386 |
|
|
387 |
// if change_vol() was called immediately after note was triggered |
// if change_vol() was called immediately after note was triggered |
388 |
// then immediately apply the volume to note object |
// then immediately apply the volume to note object |
389 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
390 |
if (relative) |
if (relative) |
391 |
pNote->Override.Volume *= fVolumeLin; |
pNote->Override.Volume *= fVolumeLin; |
392 |
else |
else |
413 |
|
|
414 |
// if change_vol() was called immediately after note was triggered |
// if change_vol() was called immediately after note was triggered |
415 |
// then immediately apply the volume to Note object |
// then immediately apply the volume to Note object |
416 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
417 |
if (relative) |
if (relative) |
418 |
pNote->Override.Volume *= fVolumeLin; |
pNote->Override.Volume *= fVolumeLin; |
419 |
else |
else |
473 |
|
|
474 |
// if change_tune() was called immediately after note was triggered |
// if change_tune() was called immediately after note was triggered |
475 |
// then immediately apply the tuning to Note object |
// then immediately apply the tuning to Note object |
476 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
477 |
if (relative) |
if (relative) |
478 |
pNote->Override.Pitch *= fFreqRatio; |
pNote->Override.Pitch *= fFreqRatio; |
479 |
else |
else |
500 |
|
|
501 |
// if change_tune() was called immediately after note was triggered |
// if change_tune() was called immediately after note was triggered |
502 |
// then immediately apply the tuning to Note object |
// then immediately apply the tuning to Note object |
503 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
504 |
if (relative) |
if (relative) |
505 |
pNote->Override.Pitch *= fFreqRatio; |
pNote->Override.Pitch *= fFreqRatio; |
506 |
else |
else |
568 |
|
|
569 |
// if change_pan() was called immediately after note was triggered |
// if change_pan() was called immediately after note was triggered |
570 |
// then immediately apply the panning to Note object |
// then immediately apply the panning to Note object |
571 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
572 |
if (relative) { |
if (relative) { |
573 |
pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, fPan, ++pNote->Override.PanSources); |
pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, fPan, ++pNote->Override.PanSources); |
574 |
} else { |
} else { |
597 |
|
|
598 |
// if change_pan() was called immediately after note was triggered |
// if change_pan() was called immediately after note was triggered |
599 |
// then immediately apply the panning to Note object |
// then immediately apply the panning to Note object |
600 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
601 |
if (relative) { |
if (relative) { |
602 |
pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, fPan, ++pNote->Override.PanSources); |
pNote->Override.Pan = RTMath::RelativeSummedAvg(pNote->Override.Pan, fPan, ++pNote->Override.PanSources); |
603 |
} else { |
} else { |
668 |
|
|
669 |
// if change_cutoff() was called immediately after note was triggered |
// if change_cutoff() was called immediately after note was triggered |
670 |
// then immediately apply cutoff to Note object |
// then immediately apply cutoff to Note object |
671 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
672 |
pNote->Override.Cutoff = fCutoff; |
pNote->Override.Cutoff = fCutoff; |
673 |
} else { // otherwise schedule cutoff change ... |
} else { // otherwise schedule cutoff change ... |
674 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
692 |
|
|
693 |
// if change_cutoff() was called immediately after note was triggered |
// if change_cutoff() was called immediately after note was triggered |
694 |
// then immediately apply cutoff to Note object |
// then immediately apply cutoff to Note object |
695 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
696 |
pNote->Override.Cutoff = fCutoff; |
pNote->Override.Cutoff = fCutoff; |
697 |
} else { // otherwise schedule cutoff change ... |
} else { // otherwise schedule cutoff change ... |
698 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
755 |
|
|
756 |
// if change_reso() was called immediately after note was triggered |
// if change_reso() was called immediately after note was triggered |
757 |
// then immediately apply resonance to Note object |
// then immediately apply resonance to Note object |
758 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
759 |
pNote->Override.Resonance = fResonance; |
pNote->Override.Resonance = fResonance; |
760 |
} else { // otherwise schedule resonance change ... |
} else { // otherwise schedule resonance change ... |
761 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
779 |
|
|
780 |
// if change_reso() was called immediately after note was triggered |
// if change_reso() was called immediately after note was triggered |
781 |
// then immediately apply resonance to Note object |
// then immediately apply resonance to Note object |
782 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
783 |
pNote->Override.Resonance = fResonance; |
pNote->Override.Resonance = fResonance; |
784 |
} else { // otherwise schedule resonance change ... |
} else { // otherwise schedule resonance change ... |
785 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
842 |
|
|
843 |
// if change_attack() was called immediately after note was triggered |
// if change_attack() was called immediately after note was triggered |
844 |
// then immediately apply attack to Note object |
// then immediately apply attack to Note object |
845 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
846 |
pNote->Override.Attack = fAttack; |
pNote->Override.Attack = fAttack; |
847 |
} else { // otherwise schedule attack change ... |
} else { // otherwise schedule attack change ... |
848 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
866 |
|
|
867 |
// if change_attack() was called immediately after note was triggered |
// if change_attack() was called immediately after note was triggered |
868 |
// then immediately apply attack to Note object |
// then immediately apply attack to Note object |
869 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
870 |
pNote->Override.Attack = fAttack; |
pNote->Override.Attack = fAttack; |
871 |
} else { // otherwise schedule attack change ... |
} else { // otherwise schedule attack change ... |
872 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
929 |
|
|
930 |
// if change_decay() was called immediately after note was triggered |
// if change_decay() was called immediately after note was triggered |
931 |
// then immediately apply decay to Note object |
// then immediately apply decay to Note object |
932 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
933 |
pNote->Override.Decay = fDecay; |
pNote->Override.Decay = fDecay; |
934 |
} else { // otherwise schedule decay change ... |
} else { // otherwise schedule decay change ... |
935 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
953 |
|
|
954 |
// if change_decay() was called immediately after note was triggered |
// if change_decay() was called immediately after note was triggered |
955 |
// then immediately apply decay to Note object |
// then immediately apply decay to Note object |
956 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
957 |
pNote->Override.Decay = fDecay; |
pNote->Override.Decay = fDecay; |
958 |
} else { // otherwise schedule decay change ... |
} else { // otherwise schedule decay change ... |
959 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1016 |
|
|
1017 |
// if change_release() was called immediately after note was triggered |
// if change_release() was called immediately after note was triggered |
1018 |
// then immediately apply relase to Note object |
// then immediately apply relase to Note object |
1019 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1020 |
pNote->Override.Release = fRelease; |
pNote->Override.Release = fRelease; |
1021 |
} else { // otherwise schedule release change ... |
} else { // otherwise schedule release change ... |
1022 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1040 |
|
|
1041 |
// if change_release() was called immediately after note was triggered |
// if change_release() was called immediately after note was triggered |
1042 |
// then immediately apply relase to Note object |
// then immediately apply relase to Note object |
1043 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1044 |
pNote->Override.Release = fRelease; |
pNote->Override.Release = fRelease; |
1045 |
} else { // otherwise schedule release change ... |
} else { // otherwise schedule release change ... |
1046 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1107 |
// if this change_*() script function was called immediately after |
// if this change_*() script function was called immediately after |
1108 |
// note was triggered then immediately apply the synth parameter |
// note was triggered then immediately apply the synth parameter |
1109 |
// change to Note object |
// change to Note object |
1110 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1111 |
pNote->Override.*T_noteParam = fValue; |
pNote->Override.*T_noteParam = fValue; |
1112 |
} else { // otherwise schedule this synth parameter change ... |
} else { // otherwise schedule this synth parameter change ... |
1113 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1132 |
// if this change_*() script function was called immediately after |
// if this change_*() script function was called immediately after |
1133 |
// note was triggered then immediately apply the synth parameter |
// note was triggered then immediately apply the synth parameter |
1134 |
// change to Note object |
// change to Note object |
1135 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1136 |
pNote->Override.*T_noteParam = fValue; |
pNote->Override.*T_noteParam = fValue; |
1137 |
} else { // otherwise schedule this synth parameter change ... |
} else { // otherwise schedule this synth parameter change ... |
1138 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1247 |
// if fade_in() was called immediately after note was triggered |
// if fade_in() was called immediately after note was triggered |
1248 |
// then immediately apply a start volume of zero to Note object, |
// then immediately apply a start volume of zero to Note object, |
1249 |
// as well as the fade in duration |
// as well as the fade in duration |
1250 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1251 |
pNote->Override.Volume = 0.f; |
pNote->Override.Volume = 0.f; |
1252 |
pNote->Override.VolumeTime = fDuration; |
pNote->Override.VolumeTime = fDuration; |
1253 |
} else { // otherwise schedule a "volume time" change with the requested fade in duration ... |
} else { // otherwise schedule a "volume time" change with the requested fade in duration ... |
1289 |
// if fade_in() was called immediately after note was triggered |
// if fade_in() was called immediately after note was triggered |
1290 |
// then immediately apply a start volume of zero to Note object, |
// then immediately apply a start volume of zero to Note object, |
1291 |
// as well as the fade in duration |
// as well as the fade in duration |
1292 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1293 |
pNote->Override.Volume = 0.f; |
pNote->Override.Volume = 0.f; |
1294 |
pNote->Override.VolumeTime = fDuration; |
pNote->Override.VolumeTime = fDuration; |
1295 |
} else { // otherwise schedule a "volume time" change with the requested fade in duration ... |
} else { // otherwise schedule a "volume time" change with the requested fade in duration ... |
1368 |
|
|
1369 |
// if fade_out() was called immediately after note was triggered |
// if fade_out() was called immediately after note was triggered |
1370 |
// then immediately apply fade out duration to Note object |
// then immediately apply fade out duration to Note object |
1371 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1372 |
pNote->Override.VolumeTime = fDuration; |
pNote->Override.VolumeTime = fDuration; |
1373 |
} else { // otherwise schedule a "volume time" change with the requested fade out duration ... |
} else { // otherwise schedule a "volume time" change with the requested fade out duration ... |
1374 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1420 |
|
|
1421 |
// if fade_out() was called immediately after note was triggered |
// if fade_out() was called immediately after note was triggered |
1422 |
// then immediately apply fade out duration to Note object |
// then immediately apply fade out duration to Note object |
1423 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) { |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) { |
1424 |
pNote->Override.VolumeTime = fDuration; |
pNote->Override.VolumeTime = fDuration; |
1425 |
} else { // otherwise schedule a "volume time" change with the requested fade out duration ... |
} else { // otherwise schedule a "volume time" change with the requested fade out duration ... |
1426 |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
Event e = m_vm->m_event->cause; // copy to get fragment time for "now" |
1555 |
wrnMsg("set_event_par(): note number of argument 3 is out of range"); |
wrnMsg("set_event_par(): note number of argument 3 is out of range"); |
1556 |
return successResult(); |
return successResult(); |
1557 |
} |
} |
1558 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) |
1559 |
pNote->cause.Param.Note.Key = value; |
pNote->cause.Param.Note.Key = value; |
1560 |
else |
else |
1561 |
wrnMsg("set_event_par(): note number can only be changed when note is new"); |
wrnMsg("set_event_par(): note number can only be changed when note is new"); |
1565 |
wrnMsg("set_event_par(): velocity of argument 3 is out of range"); |
wrnMsg("set_event_par(): velocity of argument 3 is out of range"); |
1566 |
return successResult(); |
return successResult(); |
1567 |
} |
} |
1568 |
if (m_vm->m_event->cause.SchedTime() == pNote->triggerSchedTime) |
if (m_vm->m_event->scheduleTime == pNote->triggerSchedTime) |
1569 |
pNote->cause.Param.Note.Velocity = value; |
pNote->cause.Param.Note.Velocity = value; |
1570 |
else |
else |
1571 |
wrnMsg("set_event_par(): velocity can only be changed when note is new"); |
wrnMsg("set_event_par(): velocity can only be changed when note is new"); |
1659 |
(args->argsCount() >= 2) ? (args->arg(1)->asInt()->evalInt() == 1) : false; |
(args->argsCount() >= 2) ? (args->arg(1)->asInt()->evalInt() == 1) : false; |
1660 |
|
|
1661 |
pEngineChannel->ScheduleResumeOfScriptCallback( |
pEngineChannel->ScheduleResumeOfScriptCallback( |
1662 |
itCallback, m_vm->m_event->cause.SchedTime(), disableWaitForever |
itCallback, m_vm->m_event->scheduleTime, disableWaitForever |
1663 |
); |
); |
1664 |
|
|
1665 |
return successResult(); |
return successResult(); |