This is the Mx class itself that implements patching and updating. Normal interaction with an Mx is done through the gui (MxGui) and the scripting objects (see MxApp).
The scripting objects (MxApp etc) are designed for efficiency of usage, clarity and convienience. The implementation classes like Mx, MxChannel, MxUnit etc. are designed for efficiency of internal implementation.
Most internal commands for units or channels go through the Mx object which notes all changes like adding or removing of objects or cables in its removing and adding arrays and then performs all these changes on .update. When using the gui or the scripting objects the .update is called automatically.
data |
Mx saves a data dump that contains the objects that have been added to it, their connections and their saved state. Each supported class defines its load and save methods in its drivers/ file. The data dump is not especially readable and is not meant to be hand coded or read. A binary format will be introduced later to support Mx with large amounts of data. |
endBeat |
Relavant to the timeline, this is the total length of the timeline in beats. |
loop |
Not yet implemented. An Mx may in the future loop in the timeline. |
bpm |
The bpm as was set in (the global) Tempo when the Mx was saved. |
an Mx
See frameRate instance method
int
Graphically speaking, each channel is a vertical column in the mixer.
an array of MxChannel objects
MxCable objects connect the outlets and inlets of units together. This is the collection of all cables.
an MxCableCollection
Just like an individual unit, an Mx can have inlets and can be loaded inside another Mx. (not yet fully implemented)
array of MxInlet
Just like an individual unit, an Mx can have outlets and can be loaded inside another Mx. (not yet fully implemented) By default an Mx has one audio stereo output. It will be able to have any number and type of outlets. ie. multi channel audio, kr outputs, event stream outputs and even files, images or geometries.
array of MxOutlet
When adding audio rate objects, if autoCable is true (default: true) then a cable will be connected from the unit to its channel's fader.
boolean
Relavant to the timeline, this is the total length of the timeline in beats.
float
Not yet implemented. An Mx may in the future loop in the timeline.
boolean
The bpm that the Mx should play at. This sets the global Tempo when play starts and is saved with the Mx document.
float. beats per minute
The master MxChannel (on the right side), with channel number inf. Each MxChannel is cabled to the input (top right) of the master channel. Units may be placed in the master channel for master eq, compression etc.
an MxChannel
Units in an Mx can declared Frame Rate Devices that will be ticked at this rate. SplineFr is an example of a pure Frame Rate Device. Default is 24/beat. The timeline engine uses a frame rate device for its automation.
int
a Position object that holds the current play position for the timeline. It updates at every frameRate tick
a Position
int
adds an object to an internal registery of all objects and iolets
object | |
uid |
optional |
uid
retrieves an object from the registry
uid |
object
find registery object for id
object |
uid
uid |
unit | |
uid |
channel | |
uid |
channel |
int
toSize |
Create a channel, replacing any previous channel at this index. Add supplied objects to it
index | |
objects |
index |
index |
Add a new output. Default is one stereo audio out. Adding an output adds additional MxOutlets to the Mx
rate |
Symbol |
numChannels |
int |
Retreive the MxUnit at the channel and index. returns nil if unoccupied
chan |
int |
index |
int |
put an object at channel @ index, wrapping it in an MxUnit
chan |
int |
index |
int |
object |
object |
chan | |
index | |
toChan | |
toIndex |
schedules the object at chan@index to be removed at the next update. removes the object from the grid (if any) immediately.
chan | |
index |
remote the unit, whever it is located. see remove
unit |
find the chan@index point for a unit
unit |
Point or nil for private units like the fader's unit
call the unit's handlers offering it the chance to add frame rate devices.
unit |
add a frame rate device : a function that will be called at frame rate (default 24/s)
func | |
forUnit |
unit that owns the frame rate device |
unit |
set position to 0.0 and set frame rate devices to 0.0
bundle |
bundle |
longest duration of any unit. total length of the song.
float
make a connection, adding an MxCable. actual connection happens on next update
fromUnit | |
outlet | |
toUnit | |
inlet | |
mapping |
fromUnit | |
outlet | |
toUnit | |
inlet |
cable |
unit |
inlet |
outlet |
channel | |
boo |
channel | |
boo |
beat | |
q | |
bundle |
Enact all changes to the server after things have been added/removed dis/connected. So .add and .remove etc are called, then .update is called that syncs the server to the new state in one bundle.
bundle |
MixedBundle or nil If bundle is supplied then it will not send it and will return the bundle. If nil then it creates and sends the bundle. |
set up parent chain of unit environments that participate in varPooling
iterator over all units
includeChanUnit |
boolean each MxChannel has an MxUnit for its fader. you may wish to exclude those and just iterate over the units on the grid. |
Routine
very private clears any state changes requested through .add and .remove
all channels including the master channel
array of MxChannel
b | |
server |
bundle |
bundle |
bundle |
array of MxCable
bundle |
parent | |
bounds |
MxGui
MxGui
pen | |
bounds | |
style |