MIDI notes off

468 views
Skip to first unread message

micpool

unread,
Mar 9, 2021, 1:39:59 PM3/9/21
to QLab
I currently have 2 MIDI keyboards  in my studio

An Akai MPK mini and an M-Audio Keystation M88

The Akai sends Note off when a key is released

The M-Audio sends Note on velocity 0 when a key is released

I have the second trigger action set to panic

If I set a cue to trigger  with note on, velocity any

The Akai  (note off)will trigger on the note on and  will second trigger on the note off
Triggering again during the panic time is treated as a double panic and results in a hard stop.

The M-Audio (Note on vel 0) will trigger on the note on and will second trigger on the note off.
Triggering again during the panic will trigger the cue again, and then the action of the key is reversed. 

If I set the trigger to note on,  velocity  >0

The Akai  (note off) will trigger on the note on and  will do nothing on the  note off
Triggering another note on will trigger the panic

The M-Audio (Note on vel 0) will trigger on the note on and will second trigger on the note off.
Triggering again during the panic time is treated as a double panic and results in a hard stop.

How do you program QLab so that any MIDI keyboard can be used with the intended result?

Mic

PS The Midi Spec says "A receiver must be capable of recognizing either method of turning off a note, and should treat them identically."




Sam Kusnetz

unread,
Mar 9, 2021, 2:19:49 PM3/9/21
to ql...@googlegroups.com
Hi Mic

This is a shortcoming in QLab at the moment which we will address presently.

This particular ambiguity in the MIDI spec has always driven me batty. I think it’s a rare case of the flexibility that the designers strove for making things more difficult instead of less difficult.

In any case, thanks for pointing it out. We’ll change QLab so that if a cue is running, Note-on-velocity-0 and Note-off-velocity-any will be regarded as equivalent.

Best
Sam

––
Sam Kusnetz [he/him/his] (what is this?)
Figure 53
https://qlab.app | https://figure53.com

micpool

unread,
Mar 10, 2021, 3:24:47 PM3/10/21
to QLab
Thanks Sam

I've fixed it for now by using both sorts of triggers on duplicate  OSC cues with /panic  targeting the cues that had the original note off triggers in, which works well in this project

Mic

Rich Walsh

unread,
Mar 11, 2021, 7:52:59 AM3/11/21
to ql...@googlegroups.com
If it helps, I've always understood this to be about efficiency rather than flexibility: you wouldn't be able to take advantage of the bandwidth savings of "running status" if you couldn't use Note On status bytes for Note Off…

Rich

Weaselspoon

unread,
Apr 24, 2021, 12:59:06 PM4/24/21
to QLab
I've just been making a similar project and I've just hit this problem. I've got 88 cues, triggered by 88 midi notes, and using my keyboard it plays well having them panic on second trigger and checking that a lift off is a second trigger. Now someone else has tried it with a keyboard that sends velocity=0 it fails.

Is there an easy way to write a script that for every cue in the workspace generates a matching stop cue with a MIDI vellocity=0 trigger? I've numbered and named every cue as the MIDI note, so that should make things easier. I suspect that I can find it in the script for that VJ keyboard setup.

Here's my stupid video keyboard, if anyone wants to play: https://drive.google.com/file/d/1OgydViTh4NIyWb3QpCZ3hH-5-mlW4cdG/view?usp=sharing

Cheers,

Robert

Weaselspoon

unread,
Apr 24, 2021, 2:19:39 PM4/24/21
to QLab
I've done it using the fade cue script from the cookbook. Probably more clicks than necessary, but less than doing everything manually.

micpool

unread,
Apr 24, 2021, 4:19:43 PM4/24/21
to QLab
Your workspace actually only works with note on vel >0 to trigger the video and note on vel 0 to stop it.

If you have a keyboard which sends notes off you need a cue  list with a cue for each MIDI note that triggers with a note off, and sends a MIDI note on Velocity 0 via an IAC bus

You can generate the cuelist with this script

set thepatch to 1

set thech to 1

tell application id "com.figure53.QLab.4" to tell front workspace

repeat with midinote from 0 to 127

make type "midi"

set thecue to last item of (selected as list)

set the midi trigger of thecue to enabled

set the midi command of thecue to note_off

set the midi byte one of thecue to midinote

set the midi byte two of thecue to 0

set the message type of thecue to voice

set the patch of thecue to thepatch

set the channel of thecue to thech

set the command of thecue to note_on

set the byte one of thecue to midinote

set the byte two of thecue to 0

set the q name of thecue to "Trigger MIDI note " & midinote & " off to send MIDI note " & midinote & " Velocity 0 to IAC Bus"

end repeat

end tell

Screen recording and workspace attached
On Saturday, April 24, 2021 at 5:59:06 PM UTC+1 Weaselspoon wrote:
Video works with both types of off.qlab4.zip
generate note on velocity 0 from note offs.mov

Weaselspoon

