# Note on/off triggers and the generic MIDI module

**URL:** https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952
**Category:** Generic MIDI Module
**Created:** [March 16, 2024, 12:36am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952 "2024-03-16T00:36:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Nahon](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/n/779978/32.png) [@Nahon](https://discourse.checkcheckonetwo.com/u/Nahon)
#### Post date: [March 16, 2024, 12:36am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/1 "2024-03-16T00:36:35Z")

</div>

Hello.  
Please help me configure the module.  
I’m trying to make triggers to control my Blackmagic ATEM mini using a MIDI controller.  
I create a trigger like this  
Events - On condition becoming true  
Condition - generic-midi: Receive MIDI Message - Note On (tried Note Off)

I’ve tried different midi channels, tried different notes, tried Use Variables - it doesn’t work.  
The indicator button shows that a MIDI signal is coming, the log shows that the MIDI signal is received (there is a note) - but nothing happens.

If I change Condition to Message Type = CC - everything works! But my controller has only 4 buttons that allow you to send commands like CC.

Please help me set this up.

- Note on the log  
In my controller, the buttons were set to channel 1. When I first connected it, when I pressed the button, the log displayed a message

> **debug** : Received: noteon Message, channel: 0 (0x00), note: 0 (0x00), velocity: 127 (0x7f) from “STARRYPAD”
> 
> **debug** : Received: noteoff Message, channel: 0 (0x00), note: 0 (0x00), velocity: 0 (0x00) from “STARRYPAD”

The channel was defined as = 0.  
When I changed the controller settings and set the channel to 2, it started showing up in the log as = 1.  
Although, when setting up a trigger with the CC command and viewing the variable, it displays the correct channel, number 2, in messages.

---

<div class="post-metadata">

### Author: ![Andy](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@Andy](https://discourse.checkcheckonetwo.com/u/Andy)
#### Post date: [March 16, 2024, 12:42am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/2 "2024-03-16T00:42:45Z")

</div>

Hello and Welcome;

Have a look at this video and the thread, you may have to do something like that. Let me know if that works for you.

> [@MIDI note message to trigger a button press](https://discourse.checkcheckonetwo.com/t/midi-note-message-to-trigger-a-button-press/3925/8):
>
> Ok, thanks to a suggestion from @millse , I have added a “last Message Received” variable, which you can use to create a trigger to do what you’re asking. Hopefully it works for you - let me know! Here’s a video of how to use it. You’ll need the latest build (1.1.5 or later). [[MIDI Trigger Demo] ](https://www.youtube.com/watch?v=Wgjdy9xk7AY)

---

<div class="post-metadata">

### Author: ![Andy](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@Andy](https://discourse.checkcheckonetwo.com/u/Andy)
#### Post date: [March 16, 2024, 12:46am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/3 "2024-03-16T00:46:26Z")

</div>

> [@Nahon](#):
>
> The channel was defined as = 0.  
> When I changed the controller settings and set the channel to 2, it started showing up in the log as = 1.  
> Although, when setting up a trigger with the CC command and viewing the variable, it displays the correct channel, number 2, in messages.

Yeah, there’s no “standard” for channel numbers, but in reality they’re numbered from 0 - 15, but most people familiar with MIDI expect to see them as 1-16. The log is showing the raw value, while the action is showing the “converted” (1-16) value. I probably should make them the same to avoid confusion!

---

<div class="post-metadata">

### Author: ![Nahon](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/n/779978/32.png) [@Nahon](https://discourse.checkcheckonetwo.com/u/Nahon)
#### Post date: [March 18, 2024, 7:43am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/4 "2024-03-18T07:43:58Z")

</div>

This method works.  
Just one note.  
It only works if I turn on the “FULL LEVEL” mode on the controller and it sends commands with Velocity = 127. Otherwise, I don’t know how to make it react to Velocity having a different value each time I press it.

---

<div class="post-metadata">

### Author: ![Andy](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@Andy](https://discourse.checkcheckonetwo.com/u/Andy)
#### Post date: [March 18, 2024, 2:41pm UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/5 "2024-03-18T14:41:23Z")

</div>

A post was split to a new topic: [ATEM MIDI control](https://discourse.checkcheckonetwo.com/t/atem-midi-control/3959)

---

<div class="post-metadata">

### Author: ![Andy](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@Andy](https://discourse.checkcheckonetwo.com/u/Andy)
#### Post date: [March 18, 2024, 2:49pm UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/6 "2024-03-18T14:49:46Z")

</div>

Great!

To do what you want, try this:

1. Go into the trigger and remove or disable the Condition `internal: Variable: Check value`.
2. Add a new condition `internal: Variable: Check boolean expression`
3. Set the expression to look for just the first part of the incoming message. For example, to trigger on any noteon message on channel 1, note 0, use this expression: `includes($(generic-midi:lastMessage), 'noteon_1_0')`

This will trigger the action on any velocity **above 0** for note 0 on channel 1.

My instance of the `generic-midi` module is called `generic-midi`. If yours is named something else, then substitute that name for the part before the `:lastMessage` in the expression. e.g. if you have named the instance you’re using of the generic-midi module `my-midi` then the expression would be:  
`includes($(my-midi:lastMessage), 'noteon_1_0')`

Let me know how that works for you.

---

<div class="post-metadata">

### Author: ![Nahon](https://discourse.checkcheckonetwo.com/letter_avatar_proxy/v4/letter/n/779978/32.png) [@Nahon](https://discourse.checkcheckonetwo.com/u/Nahon)
#### Post date: [March 21, 2024, 9:36am UTC](https://discourse.checkcheckonetwo.com/t/note-on-off-triggers-and-the-generic-midi-module/3952/7 "2024-03-21T09:36:07Z")

</div>

> [@Andy](#):
>
> includes($(generic-midi:lastMessage), ‘noteon\_1\_0’)

Good afternoon to you.  
Sorry for the long response, difficult working days.  
IT WORKS! This is amazing!!!  
THANK YOU VERY MUCH!!!
