mmMaxClient
Class MMMaxClient

java.lang.Object
  extended by com.cycling74.max.MaxObject
      extended by mmMaxClient.MMMaxClient
All Implemented Interfaces:
MMClient

public class MMMaxClient
extends com.cycling74.max.MaxObject
implements MMClient


Nested Class Summary
 
Nested classes/interfaces inherited from interface mmServerCommunication.MMClient
MMClient.EventType
 
Field Summary
static MMMaxClient instance
           
 int lookback
           
 
Fields inherited from class com.cycling74.max.MaxObject
EMPTY_STRING_ARRAY, NO_INLETS, NO_OUTLETS
 
Fields inherited from interface mmServerCommunication.MMClient
paramsToGet
 
Constructor Summary
MMMaxClient()
           
 
Method Summary
 void addParamToCurrentProject(java.lang.String paramName, int paramType)
          Adds Param to project and calls getParameterList() to update Max ex.
 void changeListener(MMClient.EventType event)
           
 void createNewProject(java.lang.String projectName)
          Creates a new project
 void getCurrentParamListName()
          Get the last ParamList table name on server and reuse it
static MMMaxClient getInstance()
           
 void getParameterConfigs(int paramId)
          Gets the configuration of the given parameter of the current project and outputs to Max.
 void getParameters(java.util.ArrayList<java.lang.String> newParams, java.lang.Object jsonArray_)
           
 void getProjectInfo()
          Gets the project info for the current project.
 void getProjectList()
          Outputs a list of projectId and projectName
 void getStats(int paramId, int paramType)
           
 void notifyError(java.lang.String errorMessage)
           
 void notifyMessage(java.lang.String messageType, java.lang.String message)
           
 void outputToMax(java.lang.String messageType, int toBool)
           
 void pollRaw(int paramId, int pollSwitch)
          Starts and stops polling the raw data for the given paramId.
 void pollStats(int paramId, int pollSwitch)
          Starts and stops polling the statistics for the given paramId.
 void postData(com.cycling74.max.Atom[] args)
           
 void printToMax(java.lang.String messageType, int toBool)
          Allows users to choose which messages will show up in the max console
 void removeParameter(int paramId)
          Removes Param from the current project and calls getParameterList() to update Max
 void returnedStats(java.util.ArrayList<java.lang.String> returnedStats, java.lang.Object jsonArray_)
           
 void setCurrentProject(int projectId)
           
 void setParamConfigs(com.cycling74.max.Atom[] args)
          Sets the key value pair for the Param This does not send to parse until updateProject() is called
 void setPollRate(int pollRate)
          Sets the poll rate in milliseconds.
 void setPollWindow(int seconds)
           
 void setProjectInfo(java.lang.String info)
          Sets the project info for the current project.
 void startNewParamList()
          Create a new param list table in the server dedicated to the current performance session
 void stopPolling()
          Stops all polling
 void updateProject()
          Sends any paramValues that have changed to Parse
 
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
 

Field Detail

instance

public static MMMaxClient instance

lookback

public int lookback
Constructor Detail

MMMaxClient

public MMMaxClient()
Method Detail

getInstance

public static MMMaxClient getInstance()

createNewProject

public void createNewProject(java.lang.String projectName)
Creates a new project

Parameters:
projectName -

getCurrentParamListName

public void getCurrentParamListName()
Get the last ParamList table name on server and reuse it


startNewParamList

public void startNewParamList()
Create a new param list table in the server dedicated to the current performance session


printToMax

public void printToMax(java.lang.String messageType,
                       int toBool)
Allows users to choose which messages will show up in the max console

Parameters:
messageType -
toBool -

outputToMax

public void outputToMax(java.lang.String messageType,
                        int toBool)

getProjectList

public void getProjectList()
Outputs a list of projectId and projectName


setCurrentProject

public void setCurrentProject(int projectId)
Parameters:
projectId -

getProjectInfo

public void getProjectInfo()
Gets the project info for the current project.


setProjectInfo

public void setProjectInfo(java.lang.String info)
Sets the project info for the current project.

Parameters:
info -

addParamToCurrentProject

public void addParamToCurrentProject(java.lang.String paramName,
                                     int paramType)
Adds Param to project and calls getParameterList() to update Max ex. paramType (SLIDER)

Parameters:
paramName -
paramType -

removeParameter

public void removeParameter(int paramId)
Removes Param from the current project and calls getParameterList() to update Max

Parameters:
paramId -

setParamConfigs

public void setParamConfigs(com.cycling74.max.Atom[] args)
Sets the key value pair for the Param This does not send to parse until updateProject() is called

Parameters:
paramName -
key -
value -

updateProject

public void updateProject()
Sends any paramValues that have changed to Parse


getParameterConfigs

public void getParameterConfigs(int paramId)
Gets the configuration of the given parameter of the current project and outputs to Max.

Parameters:
paramId -

setPollRate

public void setPollRate(int pollRate)
Sets the poll rate in milliseconds.

Parameters:
pollRate -

pollStats

public void pollStats(int paramId,
                      int pollSwitch)
Starts and stops polling the statistics for the given paramId. pollSwitch==0 stops polling stats. pollSwitch==1 starts polling stats.

Parameters:
paramId -
pollSwitch -

pollRaw

public void pollRaw(int paramId,
                    int pollSwitch)
Starts and stops polling the raw data for the given paramId. pollSwitch==0 stops polling raw data. pollSwitch==1 starts polling raw data.

Parameters:
paramId -
pollSwitch -

setPollWindow

public void setPollWindow(int seconds)

postData

public void postData(com.cycling74.max.Atom[] args)

stopPolling

public void stopPolling()
Stops all polling


getStats

public void getStats(int paramId,
                     int paramType)

changeListener

public void changeListener(MMClient.EventType event)
Specified by:
changeListener in interface MMClient

getParameters

public void getParameters(java.util.ArrayList<java.lang.String> newParams,
                          java.lang.Object jsonArray_)
Specified by:
getParameters in interface MMClient

returnedStats

public void returnedStats(java.util.ArrayList<java.lang.String> returnedStats,
                          java.lang.Object jsonArray_)
Specified by:
returnedStats in interface MMClient

notifyError

public void notifyError(java.lang.String errorMessage)
Specified by:
notifyError in interface MMClient

notifyMessage

public void notifyMessage(java.lang.String messageType,
                          java.lang.String message)
Specified by:
notifyMessage in interface MMClient