com.cycling74.msp
Class MSPPerformer

java.lang.Object
  extended by com.cycling74.max.MaxObject
      extended by com.cycling74.msp.MSPObject
          extended by com.cycling74.msp.MSPPerformer
All Implemented Interfaces:
MSPPerformable

public abstract class MSPPerformer
extends MSPObject
implements MSPPerformable

Process signals with a single method. Like MSPObject except that the performer method will always be "perform" (and you override it).


Field Summary
 
Fields inherited from class com.cycling74.msp.MSPObject
MSP_SIGNAL_ARRAY_CLZ, SIGNAL
 
Fields inherited from class com.cycling74.max.MaxObject
EMPTY_STRING_ARRAY, NO_INLETS, NO_OUTLETS
 
Constructor Summary
MSPPerformer()
           
 
Method Summary
 Method dsp(MSPSignal[] in, MSPSignal[] out)
          Called by PD with the dsp message is sended.
 void dspsetup(MSPSignal[] in, MSPSignal[] out)
          Initialize the dsp state of the MSPPerformable.
abstract  void perform(MSPSignal[] in, MSPSignal[] out)
          Process signal inlets/outlets.
 
Methods inherited from class com.cycling74.msp.MSPObject
declareInlets, declareOutlets, dspstate, getPerformMethod, setNoInPlace
 
Methods inherited from class com.cycling74.max.MaxObject
anything, bail, bang, createInfoOutlet, declareAttribute, declareIO, declareReadOnlyAttribute, declareTypedIO, embedMessage, error, gc, getContext, getErrorStream, getInfoIdx, getInlet, getInletType, getName, getNumInlets, getNumOutlets, getOutletType, getParentPatcher, getPostStream, inlet, inlet, list, loadbang, notifyDeleted, ouch, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outletBang, outletBangHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, outletHigh, post, save, setInletAssist, setInletAssist, setName, setOutletAssist, setOutletAssist, showException, showException, viewsource, zap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSPPerformer

public MSPPerformer()
Method Detail

dsp

public Method dsp(MSPSignal[] in,
                  MSPSignal[] out)
Called by PD with the dsp message is sended. This method will then call dspsetup and map the method "perform" has the performer method. You don't have to override this method, use dspsetup if initialization needs to be done before the signals starts processing.

Specified by:
dsp in class MSPObject
Parameters:
in - input signals
out - output signals
Returns:
the method to execute at each dsp cycle

dspsetup

public void dspsetup(MSPSignal[] in,
                     MSPSignal[] out)
Initialize the dsp state of the MSPPerformable. Override this if you have to initalize something before the signal starts processing.

Specified by:
dspsetup in interface MSPPerformable

perform

public abstract void perform(MSPSignal[] in,
                             MSPSignal[] out)
Process signal inlets/outlets. You must override this since it is the main processing method.

Specified by:
perform in interface MSPPerformable


This API is based on mxj for Max/MSP by Cycling74. Please see original MXJ implementation.