I'm making a sound (a midi shift register) where I'm recording a midi note (!KeyNumber), storing it for a while in an array and then outputing it again using MidiOutputEvent.
But the notes are coming out weird. MidiOutputEvent seems to be sending pitchbend to my synth. If I play a few notes in when they get played back they don't sound the same and if I hold down a key on the keyboard (kurzweil pc3x) while these midi events are coming out of kyma I can hear it changing the note I'm holding, as if it's sending pitchbend. I've got MPE turned off in kyma's midi settings.
Here's the shift register implemented in the value parameter of an STGC which generates the !NoteOut event:
| shiftRegister pos |
shiftRegister := EventVariable new size: 8.
pos := EventVariable new initialValue: 0.
(!KeyDown true: (shiftRegister @< pos) <+ (!KeyNumber rounded) false: nil),
(!Gate true: pos <+ ((pos + 1) mod: 8) false: nil),
(!Gate evaluate: shiftRegister @< pos).
Here's the MidiOutputEvent:
I've added "rounded" messages to see if that would make a difference but it doesn't.
Here's the Sound.
I'm also getting similar bending behaviour from one of the Sounds in the kyma library, "One key in -> flurry of Pentatonic MIDI out"
I'm not sure if I'm doing something wrong or not.