mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
testing polyphonic voice handling
This commit is contained in:
parent
7431480efa
commit
277181f88e
2 changed files with 11 additions and 1 deletions
BIN
test/audio/compare/polySynth3.wav
Normal file
BIN
test/audio/compare/polySynth3.wav
Normal file
Binary file not shown.
|
@ -18,7 +18,7 @@ function(PolySynth, Basic, InstrumentTests, OutputAudioStereo, Instrument, Test,
|
|||
synth.triggerAttackRelease("G4", 0.1, 0.4);
|
||||
synth.triggerAttackRelease("B4", 0.1, 0.4);
|
||||
synth.triggerAttackRelease("C4", 0.2, 0.5);
|
||||
}, "polySynth.wav", 0.4);
|
||||
}, "polySynth.wav", 0.5);
|
||||
});
|
||||
|
||||
it("matches another file", function(){
|
||||
|
@ -29,6 +29,16 @@ function(PolySynth, Basic, InstrumentTests, OutputAudioStereo, Instrument, Test,
|
|||
}, "polySynth2.wav", 0.6);
|
||||
});
|
||||
|
||||
it("matches a file and chooses the right voice", function(){
|
||||
return CompareToFile(function(){
|
||||
var synth = new PolySynth(3).toMaster();
|
||||
synth.triggerAttackRelease(["C4", "E4"], 1, 0);
|
||||
synth.triggerAttackRelease("G4", 0.1, 0.2);
|
||||
synth.triggerAttackRelease("B4", 0.1, 0.4);
|
||||
synth.triggerAttackRelease("G4", 0.1, 0.6);
|
||||
}, "polySynth3.wav", 0.5);
|
||||
});
|
||||
|
||||
context("PolySynth Tests", function(){
|
||||
|
||||
it("extends Tone.Instrument", function(){
|
||||
|
|
Loading…
Reference in a new issue