SuperCollider CLASSES (extension)

Player

A soundfile player and BFormat Decoder
Inherits from: Object

Description

Class Methods

*new (soundfilepath, formatOut: 'straight', starttime: 0, outbus: 0, amp: 1, xywz: false, env)

NOTE: All arguments are optional.

Arguments:

soundfilepath

The path (complete or relative) to a soundfile

formatOut

A string. defaults to \straight which simply plays the soundfile directly to the output. If your file is a BFormat file (3 or 4 channel) you can choose:

  • \stereo
  • \uhj
  • \quad
  • \hex
starttime

An initial starttime for playback.

outbus

The starting outbus for playback.

amp

An initial amplitude value.

xywz

Expects true or false. This will decode Ambsonic files recorded for middle side monitoring. (default is false)

env

Any fixed duration envelope (Env, InterplEnv, InterplXYC) to be played over the soundfiles duration.

*initClass

Inherited class methods

Instance Methods

-play

Plays the soundfile.

-pause

Pauses the soundfile. Playback resumes where the file was paused.

-stop

Stops the soundfile. Playback begins from starttime.

-formatOut

-formatOut = format

Changes the output format

-starttime

-starttime = newstart

Change the starttime.

-endtime

-endtime = newend

Change the endtime.

-gui

Create a GUI controller with optional scope.

-isScope

-mute_w

-mute_y

-pausedplay (waitdur)

-initendtime = newend

-env

-env = newenv

-bufnum

-player

-close

-amp

-amp = newamp

-group

-group = value

-mute_x

-clock

-clock =

-outarray

-filename

-isGui

-init (argsoundfilepath, argFormatOut, argstarttime, argoutbus, argamp, argxywz, argenv)

-sf

-soundfilepath

-window

-soundfile_ (argsoundfilepath, argFormatOut, argstarttime, argoutbus, argamp, argxywz, argenv)

-scopebuf

-initstarttime = newstart

-server

-curtime

-mute_z

-outbus

-outbus = value

-scopeID

-xywz

-numchan

-reset

-nodeID

-nodeID = value

-isPlaying

-playfunc (start, dur)

-tempoclock

Inherited instance methods

Examples

// create a new player
a = Player.new(Platform.resourceDir +/+ "sounds/a11wlk01-44_1.aiff")

// play it
a.play;

// pause it
a.pause;

// play it again
a.play;

// stop it
a.stop;

// create a GUI
a.gui;