So, I'm working on an interface that will translate gamepad inputs to certain MIDI controls that will control the routing and properties of an audio effects chain in Logic, including loop plugins within logic.
My main patch receives the input and sends it to one of many different subpatches that each deal with the same input in different ways.
For example, if subpatch 1 is active and button 1 is pressed, I want to send MIDI message 1 1 1 to logic, which converts that message in the logic environment to the correct message to, say, start recording loop one. If I want another button on another subpatch to perform the same function (loop one record-on), I would want the same message to be sent to Logic (1 1 1) from a different point in the chain.
Now, to make passing these MIDI messages within my patches easier, I have the digits shifted and parts summed so that MIDI message 1 1 1 would be passed within the patch as 0010101 and 127 5 8 would be passed as 1270508.
I expect to be cranking out more subpatches every week for possible input sets, all leading back to the same output to logic for the same message ("loop one record-on" will be 1 1 1 for every subpatch), and to make writing subpatches more intuitive, I'd like to do some sort of analogous function to #DEFINE in C, such as:
#DEFINE lp1RecOn 0010101
and my subpatches could use the name instead of the number. This also would make it easier to change my MIDI message processing scheme later. If I decide that some other function needs to be 1 1 1, and I change the "loop one record-on" function to use 1 5 4, I would only need to change the definition of the constant in one central reference file (an the routing in logic) instead of crawling through all of my patches, changing every instance of it in them.
Is there any way to #DEFINE constants in Pd?
(Or do something funcitonally equivalent?)