/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3714 by schoenebeck, Fri Jan 3 12:35:20 2020 UTC revision 3715 by schoenebeck, Sun Jan 12 17:07:34 2020 UTC
# Line 980  namespace LinuxSampler { Line 980  namespace LinuxSampler {
980              (unit) ?              (unit) ?
981                  true : // imply 'final' value if unit type is used                  true : // imply 'final' value if unit type is used
982                  args->arg(1)->asNumber()->isFinal();                  args->arg(1)->asNumber()->isFinal();
983          if (!unit && cutoff > VM_FILTER_PAR_MAX_VALUE) {          // note: intentionally not checking against a max. value here if no unit!
984              wrnMsg("change_cutoff(): argument 2 may not be larger than " strfy(VM_FILTER_PAR_MAX_VALUE));          // (to allow i.e. passing 2000000 for doubling cutoff frequency)
985              cutoff = VM_FILTER_PAR_MAX_VALUE;          if (unit && cutoff > VM_FILTER_PAR_MAX_HZ) {
         } else if (unit && cutoff > VM_FILTER_PAR_MAX_HZ) {  
986              wrnMsg("change_cutoff(): argument 2 may not be larger than " strfy(VM_FILTER_PAR_MAX_HZ) " Hz");              wrnMsg("change_cutoff(): argument 2 may not be larger than " strfy(VM_FILTER_PAR_MAX_HZ) " Hz");
987              cutoff = VM_FILTER_PAR_MAX_HZ;              cutoff = VM_FILTER_PAR_MAX_HZ;
988          } else if (cutoff < 0) {          } else if (cutoff < 0) {
# Line 1080  namespace LinuxSampler { Line 1079  namespace LinuxSampler {
1079      VMFnResult* InstrumentScriptVMFunction_change_reso::exec(VMFnArgs* args) {      VMFnResult* InstrumentScriptVMFunction_change_reso::exec(VMFnArgs* args) {
1080          vmint resonance = args->arg(1)->asInt()->evalInt();          vmint resonance = args->arg(1)->asInt()->evalInt();
1081          bool isFinal    = args->arg(1)->asInt()->isFinal();          bool isFinal    = args->arg(1)->asInt()->isFinal();
1082          if (resonance > VM_FILTER_PAR_MAX_VALUE) {          // note: intentionally not checking against a max. value here!
1083              wrnMsg("change_reso(): argument 2 may not be larger than 1000000");          // (to allow i.e. passing 2000000 for doubling the resonance)
1084              resonance = VM_FILTER_PAR_MAX_VALUE;          if (resonance < 0) {
         } else if (resonance < 0) {  
1085              wrnMsg("change_reso(): argument 2 may not be negative");              wrnMsg("change_reso(): argument 2 may not be negative");
1086              resonance = 0;              resonance = 0;
1087          }          }
# Line 1809  namespace LinuxSampler { Line 1807  namespace LinuxSampler {
1807                      &NoteBase::_Override::AmpLFODepth,                      &NoteBase::_Override::AmpLFODepth,
1808                      Event::synth_param_amp_lfo_depth,                      Event::synth_param_amp_lfo_depth,
1809                      /* if value passed without unit */                      /* if value passed without unit */
1810                      0, 1000000, true,                      0, NO_LIMIT, true,
1811                      /* not used (since this function does not accept unit) */                      /* not used (since this function does not accept unit) */
1812                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_amp_lfo_depth" );                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_amp_lfo_depth" );
1813      }      }
# Line 1822  namespace LinuxSampler { Line 1820  namespace LinuxSampler {
1820                      &NoteBase::_Override::AmpLFOFreq,                      &NoteBase::_Override::AmpLFOFreq,
1821                      Event::synth_param_amp_lfo_freq,                      Event::synth_param_amp_lfo_freq,
1822                      /* if value passed without unit */                      /* if value passed without unit */
1823                      0, 1000000, true,                      0, NO_LIMIT, true,
1824                      /* if value passed with 'Hz' unit */                      /* if value passed with 'Hz' unit */
1825                      0, 30000, VM_NO_PREFIX>( args, "change_amp_lfo_freq" );                      0, 30000, VM_NO_PREFIX>( args, "change_amp_lfo_freq" );
1826      }      }
# Line 1835  namespace LinuxSampler { Line 1833  namespace LinuxSampler {
1833                      &NoteBase::_Override::CutoffLFODepth,                      &NoteBase::_Override::CutoffLFODepth,
1834                      Event::synth_param_cutoff_lfo_depth,                      Event::synth_param_cutoff_lfo_depth,
1835                      /* if value passed without unit */                      /* if value passed without unit */
1836                      0, 1000000, true,                      0, NO_LIMIT, true,
1837                      /* not used (since this function does not accept unit) */                      /* not used (since this function does not accept unit) */
1838                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_cutoff_lfo_depth" );                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_cutoff_lfo_depth" );
1839      }      }
# Line 1848  namespace LinuxSampler { Line 1846  namespace LinuxSampler {
1846                      &NoteBase::_Override::CutoffLFOFreq,                      &NoteBase::_Override::CutoffLFOFreq,
1847                      Event::synth_param_cutoff_lfo_freq,                      Event::synth_param_cutoff_lfo_freq,
1848                      /* if value passed without unit */                      /* if value passed without unit */
1849                      0, 1000000, true,                      0, NO_LIMIT, true,
1850                      /* if value passed with 'Hz' unit */                      /* if value passed with 'Hz' unit */
1851                      0, 30000, VM_NO_PREFIX>( args, "change_cutoff_lfo_freq" );                      0, 30000, VM_NO_PREFIX>( args, "change_cutoff_lfo_freq" );
1852      }      }
# Line 1861  namespace LinuxSampler { Line 1859  namespace LinuxSampler {
1859                      &NoteBase::_Override::PitchLFODepth,                      &NoteBase::_Override::PitchLFODepth,
1860                      Event::synth_param_pitch_lfo_depth,                      Event::synth_param_pitch_lfo_depth,
1861                      /* if value passed without unit */                      /* if value passed without unit */
1862                      0, 1000000, true,                      0, NO_LIMIT, true,
1863                      /* not used (since this function does not accept unit) */                      /* not used (since this function does not accept unit) */
1864                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_pitch_lfo_depth" );                      NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_pitch_lfo_depth" );
1865      }      }
# Line 1874  namespace LinuxSampler { Line 1872  namespace LinuxSampler {
1872                      &NoteBase::_Override::PitchLFOFreq,                      &NoteBase::_Override::PitchLFOFreq,
1873                      Event::synth_param_pitch_lfo_freq,                      Event::synth_param_pitch_lfo_freq,
1874                      /* if value passed without unit */                      /* if value passed without unit */
1875                      0, 1000000, true,                      0, NO_LIMIT, true,
1876                      /* if value passed with 'Hz' unit */                      /* if value passed with 'Hz' unit */
1877                      0, 30000, VM_NO_PREFIX>( args, "change_pitch_lfo_freq" );                      0, 30000, VM_NO_PREFIX>( args, "change_pitch_lfo_freq" );
1878      }      }

Legend:
Removed from v.3714  
changed lines
  Added in v.3715

  ViewVC Help
Powered by ViewVC