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) { |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |