mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
toFrequency test
This commit is contained in:
parent
f7a14f2b37
commit
3ddc50be6a
1 changed files with 7 additions and 0 deletions
|
@ -120,6 +120,13 @@ define(["chai", "Tone/core/Tone", "Tone/core/Master", "Tone/core/Bus",
|
|||
expect(tone.intervalToFrequencyRatio(12)).to.equal(2);
|
||||
expect(tone.intervalToFrequencyRatio(7)).to.be.closeTo(1.5, 0.01);
|
||||
});
|
||||
|
||||
it("can convert different representations into frequencies", function(){
|
||||
expect(tone.toFrequency("4n")).to.equal(2);
|
||||
expect(tone.toFrequency("4hz")).to.equal(4);
|
||||
expect(tone.toFrequency("A4")).to.be.closeTo(440, 0.001);
|
||||
expect(tone.toFrequency(990)).to.equal(990);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Tone.Master", function(){
|
||||
|
|
Loading…
Reference in a new issue