Skip to content

Commit

Permalink
using var instead of const
Browse files Browse the repository at this point in the history
  • Loading branch information
tambien committed Jun 2, 2018
1 parent 064322c commit a5e0946
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion test/instrument/AMSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(AMSynth, Basic, InstrumentTest, CompareToFile){

it("matches a file", function(){
return CompareToFile(function(){
const synth = new AMSynth().toMaster();
var synth = new AMSynth().toMaster();
synth.triggerAttackRelease("C5", 0.1, 0.1);
}, "amSynth.wav", 0.15);
});
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/DuoSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function(DuoSynth, Basic, InstrumentTest, CompareToFile, Supports){
if (Supports.CHROME_AUDIO_RENDERING){
it("matches a file", function(){
return CompareToFile(function(){
const synth = new DuoSynth().toMaster();
var synth = new DuoSynth().toMaster();
synth.triggerAttackRelease("C5", 0.1, 0.1);
}, "duoSynth.wav", 0.01);
});
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/FMSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function(FMSynth, Basic, InstrumentTest, CompareToFile, Supports){
if (Supports.CHROME_AUDIO_RENDERING){
it("matches a file", function(){
return CompareToFile(function(){
const synth = new FMSynth().toMaster();
var synth = new FMSynth().toMaster();
synth.triggerAttackRelease("G4", 0.1, 0.05);
}, "fmSynth.wav", 0.1);
});
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/MembraneSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(MembraneSynth, Basic, InstrumentTest, CompareToFile){

it("matches a file", function(){
return CompareToFile(function(){
const synth = new MembraneSynth().toMaster();
var synth = new MembraneSynth().toMaster();
synth.triggerAttackRelease("F#2", 0.1, 0.05);
}, "membraneSynth.wav", 0.5);
});
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/MetalSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function(MetalSynth, Basic, InstrumentTest, CompareToFile, Supports){
if (Supports.CHROME_AUDIO_RENDERING){
it("matches a file", function(){
return CompareToFile(function(){
const synth = new MetalSynth().toMaster();
var synth = new MetalSynth().toMaster();
synth.triggerAttackRelease(0.1, 0.05);
}, "metalSynth.wav", 5.9);
});
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/MonoSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function(MonoSynth, Basic, InstrumentTest, CompareToFile, Supports, Offline){
if (Supports.CHROME_AUDIO_RENDERING){
it("matches a file", function(){
return CompareToFile(function(){
const synth = new MonoSynth().toMaster();
var synth = new MonoSynth().toMaster();
synth.triggerAttackRelease("C4", 0.1, 0.05);
}, "monoSynth.wav", 1.75);
});
Expand Down
4 changes: 2 additions & 2 deletions test/instrument/NoiseSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define(["Tone/instrument/NoiseSynth", "helper/Basic", "helper/InstrumentTests",

it("matches a file", function(){
return CompareToFile(function(){
const synth = new NoiseSynth({
var synth = new NoiseSynth({
envelope : {
attack : 0.01,
decay : 0.4
Expand All @@ -27,7 +27,7 @@ define(["Tone/instrument/NoiseSynth", "helper/Basic", "helper/InstrumentTests",

it("matches another file", function(){
return CompareToFile(function(){
const synth = new NoiseSynth({
var synth = new NoiseSynth({
envelope : {
attack : 0.01,
decay : 0.4
Expand Down
2 changes: 1 addition & 1 deletion test/instrument/PluckSynth.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function(PluckSynth, Basic, InstrumentTest, CompareToFile, Supports){
if (Supports.CHROME_AUDIO_RENDERING){
it("matches a file", function(){
return CompareToFile(function(){
const synth = new PluckSynth().toMaster();
var synth = new PluckSynth().toMaster();
synth.triggerAttack("C4");
}, "pluckSynth.wav", 0.2);
});
Expand Down
4 changes: 2 additions & 2 deletions test/instrument/Synth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ function(Synth, Basic, InstrumentTest, APITest, Offline, Frequency, CompareToFil

it("matches a file basic", function(){
return CompareToFile(function(){
const synth = new Synth().toMaster();
var synth = new Synth().toMaster();
synth.triggerAttackRelease("C4", 0.1, 0.05);
}, "synth_basic.wav", 0.3);
});

it("matches a file melody", function(){
return CompareToFile(function(){
const synth = new Synth().toMaster();
var synth = new Synth().toMaster();
synth.triggerAttack("C4", 0);
synth.triggerAttack("E4", 0.1, 0.5);
synth.triggerAttackRelease("G4", 0.5, 0.3);
Expand Down
2 changes: 1 addition & 1 deletion test/source/BufferSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function(BasicTests, BufferSource, Offline, Buffer, Meter, Tone, CompareToFile,

it("matches a file", function(){
return CompareToFile(function(){
const source = new BufferSource(buffer).toMaster();
var source = new BufferSource(buffer).toMaster();
source.start(0).stop(0.2);
}, "bufferSource.wav");
});
Expand Down
2 changes: 1 addition & 1 deletion test/source/GrainPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function(BasicTests, GrainPlayer, Offline, SourceTests, Buffer, Test, Tone, Comp

it("matches a file", function(){
return CompareToFile(function(){
const player = new GrainPlayer(buffer).toMaster();
var player = new GrainPlayer(buffer).toMaster();
player.start(0.1).stop(0.2);
player.detune = -100,
player.playbackRate = 2;
Expand Down
2 changes: 1 addition & 1 deletion test/source/Noise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define(["helper/Basic", "Tone/source/Noise", "helper/SourceTests", "helper/Outpu

it("matches a file", function(){
return CompareToFile(function(){
const noise = new Noise().toMaster();
var noise = new Noise().toMaster();
noise.start(0.1).stop(0.2);
}, "noise.wav", 9);
});
Expand Down
2 changes: 1 addition & 1 deletion test/source/OmniOscillator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function(BasicTests, OmniOscillator, Offline, SourceTests, OscillatorTests, Outp

it("matches a file", function(){
return CompareToFile(function(){
const osc = new OmniOscillator(220, "fmsquare").toMaster();
var osc = new OmniOscillator(220, "fmsquare").toMaster();
osc.start(0.1).stop(0.2);
}, "omniOscillator.wav", 1.6);
});
Expand Down
2 changes: 1 addition & 1 deletion test/source/Oscillator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function(BasicTests, Oscillator, Offline, SourceTests, OscillatorTests, OutputAu

it("matches a file", function(){
return CompareToFile(function(){
const osc = new Oscillator().toMaster();
var osc = new Oscillator().toMaster();
osc.type = "square";
osc.start(0).stop(0.2);
}, "oscillator.wav", 0.005);
Expand Down
2 changes: 1 addition & 1 deletion test/source/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function(BasicTests, Player, Offline, SourceTests, Buffer, Meter, Test, Tone, Co

it("matches a file", function(){
return CompareToFile(function(){
const player = new Player(buffer).toMaster();
var player = new Player(buffer).toMaster();
player.start(0.1).stop(0.2);
player.playbackRate = 2;
}, "player.wav", 0.005);
Expand Down
2 changes: 1 addition & 1 deletion test/source/TickSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ define(["helper/Test", "Tone/source/TickSource", "helper/Offline", "helper/Basic
source.frequency.linearRampToValueAtTime(4, 1);
source.start(0.5);
var iterations = 0;
const times = [0.500, 0.833, 1.094, 1.344, 1.594, 1.844];
var times = [0.500, 0.833, 1.094, 1.344, 1.594, 1.844];
source.forEachTickBetween(0, 2, function(time, ticks){
expect(time).to.be.closeTo(times[ticks], 0.001);
iterations++;
Expand Down

0 comments on commit a5e0946

Please sign in to comment.