[PD] array vs text, avoiding duplication
abonnements at revolwear.com
Sun Dec 23 21:06:34 CET 2018
I have a design consideration:
There is a mapping abstraction where IDs of buttons are mapped to MIDI
notes. There are different tunings.
Previously I used an array to store the tunings and filled this by
reading a text file in which the tuning was stored.
Now, I do the same thing but I am using the text object. Nice thing here
is that I can store the tuning in an object.
However in both cases I want to be able to use this abstraction either
only once or multiple times.
Problem is, that if I use it multiple times the [array name] or [text
define -k name] will be defined multiple times.
Is there a smart way to solve this kind of issue?
I could still use text files and load them in [array $0-name] or [text
define -k $0-name] objects, but that doesn't strike me as particular
elegant since they will still contain the same thing, meaning it's code
More information about the Pd-list