tsutek
2016-06-19 20:54:25
Hi,
First of all, let me say I'm really excited about joining the Bome club!
Been reading this board a bit, but getting around to catching up soon.
Just wanted to ask some opinion about my first bome script. First it's probably good to explain my intentions with the script.
I have a MPD218 pad controller that is triggering notes of a drum machine. I want to reserve the first four pads to special functions, while the 12 pads underneath are sending midi notes to trigger the drum sounds / synth notes.
So I have mapped the first 4 pads to transmit midi notes 124, 125, 126, 127 on channel 16
The remaining pads are triggering notes chromatically from notes 000-011 on channel 01
Now the script itself has two translators. First one handles program change increment, and the second one handles program change decrement. Here is the code:
Does it look like I am doing everything correctly? I am asking because it's my first script and I am not 100% sure the script works flawlessly.. Like, is it safe to use a global variable for translating data like this? Should I copy the value of gp to a local, say, "pp" before going out from a translation? Also, what about note offs (velo 0), will they cause the translations to run twice or unpredicatbly?
Cheers
First of all, let me say I'm really excited about joining the Bome club!
Been reading this board a bit, but getting around to catching up soon.
Just wanted to ask some opinion about my first bome script. First it's probably good to explain my intentions with the script.
I have a MPD218 pad controller that is triggering notes of a drum machine. I want to reserve the first four pads to special functions, while the 12 pads underneath are sending midi notes to trigger the drum sounds / synth notes.
So I have mapped the first 4 pads to transmit midi notes 124, 125, 126, 127 on channel 16
The remaining pads are triggering notes chromatically from notes 000-011 on channel 01
Now the script itself has two translators. First one handles program change increment, and the second one handles program change decrement. Here is the code:
Code: Select all
Project: MPD218-AR-CTRL002
_____________________________________________________________
[x] Preset 0: MPD218-AR-CTRL001
[x] Translator 0.0: MPD218-PRGC-INC
Incoming: Takes Note #127 from ch16 of MPD218 and converts to pgm chng (+) - if pgm chng = 127, action is ignored, on port MPD218 Port A
Rules:
if gp==127 then exit rules, skip Outgoing Action
gp=gp+1
Outgoing: Program Change on channel 1 with program:gp, to port Bome MIDI Translator 1 Virtual Out
[x] Translator 0.1: MPD218-PRGC-DEC
Incoming: Takes Note #126 from ch16 of MPD218 and converts to pgm chng (-) - if pgm chng = 0, action is ignored, on port MPD218 Port A
Rules:
if gp==0 then exit rules, skip Outgoing Action
gp=gp-1
Outgoing: Program Change on channel 1 with program:gp, to port Bome MIDI Translator 1 Virtual Out
Cheers