UNPKG

1.79 kBTypeScriptView Raw
1import { StereoXFeedbackEffect, StereoXFeedbackEffectOptions } from "./StereoXFeedbackEffect.js";
2import { NormalRange, Seconds, Time } from "../core/type/Units.js";
3import { Signal } from "../signal/Signal.js";
4export interface PingPongDelayOptions extends StereoXFeedbackEffectOptions {
5 delayTime: Time;
6 maxDelay: Seconds;
7}
8/**
9 * PingPongDelay is a feedback delay effect where the echo is heard
10 * first in one channel and next in the opposite channel. In a stereo
11 * system these are the right and left channels.
12 * PingPongDelay in more simplified terms is two Tone.FeedbackDelays
13 * with independent delay values. Each delay is routed to one channel
14 * (left or right), and the channel triggered second will always
15 * trigger at the same interval after the first.
16 * @example
17 * const pingPong = new Tone.PingPongDelay("4n", 0.2).toDestination();
18 * const drum = new Tone.MembraneSynth().connect(pingPong);
19 * drum.triggerAttackRelease("C4", "32n");
20 * @category Effect
21 */
22export declare class PingPongDelay extends StereoXFeedbackEffect<PingPongDelayOptions> {
23 readonly name: string;
24 /**
25 * the delay node on the left side
26 */
27 private _leftDelay;
28 /**
29 * the delay node on the right side
30 */
31 private _rightDelay;
32 /**
33 * the predelay on the right side
34 */
35 private _rightPreDelay;
36 /**
37 * the delay time signal
38 */
39 readonly delayTime: Signal<"time">;
40 /**
41 * @param delayTime The delayTime between consecutive echos.
42 * @param feedback The amount of the effected signal which is fed back through the delay.
43 */
44 constructor(delayTime?: Time, feedback?: NormalRange);
45 constructor(options?: Partial<PingPongDelayOptions>);
46 static getDefaults(): PingPongDelayOptions;
47 dispose(): this;
48}