setStep and NoteStep

Post Reply New Topic
RELATED
PRODUCTS

Post

I am generating clips for Bitwig using Javascript API. When making only notes with pitch, startpoint and duration it works fine, like: "setStep(channel, startp, pitch, velocity,duration"

However, I would like to enchance these notes with note-expression (timbre, pressure etc). "NoteStep" seems to be the way to go. Not sure if I'm doing it properly (it seems that setStep is called first, then getStep to get the handle to note and then setPressure etc.)

Code: Select all

            myclip.setStep(channel,startpos,pitch,velocity,duration);	
               mynote = myclip.getStep(channel,startpos,pitch)
               mynote.setPressure(0.4);
Do you think above is correct?

Post

Hey did you get that working? i'm looking to do the same here and its unclear to me.

just tried your suggestion... seemed to work! Thanks for the snippit! Here is a Java version for fun...

Code: Select all

cursor_clip.setStep(midi_channel, note_x, note_y, 127, 0.25);
NoteStep note_step = cursor_clip.getStep(midi_channel,note_x,note_y);
note_step.setPressure(Math.random());
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”