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

PlayerSocket : AbstractPlayerProxy : AbstractPlayer : AbstractFunction : Object
ExtensionExtension

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

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

PlayerSocket.new(rate: 'audio', numChannels: 2, round: 0.0, env)

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

PlayerSocket.prNew(rate: 'audio', numChannels: 2, round: 0.0, env)

Arguments:

rate
numChannels
round
env

Inherited class methods

Instance Methods

.round

.round = value

.rate

.rate = value

.numChannels

.numChannels = value

.env

.env = value

.socketGroup

.lastPlayer

.envdSource

.fuseBlown

.psinit

.prepareAndSpawn(player, releaseTime)

Arguments:

player
releaseTime

.prepareAndQSpawn(player, releaseTime)

Arguments:

player
releaseTime

.preparePlayer(player, onComplete)

Arguments:

player
onComplete

.spawnPlayer(player, releaseTime, beatDelta: 0.0, forceRespawn: false)

you should have already prepared the player

Arguments:

player
releaseTime
beatDelta
forceRespawn

.qspawnPlayer(player, releaseTime)

you should have already prepared the player

Arguments:

player
releaseTime

.qrespawnPlayer(releaseTime)

restart the currently playing player

Arguments:

releaseTime

.releaseVoice(releaseTime)

release the currently playing player voice

Arguments:

releaseTime

.isSleeping

.qwake

.makeResourcesToBundle(bundle)

Arguments:

bundle

.freeResourcesToBundle(bundle)

Arguments:

bundle

.prepareChildrenToBundle(bundle)

Arguments:

bundle

.freeToBundle(bundle)

Arguments:

bundle

.subGroups

.loadDefFileToBundle(bundle, server)

Arguments:

bundle
server

.instrArgFromControl(control)

Arguments:

control

.spawnToBundle(bundle)

Arguments:

bundle

.synthArg

.setSource(s, atTime, releaseTime)

Arguments:

s
atTime

see atTime

releaseTime

.setSourceToBundle(s, bundle, releaseTime)

Arguments:

s
bundle
releaseTime

.didFree

.fuseDidBlow(value)

Arguments:

value

.socketFreeAll

.name

.name = value

.limit = boo

Arguments:

boo

Inherited instance methods

Examples

Testing short time intervals

As an input to a Patch