The Polyphonic interface defines methods for adding, removing, and manipulating the state of AudioSignals. It looks a lot like a Collection. The methods are:
[snip java]
// Adds a signal to the signal chain.
void addSignal(AudioSignal signal)
// Removes all signals from the signal chain.
void clearSignals()
// Disables signal if it is in the chain.
void disableSignal(AudioSignal signal)
// Disables the ith signal in the signal chain.
void disableSignal(int i)
// Enables signal if it is in the chain.
void enableSignal(AudioSignal signal)
// Enables the ith signal in the signal chain.
void enableSignal(int i)
// Returns the ith signal in the signal chain.
AudioSignal getSignal(int i)
// Returns true if the signal is in the signal chain.
boolean hasSignal(AudioSignal signal)
// Returns true if signal is in the chain and is also enabled.
boolean isEnabled(AudioSignal signal)
// Enables all signals currently attached to this.
void sound()
// Disables all signals currently attached to this.
void noSound()
// Returns true if at least one signal in the chain is enabled.
boolean isSounding()
// Removes signal from the signals chain.
void removeSignal(AudioSignal signal)
// Removes and returns the ith signal in the signal chain.
AudioSignal removeSignal(int i)
// Returns the number of signals in the chain.
int signalCount()
[/snip]
Note that there is no way to insert a signal into a particular slot. Signals are always added to the end of the signal list. The number of signals that can be added does not have a limit, other than memory. Processing time will also be a factor if signals are complex.
Code Sample (online example)
[snip code_sample]http://code.compartmental.net/minim/examples/Polyphonic/addSignal/addSignal.pde[/snip]