mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-13 12:28:47 +00:00
removing unused variables
This commit is contained in:
parent
7549764c38
commit
b9619d8c68
50 changed files with 39 additions and 55 deletions
|
@ -24,7 +24,6 @@ export class DCMeter extends MeterBase<DCMeterOptions> {
|
|||
constructor(options?: Partial<DCMeterOptions>);
|
||||
constructor() {
|
||||
super(optionsFromArguments(DCMeter.getDefaults(), arguments));
|
||||
const options = optionsFromArguments(DCMeter.getDefaults(), arguments);
|
||||
|
||||
this._analyser.type = "waveform";
|
||||
this._analyser.size = 256;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { ToneAudioNode } from "../../core/context/ToneAudioNode";
|
||||
import { dbToGain } from "../../core/type/Conversions";
|
||||
import { NormalRange, PowerOfTwo } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
|
|
|
@ -29,7 +29,6 @@ export class MeterBase<Options extends MeterBaseOptions> extends ToneAudioNode<O
|
|||
constructor(options?: Partial<MeterBaseOptions>);
|
||||
constructor() {
|
||||
super(optionsFromArguments(MeterBase.getDefaults(), arguments));
|
||||
const options = optionsFromArguments(MeterBase.getDefaults(), arguments);
|
||||
|
||||
this.input = this.output = this._analyser = new Analyser({
|
||||
context: this.context,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { Merge } from "./Merge";
|
||||
|
||||
|
@ -34,7 +34,6 @@ export class Mono extends ToneAudioNode<MonoOptions> {
|
|||
constructor() {
|
||||
|
||||
super(optionsFromArguments(Mono.getDefaults(), arguments));
|
||||
const options = optionsFromArguments(Mono.getDefaults(), arguments);
|
||||
|
||||
this.input = new Gain({ context: this.context });
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Param } from "../../core/context/Param";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { AudioRange, NormalRange } from "../../core/type/Units";
|
||||
import { AudioRange } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { Param } from "../../core/context/Param";
|
||||
import { InputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { Decibels } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { Param } from "../../core/context/Param";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { Cents, Decibels, Frequency, GainFactor, Positive } from "../../core/type/Units";
|
||||
import { Decibels, Frequency } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly, writable } from "../../core/util/Interface";
|
||||
import { Signal } from "../../signal/Signal";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { connectSeries, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { Cents, Decibels, Frequency, GainFactor, Positive } from "../../core/type/Units";
|
||||
import { Cents, Frequency, GainFactor, Positive } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly, writable } from "../../core/util/Interface";
|
||||
import { isNumber } from "../../core/util/TypeCheck";
|
||||
|
|
|
@ -4,7 +4,6 @@ import { Frequency, NormalRange, Time } from "../../core/type/Units";
|
|||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { RecursivePartial } from "../../core/util/Interface";
|
||||
import { FeedbackCombFilter } from "./FeedbackCombFilter";
|
||||
import { Filter } from "./Filter";
|
||||
import { OnePoleFilter } from "./OnePoleFilter";
|
||||
|
||||
interface LowpassCombFilterOptions extends ToneAudioNodeOptions {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { Frequency, NormalRange } from "../../core/type/Units";
|
||||
import { Frequency } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { Gain } from "../../core/context/Gain";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ToneWithContext, ToneWithContextOptions } from "../context/ToneWithContext";
|
||||
import { BPM, Frequency, Hertz, Seconds, Ticks, Time } from "../type/Units";
|
||||
import { Frequency, Hertz, Seconds, Ticks, Time } from "../type/Units";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { Emitter } from "../util/Emitter";
|
||||
import { noOp, readOnly } from "../util/Interface";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Signal, SignalOptions } from "../../signal/Signal";
|
||||
import { InputNode } from "../context/ToneAudioNode";
|
||||
import { BPM, Hertz, Seconds, Ticks, Time, UnitMap, UnitName } from "../type/Units";
|
||||
import { Seconds, Ticks, Time, UnitMap, UnitName } from "../type/Units";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { TickParam } from "./TickParam";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ToneWithContext, ToneWithContextOptions } from "../context/ToneWithContext";
|
||||
import { BPM, Frequency, Hertz, Seconds, Ticks, Time, UnitMap } from "../type/Units";
|
||||
import { Seconds, Ticks, Time } from "../type/Units";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { readOnly } from "../util/Interface";
|
||||
import { PlaybackState, StateTimeline, StateTimelineEvent } from "../util/StateTimeline";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Time, Unit, UnitMap, UnitName } from "../type/Units";
|
||||
import { Time, UnitMap, UnitName } from "../type/Units";
|
||||
|
||||
/**
|
||||
* Abstract base class for [[Param]] and [[Signal]]
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Seconds } from "../type/Units";
|
|||
import { isAudioContext } from "../util/AdvancedTypeCheck";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { Emitter } from "../util/Emitter";
|
||||
import { noOp, Omit } from "../util/Interface";
|
||||
import { Omit } from "../util/Interface";
|
||||
import { Timeline } from "../util/Timeline";
|
||||
import { isDefined, isString } from "../util/TypeCheck";
|
||||
import { AnyAudioContext, createAudioContext, createAudioWorkletNode } from "./AudioContext";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { AbstractParam } from "../context/AbstractParam";
|
||||
import { dbToGain, gainToDb } from "../type/Conversions";
|
||||
import { AudioRange, Decibels, Frequency, NormalRange, Positive, Time, Unit, UnitMap, UnitName } from "../type/Units";
|
||||
import { AudioRange, Decibels, Frequency, NormalRange, Positive, Time, UnitMap, UnitName } from "../type/Units";
|
||||
import { isAudioParam } from "../util/AdvancedTypeCheck";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { Timeline } from "../util/Timeline";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getContext } from "../Global";
|
||||
import { Tone } from "../Tone";
|
||||
import { Samples, Seconds, Time } from "../type/Units";
|
||||
import { Samples, Seconds } from "../type/Units";
|
||||
import { isAudioBuffer } from "../util/AdvancedTypeCheck";
|
||||
import { optionsFromArguments } from "../util/Defaults";
|
||||
import { noOp } from "../util/Interface";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { getContext } from "../Global";
|
|||
import { intervalToFrequencyRatio, mtof } from "./Conversions";
|
||||
import { ftom, getA4, setA4 } from "./Conversions";
|
||||
import { TimeClass } from "./Time";
|
||||
import { TimeBaseClass, TimeBaseUnit, TimeExpression, TimeValue } from "./TimeBase";
|
||||
import { TimeBaseUnit, TimeExpression, TimeValue } from "./TimeBase";
|
||||
import { Frequency, Hertz, Interval, MidiNote, Note, Seconds, Ticks } from "./Units";
|
||||
|
||||
export type FrequencyUnit = TimeBaseUnit | "midi";
|
||||
|
|
|
@ -229,8 +229,6 @@ export class Timeline<GenericEvent extends TimelineEvent> extends Tone {
|
|||
}
|
||||
}
|
||||
|
||||
private readonly _epsilon = 1e-6;
|
||||
|
||||
/**
|
||||
* Does a binary search on the timeline array and returns the
|
||||
* nearest event index whose time is after or equal to the given time.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Effect, EffectOptions } from "../effect/Effect";
|
||||
import { Frequency, NormalRange, Positive, Time } from "../core/type/Units";
|
||||
import { Frequency, Positive } from "../core/type/Units";
|
||||
import { Filter, FilterOptions } from "../component/filter/Filter";
|
||||
import { SourceOptions } from "../source/Source";
|
||||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
|
|
|
@ -34,7 +34,6 @@ export class AutoPanner extends LFOEffect<AutoPannerOptions> {
|
|||
constructor() {
|
||||
|
||||
super(optionsFromArguments(AutoPanner.getDefaults(), arguments, ["frequency"]));
|
||||
const options = optionsFromArguments(AutoPanner.getDefaults(), arguments, ["frequency"]);
|
||||
|
||||
this._panner = new Panner({ context: this.context });
|
||||
// connections
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CrossFade } from "../component/channel/CrossFade";
|
||||
import { Gain } from "../core/context/Gain";
|
||||
import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { NormalRange } from "../core/type/Units";
|
||||
import { readOnly } from "../core/util/Interface";
|
||||
import { Signal } from "../signal/Signal";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Effect, EffectOptions } from "../effect/Effect";
|
||||
import { Frequency, NormalRange, Positive, Time } from "../core/type/Units";
|
||||
import { Frequency, NormalRange, Time } from "../core/type/Units";
|
||||
import { LFO } from "../source/oscillator/LFO";
|
||||
import { ToneOscillatorType } from "../source/oscillator/OscillatorInterface";
|
||||
import { Signal } from "../signal/Signal";
|
||||
|
|
|
@ -160,7 +160,6 @@ export class Sequence<ValueType = any> extends ToneEvent<ValueType> {
|
|||
},
|
||||
set: (target: any[], property: PropertyKey, value: any): boolean => {
|
||||
if (isString(property) && isFinite(parseInt(property, 10))) {
|
||||
const index = parseInt(property, 10);
|
||||
if (isArray(value)) {
|
||||
target[property] = this._createSequence(value);
|
||||
} else {
|
||||
|
|
|
@ -31,7 +31,6 @@ export class AMSynth extends ModulationSynth<AMSynthOptions> {
|
|||
constructor(options?: RecursivePartial<AMSynthOptions>);
|
||||
constructor() {
|
||||
super(optionsFromArguments(AMSynth.getDefaults(), arguments));
|
||||
const options = optionsFromArguments(AMSynth.getDefaults(), arguments);
|
||||
|
||||
this._modulationScale = new AudioToGain({
|
||||
context: this.context,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Envelope, EnvelopeOptions } from "../component/envelope/Envelope";
|
|||
import { Filter } from "../component/filter/Filter";
|
||||
import { Gain } from "../core/context/Gain";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { Cents, Frequency, NormalRange, Positive, Seconds, Time } from "../core/type/Units";
|
||||
import { Frequency, NormalRange, Positive, Seconds } from "../core/type/Units";
|
||||
import { deepMerge, omitFromObject, optionsFromArguments } from "../core/util/Defaults";
|
||||
import { noOp, RecursivePartial } from "../core/util/Interface";
|
||||
import { Multiply } from "../signal/Multiply";
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { Signal } from "../signal/Signal";
|
||||
import { Multiply } from "../signal/Multiply";
|
||||
import { AudioToGain } from "../signal/AudioToGain";
|
||||
import { Gain } from "../core/context/Gain";
|
||||
import { Positive, Seconds } from "../core/type/Units";
|
||||
import { Envelope, EnvelopeOptions } from "../component/envelope/Envelope";
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Synth, SynthOptions } from "./Synth";
|
|||
import { FrequencyEnvelope, FrequencyEnvelopeOptions } from "../component/envelope/FrequencyEnvelope";
|
||||
import { Time } from "../core/type/Units";
|
||||
import { Signal } from "../signal/Signal";
|
||||
import { OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { OmniOscillatorSynthOptions } from "../source/oscillator/OscillatorInterface";
|
||||
|
||||
export interface MonoSynthOptions extends MonophonicOptions {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AmplitudeEnvelope } from "../component/envelope/AmplitudeEnvelope";
|
||||
import { Envelope, EnvelopeOptions } from "../component/envelope/Envelope";
|
||||
import { ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { Cents, Frequency, Seconds } from "../core/type/Units";
|
||||
import { Seconds } from "../core/type/Units";
|
||||
import { omitFromObject, optionsFromArguments } from "../core/util/Defaults";
|
||||
import { readOnly } from "../core/util/Interface";
|
||||
import { RecursivePartial } from "../core/util/Interface";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
import { Multiply } from "./Multiply";
|
||||
import { SignalOperator } from "./SignalOperator";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { AbstractParam } from "../core/context/AbstractParam";
|
|||
import { Param } from "../core/context/Param";
|
||||
import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { connect } from "../core/context/ToneAudioNode";
|
||||
import { Time, Unit, UnitMap, UnitName } from "../core/type/Units";
|
||||
import { Time, UnitMap, UnitName } from "../core/type/Units";
|
||||
import { isAudioParam } from "../core/util/AdvancedTypeCheck";
|
||||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
import { ToneConstantSource } from "./ToneConstantSource";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { connect } from "../core/Connect";
|
||||
import { Param } from "../core/context/Param";
|
||||
import { Seconds, Time, Unit, UnitMap, UnitName } from "../core/type/Units";
|
||||
import { Seconds, Time, UnitMap, UnitName } from "../core/type/Units";
|
||||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
import { OneShotSource, OneShotSourceOptions } from "../source/OneShotSource";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode";
|
||||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
import { isArray, isFunction, isUndef } from "../core/util/TypeCheck";
|
||||
import { Signal, SignalOptions } from "./Signal";
|
||||
import { isArray, isFunction } from "../core/util/TypeCheck";
|
||||
import { Signal } from "./Signal";
|
||||
import { SignalOperator } from "./SignalOperator";
|
||||
|
||||
export type WaveShaperMappingFn = (value: number, index?: number) => number;
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ToneAudioNode, ToneAudioNodeOptions } from "../core/context/ToneAudioNo
|
|||
import { GainFactor, Seconds, Time } from "../core/type/Units";
|
||||
import { noOp } from "../core/util/Interface";
|
||||
import { BasicPlaybackState } from "../core/util/StateTimeline";
|
||||
import { OfflineContext } from "../core/context/OfflineContext";
|
||||
|
||||
export type OneShotSourceCurve = "linear" | "exponential";
|
||||
|
||||
|
|
|
@ -103,7 +103,6 @@ describe("Source", () => {
|
|||
const source = new Oscillator();
|
||||
expect(source.state).to.equal("stopped");
|
||||
source.start(0);
|
||||
const currentTime = source.context.currentTime;
|
||||
setTimeout(() => {
|
||||
expect(source.state).to.equal("started");
|
||||
source.dispose();
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Volume } from "../component";
|
|||
import { optionsFromArguments } from "../core/util/Defaults";
|
||||
import { Param } from "../core/context/Param";
|
||||
import { readOnly } from "../core/util/Interface";
|
||||
import { isDefined, isNumber, isUndef } from "../core/util/TypeCheck";
|
||||
import { isDefined, isNumber } from "../core/util/TypeCheck";
|
||||
|
||||
export interface UserMediaOptions extends ToneAudioNodeOptions {
|
||||
volume: Decibels;
|
||||
|
|
|
@ -6,7 +6,7 @@ import { defaultArg, optionsFromArguments } from "../../core/util/Defaults";
|
|||
import { noOp } from "../../core/util/Interface";
|
||||
import { isDefined } from "../../core/util/TypeCheck";
|
||||
import { OneShotSource, OneShotSourceCurve, OneShotSourceOptions } from "../OneShotSource";
|
||||
import { EQ, GTE, LT } from "../../core/util/Math";
|
||||
import { GTE, LT } from "../../core/util/Math";
|
||||
|
||||
export type ToneBufferSourceCurve = OneShotSourceCurve;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import { BasicTests } from "test/helper/Basic";
|
||||
import { CompareToFile } from "test/helper/CompareToFile";
|
||||
import { Offline } from "test/helper/Offline";
|
||||
import { OscillatorTests } from "test/helper/OscillatorTests";
|
||||
import { SourceTests } from "test/helper/SourceTests";
|
||||
import { AMOscillator } from "./AMOscillator";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { Cents, Degrees, Frequency, Positive, Seconds, Time } from "../../core/type/Units";
|
||||
import { Degrees, Frequency, Seconds, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { AudioToGain } from "../../signal/AudioToGain";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { expect } from "chai";
|
||||
import { BasicTests } from "test/helper/Basic";
|
||||
import { CompareToFile } from "test/helper/CompareToFile";
|
||||
import { connectFrom, connectTo } from "test/helper/Connect";
|
||||
import { connectFrom } from "test/helper/Connect";
|
||||
import { OscillatorTests } from "test/helper/OscillatorTests";
|
||||
import { SourceTests } from "test/helper/SourceTests";
|
||||
import { FMOscillator } from "./FMOscillator";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { AudioRange, Cents, Degrees, Frequency, Positive, Time } from "../../core/type/Units";
|
||||
import { Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { Multiply } from "../../signal/Multiply";
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { expect } from "chai";
|
||||
import { BasicTests } from "test/helper/Basic";
|
||||
import { CompareToFile } from "test/helper/CompareToFile";
|
||||
// import Offline from "test/helper/Offline";
|
||||
import { OscillatorTests } from "test/helper/OscillatorTests";
|
||||
import { SourceTests } from "test/helper/SourceTests";
|
||||
import { FatOscillator } from "./FatOscillator";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Cents, Degrees, Frequency, Positive, Time } from "../../core/type/Units";
|
||||
import { Cents, Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { noOp, readOnly } from "../../core/util/Interface";
|
||||
import { Signal } from "../../signal/Signal";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { Param } from "../../core/context/Param";
|
||||
import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode";
|
||||
import { AudioRange, Cents, Degrees, Frequency, NormalRange, Time, UnitName } from "../../core/type/Units";
|
||||
import { Degrees, Frequency, NormalRange, Time, UnitName } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { BasicPlaybackState } from "../../core/util/StateTimeline";
|
||||
|
@ -10,7 +10,6 @@ import { Scale } from "../../signal/Scale";
|
|||
import { connectSignal, Signal } from "../../signal/Signal";
|
||||
import { Zero } from "../../signal/Zero";
|
||||
import { Oscillator, ToneOscillatorType } from "./Oscillator";
|
||||
import { ToneOscillatorInterface } from "./OscillatorInterface";
|
||||
|
||||
export interface LFOOptions extends ToneAudioNodeOptions {
|
||||
type: ToneOscillatorType;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AudioRange, Cents, Degrees, Frequency, Positive, Time } from "../../core/type/Units";
|
||||
import { Cents, Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { isNumber, isString } from "../../core/util/TypeCheck";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AudioRange, Cents, Degrees, Frequency, Radians, Time } from "../../core/type/Units";
|
||||
import { AudioRange, Degrees, Frequency, Radians, Time } from "../../core/type/Units";
|
||||
import { deepEquals, optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { isDefined } from "../../core/util/TypeCheck";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Cents, Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { Multiply } from "../../signal/Multiply";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Gain } from "../../core/context/Gain";
|
||||
import { AudioRange, Cents, Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { AudioRange, Degrees, Frequency, Time } from "../../core/type/Units";
|
||||
import { optionsFromArguments } from "../../core/util/Defaults";
|
||||
import { readOnly } from "../../core/util/Interface";
|
||||
import { Signal } from "../../signal/Signal";
|
||||
|
|
|
@ -151,7 +151,7 @@ describe("ToneOscillatorNode", () => {
|
|||
});
|
||||
|
||||
it("can play for a specific duration", () => {
|
||||
return Offline((context) => {
|
||||
return Offline(() => {
|
||||
const osc = new ToneOscillatorNode().toDestination();
|
||||
osc.start(0).stop(0.1);
|
||||
}, 0.4).then(buffer => {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"declaration": true
|
||||
"declaration": true,
|
||||
"noUnusedLocals": true,
|
||||
},
|
||||
"extends": "../tsconfig.json",
|
||||
"include": [
|
||||
|
|
Loading…
Reference in a new issue