| User-Defined Opcode Database |
|---|
Interface for a foot array which outputs program change MIDI messages. Can be used with any MIDI program change capable device.
Download UDO FileThis opcode is an interpreter for a foot array which outputs MIDI program change messages. It is feasible to use this opcode with any hardware or software application that is capable of generating MIDI program change messages. A diagram of the foot array is something like
--------------------
| 0 | 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 |
--------------------
where the numbers correspond to the decimal equivelent of the Data Byte 1 of the MIDI message.
knum, kval footarray
knum -- Number of the Program Change message.
kval -- True / False (0/1). Sends a 1 each time a controller message and immediately resets.
opcode footarray, kk, 0 kstatus, kchan, kd1, kd2 midiin kval = 0 if (kstatus == 176 && kd1 == 32) then kval = 0 elseif (kstatus == 192) then knum = kd1 kval = 1 endif xout knum, kval endop
/*--- ---*/ instr 1 knum, kval footarray if (knum == 1 && kval == 1) kgoto one if (knum == 2 && kval == 1) kgoto two if (knum == 3 && kval == 1) kgoto three kgoto contin one: event "i", 2, 0, 2, 8.02, 0.25 kgoto contin two: event "i", 2, 0, 2, 8.07, 0.75 kgoto contin three: event "i", 2, 0, 2, 8.00, 1.00 kgoto contin contin: knum = 0 endin /*--- ---*/ instr 2 kpan = p5 a1 oscil 10000, cpspch(p4), 1 kenv linseg 0.000001, 0.05, 1, p3, 1, 0.05, 0.000001 aout = a1 * kenv outs aout * (1 - kpan), aout * kpan endin /*--- ---*/
David Akbari - 2005. Thanks to Istvan Varga for suggesting an improvement!
| Previous | Home | Next |
| Fofilter | FracLen |