Putting notes into BWS by script

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi!

Made a script for my Novation Mini that works fine for controlling the DAW (stepsequencing, mixing, instrument-tweaking, launching and so on)

Now I need to “manipulate” incoming notes, specifically: collect them to an array when keys are pressed, not passing them through, but “collecting” them (as chords) and assigning those to some (simultaneously held and released when all “chord-notes” are played) key below a split, to play them back when same key is hit again. So, basically I use the “pressed” -state (144) of keys below split as a “begin storing” -command and the release (127) for same as “stop storing” -command, which makes it a breeze to catch inspiring chord progressions on the fly.

Everything works perfect, with only one problem: when “playing back” the notes (chords) stored in the arrays for each key, the instrument on the track plays those correctly on instrument on track, only, they do not get recorded (to the Bitwig track/clip).

My approach is to filter out everything with the createNoteInput() by setting second parameter blank (this stops the onMidi() -eventprocedure from passing the notes directly through to the track) and then “programmatically” passing the “stored” notes with the cursorTrack.sendMidi() instead when the key is hit again.

As said everything works fine (chords are stored and plays back on the instrument on cursorTrack), only they are not recorded on track.

I should mention that I tried both settings (true/false) for shouldConsumeEvents on the note input, but none gives me the wanted result.

I am relying on api v.1 as I’d otherwise need to refactor entire script.

Any help?

Post Reply

Return to “Controller Scripting”