mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
confirming rounding error fix
This commit is contained in:
parent
6937466554
commit
b2950444db
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
define(["helper/Basic", "Test", "Tone/type/Frequency", "Tone/core/Tone", "deps/teoria", "helper/Offline"],
|
||||
define(["helper/Basic", "Test", "Tone/type/Frequency", "Tone/core/Tone", "deps/teoria", "helper/Offline"],
|
||||
function (Basic, Test, Frequency, Tone, teoria, Offline) {
|
||||
|
||||
describe("Frequency", function(){
|
||||
|
@ -149,11 +149,12 @@ define(["helper/Basic", "Test", "Tone/type/Frequency", "Tone/core/Tone", "deps/t
|
|||
expect(Frequency(440).toNote()).to.equal(teoria.Note.fromFrequency(440).note.scientific());
|
||||
expect(Frequency(220).toNote()).to.equal(teoria.Note.fromFrequency(220).note.scientific());
|
||||
expect(Frequency(13.75).toNote()).to.equal(teoria.Note.fromFrequency(13.75).note.scientific());
|
||||
expect(Frequency(4979).toNote()).to.equal("D#8");
|
||||
expect(Frequency(4979).toNote()).to.equal("D#8");
|
||||
});
|
||||
|
||||
it("can convert note to midi values", function(){
|
||||
expect(Frequency("C4").toMidi()).to.equal(teoria.note("C4").midi());
|
||||
expect(Frequency("C#0").toMidi()).to.equal(teoria.note("C#0").midi());
|
||||
expect(Frequency("A-4").toMidi()).to.equal(teoria.note("A-4").midi());
|
||||
});
|
||||
|
||||
|
@ -178,4 +179,4 @@ define(["helper/Basic", "Test", "Tone/type/Frequency", "Tone/core/Tone", "deps/t
|
|||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue