Tone.Select

↳ EXTENDS Tone.SignalBase

Select between any number of inputs, sending the one selected by the gate signal to the output

CONSTRUCTOR

new Tone.Select ( [
sourceCount
= 2 ] )
sourceCount

the number of inputs the switch accepts

type: number
default: 2

EXAMPLE

var sel = new Tone.Select(2);
var sigA = new Tone.Signal(10).connect(sel, 0, 0);
var sigB = new Tone.Signal(20).connect(sel, 0, 1);
sel.gate.value = 0;
//sel outputs 10 (the value of sigA);
sel.gate.value = 1;
//sel outputs 20 (the value of sigB);

Members

∿

.gate

↝ Number #

the control signal

</>

Methods

.dispose ( )

#
↪ returns Tone.Select

this

Clean up.

</>

.select ( )

#
which

The gate to open.

type: number
time

The time when the switch will open

type: Time
default: now
↪ returns Tone.Select

this

Open a specific input and close the others.

EXAMPLE

//open input 1 in a half second from now
sel.select(1, "+0.5");
</>
docs generated Sep 15 2019