unread,
Apr 25, 2021, 9:48:24 AM4/25/21
to QLab
That's really fascinating. My original workspace works fine with my keyboard that sends note off commands with velocity=127, and I assumed it was failing with devices that send note on velocity=0, however it's actually failing with note off commands with velocity=0, and your workspace definitely fixes that.

Why should note off velocity make a difference to that trigger checkbox?

Unfortunately, I'm trying to make this a workspace I can send to people who don't have any licenses (since it's just a bit of fun), so I don't want to use MIDI cues. However, it should work with a set of Start cues, such that a MIDI note off with velocity=0 triggers the original cue to start again and so panic.

I can't seem to work out the syntax to get the midinote variable to be the target number of the start cue. What am I doing wrong?

tell application id "com.figure53.QLab.4" to tell front workspace
repeat with midinote from 21 to 108
make type "start"
set thecue to last item of (selected as list)
set the midi trigger of thecue to enabled
set the midi command of thecue to note_off
set the midi byte one of thecue to midinote
set the midi byte two of thecue to 0
set the q name of thecue to "Trigger cue " & midinote & " to panic"
set the cue target of thecue to midinote
end repeat
end tell

micpool

unread,
Apr 25, 2021, 10:14:55 AM4/25/21
to QLab

The answer to your second question is easy if you were generating a cue to start cue "100", your script says set the cue  target to 100, which is not what you want.

set the cue target of thecue to cue midinote

or

set the cue target of thecue to (first cue whose q name is midinote)


Unlike generated MIDI cues or Network cues with OSC messages a cue actually has to exist before a start  cue   can target it.


(I'll look at the MIDI note on /off velocity issues in my next post)


Mic

Weaselspoon

unread,
Apr 25, 2021, 11:50:01 AM4/25/21
to QLab
Thank you Mic!

Oddly the first didn't work at all and targeted seemingly random cues, but the second worked perfectly.

You are, as ever, the best.

Robert
Message has been deleted

micpool

unread,
Apr 25, 2021, 11:59:20 AM4/25/21
to QLab
If you have second trigger set to Panic there are quite a lot of variables that determine whether any ON/OFF Pair of MIDI voice messages will successfully   start and panic a cue. These are:

The Velocity of the Note On message that the MIDI keyboard sends

The type of Voice Message which the MIDI  keyboard sends when the key is released (Note on 0,  or Note Off)

If the MIDI keyboard sends note offs, the velocity of those note off messages.

The Velocity setting of the QLab Cue Trigger (any, >0, or a specific value)

The setting of the second trigger on release checkbox in the triggers tab of the cue.

This table is a complete summary of the above in QLab version 4.6.9. e.g the first row of the table shows that is a MIDI keyboard sends a NOTE_ON with a velocity  of 50 when a key is pressed, and a NOTE_OFF with velocity 0 when the key is released, cues with NOTE_ON triggers with velocity set to  any or velocity  set to >0 will start (Cue ON ), but only the cue with the NOTE_ON trigger set to any, and the second trigger on release checkbox checked, will panic the cue (CUE OFF).   

MIDI Triggers.jpg

Mic

On Sunday, April 25, 2021 at 2:48:24 PM UTC+1 Weaselspoon wrote:

micpool

unread,
Apr 25, 2021, 12:06:36 PM4/25/21
to QLab
On Sunday, April 25, 2021 at 4:50:01 PM UTC+1 Weaselspoon wrote:

Oddly the first didn't work at all and targeted seemingly random cues,

The first method should have been:

set the cue target of thecue to cue (midinote as string)


Mic


simon.c...@gmail.com

unread,
Apr 28, 2023, 10:01:31 AM4/28/23
to QLab
Was this ever implemented? I have been testing a workbook and sending velocity 0 doesnt seem to act as second trigger, but sending note off does...

Simon

Sam Kusnetz

unread,
Apr 28, 2023, 10:15:22 AM4/28/23
to ql...@googlegroups.com
On Apr 28, 2023 at 10:01:31 AM, simon.c...@gmail.com <simon.c...@gmail.com> wrote:
Was this ever implemented? I have been testing a workbook and sending velocity 0 doesnt seem to act as second trigger, but sending note off does...

It has not yet been implemented.

It turned out to be a more complex issue than it seems on the surface, and between that and the fact that we’ve only heard about it causing trouble like twice ever, it never got pulled up to the top of the priority list.

I’ll add your comment to the note!

Best
Sam

Sam Kusnetz (he/him) | Figure 53


José Miguel Mayoral (Mayo)

unread,
Apr 28, 2023, 3:51:49 PM4/28/23
to ql...@googlegroups.com
Hi!!
I'm using a script in Qlab 4 that works perfectly but in Qlab 5 it doesn't, what could be the problem?

--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/CAOOK5AYm1DANc4Qs6LgiM%2BoVZsoNuwVCa7aVPZti6GsUgBvaJA%40mail.gmail.com.


--
José Miguel Mayoral Samaniego (Mayo)
Técnico audiovisual     +34 678 409 803
Reply all
Reply to author
Forward
0 new messages