also export Options

This commit is contained in:
Yotam Mann 2019-09-04 18:34:42 -04:00
parent 1285fb19ed
commit a8962eb824
10 changed files with 17 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
* ```

View file

@ -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.

View file

@ -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
*/

View file

@ -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),

View file

@ -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;

View file

@ -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

View file

@ -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