PlayerSocket:
Filter:
crucial-library/Classes (extension) | Libraries > crucial > Players

PlayerSocket
ExtensionExtension

a player that can play other players using a cross-faded and fuse-protected socket

Description

A voice that is able to host and switch between different players.

Setting the socket to a new player will load from disk (if needed), prepareForPlay and spawn.

Players are played using an EnvelopedPlayer so that when the socket releases the voice (to end it or to switch to the next incoming player being played in the socket) the outgoing player is released cleanly. The EnvelopedPlayer also protects against NaN, inf and de-normalized floats, so if anything blows up in the channel it will not propgate up the mixer chain.

the default releaseTime is 0.0 which will stop immediately.

Class Methods

.new

Arguments:

rate

all players should be the same rate

numChannels

all players should have the same numChannels.

round

if calling qspawnPlayer this is the timing quantization setting

env

the Envelope for the internal EnvelopedPlayer

.prNew

Arguments:

rate
numChannels
round
env

Instance Methods

.round

.rate

.numChannels

.env

.socketGroup

.lastPlayer

.envdSource

.fuseBlown

.psinit

.prepareAndSpawn

Arguments:

player
releaseTime

.prepareAndQSpawn

Arguments:

player
releaseTime

.preparePlayer

Arguments:

player
onComplete

.spawnPlayer

you should have already prepared the player

Arguments:

player
releaseTime
beatDelta
forceRespawn

.qspawnPlayer

you should have already prepared the player

Arguments:

player
releaseTime

.qrespawnPlayer

restart the currently playing player

Arguments:

releaseTime

.releaseVoice

release the currently playing player voice

Arguments:

releaseTime

.isSleeping

.qwake

.makeResourcesToBundle

Arguments:

bundle

.freeResourcesToBundle

Arguments:

bundle

.prepareChildrenToBundle

Arguments:

bundle

.freeToBundle

Arguments:

bundle

.subGroups

.loadDefFileToBundle

Arguments:

bundle
server

.instrArgFromControl

Arguments:

control

.spawnToBundle

Arguments:

bundle

.synthArg

.setSource

Arguments:

s
atTime

see atTime

releaseTime

.setSourceToBundle

Arguments:

s
bundle
releaseTime

.didFree

.fuseDidBlow

Arguments:

value

.socketFreeAll

.name

.limit

Arguments:

boo

Examples

Testing short time intervals

As an input to a Patch