melhorando a leitura de projetos no mmpCreator
Deploy / Deploy (push) Successful in 2m10s
Details
Deploy / Deploy (push) Successful in 2m10s
Details
This commit is contained in:
parent
d619e533aa
commit
0ff6235dba
|
|
@ -13,7 +13,7 @@ import { loadAudioForTrack } from "./pattern/pattern_state.js";
|
||||||
import { renderAll, getSamplePathMap } from "./ui.js";
|
import { renderAll, getSamplePathMap } from "./ui.js";
|
||||||
import { DEFAULT_PAN, DEFAULT_VOLUME, NOTE_LENGTH } from "./config.js";
|
import { DEFAULT_PAN, DEFAULT_VOLUME, NOTE_LENGTH } from "./config.js";
|
||||||
import { initializeAudioContext, getMainGainNode } from "./audio.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 * as Tone from "https://esm.sh/tone";
|
||||||
import { sendAction } from "./socket.js";
|
import { sendAction } from "./socket.js";
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ function resolveSamplePath(sampleName, pathMap) {
|
||||||
|
|
||||||
// 2) fallback simples (se você tiver essa convenção)
|
// 2) fallback simples (se você tiver essa convenção)
|
||||||
// ajuste se necessário
|
// ajuste se necessário
|
||||||
if (sampleName) return `src/samples/${sampleName}`;
|
if (sampleName) return `${SAMPLE_SRC}/${sampleName}`;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -314,7 +314,7 @@ function parseInstrumentNode(
|
||||||
let cleanSrc = sampleSrc.startsWith("samples/")
|
let cleanSrc = sampleSrc.startsWith("samples/")
|
||||||
? sampleSrc.substring("samples/".length)
|
? sampleSrc.substring("samples/".length)
|
||||||
: sampleSrc;
|
: sampleSrc;
|
||||||
finalSamplePath = `src/samples/${cleanSrc}`;
|
finalSamplePath = `${SAMPLE_SRC}/${cleanSrc}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue