I’m attempting to refactor this code to make it more DRY. How can I start the playback of the tracks using the Tone.Players
method? codesandbox – https://codesandbox.io/s/tone-mixer-2-lyeqqz
let player = {};
for (let i = 0; i < tracks.length; i++) {
player["buffers" + playerNum] = buffers["track" + playerNum];
playerNum++;
}
const players = new Tone.Players(player);
console.log("playerName:", players.player.name); // player
players.player("player").start(); // Uncaught Error: No Player with the name player exists on this object