|
Post by Buzz on Nov 4, 2018 0:24:13 GMT
I need cc19 at 00 value to sound all notes off. This is what I have so far. And it’s great! But I just need this additional thing. So that when I move cc19 to off the note off message sends. We’ll say I’m working with channel 1 for now
IF LOAD # constants - K0 K1 = controlling CC # K2 = ms per CC value factor ASS K0 = B0 07 32
# variables - L0 = current position # L1 = current delay ASS L0 = 40 MAT L1 = L0 * K2 END
# handle note off 9X XX 00 = 8X IF MT == 80 # delay note off by L1 value SND M0 M1 M2 +DL1 XX = XX +B END
# handle controlling CC IF M0 == K0 K1 # update current position and delay ASS L0 = M2 MAT L1 = L0 * K2 END
|
|
|
Post by Buzz on Nov 4, 2018 3:23:19 GMT
Also thought I’d add here that I know that a zero velocity note should count as a note off, so that would really be what I’m asking. To map the value of cc zero to play as a note with zero velocity
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 4, 2018 8:15:52 GMT
Hi Buzz,
How about simply translating CC19 value 0 to an 'all notes off' message:
BX 13 00 = XX 7B
would do that
Or, if your sound generators do not respond to 'all notes off' we can do it via brute force:
# send note off for # all 128 notes on # CC19 value 0 IF M0 == B0 13 00 ASS I0 = 0 IF I0 < 80 SND 80 I0 00 MAT I0 = I0 + 1 END END
Regards, Nic.
|
|
|
Post by Buzz on Nov 4, 2018 20:22:17 GMT
These applied to current rule set changes nothing. I tried positioning it in different lines, I tried input rules. Is there a way to take the delay function out and just say zero is note off and 1-127 are note on? The sound doesn’t need to have a delayed off just an off at cc19 00? I’ll try and explain in more detail what I’m trying to achieve. I have a drum pad that I want to use to play chords per pad. I have a MIDI Designer configured so that one button plays three notes at a time. Then those buttons are assigned to my drum pads. I want to Control the length of the note with a footpedal that will essentially act as “if I was holding the key on a keyboard down”. So, pedal down (no notes played but designating that once I play a note I actually want that note played, that the key [button] will play until cc19 is released), play drum pad (which selects which chord) and notes play, let go of pedal, notes stop. I’m not sure if I can describe it much better or if it’s even possible. There are 12 drum pads to which I can assign a button in midi designer, that button plays a chord that I’ve pre programmed with varying notes depending on which chord is wanted. My foot pedal is cc19 and it’s a hi hat pedal on my drum pad, so it is spring loaded to return to zero, just like a key on a piano.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 4, 2018 20:37:41 GMT
I think I understood what you wanted. The rules would go at the end. For the first variant the rule doesn't care which MIDI channel the pedal is on but it sends the all notes off message on the same channel as the pedal. The second variant is hard coded to expect CC19 on channel 1 and sends out the note off messages also on channel 1. If your pedal or your sound generator is on a different channel than 1 then we need to adjust those rules a little in which case if you can detail which channel the pedal and sound generator are on I can give you these adjustments.
|
|
|
Post by Buzz on Nov 4, 2018 20:54:32 GMT
Also I should add that midi designer is going thru audiobus virtual midi to KORG gadget. And the audio is KORG gadget to iPad speakers. On the sound module I’ve selected, the note stops immediately after I release the key
|
|
|
Post by Buzz on Nov 4, 2018 21:14:05 GMT
Everything I can find is on channel 1
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 4, 2018 21:19:59 GMT
D'oh, I see I forgot something crucial in that last bit of code. Anyhow, let's give you a new ruleset that simply blocks all note offs but sends all 128 note offs whenever CC19 goes to zero:
# block all note offs 8X = XX +B 9X XX 00 = XX +B
# send note off for # all 128 notes on # CC19 value 0 IF M0 == B0 13 00 ASS I0 = 0 IF I0 < 80 +L SND 80 I0 00 MAT I0 = I0 + 1 END END
Regards, Nic.
|
|
buzz
Seeker
Posts: 2
|
Post by buzz on Nov 5, 2018 4:50:07 GMT
Ok Cool! Very close! It all works but can I block all notes from sending in the first place if Cc19 is off? What is happening is notes still play when cc19 is off from the beginning. Then I have to press pedal, then let go to get them to stop. I can’t just not play them as some of them are connected to drums that are acting as drum pads via triggers. I tried a B0 13 00 = NX XX +B but I’m not sure where to put it. I know I’m lacking on my knowledge of conditionals and that’s probably where I’m failing. I tried to install this before the rest but then all note offs are blocked. Something like a block all note on if cc19 is at 0?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 5, 2018 9:21:08 GMT
Hi buzz , OK, so we need to add back in some of the other code. Here is the full ruleset for you: IF LOAD # constants - K0 K1 = controlling CC ASS K0 = B0 13
# variables - L0 = current CC value ASS L0 = 0 END
# force note on/vel 0 # to note off 9X XX 00 = 8X
# retain CC value IF M0 == K0 K1 ASS L0 = M2 END
# block note ons if CC is 0 IF L0 == 0 9X = XX +B END
# block all note offs 8X = XX +B
# send note off for # all 128 notes on # CC value 0 IF M0 == K0 K1 00 ASS I0 = 0 IF I0 < 80 +L SND 80 I0 00 MAT I0 = I0 + 1 END END
Regards, Nic.
|
|
buzz
Seeker
Posts: 2
|
Post by buzz on Nov 5, 2018 13:13:26 GMT
Omg this is it! What a great help you’ve been Nic! I can’t believe it works. I’ve got a few other issues to sort thru and I’ll try and learn a bit more how this works but thank you so much!
|
|