mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
moving interval to frequency test
This commit is contained in:
parent
aa07dca366
commit
68b1791222
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ define(["Test", "Tone/core/Tone", "helper/PassAudio", "Tone/source/Oscillator",
|
|||
expect(tone.dbToGain(tone.gainToDb(0.5))).is.closeTo(0.5, 0.01);
|
||||
expect(tone.gainToDb(tone.dbToGain(1))).is.closeTo(1, 0.01);
|
||||
});
|
||||
|
||||
it("can convert semitone intervals to frequency ratios", function(){
|
||||
expect(tone.intervalToFrequencyRatio(0)).to.equal(1);
|
||||
expect(tone.intervalToFrequencyRatio(12)).to.equal(2);
|
||||
expect(tone.intervalToFrequencyRatio(7)).to.be.closeTo(1.5, 0.01);
|
||||
});
|
||||
});
|
||||
|
||||
context("Type checking", function(){
|
||||
|
|
Loading…
Reference in a new issue