Skip to content

Commit

Permalink
Update Tone.js method names. Closes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLaumeister committed Dec 24, 2019
1 parent f6d073b commit f99b45b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/NotePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NotePlayer { // eslint-disable-line no-unused-vars
const lowPass = new Tone.Filter({
frequency: 1100,
rolloff: -12,
}).toMaster();
}).toDestination();

const synth = new Tone.Synth({
oscillator: {
Expand All @@ -59,7 +59,7 @@ class NotePlayer { // eslint-disable-line no-unused-vars
});
}, this.noteOffset * scale.length).then((buffer) => {
for (let i = 0; i < scale.length * self.numVoices; i += 1) {
this.players.push(new Tone.Player(buffer).toMaster());
this.players.push(new Tone.Player(buffer).toDestination());
}
});

Expand Down
2 changes: 1 addition & 1 deletion src/ToneMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ToneMatrix { // eslint-disable-line no-unused-vars
Tone.context.latencyHint = this.SYNTHLATENCY;
Tone.Transport.loopEnd = '1m'; // loop at one measure
Tone.Transport.loop = true;
Tone.Transport.toggle(); // start
Tone.Transport.start();

// If Chrome Autoplay Policy is blocking audio,
// add a play button that encourages user interaction
Expand Down

0 comments on commit f99b45b

Please sign in to comment.