GreaterThanZero
class Signal ↳ extends SignalOperator<GreaterThanZeroOptions>
GreaterThanZero outputs 1 when the input is strictly greater than zero
return Tone.Offline(() => {
const gt0 = new Tone.GreaterThanZero().toDestination();
const sig = new Tone.Signal(0.5).connect(gt0);
sig.setValueAtTime(-1, 0.05);
}, 0.1, 1);Constructor
Section titled “Constructor”new GreaterThanZero(options?: Partial<ToneWithContextOptions>)Parameters
- options
Partial<ToneWithContextOptions>optional
Properties
Section titled “Properties”read-only
input: ToneAudioNodeThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”read-only
output: ToneAudioNodeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
Methods
Section titled “Methods”connect()
Section titled “connect()”↳ inherited from SignalOperator
connect(destination: InputNode, outputNum?: number, inputNum?: number): thisconnect the output of a ToneAudioNode to an AudioParam, AudioNode, or ToneAudioNode
Parameters
-
destination
InputNodeThe output to connect to
-
outputNum
numberoptional default0The output to connect from
-
inputNum
numberoptional default0The input to connect to
Returns this
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks(), getDefaults() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), disconnect(), fan(), toDestination(), toMaster()