I’m working on an interactive controller for the Gibson EDP. One nice function is you can trigger functionality using Note On messages.
I’m trying to use a pad, type = note, and set it to toggle so I press it once, it should send a note on and then sustain until I press it again. What ends up happening though is that after 0.48 seconds (lol - I see the record time on the EDP) the sustain stops.
So is the only way to do an arbitrary sustain time is via a virtual control that sends a MIDI note ON then a MIDI note off when pressed again?
Also - if it type VIRTUAL and is set to TOGGLE and you set the ON value to something (say 40) and the OFF value to 0, and the default state to OFF, the very first time you press the note button, it sends a value of 0 (wrong) then the second press is also a 0 (correct) then finally the third press sends the 40 (correct) as you would expect.
I think that’s not correct (this is OS 2.2) - the first press should send the ON value specified.
I just tested this, @oldgearguy . In my case the note remains on, as long as I press. In other words, as hoped and expected.
See settings below
Then I tested a virtual pad with on On value of 40 and an Off value of 5 where the function sendNote is to trigger an F#:
The first transmission immediately sent out the NoteOn message, but with a value of 1, followed by the Off message with a value of 0. So not with 40 , resp. 5.
Below the lua used:
deviceId = 1
devPort = device:getPort ()
channel = device:getChannel ()
function sendNote(ValueObject, value)
midi.sendNoteOn (devPort , channel, 66, value)
What lua did you use?
Momentary is ok, I wanted toggle to work so I can free up my hands for something else.
Below is for a Virtual pad, set to toggle, on value is 38, off value is 0, default state is off. Parameter number is 38
I wasn’t trying to be final/definitive/fancy at first, just testing note on/off, so lots of things hardcoded.
Running OS 2.2 on a 2.4 hw platform
function recToggle(ValueObject, Value)
local message = ValueObject:getMessage()
local keyNum = message:getValue ()
local paramNum = message:getParameterNumber ()
print(string.format("param number = %d", paramNum))
print(string.format("key value = %d", keyNum))
if (keyNum == 0) then
midi.sendNoteOn(PORT_1, 1, 38, 127)
elseif (keyNum == 38) then
midi.sendNoteOff(PORT_1, 1, 38, 0)
Please hold off any more research on this point for a day or so.
Even though there may be issues trying to combine toggle mode with note commands, I may be misinterpreting the Gibson EDP MIDI spec and how it responds to note commands.
Let me do some more testing to see if this may be a non-issue for what I’m trying to implement.
toggle mode works for notes on beta as of 3.0-a.20.