RedMst:
Filter:
redMst/Classes (extension) | Red > redMst

RedMst
ExtensionExtension

a sort of timeline - master controller

Description

RedMst controls track objects (i.e. RedTrk). It does so by sending play and stop messages to them synced to a clock. RedMst also has a global counter for sections. If a track is not already playing and is activated to play for a certain section, it gets sent a play message when RedMst reaches that section, else the track is stopped. The section counter is driven manually by user input ( *next, *goto, etc.) or by RedSeq. All messages controlling playback ( *next, *prev, *goto, *play, *stop ) are scheduled to happen on the next quant beat.

NOTE: When you replace/overwrite a RedTrk as it is running, it will stop playing and not start until you goto a new RedMst section.

Class Methods

.play

Play activated tracks on the next quant beat.

.goto

Play activated and stop non-activated tracks on the next quant beat.

.next

Go to the next section (section= section+1) on the next quant beat.

.prev

Go to the previous section (section= section-1) on the next quant beat.

.isJumping

True if about to go somewhere on the next quant beat.

.stop

Stop all tracks on the next quant beat.

.clear

Stop and remove all tracks, reset section counter and stop the clock. Clears action function.

.tracks

Dictionary of all tracks. Tracks (i.e. RedTrk objects) add themselves here when created.

.clock

Master clock. If not set TempoClock.default is used.

.quant

Master quant beat. The default is 4.

.section

Counter for current section.

.maxSection

Highest section found among all tracks.

.jumpSection

This is nil if not going somewhere. And it will equal the next section index if about to go to that section on the next quant beat.

.stopAheadTime

How much time ahead play the stop message will be scheduled. The default is 0.05 seconds.

.skipEmpty

Next and previous methods skip over sections that does not have active tracks. The default is false.

.action

A function to be evaluated when section changes.

.isPlaying

Returns a boolean.

.at

Returns track for key.

.add

Done automatically for all new instances of RedTrk.

.remove

Usually done with *clear. Removes a track from master controller.

.makeWindow

Convenience method. See RedMstGUI

Examples