Here is my current situation... I made a custom [monome] class (with inlets and outlets) which communicates with [serialosc] (a bpatcher provided by the monome folks to send messages to the device)...I did this because I don't know enough yet to implement sending OSC stuff within java.
Now, I also made a separate [sequencer] class (with inlets and outlets) which needs to communicate with my [monome] class...simply importing the monome class won't work because the monome class sends very specific messages out of its outlets to communicate with [serialosc]...I want to keep that class generic (inlets/outlets) for future use, and don't want to have to have to rewrite the outlet code in my sequencer...
I can't simply have a monome outlet on my sequencer, bcs the sequencer deals with NxM arrays, and if you send those out of an outlet they just come out as one long list (1D array) which can't be generically processed by [monome]...I need the dimensional structure of the matrix intact.
So, my question is: Is there anyway, when importing my [monome] class into my [sequencer] class to have whatever the [monome] class would normally output out of its outlets if it were standalone, come out of my [sequencer] outlets? An overloading of outlets so to speak...
How do people deal with this? Writing generic classes which could be used standalone (inlets/outlets), but also capable of being called by other classes and using THEIR outlets...
I spent quite a while rewriting this hoping to make it as clear as possible. I hope it's not a dumb question :<
Any help would be appreciated!
- Marcos