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 |
} |
} |
1215 |
attack = 0; |
attack = 0; |
1216 |
} |
} |
1217 |
const float fAttack = |
const float fAttack = |
1218 |
(unit) ? attack : float(attack) / float(VM_EG_PAR_MAX_VALUE); |
(unit) ? |
1219 |
|
float(attack) / 1000000.f /* us -> s */ : |
1220 |
|
float(attack) / float(VM_EG_PAR_MAX_VALUE); |
1221 |
|
|
1222 |
AbstractEngineChannel* pEngineChannel = |
AbstractEngineChannel* pEngineChannel = |
1223 |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
1347 |
decay = 0; |
decay = 0; |
1348 |
} |
} |
1349 |
const float fDecay = |
const float fDecay = |
1350 |
(unit) ? decay : float(decay) / float(VM_EG_PAR_MAX_VALUE); |
(unit) ? |
1351 |
|
float(decay) / 1000000.f /* us -> s */ : |
1352 |
|
float(decay) / float(VM_EG_PAR_MAX_VALUE); |
1353 |
|
|
1354 |
AbstractEngineChannel* pEngineChannel = |
AbstractEngineChannel* pEngineChannel = |
1355 |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
1479 |
release = 0; |
release = 0; |
1480 |
} |
} |
1481 |
const float fRelease = |
const float fRelease = |
1482 |
(unit) ? release : float(release) / float(VM_EG_PAR_MAX_VALUE); |
(unit) ? |
1483 |
|
float(release) / 1000000.f /* us -> s */ : |
1484 |
|
float(release) / float(VM_EG_PAR_MAX_VALUE); |
1485 |
|
|
1486 |
AbstractEngineChannel* pEngineChannel = |
AbstractEngineChannel* pEngineChannel = |
1487 |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
static_cast<AbstractEngineChannel*>(m_vm->m_event->cause.pEngineChannel); |
1813 |
&NoteBase::_Override::AmpLFODepth, |
&NoteBase::_Override::AmpLFODepth, |
1814 |
Event::synth_param_amp_lfo_depth, |
Event::synth_param_amp_lfo_depth, |
1815 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1816 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1817 |
/* not used (since this function does not accept unit) */ |
/* not used (since this function does not accept unit) */ |
1818 |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_amp_lfo_depth" ); |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_amp_lfo_depth" ); |
1819 |
} |
} |
1826 |
&NoteBase::_Override::AmpLFOFreq, |
&NoteBase::_Override::AmpLFOFreq, |
1827 |
Event::synth_param_amp_lfo_freq, |
Event::synth_param_amp_lfo_freq, |
1828 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1829 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1830 |
/* if value passed with 'Hz' unit */ |
/* if value passed with 'Hz' unit */ |
1831 |
0, 30000, VM_NO_PREFIX>( args, "change_amp_lfo_freq" ); |
0, 30000, VM_NO_PREFIX>( args, "change_amp_lfo_freq" ); |
1832 |
} |
} |
1839 |
&NoteBase::_Override::CutoffLFODepth, |
&NoteBase::_Override::CutoffLFODepth, |
1840 |
Event::synth_param_cutoff_lfo_depth, |
Event::synth_param_cutoff_lfo_depth, |
1841 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1842 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1843 |
/* not used (since this function does not accept unit) */ |
/* not used (since this function does not accept unit) */ |
1844 |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_cutoff_lfo_depth" ); |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_cutoff_lfo_depth" ); |
1845 |
} |
} |
1852 |
&NoteBase::_Override::CutoffLFOFreq, |
&NoteBase::_Override::CutoffLFOFreq, |
1853 |
Event::synth_param_cutoff_lfo_freq, |
Event::synth_param_cutoff_lfo_freq, |
1854 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1855 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1856 |
/* if value passed with 'Hz' unit */ |
/* if value passed with 'Hz' unit */ |
1857 |
0, 30000, VM_NO_PREFIX>( args, "change_cutoff_lfo_freq" ); |
0, 30000, VM_NO_PREFIX>( args, "change_cutoff_lfo_freq" ); |
1858 |
} |
} |
1865 |
&NoteBase::_Override::PitchLFODepth, |
&NoteBase::_Override::PitchLFODepth, |
1866 |
Event::synth_param_pitch_lfo_depth, |
Event::synth_param_pitch_lfo_depth, |
1867 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1868 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1869 |
/* not used (since this function does not accept unit) */ |
/* not used (since this function does not accept unit) */ |
1870 |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_pitch_lfo_depth" ); |
NO_LIMIT, NO_LIMIT, VM_NO_PREFIX>( args, "change_pitch_lfo_depth" ); |
1871 |
} |
} |
1878 |
&NoteBase::_Override::PitchLFOFreq, |
&NoteBase::_Override::PitchLFOFreq, |
1879 |
Event::synth_param_pitch_lfo_freq, |
Event::synth_param_pitch_lfo_freq, |
1880 |
/* if value passed without unit */ |
/* if value passed without unit */ |
1881 |
0, 1000000, true, |
0, NO_LIMIT, true, |
1882 |
/* if value passed with 'Hz' unit */ |
/* if value passed with 'Hz' unit */ |
1883 |
0, 30000, VM_NO_PREFIX>( args, "change_pitch_lfo_freq" ); |
0, 30000, VM_NO_PREFIX>( args, "change_pitch_lfo_freq" ); |
1884 |
} |
} |