mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
updating docs
This commit is contained in:
parent
b4c2153749
commit
1bf6fb0d51
4 changed files with 13 additions and 11 deletions
|
@ -15,8 +15,6 @@ interface ToneConvolverOptions extends EffectOptions {
|
|||
* Convolution is useful for reverb and filter emulation. Read more about convolution reverb on
|
||||
* [Wikipedia](https://en.wikipedia.org/wiki/Convolution_reverb).
|
||||
*
|
||||
* @param url The URL of the impulse response or the Tone.Buffer contianing the impulse response.
|
||||
* @param onload The callback to invoke when the url is loaded.
|
||||
* @example
|
||||
* //initializing the convolver with an impulse response
|
||||
* var convolver = new Convolver("./path/to/ir.wav").toDestination();
|
||||
|
@ -35,6 +33,10 @@ export class Convolver extends Effect<ToneConvolverOptions> {
|
|||
*/
|
||||
private _buffer: ToneAudioBuffer;
|
||||
|
||||
/**
|
||||
* @param url The URL of the impulse response or the Tone.Buffer contianing the impulse response.
|
||||
* @param onload The callback to invoke when the url is loaded.
|
||||
*/
|
||||
constructor(url?: string | AudioBuffer | ToneAudioBuffer, onload?: () => void);
|
||||
constructor(options?: Partial<ToneConvolverOptions>);
|
||||
constructor() {
|
||||
|
|
|
@ -9,13 +9,9 @@ export interface EffectOptions extends ToneAudioNodeOptions {
|
|||
wet: NormalRange;
|
||||
}
|
||||
/**
|
||||
* @class Effect is the base class for effects. Connect the effect between
|
||||
* the effectSend and effectReturn GainNodes, then control the amount of
|
||||
* effect which goes to the output using the wet control.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {NormalRange|Object} [wet] The starting wet value.
|
||||
* Effect is the base class for effects. Connect the effect between
|
||||
* the effectSend and effectReturn GainNodes, then control the amount of
|
||||
* effect which goes to the output using the wet control.
|
||||
*/
|
||||
export abstract class Effect<Options extends EffectOptions>
|
||||
extends ToneAudioNode<Options> {
|
||||
|
|
|
@ -25,7 +25,6 @@ interface FrequencyShifterOptions extends EffectOptions {
|
|||
* be an option to low pass filter your input before frequency shifting it to get ride of the aliasing.
|
||||
* You can find a very detailed description of the algorithm here: https://larzeitlin.github.io/RMFS/
|
||||
*
|
||||
* @param frequency The incoming signal is shifted by this frequency value.
|
||||
* @example
|
||||
* let input = new Tone.Oscillator(230, "sawtooth").start();
|
||||
* let shift = new FrequencyShifter(42).toDestination();
|
||||
|
@ -76,6 +75,9 @@ export class FrequencyShifter extends Effect<FrequencyShifterOptions> {
|
|||
*/
|
||||
private _phaseShifter: PhaseShiftAllpass;
|
||||
|
||||
/**
|
||||
* @param frequency The incoming signal is shifted by this frequency value.
|
||||
*/
|
||||
constructor(frequency?: Frequency);
|
||||
// tslint:disable-next-line: unified-signatures
|
||||
constructor(options?: Partial<FrequencyShifterOptions>);
|
||||
|
|
|
@ -21,7 +21,6 @@ interface ReverbOptions extends EffectOptions {
|
|||
* Inspiration from [ReverbGen](https://github.com/adelespinasse/reverbGen).
|
||||
* Copyright (c) 2014 Alan deLespinasse Apache 2.0 License.
|
||||
*
|
||||
* @param decay The amount of time it will reverberate for.
|
||||
*/
|
||||
export class Reverb extends Effect<ReverbOptions> {
|
||||
|
||||
|
@ -42,6 +41,9 @@ export class Reverb extends Effect<ReverbOptions> {
|
|||
*/
|
||||
preDelay: Seconds;
|
||||
|
||||
/**
|
||||
* @param decay The amount of time it will reverberate for.
|
||||
*/
|
||||
constructor(decay?: Seconds);
|
||||
// tslint:disable-next-line: unified-signatures
|
||||
constructor(options?: Partial<ReverbOptions>);
|
||||
|
|
Loading…
Reference in a new issue