tentando resolver conflitos do tone no mmpCreator

This commit is contained in:
JotaChina committed 2025-12-26 19:56:09 -03:00
1 parent f148254958
commit ee49f1c9ff
2 files changed
+4 -5

No files matched your search

+4 -4
View File
@@ -414,7 +414,7 @@ export async function parseMmpContent(xmlString) {
const lanePan = st ? Number(st.getAttribute("pan") ?? 0) / 100 : 0;
// cada <sampletco> é um clip
const clips = Array.from(node.querySelectorAll(":scope > sampletco"));
const clips = Array.from(node.children).filter(c => c.tagName === "sampletco");
clips.forEach((c, cidx) => {
// resolve caminho via manifest; fallback para /samples
const src = c.getAttribute("src") || "";
@@ -509,9 +509,9 @@ export async function parseMmpContent(xmlString) {
.map((trackNode, idx) => {
const trackName = trackNode.getAttribute("name") || "Beat/Bassline";
const playlistClips = Array.from(
trackNode.querySelectorAll(":scope > bbtco")
).map((bbtco) => ({
const playlistClips = Array.from(trackNode.children)
.filter(c => c.tagName === "bbtco")
.map((bbtco) => ({
pos: parseInt(bbtco.getAttribute("pos"), 10) || 0,
len: parseInt(bbtco.getAttribute("len"), 10) || 192,
name: trackName,
-1
View File
@@ -6,7 +6,6 @@ import {
applyAudioSnapshot,
} from "./audio/audio_state.js";
import { DEFAULT_VOLUME, DEFAULT_PAN } from "./config.js";
import * as Tone from "https://esm.sh/tone";
// ---------------- ESTADOS INICIAIS ----------------