BBlockerProgram:
Filter:
Classes (extension) | Convenience

BBlockerProgram : Object
ExtensionExtension

Convenience class to create and store BetaBlocker programs

Description

Convenience class to create and store assembly programs for the BetaBlocker VChip.

See http://tai-studio.org/portfolio/chip-interpretations.html for details.

Class Methods

BBlockerProgram.new(program)

creates a new BBlocker program:

Arguments:

program

Mixed array of instructions (Symbols) and Integers (will be interpreted either as instructions or as values for unary instructions like \JMP or \PHSL).

BBlockerProgram.instructions

all instructions

BBlockerProgram.descs

all descriptions

BBlockerProgram.printDescs

print description for each instruction

BBlockerProgram.find(identifier)

search for command

Arguments:

identifier

search term

Returns:

array of commands

BBlockerProgram.descOf(key)

find description for command

Arguments:

key

command

Returns:

description string

Inherited class methods

Undocumented class methods

BBlockerProgram.initStates

Instance Methods

.fillBuffer(buffer)

fill Buffer with compiled code.

Arguments:

buffer

buffer to be filled.

.program

Returns:

the program

.makeBuffer(server, action)

create a Buffer and fill it with conpiled code.

Arguments:

server

instance of Server on which the Buffer is created

action

action to be evaluated after successful buffer creation

Returns:

the Buffer

.collection(force: false)

array with 256 entries containing the codeified program.

Arguments:

force

if true, force re-computation.

.asLocalBuf

Returns:

compiled program as a LocalBuf object

.play(rate: 20000, using, leak: false, vol: 0.1, force: true)

play program.

Arguments:

rate

rate of operation

using

instance of Server or Buffer. If a buffer is given, this is used to load the program into.

leak

if true, encapsulate output by a LeakDC.

vol

attenuation

force

force re-filling of collection with program (plus possible randomness)

Returns:

Synth evaluating and playing the program.

.ar(rate: 20000, using, leak: false, vol: 1, force: false)

server playback.

Arguments:

rate

rate of operation

using

instance of Server or Buffer. If a buffer is given, this is used to load the program into.

leak

if true, encapsulate output by a LeakDC.

vol

attenuation

force

force re-filling of collection with program (plus possible randomness)

.fillUpRandom

.fillUpRandom = value

if true, fill remaining space in collection/Buffer with random numbers between 0 and 255.

.scope(rate: 20000, using, leak: false, vol: 0.1, force: true)

run program and scope it.

Arguments:

rate

rate of operation

using

instance of Server or Buffer. If a buffer is given, this is used to load the program into.

leak

if true, encapsulate output by a LeakDC.

vol

attenuation

force

force re-filling of collection with program (plus possible randomness)

.plot(rate: 20000, using, leak: false, duration: 1, force: true)

run program and plot its results.

Arguments:

rate

rate of operation

using

instance of Server or Buffer. If a buffer is given, this is used to load the program into.

leak

if true, encapsulate output by a LeakDC.

duration

time to run in seconds.

force

force re-filling of collection with program (plus possible randomness)

.decompile(force: false)

decompile content of collection.

Arguments:

force

if true, force re-write of (intermediately used) collection.

Returns:

program

Inherited instance methods

Undocumented instance methods

.pr_rTranslate(val)

.pr_translate(val)

Examples