tentando resolver conflitos do tone no mmpCreator
Deploy / Deploy (push) Successful in 2m4s
Details
Deploy / Deploy (push) Successful in 2m4s
Details
This commit is contained in:
parent
05bfc6794f
commit
3d6621071d
|
|
@ -176,47 +176,6 @@ export function stopPlayback(rewind = true) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function stopPlayback() {
|
|
||||||
if (appState.global.playbackIntervalId) {
|
|
||||||
clearInterval(appState.global.playbackIntervalId);
|
|
||||||
}
|
|
||||||
appState.global.playbackIntervalId = null;
|
|
||||||
appState.global.isPlaying = false;
|
|
||||||
|
|
||||||
// --- NOVO: Para o Transport e Limpa Synths ---
|
|
||||||
Tone.Transport.stop();
|
|
||||||
|
|
||||||
// Limpa agendamentos melódicos
|
|
||||||
activeParts.forEach((part) => part.dispose());
|
|
||||||
activeParts = [];
|
|
||||||
|
|
||||||
// Solta notas travadas de todos os plugins
|
|
||||||
appState.pattern.tracks.forEach((track) => {
|
|
||||||
try {
|
|
||||||
track.player?.stop();
|
|
||||||
} catch {}
|
|
||||||
try {
|
|
||||||
track.instrument?.releaseAll?.();
|
|
||||||
} catch {} // Para PolySynths
|
|
||||||
try {
|
|
||||||
track.instrument?.triggerRelease?.();
|
|
||||||
} catch {} // Para MonoSynths
|
|
||||||
});
|
|
||||||
// --------------------------------------------
|
|
||||||
|
|
||||||
document
|
|
||||||
.querySelectorAll(".step.playing")
|
|
||||||
.forEach((s) => s.classList.remove("playing"));
|
|
||||||
appState.global.currentStep = 0;
|
|
||||||
if (timerDisplay) timerDisplay.textContent = "00:00:00";
|
|
||||||
|
|
||||||
const playBtn = document.getElementById("play-btn");
|
|
||||||
if (playBtn) {
|
|
||||||
playBtn.classList.remove("fa-pause");
|
|
||||||
playBtn.classList.add("fa-play");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function rewindPlayback() {
|
export function rewindPlayback() {
|
||||||
const lastStep =
|
const lastStep =
|
||||||
appState.global.currentStep > 0
|
appState.global.currentStep > 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue