Skip to content

Commit

Permalink
Removed latency scheduling workaround (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Linn Dahlgren committed Jul 31, 2020
1 parent 850f9f5 commit 45258f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/SynthInstrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class SynthInstrument { // eslint-disable-line no-unused-vars
const volume = ((this.gridHeight - this.polyphony[gridX]) / this.gridHeight)
* (highVolume - lowVolume) + lowVolume;
try {
this.players[this.currentPlayer].volume.value = volume;
this.players[this.currentPlayer].volume.setValueAtTime(volume, time);
this.players[this.currentPlayer].start(
time, gridY * this.noteOffset, this.noteOffset,
);
Expand Down
2 changes: 0 additions & 2 deletions src/ToneMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ class ToneMatrix { // eslint-disable-line no-unused-vars
}
});

this.SYNTHLATENCY = 0.25; // Queue events ahead of time
Tone.context.latencyHint = this.SYNTHLATENCY;
Tone.Transport.loopEnd = '1m'; // loop at one measure
Tone.Transport.loop = true;
Tone.Transport.start();
Expand Down

0 comments on commit 45258f8

Please sign in to comment.