diff --git a/Tone/component/analysis/DCMeter.ts b/Tone/component/analysis/DCMeter.ts index 4bdb948f..e30267b7 100644 --- a/Tone/component/analysis/DCMeter.ts +++ b/Tone/component/analysis/DCMeter.ts @@ -24,7 +24,6 @@ export class DCMeter extends MeterBase { constructor(options?: Partial); constructor() { super(optionsFromArguments(DCMeter.getDefaults(), arguments)); - const options = optionsFromArguments(DCMeter.getDefaults(), arguments); this._analyser.type = "waveform"; this._analyser.size = 256; diff --git a/Tone/component/analysis/FFT.ts b/Tone/component/analysis/FFT.ts index 7243c012..ef835d3d 100644 --- a/Tone/component/analysis/FFT.ts +++ b/Tone/component/analysis/FFT.ts @@ -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"; diff --git a/Tone/component/analysis/MeterBase.ts b/Tone/component/analysis/MeterBase.ts index 83d6321f..5e9c6ef3 100644 --- a/Tone/component/analysis/MeterBase.ts +++ b/Tone/component/analysis/MeterBase.ts @@ -29,7 +29,6 @@ export class MeterBase extends ToneAudioNode); constructor() { super(optionsFromArguments(MeterBase.getDefaults(), arguments)); - const options = optionsFromArguments(MeterBase.getDefaults(), arguments); this.input = this.output = this._analyser = new Analyser({ context: this.context, diff --git a/Tone/component/channel/Mono.ts b/Tone/component/channel/Mono.ts index 9a6f6c12..f999e8f8 100644 --- a/Tone/component/channel/Mono.ts +++ b/Tone/component/channel/Mono.ts @@ -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 { constructor() { super(optionsFromArguments(Mono.getDefaults(), arguments)); - const options = optionsFromArguments(Mono.getDefaults(), arguments); this.input = new Gain({ context: this.context }); diff --git a/Tone/component/channel/Panner.ts b/Tone/component/channel/Panner.ts index 1c46ce38..6f08c875 100644 --- a/Tone/component/channel/Panner.ts +++ b/Tone/component/channel/Panner.ts @@ -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"; diff --git a/Tone/component/channel/Volume.ts b/Tone/component/channel/Volume.ts index 3ca03673..9caeff90 100644 --- a/Tone/component/channel/Volume.ts +++ b/Tone/component/channel/Volume.ts @@ -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"; diff --git a/Tone/component/filter/EQ3.ts b/Tone/component/filter/EQ3.ts index ed81710c..199e3b34 100644 --- a/Tone/component/filter/EQ3.ts +++ b/Tone/component/filter/EQ3.ts @@ -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"; diff --git a/Tone/component/filter/Filter.ts b/Tone/component/filter/Filter.ts index 2221c996..9459be21 100644 --- a/Tone/component/filter/Filter.ts +++ b/Tone/component/filter/Filter.ts @@ -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"; diff --git a/Tone/component/filter/LowpassCombFilter.ts b/Tone/component/filter/LowpassCombFilter.ts index 0c5da6fa..69836e4a 100644 --- a/Tone/component/filter/LowpassCombFilter.ts +++ b/Tone/component/filter/LowpassCombFilter.ts @@ -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 { diff --git a/Tone/component/filter/OnePoleFilter.ts b/Tone/component/filter/OnePoleFilter.ts index b2da64bf..ba86b988 100644 --- a/Tone/component/filter/OnePoleFilter.ts +++ b/Tone/component/filter/OnePoleFilter.ts @@ -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"; diff --git a/Tone/core/clock/Clock.ts b/Tone/core/clock/Clock.ts index 2d777266..305e6eab 100644 --- a/Tone/core/clock/Clock.ts +++ b/Tone/core/clock/Clock.ts @@ -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"; diff --git a/Tone/core/clock/TickSignal.ts b/Tone/core/clock/TickSignal.ts index f14ac66d..dd1a49cb 100644 --- a/Tone/core/clock/TickSignal.ts +++ b/Tone/core/clock/TickSignal.ts @@ -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"; diff --git a/Tone/core/clock/TickSource.ts b/Tone/core/clock/TickSource.ts index 4e575327..840189e3 100644 --- a/Tone/core/clock/TickSource.ts +++ b/Tone/core/clock/TickSource.ts @@ -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"; diff --git a/Tone/core/context/AbstractParam.ts b/Tone/core/context/AbstractParam.ts index 963d7131..9747f92f 100644 --- a/Tone/core/context/AbstractParam.ts +++ b/Tone/core/context/AbstractParam.ts @@ -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]] diff --git a/Tone/core/context/Context.ts b/Tone/core/context/Context.ts index 95fac40f..5d5a8fb4 100644 --- a/Tone/core/context/Context.ts +++ b/Tone/core/context/Context.ts @@ -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"; diff --git a/Tone/core/context/Param.ts b/Tone/core/context/Param.ts index 860fb762..8b9c041a 100644 --- a/Tone/core/context/Param.ts +++ b/Tone/core/context/Param.ts @@ -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"; diff --git a/Tone/core/context/ToneAudioBuffer.ts b/Tone/core/context/ToneAudioBuffer.ts index 50104741..43075c83 100644 --- a/Tone/core/context/ToneAudioBuffer.ts +++ b/Tone/core/context/ToneAudioBuffer.ts @@ -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"; diff --git a/Tone/core/type/Frequency.ts b/Tone/core/type/Frequency.ts index 3467b970..7afc192a 100644 --- a/Tone/core/type/Frequency.ts +++ b/Tone/core/type/Frequency.ts @@ -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"; diff --git a/Tone/core/util/Timeline.ts b/Tone/core/util/Timeline.ts index 0e56d840..8e4eed38 100644 --- a/Tone/core/util/Timeline.ts +++ b/Tone/core/util/Timeline.ts @@ -229,8 +229,6 @@ export class Timeline 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. diff --git a/Tone/effect/AutoFilter.ts b/Tone/effect/AutoFilter.ts index 1d01d229..4bb53062 100644 --- a/Tone/effect/AutoFilter.ts +++ b/Tone/effect/AutoFilter.ts @@ -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"; diff --git a/Tone/effect/AutoPanner.ts b/Tone/effect/AutoPanner.ts index 11437eae..ee133b2c 100644 --- a/Tone/effect/AutoPanner.ts +++ b/Tone/effect/AutoPanner.ts @@ -34,7 +34,6 @@ export class AutoPanner extends LFOEffect { constructor() { super(optionsFromArguments(AutoPanner.getDefaults(), arguments, ["frequency"])); - const options = optionsFromArguments(AutoPanner.getDefaults(), arguments, ["frequency"]); this._panner = new Panner({ context: this.context }); // connections diff --git a/Tone/effect/Effect.ts b/Tone/effect/Effect.ts index 951089d6..9a2205ff 100644 --- a/Tone/effect/Effect.ts +++ b/Tone/effect/Effect.ts @@ -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"; diff --git a/Tone/effect/LFOEffect.ts b/Tone/effect/LFOEffect.ts index dfc76e34..254535d9 100644 --- a/Tone/effect/LFOEffect.ts +++ b/Tone/effect/LFOEffect.ts @@ -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"; diff --git a/Tone/event/Sequence.ts b/Tone/event/Sequence.ts index 42a48f2a..414584d9 100644 --- a/Tone/event/Sequence.ts +++ b/Tone/event/Sequence.ts @@ -160,7 +160,6 @@ export class Sequence extends ToneEvent { }, 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 { diff --git a/Tone/instrument/AMSynth.ts b/Tone/instrument/AMSynth.ts index 47242a71..44a9c938 100644 --- a/Tone/instrument/AMSynth.ts +++ b/Tone/instrument/AMSynth.ts @@ -31,7 +31,6 @@ export class AMSynth extends ModulationSynth { constructor(options?: RecursivePartial); constructor() { super(optionsFromArguments(AMSynth.getDefaults(), arguments)); - const options = optionsFromArguments(AMSynth.getDefaults(), arguments); this._modulationScale = new AudioToGain({ context: this.context, diff --git a/Tone/instrument/MetalSynth.ts b/Tone/instrument/MetalSynth.ts index 41987d43..870bb0ba 100644 --- a/Tone/instrument/MetalSynth.ts +++ b/Tone/instrument/MetalSynth.ts @@ -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"; diff --git a/Tone/instrument/ModulationSynth.ts b/Tone/instrument/ModulationSynth.ts index 4990ea31..835a72ec 100644 --- a/Tone/instrument/ModulationSynth.ts +++ b/Tone/instrument/ModulationSynth.ts @@ -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"; diff --git a/Tone/instrument/MonoSynth.ts b/Tone/instrument/MonoSynth.ts index d9fd07f3..4af8ca4b 100644 --- a/Tone/instrument/MonoSynth.ts +++ b/Tone/instrument/MonoSynth.ts @@ -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 { diff --git a/Tone/instrument/Synth.ts b/Tone/instrument/Synth.ts index 14747079..4851fd3f 100644 --- a/Tone/instrument/Synth.ts +++ b/Tone/instrument/Synth.ts @@ -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"; diff --git a/Tone/signal/Negate.ts b/Tone/signal/Negate.ts index ca4da491..76e47965 100644 --- a/Tone/signal/Negate.ts +++ b/Tone/signal/Negate.ts @@ -1,5 +1,4 @@ import { ToneAudioNodeOptions } from "../core/context/ToneAudioNode"; -import { optionsFromArguments } from "../core/util/Defaults"; import { Multiply } from "./Multiply"; import { SignalOperator } from "./SignalOperator"; diff --git a/Tone/signal/Signal.ts b/Tone/signal/Signal.ts index a405b015..50d9c7b5 100644 --- a/Tone/signal/Signal.ts +++ b/Tone/signal/Signal.ts @@ -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"; diff --git a/Tone/signal/ToneConstantSource.ts b/Tone/signal/ToneConstantSource.ts index e3916936..684e9506 100644 --- a/Tone/signal/ToneConstantSource.ts +++ b/Tone/signal/ToneConstantSource.ts @@ -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"; diff --git a/Tone/signal/WaveShaper.ts b/Tone/signal/WaveShaper.ts index fdd2d385..ed5b3027 100644 --- a/Tone/signal/WaveShaper.ts +++ b/Tone/signal/WaveShaper.ts @@ -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; diff --git a/Tone/source/OneShotSource.ts b/Tone/source/OneShotSource.ts index 218d7695..89d12b0b 100644 --- a/Tone/source/OneShotSource.ts +++ b/Tone/source/OneShotSource.ts @@ -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"; diff --git a/Tone/source/Source.test.ts b/Tone/source/Source.test.ts index 13bdab17..6cdc9754 100644 --- a/Tone/source/Source.test.ts +++ b/Tone/source/Source.test.ts @@ -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(); diff --git a/Tone/source/UserMedia.ts b/Tone/source/UserMedia.ts index 1f40d340..5c9ae5c2 100644 --- a/Tone/source/UserMedia.ts +++ b/Tone/source/UserMedia.ts @@ -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; diff --git a/Tone/source/buffer/ToneBufferSource.ts b/Tone/source/buffer/ToneBufferSource.ts index b19b01d2..39dd14c1 100644 --- a/Tone/source/buffer/ToneBufferSource.ts +++ b/Tone/source/buffer/ToneBufferSource.ts @@ -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; diff --git a/Tone/source/oscillator/AMOscillator.test.ts b/Tone/source/oscillator/AMOscillator.test.ts index d9329fa7..b6e4d0fe 100644 --- a/Tone/source/oscillator/AMOscillator.test.ts +++ b/Tone/source/oscillator/AMOscillator.test.ts @@ -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"; diff --git a/Tone/source/oscillator/AMOscillator.ts b/Tone/source/oscillator/AMOscillator.ts index a9c81af5..0c65d046 100644 --- a/Tone/source/oscillator/AMOscillator.ts +++ b/Tone/source/oscillator/AMOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/FMOscillator.test.ts b/Tone/source/oscillator/FMOscillator.test.ts index 3c4cd208..0f191238 100644 --- a/Tone/source/oscillator/FMOscillator.test.ts +++ b/Tone/source/oscillator/FMOscillator.test.ts @@ -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"; diff --git a/Tone/source/oscillator/FMOscillator.ts b/Tone/source/oscillator/FMOscillator.ts index 99d5730c..38eabc7b 100644 --- a/Tone/source/oscillator/FMOscillator.ts +++ b/Tone/source/oscillator/FMOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/FatOscillator.test.ts b/Tone/source/oscillator/FatOscillator.test.ts index c7f54273..db7dc1d7 100644 --- a/Tone/source/oscillator/FatOscillator.test.ts +++ b/Tone/source/oscillator/FatOscillator.test.ts @@ -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"; diff --git a/Tone/source/oscillator/FatOscillator.ts b/Tone/source/oscillator/FatOscillator.ts index 92b1d69e..82127d7f 100644 --- a/Tone/source/oscillator/FatOscillator.ts +++ b/Tone/source/oscillator/FatOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/LFO.ts b/Tone/source/oscillator/LFO.ts index 9d1f186a..6da91dd1 100644 --- a/Tone/source/oscillator/LFO.ts +++ b/Tone/source/oscillator/LFO.ts @@ -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; diff --git a/Tone/source/oscillator/OmniOscillator.ts b/Tone/source/oscillator/OmniOscillator.ts index a6d00e50..a5866a67 100644 --- a/Tone/source/oscillator/OmniOscillator.ts +++ b/Tone/source/oscillator/OmniOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/Oscillator.ts b/Tone/source/oscillator/Oscillator.ts index 8f89e548..85651369 100644 --- a/Tone/source/oscillator/Oscillator.ts +++ b/Tone/source/oscillator/Oscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/PWMOscillator.ts b/Tone/source/oscillator/PWMOscillator.ts index 353f59c5..082f3735 100644 --- a/Tone/source/oscillator/PWMOscillator.ts +++ b/Tone/source/oscillator/PWMOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/PulseOscillator.ts b/Tone/source/oscillator/PulseOscillator.ts index 8ea5109d..87c810dd 100644 --- a/Tone/source/oscillator/PulseOscillator.ts +++ b/Tone/source/oscillator/PulseOscillator.ts @@ -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"; diff --git a/Tone/source/oscillator/ToneOscillatorNode.test.ts b/Tone/source/oscillator/ToneOscillatorNode.test.ts index 3ed8549f..03c69533 100644 --- a/Tone/source/oscillator/ToneOscillatorNode.test.ts +++ b/Tone/source/oscillator/ToneOscillatorNode.test.ts @@ -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 => { diff --git a/scripts/tsconfig.build.json b/scripts/tsconfig.build.json index 4e09cd18..9a80fee5 100644 --- a/scripts/tsconfig.build.json +++ b/scripts/tsconfig.build.json @@ -1,7 +1,8 @@ { "compilerOptions": { "sourceMap": true, - "declaration": true + "declaration": true, + "noUnusedLocals": true, }, "extends": "../tsconfig.json", "include": [