Send on and off note on variation callback

Hello, what would be a simple way of programming a note sent from a MidiOutBlock on activation of a variation and the corresponding note off a) on variation deactivation and b) after waiting a set amount of time? I now this is pretty basic but as some things only work from the workspace script and some only work in scriplet, I can’t figure it out. Thanks!

With a widget which does not ignore variations you can send out a note on message to a midi out block
And in the next variation you can send out the note off message for the sent note in the previous variation.

So in each variation you send out a note on and a note off message,
This should work fine when you onl switch to the next variation and never switch back.

Another more elegant way is to use SetList Mode
In this Mode you can send out midi messages when the Song Part is selected.

So the trick is to send out a pair use useful Note On/Note Off Messages

Thank you! The option in setlist mode sounds very elegant of course.

Considering I would do this as a scriptlet - what code would you propose?

In a scriptlet you cannot detect variation changes.

And what about a rackspace script? I can of course figure out the on variation sendnow(). But you can’t do a sendlater() in a rackspace script, can you?

SendLater(<p : MidiInBlock>, <m : midiMessage>, <delayInMS : double>)

1 Like