mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
also export Options
This commit is contained in:
parent
1285fb19ed
commit
a8962eb824
10 changed files with 17 additions and 5 deletions
|
@ -9,7 +9,7 @@ import { OneShotSource, OneShotSourceCurve, OneShotSourceOptions } from "../OneS
|
|||
|
||||
export type ToneBufferSourceCurve = OneShotSourceCurve;
|
||||
|
||||
interface ToneBufferSourceOptions extends OneShotSourceOptions {
|
||||
export interface ToneBufferSourceOptions extends OneShotSourceOptions {
|
||||
buffer: ToneAudioBuffer;
|
||||
curve: ToneBufferSourceCurve;
|
||||
playbackRate: Positive;
|
||||
|
@ -26,7 +26,7 @@ interface ToneBufferSourceOptions extends OneShotSourceOptions {
|
|||
*/
|
||||
export class ToneBufferSource extends OneShotSource<ToneBufferSourceOptions> {
|
||||
|
||||
name = "ToneBufferSource";
|
||||
readonly name = "ToneBufferSource";
|
||||
|
||||
/**
|
||||
* The oscillator
|
||||
|
|
|
@ -6,7 +6,7 @@ import { isUndef } from "../../core/util/TypeCheck";
|
|||
import { Source, SourceOptions } from "../Source";
|
||||
import { ToneBufferSource } from "./BufferSource";
|
||||
|
||||
interface PlayerOptions extends SourceOptions {
|
||||
export interface PlayerOptions extends SourceOptions {
|
||||
onload: () => void;
|
||||
playbackRate: Positive;
|
||||
loop: boolean;
|
||||
|
@ -28,7 +28,7 @@ interface PlayerOptions extends SourceOptions {
|
|||
*/
|
||||
export class Player extends Source<PlayerOptions> {
|
||||
|
||||
name = "Player";
|
||||
readonly name = "Player";
|
||||
|
||||
/**
|
||||
* If the file should play as soon
|
||||
|
|
|
@ -11,6 +11,8 @@ import { AMConstructorOptions, AMOscillatorOptions,
|
|||
NonCustomOscillatorType, ToneOscillatorInterface,
|
||||
ToneOscillatorType } from "./OscillatorInterface";
|
||||
|
||||
export { AMOscillatorOptions } from "./OscillatorInterface";
|
||||
|
||||
/**
|
||||
* An amplitude modulated oscillator node. It is implemented with
|
||||
* two oscillators, one which modulators the other's amplitude
|
||||
|
|
|
@ -9,6 +9,7 @@ import { Oscillator } from "./Oscillator";
|
|||
import { FMConstructorOptions, FMOscillatorOptions,
|
||||
NonCustomOscillatorType, ToneOscillatorInterface, ToneOscillatorType } from "./OscillatorInterface";
|
||||
|
||||
export { FMOscillatorOptions } from "./OscillatorInterface";
|
||||
/**
|
||||
* FMOscillator implements a frequency modulation synthesis
|
||||
* ```
|
||||
|
|
|
@ -9,6 +9,8 @@ import { Oscillator } from "./Oscillator";
|
|||
import { FatConstructorOptions, FatOscillatorOptions,
|
||||
ToneOscillatorInterface, ToneOscillatorType } from "./OscillatorInterface";
|
||||
|
||||
export { FatOscillatorOptions } from "./OscillatorInterface";
|
||||
|
||||
/**
|
||||
* FatOscillator is an array of oscillators with detune spread between the oscillators
|
||||
* @param frequency The oscillator's frequency.
|
||||
|
|
|
@ -14,6 +14,8 @@ import { OmniOscillatorConstructorOptions,
|
|||
import { PulseOscillator } from "./PulseOscillator";
|
||||
import { PWMOscillator } from "./PWMOscillator";
|
||||
|
||||
export { OmniOscillatorOptions } from "./OscillatorInterface";
|
||||
|
||||
/**
|
||||
* All of the oscillator types that OmniOscillator can take on
|
||||
*/
|
||||
|
|
|
@ -8,6 +8,7 @@ import { ToneOscillatorConstructorOptions, ToneOscillatorInterface,
|
|||
ToneOscillatorOptions, ToneOscillatorType } from "./OscillatorInterface";
|
||||
import { ToneOscillatorNode } from "./OscillatorNode";
|
||||
|
||||
export { ToneOscillatorOptions } from "./OscillatorInterface";
|
||||
/**
|
||||
* Oscillator supports a number of features including
|
||||
* phase rotation, multiple oscillator types (see Oscillator.type),
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Cents, Frequency, Seconds, Time } from "../../core/type/Units";
|
|||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { OneShotSource, OneShotSourceOptions } from "../OneShotSource";
|
||||
|
||||
interface ToneOscillatorNodeOptions extends OneShotSourceOptions {
|
||||
export interface ToneOscillatorNodeOptions extends OneShotSourceOptions {
|
||||
frequency: Frequency;
|
||||
detune: Cents;
|
||||
type: OscillatorType;
|
||||
|
|
|
@ -8,6 +8,8 @@ import { Oscillator } from "./Oscillator";
|
|||
import { PWMOscillatorOptions, ToneOscillatorInterface } from "./OscillatorInterface";
|
||||
import { PulseOscillator } from "./PulseOscillator";
|
||||
|
||||
export { PWMOscillatorOptions } from "./OscillatorInterface";
|
||||
|
||||
/**
|
||||
* PWMOscillator modulates the width of a Tone.PulseOscillator
|
||||
* at the modulationFrequency. This has the effect of continuously
|
||||
|
|
|
@ -8,6 +8,8 @@ import { Source } from "../Source";
|
|||
import { Oscillator } from "./Oscillator";
|
||||
import { PulseOscillatorOptions, ToneOscillatorInterface } from "./OscillatorInterface";
|
||||
|
||||
export { PulseOscillatorOptions } from "./OscillatorInterface";
|
||||
|
||||
/**
|
||||
* PulseOscillator is an oscillator with control over pulse width,
|
||||
* also known as the duty cycle. At 50% duty cycle (width = 0) the wave is
|
||||
|
|
Loading…
Reference in a new issue