com.softsynth.jmsl.max
Class JMSLInstrumentToMax

java.lang.Object
  extended by com.cycling74.max.MaxObject
      extended by com.softsynth.jmsl.max.JMSLInstrumentToMax

public class JMSLInstrumentToMax
extends com.cycling74.max.MaxObject

Single Max object which receives data from ALL MaxInstruments This is the conduit from JMSL to Max. One of these is instantiated by Max, and it sets itself as the static conduit for all MaxInstruments. It does no good to create a new JMSLInstrumentToMax() in JMSL, since you need it in Max to tap the outlets.

Author:
Nick Didkovsky, didkovn@mail.rockefeller.edu

Field Summary
 
Fields inherited from class com.cycling74.max.MaxObject
EMPTY_STRING_ARRAY, NO_INLETS, NO_OUTLETS
 
Constructor Summary
JMSLInstrumentToMax()
           
 
Method Summary
 void sendToMax(double playTime, double timeStretch, double[] data, int insIndex)
          This Gets called from MaxInstrument.play(); the playTime is a JMSLTimeStamp slightly in the future.
 
Methods inherited from class com.cycling74.max.MaxObject
error, gc, getAtomArrayAttr, getAttr, getAttributeInfo, getBoolAttr, getBooleanArrayAttr, getByteArrayAttr, getByteAttr, getCharArrayAttr, getCharAttr, getContext, getDoubleArrayAttr, getDoubleAttr, getErrorStream, getFloatArrayAttr, getFloatAttr, getInfoIdx, getInletAssist, getInletType, getIntArrayAttr, getIntAttr, getLongArrayAttr, getLongAttr, getMaxBox, getName, getNumInlets, getNumOutlets, getOutletAssist, getOutletType, getParentPatcher, getPostStream, getShortArrayAttr, getShortAttr, getStringArrayAttr, getStringAttr, ouch, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, outlet, 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, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setName, showException, showException, toString, viewsource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMSLInstrumentToMax

public JMSLInstrumentToMax()
Method Detail

sendToMax

public void sendToMax(double playTime,
                      double timeStretch,
                      double[] data,
                      int insIndex)
This Gets called from MaxInstrument.play(); the playTime is a JMSLTimeStamp slightly in the future. Then we convert that to a Max CPU Clocktime. Max Will then Delay this message to the synthesizer by the difference between this timeStamp and the max [CPUClock] time in milliseconds...

Sends Max a float array containing:
  • 0) ins index
  • 1) timestamp
  • 2) pitch
  • 3) amp
  • 4) hold in sec (ie sustain time ie Max "duration")
  • 5...n) any additional dimensions So we drop JMSL timestretch and JMSL duration (which is time between events, not sustain time of voice) before copying data to float[] going out to Max. So Max only sees values it needs.

    Parameters:
    playTime -
    timeStretch -
    data -
    insIndex -