tentando resolver conflitos do tone no mmpCreator

This commit is contained in:
JotaChina committed 2025-12-26 20:00:10 -03:00
1 parent ee49f1c9ff
commit 0710f3c140
2 files changed
+7 -13

No files matched your search

+2 -8
View File
@@ -1,5 +1,5 @@
// js/pattern_audio.js
import * as Tone from "https://esm.sh/tone@14.7.77";
import * as Tone from "https://esm.sh/tone";
import { appState } from "../state.js";
import { highlightStep } from "./pattern_ui.js";
@@ -632,13 +632,7 @@ export function startSongPatternPlaybackOnTransport() {
if (patt.steps[stepInPattern]) {
if (track.type === "sampler" && track.player) {
track.player.restart = true;
try {
// Verifica se já está tocando. Se sim, para imediatamente antes de recomeçar.
if (track.player.state === "started") {
track.player.stop();
}
track.player.start(time); }
catch {}
try { track.player.start(time); } catch {}
} else if (track.type === "plugin" && track.instrument) {
// plugin sem piano roll
try { track.instrument.triggerAttackRelease("C5", "16n", time); } catch {}