From 0ff6235dba1cd34b30398ffd63c376ea1bce1b18 Mon Sep 17 00:00:00 2001 From: JotaChina Date: Thu, 25 Dec 2025 12:36:40 -0300 Subject: [PATCH] melhorando a leitura de projetos no mmpCreator --- assets/js/creations/file.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/creations/file.js b/assets/js/creations/file.js index 4feb0957..f7067f57 100755 --- a/assets/js/creations/file.js +++ b/assets/js/creations/file.js @@ -13,7 +13,7 @@ import { loadAudioForTrack } from "./pattern/pattern_state.js"; 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 } from "./utils.js"; +import { DEFAULT_PROJECT_XML, getSecondsPerStep, SAMPLE_SRC } from "./utils.js"; import * as Tone from "https://esm.sh/tone"; import { sendAction } from "./socket.js"; @@ -40,7 +40,7 @@ function resolveSamplePath(sampleName, pathMap) { // 2) fallback simples (se você tiver essa convenção) // ajuste se necessário - if (sampleName) return `src/samples/${sampleName}`; + if (sampleName) return `${SAMPLE_SRC}/${sampleName}`; return null; } @@ -314,7 +314,7 @@ function parseInstrumentNode( let cleanSrc = sampleSrc.startsWith("samples/") ? sampleSrc.substring("samples/".length) : sampleSrc; - finalSamplePath = `src/samples/${cleanSrc}`; + finalSamplePath = `${SAMPLE_SRC}/${cleanSrc}`; } } }