mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-28 03:25:01 +00:00
updating threshold
This commit is contained in:
parent
d6a23a134c
commit
aeaaa1e871
1 changed files with 11 additions and 8 deletions
|
@ -7,25 +7,29 @@ import { Oscillator } from "Tone/source";
|
||||||
import { Offline } from "test/helper/Offline";
|
import { Offline } from "test/helper/Offline";
|
||||||
|
|
||||||
describe("Chorus", () => {
|
describe("Chorus", () => {
|
||||||
|
|
||||||
BasicTests(Chorus);
|
BasicTests(Chorus);
|
||||||
EffectTests(Chorus);
|
EffectTests(Chorus);
|
||||||
|
|
||||||
it("matches a file", () => {
|
it("matches a file", () => {
|
||||||
return CompareToFile(() => {
|
return CompareToFile(
|
||||||
const chorus = new Chorus().toDestination().start();
|
() => {
|
||||||
const osc = new Oscillator(220, "sawtooth").connect(chorus).start();
|
const chorus = new Chorus().toDestination().start();
|
||||||
}, "chorus.wav", 0.1);
|
const osc = new Oscillator(220, "sawtooth")
|
||||||
|
.connect(chorus)
|
||||||
|
.start();
|
||||||
|
},
|
||||||
|
"chorus.wav",
|
||||||
|
0.25
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
context("API", () => {
|
context("API", () => {
|
||||||
|
|
||||||
it("can pass in options in the constructor", () => {
|
it("can pass in options in the constructor", () => {
|
||||||
const chorus = new Chorus({
|
const chorus = new Chorus({
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
delayTime: 1,
|
delayTime: 1,
|
||||||
depth: 0.4,
|
depth: 0.4,
|
||||||
spread: 90
|
spread: 90,
|
||||||
});
|
});
|
||||||
expect(chorus.frequency.value).to.be.closeTo(2, 0.01);
|
expect(chorus.frequency.value).to.be.closeTo(2, 0.01);
|
||||||
expect(chorus.delayTime).to.be.closeTo(1, 0.01);
|
expect(chorus.delayTime).to.be.closeTo(1, 0.01);
|
||||||
|
@ -84,4 +88,3 @@ describe("Chorus", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue