tentando resolver conflitos do tone no mmpCreator
Deploy / Deploy (push) Successful in 2m0s Details

This commit is contained in:
JotaChina 2025-12-26 19:56:09 -03:00
parent bf060929c6
commit 2fa137a45d
2 changed files with 4 additions and 5 deletions

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,

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 ----------------