Players are things that can play. The AbstractPlayer interface encapsulates each of the steps to load an object, get its resources onto the server (eg. loading buffers, populating lookup tables) , to play at precise times, stop and free its resources when finished.
Players may have one synth or many or even none. They may hold groups, busses and buffers in its instance variables.
Players have an output spec and some of them have inputs and input specs.
If they have editable parameters then the framework supports saving and loading of the player object in compile string document format.
Arguments:
server | |
atTime |
see atTime |
buildFunction | |
if loaded or saved, the player knows its path
Arguments:
boots the server, prepares the player for play (loading resources like samples etc.) and spawns the player
all args are optional
Arguments:
group |
a Server (will use the root node) a Group nil (default server's root node) |
atTime |
see atTime |
bus |
bus - (Bus,Integer,Nil) a specific Bus to play on, otherwise will default to the main audio outs |
Arguments:
atTime |
see atTime |
bus | |
timeOfRequest | |
this loads the synthDef to the server for the player and all of its children, and allocates any resources such as buffers, loading sound files etc.
Arguments:
group |
group - a Server, a Group or Nil |
private |
isPrivate: a public bus is one of the main audio outputs of your soundcard. a private bus is one that will be patched and mixed further down the line. When makePatchOut is called on the top player (the one that actually was sent .play) it plays to a public (main audio output), and any internal children are told to allocate and play onto a private bus. |
bus |
bus - a specific Bus to play on. this will cause isPrivate to be ignored |
assumes the player has been prepared. see prepareForPlay
Arguments:
atTime |
see atTime |
timeOfRequest | |
Arguments:
group | |
bus | |
atTime |
see atTime |
timeOfRequest | |
Arguments:
func | |
timeout | |
listener | |
oneShot | |
throwErrorOnTimeout | |
Arguments:
func | |
timeout | |
listener | |
oneShot | |
throwErrorOnTimeout | |
Arguments:
func | |
timeout | |
listener | |
oneShot | |
throwErrorOnTimeout | |
Arguments:
status | |
func | |
timeout | |
listener | |
oneShot | |
throwErrorOnTimeout | |
stops playing but does not deallocate any resources (buffers etc.) You need to .free to deallocate it
Arguments:
call release on the synth, with the releaseTime then calls stop on the player, so even if the synthDef does not have a \gate input, it will function the same as stop after a short delay.
Arguments:
frees all allocated resources (buffers etc.) if it is playing then it also stops it
Arguments:
Arguments:
path | |
endBeat | |
onComplete | |
recHeaderFormat | |
recSampleFormat | |
atTime |
see atTime |
for players that hold other players or objects, return those children player classes should implement where appropriate. a Patch has its args as children SFP has its underlying object as child
using this.children.do({arg item; .... }) can save you from having to muck up the Player class with extra methods.
do to allChildren
Arguments:
and all your children's children, and their children...
if loaded or saved then the name is the filename, else its the normal asString for an object (eg. "a Patch")