tentando resolver conflitos do tone no mmpCreator
Deploy / Deploy (push) Successful in 2m2s
Details
Deploy / Deploy (push) Successful in 2m2s
Details
This commit is contained in:
parent
191e97d032
commit
94343c6326
|
|
@ -14,7 +14,7 @@ import { renderAll, getSamplePathMap } from "./ui.js";
|
|||
import { DEFAULT_PAN, DEFAULT_VOLUME, NOTE_LENGTH } from "./config.js";
|
||||
import { initializeAudioContext, getMainGainNode } from "./audio.js";
|
||||
import { DEFAULT_PROJECT_XML, getSecondsPerStep, SAMPLE_SRC } from "./utils.js";
|
||||
import * as Tone from "https://esm.sh/tone";
|
||||
import * as Tone from "https://esm.sh/tone@14.7.77";
|
||||
import { sendAction } from "./socket.js";
|
||||
|
||||
// ⚠️ vem do módulo de áudio (o mesmo que audio_ui usa)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// js/pattern_audio.js
|
||||
import * as Tone from "https://esm.sh/tone";
|
||||
import * as Tone from "https://esm.sh/tone@14.7.77";
|
||||
|
||||
import { appState } from "../state.js";
|
||||
import { highlightStep } from "./pattern_ui.js";
|
||||
|
|
@ -632,7 +632,13 @@ export function startSongPatternPlaybackOnTransport() {
|
|||
if (patt.steps[stepInPattern]) {
|
||||
if (track.type === "sampler" && track.player) {
|
||||
track.player.restart = true;
|
||||
try { track.player.start(time); } catch {}
|
||||
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 {}
|
||||
} else if (track.type === "plugin" && track.instrument) {
|
||||
// plugin sem piano roll
|
||||
try { track.instrument.triggerAttackRelease("C5", "16n", time); } catch {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue