1 | import { ToneAudioNode } from "../core/context/ToneAudioNode.js";
|
2 | import { Signal, SignalOptions } from "./Signal.js";
|
3 | import { Param } from "../core/context/Param.js";
|
4 | export type GreaterThanOptions = SignalOptions<"number">;
|
5 | /**
|
6 | * Output 1 if the signal is greater than the value, otherwise outputs 0.
|
7 | * can compare two signals or a signal and a number.
|
8 | *
|
9 | * @example
|
10 | * return Tone.Offline(() => {
|
11 | * const gt = new Tone.GreaterThan(2).toDestination();
|
12 | * const sig = new Tone.Signal(4).connect(gt);
|
13 | * }, 0.1, 1);
|
14 | * @category Signal
|
15 | */
|
16 | export declare class GreaterThan extends Signal<"number"> {
|
17 | readonly name: string;
|
18 | readonly override: boolean;
|
19 | readonly input: ToneAudioNode;
|
20 | readonly output: ToneAudioNode;
|
21 | /**
|
22 | * compare that amount to zero after subtracting
|
23 | */
|
24 | private _gtz;
|
25 | /**
|
26 | * Subtract the value from the input node
|
27 | */
|
28 | private _subtract;
|
29 | /**
|
30 | * The signal to compare to the incoming signal against.
|
31 | * @example
|
32 | * return Tone.Offline(() => {
|
33 | * // change the comparison value
|
34 | * const gt = new Tone.GreaterThan(1.5).toDestination();
|
35 | * const signal = new Tone.Signal(1).connect(gt);
|
36 | * gt.comparator.setValueAtTime(0.5, 0.1);
|
37 | * }, 0.5, 1);
|
38 | */
|
39 | readonly comparator: Param<"number">;
|
40 | /**
|
41 | * @param value The value to compare to
|
42 | */
|
43 | constructor(value?: number);
|
44 | constructor(options?: Partial<GreaterThanOptions>);
|
45 | static getDefaults(): GreaterThanOptions;
|
46 | dispose(): this;
|
47 | }
|