Class problems, incoming data.
in
Programming Questions
•
3 years ago
Hi all,
I am trying to set up a very simple graphic EQ responding to incoming audio data from MaxMSP. However, I am having trouble with classes and any help would be very appreciated. This is the basic problem:
I have a set of public variables coming into Processing from MaxMSP, bin0, bin1, bin2, bin3 etc.
I have a Class, Bar, with different instances, bar0, bar1, bar2 etc.
I need each instance of Bar, to respond to its corresponding 'bin' value. For example, bar0 uses the bin0 data, bar1 uses the bin1 data and so forth...
My original idea was to state which variable to use when initialising the object. For example:
bar0 = new Bar(bin0);
bar1 = new Bar(bin1);
However this doesn't seem to work with a constantly changing value.
I may be thinking about this the wrong way so any help is much appreciated, thanks a lot.
1