StreamDeck with VSTLive - examples

Hi mates!

here is my script for controlling Play/Stop/RTZ using
Trevliga Spel’s MIDI plugin with custom script. Didn’t spend time for the MIDI variables to the heading, but all is clean. In this script: I’m listening if the button is pressed longer, and when reaching 800msec, it will currently fire on Ch1, NoteOn 95, velo127 to init RTZ.
When releasing button earlier, it will simply fire Ch1, NoteOn94, velo127 to toggle Play/Stop
And in the last two to-do’s are to listen the state sent from VL and replace the button text and button picture regarding. Have fun with and can’t wait your future scripts here :slight_smile:

CODE to copy paste:

[(init)
{image:%plugin%\Images\stopped.png}
{@longpress:0}
{text:READY}

]
[(press)
{@longpress:0}
{@t_mytimer:run}
]

[(@t_mytimer:800)
{@longpress:1}
{noteon:1,95,127}
{text:RTZ}{@t_mytimer:pause}
]

[(release)
(@longpress:0)
{noteon:1,94,127}
{@t_mytimer:reset}
]

// STATEDISPL
[(noteon:1,94,127){image:%plugin%\Images\playing.png}
{text:PLAYING}
]

[(noteoff:1,94,<127)
{text:STOPPED}{image:%plugin%\Images\stopped.png}
]

1 Like

A better one, that won’t allow RTZ while PLAYING is active.
(Still 800msec timeout for short/long press)

// INIT
[(init)
{image:%plugin%\Images\stopped.png}
{@is_playing:0}
{@is_down:0}
{@hold_reached:0}
{text:READY}
]

// PRESS always measure
[(press)
{@is_down:1}
{@hold_reached:0}
{@t_mytimer:restart}
]

// longpress1 at 800ms
[(@t_mytimer:800)
(@is_down:1)
{@hold_reached:1}
{@t_mytimer:pause}
]

// rtz if stopped and longpressed
[(@t_mytimer:800)
(@is_down:1)
(@is_playing:0)
{noteon:1,95,127}
{text:RTZ}
]

// RELEASE shortpress-always
[(release)
{@is_down:0}
(@hold_reached:0)
{noteon:1,94,127}
{@t_mytimer:reset}
]

// RELEASE: longpress-reset
[(release)
{@is_down:0}
(@hold_reached:1)
{@t_mytimer:reset}
{@hold_reached:0}
]

// STATEDISPL
[(noteon:1,94,127)
{image:%plugin%\Images\playing.png}
{text:PLAYING}
{@is_playing:1}
]

[(noteoff:1,94,<127)
{text:STOPPED}
{image:%plugin%\Images\stopped.png}
{@is_playing:0}
]