Class JMSLInstrumentToMax

java.lang.Object
com.cycling74.max.MaxObject
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, nick@didkovsky.com
  • Field Summary

    Fields inherited from class com.cycling74.max.MaxObject

    EMPTY_STRING_ARRAY, NO_INLETS, NO_OUTLETS
  • Constructor Summary

    Constructors
    Constructor Description
    JMSLInstrumentToMax()  
  • Method Summary

    Modifier and Type Method Description
    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, getAttr, getAttrAtomArray, getAttrBool, getAttrBoolArray, getAttrByte, getAttrByteArray, getAttrChar, getAttrCharArray, getAttrDouble, getAttrDoubleArray, getAttrFloat, getAttrFloatArray, getAttributeInfo, getAttrInt, getAttrIntArray, getAttrLongArray, getAttrShort, getAttrShortArray, getAttrString, getAttrStringArray, getCodeSourcePath, getContext, getErrorStream, getInfoIdx, getInletAssist, getInletType, getLongAttr, getMaxBox, getName, getNumInlets, getNumOutlets, getOutletAssist, getOutletType, getParentPatcher, getPostStream, 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, outletHigh, outletHigh, outletHigh, outletHigh, post, postCodePath, 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, zap

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • JMSLInstrumentToMax

      public JMSLInstrumentToMax()
  • Method Details

    • 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 -