mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 08:17:07 +00:00
linting
This commit is contained in:
parent
7c20589ea0
commit
d435dcae96
5 changed files with 26 additions and 27 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
import { expect } from "chai";
|
||||
import { FeedbackCombFilter } from "./FeedbackCombFilter";
|
||||
import { BasicTests } from "test/helper/Basic";
|
||||
|
@ -25,8 +24,8 @@ describe("FeedbackCombFilter", () => {
|
|||
fbcf.set({
|
||||
delayTime: 0.2,
|
||||
resonance: 0.3,
|
||||
});
|
||||
const values = fbcf.get();
|
||||
});
|
||||
const values = fbcf.get();
|
||||
expect(values.delayTime).to.be.closeTo(0.2, 0.001);
|
||||
expect(values.resonance).to.be.closeTo(0.3, 0.001);
|
||||
fbcf.dispose();
|
||||
|
@ -35,8 +34,8 @@ describe("FeedbackCombFilter", () => {
|
|||
it("passes the incoming signal through", () => {
|
||||
return PassAudio(input => {
|
||||
const fbcf = new FeedbackCombFilter({
|
||||
delayTime: 0,
|
||||
}).toDestination();
|
||||
delayTime: 0,
|
||||
}).toDestination();
|
||||
input.connect(fbcf);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -54,7 +54,7 @@ export class FeedbackCombFilter extends ToneAudioNode<FeedbackCombFilterOptions>
|
|||
|
||||
this._delay = this.input = this.output = new Delay({
|
||||
context: this.context,
|
||||
delayTime : options.delayTime
|
||||
delayTime: options.delayTime
|
||||
});
|
||||
this.delayTime = this._delay.delayTime;
|
||||
|
||||
|
@ -83,4 +83,4 @@ export class FeedbackCombFilter extends ToneAudioNode<FeedbackCombFilterOptions>
|
|||
this._feedback.dispose();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import {LowpassCombFilter} from "./LowpassCombFilter";
|
||||
import {BasicTests} from "test/helper/Basic";
|
||||
import {Offline} from "test/helper/Offline";
|
||||
import {PassAudio} from "test/helper/PassAudio";
|
||||
import {Oscillator} from "Tone/source/oscillator/Oscillator";
|
||||
import {expect} from 'chai';
|
||||
import { LowpassCombFilter } from "./LowpassCombFilter";
|
||||
import { BasicTests } from "test/helper/Basic";
|
||||
import { Offline } from "test/helper/Offline";
|
||||
import { PassAudio } from "test/helper/PassAudio";
|
||||
import { Oscillator } from "Tone/source/oscillator/Oscillator";
|
||||
import { expect } from "chai";
|
||||
|
||||
describe("LowpassCombFilter", () => {
|
||||
|
||||
|
@ -13,9 +13,9 @@ describe("LowpassCombFilter", () => {
|
|||
|
||||
it("can be constructed with an object", () => {
|
||||
const lpcf = new LowpassCombFilter({
|
||||
delayTime : 0.2,
|
||||
resonance : 0.3,
|
||||
dampening : 2400
|
||||
delayTime: 0.2,
|
||||
resonance: 0.3,
|
||||
dampening: 2400
|
||||
});
|
||||
expect(lpcf.delayTime.value).to.be.closeTo(0.2, 0.001);
|
||||
expect(lpcf.resonance.value).to.be.closeTo(0.3, 0.001);
|
||||
|
@ -26,9 +26,9 @@ describe("LowpassCombFilter", () => {
|
|||
it("can be get and set through object", () => {
|
||||
const lpcf = new LowpassCombFilter();
|
||||
lpcf.set({
|
||||
delayTime : 0.2,
|
||||
resonance : 0.3,
|
||||
dampening : 2000
|
||||
delayTime: 0.2,
|
||||
resonance: 0.3,
|
||||
dampening: 2000
|
||||
});
|
||||
expect(lpcf.get().delayTime).to.be.closeTo(0.2, 0.001);
|
||||
expect(lpcf.get().resonance).to.be.closeTo(0.3, 0.001);
|
||||
|
@ -37,7 +37,7 @@ describe("LowpassCombFilter", () => {
|
|||
});
|
||||
|
||||
it("passes the incoming signal through", () => {
|
||||
return PassAudio(function(input){
|
||||
return PassAudio(function(input) {
|
||||
const lpcf = new LowpassCombFilter(0).toDestination();
|
||||
input.connect(lpcf);
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@ export class LowpassCombFilter extends ToneAudioNode<LowpassCombFilterOptions> {
|
|||
Q: 0,
|
||||
frequency: options.dampening,
|
||||
rolloff: -12,
|
||||
type : "lowpass",
|
||||
type: "lowpass",
|
||||
});
|
||||
this.dampening = this._lowpass.frequency;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { optionsFromArguments } from "../core/util/Defaults";
|
|||
import { RecursivePartial } from "../core/util/Interface";
|
||||
import { Signal } from "../signal/Signal";
|
||||
import { Noise } from "../source/Noise";
|
||||
import { InstrumentOptions, Instrument } from "./Instrument";
|
||||
import { Instrument, InstrumentOptions } from "./Instrument";
|
||||
|
||||
export interface PluckSynthOptions extends InstrumentOptions {
|
||||
attackNoise: number;
|
||||
|
@ -78,9 +78,9 @@ export class PluckSynth extends Instrument<PluckSynthOptions> {
|
|||
|
||||
static getDefaults(): PluckSynthOptions {
|
||||
return deepMerge(Instrument.getDefaults(), {
|
||||
attackNoise : 1,
|
||||
dampening : 4000,
|
||||
resonance : 0.7,
|
||||
attackNoise: 1,
|
||||
dampening: 4000,
|
||||
resonance: 0.7,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ export class PluckSynth extends Instrument<PluckSynthOptions> {
|
|||
* PluckSynths' trigger release method doesn't do anything.
|
||||
*/
|
||||
triggerRelease(): this{
|
||||
//does nothing
|
||||
// does nothing
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -108,4 +108,4 @@ export class PluckSynth extends Instrument<PluckSynthOptions> {
|
|||
this._lfcf.dispose();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue