What's new

Midi transpose and scripting

mbietenholz

New Member
Is there a way for a script to know the setting of the Kontakt instrument "Midi transpose" slider?

I would have expected the "Midi transpose" slider to affect the EVENT_NOTE,
but it doesn't seem to. Which means that NKIs which have a
script whose actions depend on the $EVENT_NOTE will act differently when
the transposed with the "Midi transpose" knob.

For example, imagine you have an instrument where the lowest
note on a 88-key (A -1) keyboard plays a loop, and the group
is programmed to have a long decay when the key is released.
Sometimes you might want to end the loop abruptly, so you script
the key above that (Bb -1) to stop the any scriptloop instantly, without the long decay.
Now someone with a 3-octave keyboard could use the Midi transpose slider
to so that their low C key plays the loop, but the "stop it instantly"
key would not be available to them, as it will not transpose upwards
like the "play the loop" key.
 
I could script my own transpose slider, I was more worried that if an NKI user starts using the
MIDI transpose slider, the scripted instrument can break. I guess the deal is be aware that the
MIDI transpose slider only transposes the rest of the NKI (e.g sample mapping etc), but not any scripted behavior. Which probably means that its a bit dangerous to use the MIDI transpose slider on any scripted instrument where $EVENT_NOTE is used in the script.
 
Not really. You just do change_note() in the very first script slot, then the other slots should be working just fine. The only possible case where things would "break" is if you change the amount of transpose while holding keys, before releasing them, because that would mismatch note ons and note offs.
 
Last edited:
I meant that if the user starts fiddling with the Kontakt-instrument MIDI transpose slider (not a scripted one) it can mess up scripted things. As a script writer, if you're using EVENT_NOTE in your script, all you can do is warn your users that if they start messing with the Kontakt-instrument MIDI transpose, things may go funny.
 
Top Bottom