What's new

Different release groups for Sustain Pedal on/off


Noob in frenzy loop
Greetings KSP:ers.

I have an issue with release samples. My need is to have different release groups triggered based on wether or not the sustain pedal was pressed, at the time of the release.

Prelude: Note-off events are triggered upon the release of a note, the release of a key. But in the case of the sustain pedal being pressed down the note-off event is delayed until the sustain pedal gets released (going from pressed down to up, or a Midi CC64 message of 0-63. My instrument has 2 sets of recordings. One set for sustained notes with the sustain pedal off and one more set for when the pedal is pressed down/on.

So, I have one group of release samples that correspond to the sustained notes with the sustain pedal off. But then I want to trigger a different group of release samples for the sustained notes with the sustain pedal active, or the CC64 at 64-127.

Now, the groups of release samples cannot be used for both sustain pedal on samples and for sustain pedal off samples. As I mentioned before, these are different recordings with vastly different lengths. So, the release volumes at the time of the note-off message will produce either a too low or to high volume.

Notes need to be tied to their corresponding cc64 value at the time of the note-on event. Otherwise the note-off event will trigger both groups, I think.

I thought that I could just simply include 2 groups of release samples, then just set one to trigger at CC64 = 0-63, then the other to trigger at CC64 = 64-127. But that was not the case. And why should it be? The value of Midi CC64 is always at 0 when the sustain pedal is released. That´s kind of what the whole deal is. To take the CC value from above 64 to below 63. To 0 in fact.

So the CC64 base value for triggering release groups seems impossible in Kontakt, without some scripting.

One way is to use disallow/allow groups, but that will not work because of the fact that one individual note could be triggered without the sustain pedal pressed, making that individual note correspond to the “pedal off” release group. Then right after, the pedal is pressed down. Now another note will be triggered from the “pedal on” set of sustained note, that is going to have to play a release note from the “pedal on” release group. How do I do that?

How do I tie 2 groups together, one sustained notes group (note-on), and one release group (note-off) ??

Some KSP components I think it will include:
- set_event_mark (event groups, could be used to group sustained/release samples?)

Similar threads and stuff (or with common denominators):

My own recent thread on this (trying to clarify more in this one):

Thanks for any help.


Noob in frenzy loop
Thread starter
  • Thread Starter
  • Thread Starter
  • #4
Seems like there is a way to group events together using MARKs, and then use group allow functions through events via the "set_event_par_arr()". Will this work?

I need to allow specific events, not groups, based on where and how they are triggered.
Top Bottom