Controlling Plaback Through a PlugIn

• May 3, 2021 - 02:37

I would like to be able to do the following through a plugin:
1) Start playback
2) Stop and pause playback
3) Set the Start and end notes (or measure) for playback
4) Set loop start and end notes and set loop mode on for playback

Are these things possible? If so, some pointers as to where to start (or even sample code) would be appreciated.



I think, something could be done, but probably needs some "hacks".

There is a comand cmd("play"), which does same, as click play button in UI. (play and stop)
(List of available commands is here… )

To start from specific note, you need to select it first. (It should be possible by plugin API)

To stop on specific position, you need to "read" actual position. Not sure, if this is possible, i guess, it is not.
May be with some combinantion with cursor input state mode "INPUT_STATE_SYNC_WITH_SCORE" it could be possible? I dont know.

In reply to by sammik

Attached is a basic plugin file that will perform a play back action on the selected region of the current score by copying the selection into a specially created Temp score and then playing that score. It assumes that the Temp score contents are shorter than or equal to the pasted contents (if the Temp score has already been created it is reused for subsequent playbacks)

The code will 'increment' the selection in the originating score after the copy has been done.

Attachment Size
Playback V7.qml 5.35 KB

Do you still have an unanswered question? Please log in first to post your question.