What's new

Is there a way to read MIDI note-off velocity in KSP ?

Fredeke

Active Member
It's all in the title, but let me elaborate just in case.

You know how some fancy keyboards have release velocity - that is, they are sensitive to how fast you release a key? It's in the MIDI specifications, and it can be simulated in a MIDI sequencer (like Reaper's ;)) too.

I was wondering if there is a way of reading that in KSP, in order to end the note with a fade of proportional duration?

All I know is that EVENT_VELOCITY always returns the note-on velocity, even in the release call back (which makes sense from an architecture point of view, but doesn't help me)
 
Last edited:
OP
Fredeke

Fredeke

Active Member
Damn.

But I see release velocity is available as an envelope modulator (not in KSP, but in the GUI). So maybe I can do something with that...
 

EvilDragon

KSP Wizard
If you want to affect envelope parameters with release velocity, don't bother. Envelopes are pre-calculated at note-on only, which means that any release velocity modulation will be delayed by one note, always. :/
 
OP
Fredeke

Fredeke

Active Member
Yes, I've just tried that, and indeed the modulation is always one note late - however, maybe not for the reason you say: You see, when I manually turn the release knob while a note is playing, the change still affects the current note. So I'm thinking, since the modulation happens at the same time the release stage is started, maybe it only comes in a few microseconds too late.

So I've tried this :

on release
ignore_event (EVENT_ID)
wait (1000)
note_off (EVENT_ID)

But now release velocity gets ignored altogether !?

Anyway it was just supposed to be a "luxury feature" - I'm not spending more time on this.
 
Last edited:
Top Bottom