It should work, but you have a typo in note_off() command there.
Yes, thanks. To all who reads the code: My code above was a guide or a "notation" style code. It´s not correct, just noting my idea. Will refrain from doing that in the future, could potentially ruin someone´s hour
.
Also, it actually might not work if internal release trigger script is being used, but I did not verify this.
You´re probably right about that, but the
note_off is the key, if it at all handles
change_vol. I have actually never seen it in any script. Only with
play_note. If
note_off and
change_vol can in fact be used together, it´s a strange thing that it´s never in use, it would be a very very useful combo.
With the internal release triggering functionality intact, using
MARKS to enter
on note events into groups (if
cc64 was
on, the pedal activates another group with longer recordings, requiring
later/postponed note_off events for these). Then releasing them is possible by
MARKS (
using internal release script too) and activating release groups separately with key-switches, before using
note_off(by_marks($MARK_X)). Like so:
Code:
on release
{ key-switches for release groups (using internal Kontakt rel triggering) }
{ KS1: MARK_X - "NOTES_ON_POFF", original notes played, before the "ignore_event" on note. }
{ KS2: MARK_Y - "NOTES_ON_PON", notes played while cc64/pedal is on, shorter samples }
play_note(24,100,0,10) { PLAY KEY-SWITCH, turning on first group, for pedal off release }
note_off(by_marks($MARK_X))
///// here we want to change_vol for events in MARK_X ... but it doesn´t work.
wait(800)
play_note(26,100,0,20) { PLAY KEY-SWITCH, turning on second group, for pedal on release }
note_off(by_marks($MARK_Y))
///// here we want to change_vol for events in MARK_Y ...
end on
For this script, I am using separated release groups for time-bases with (t/ms setting in group editor), instead of a custom formula for time and velocity changes.
If indeed you cannot use
change_vol to change a
note_off event, without disabling kontakt´s own release trigger script, the whole concept falls short. Because
note_off can´t be used to trigger a release sample anymore, right? If kontakt´s internal release is off, groups do not trigger "on release" by default.
I guess you could use it, if only to trigger a
new play_note +
change_vol. But that annuls the issue and requires a more complex custom release script.