This commit is contained in:
JotaChina committed 2025-12-07 18:14:32 -03:00
1 parent 708c2843d1
commit 9a92ba9d10
126 files changed
+353160 -271425

No files matched your search

+5 -4
View File
@@ -4,6 +4,7 @@ import { playSample } from "./pattern/pattern_audio.js";
import { renderPatternEditor } from "./pattern/pattern_ui.js";
import { renderAudioEditor } from "./audio/audio_ui.js";
import { loadProjectFromServer } from "./file.js";
import { MMP_MANIFEST, SAMPLE_MANIFEST, SAMPLE_SRC } from "./utils.js"
let samplePathMap = {};
@@ -38,14 +39,14 @@ function buildSamplePathMap(tree, currentPath) {
export async function loadAndRenderSampleBrowser() {
const browserContent = document.getElementById("browser-content");
try {
const response = await fetch(`metadata/samples-manifest.json?v=${Date.now()}`);
const response = await fetch(`${SAMPLE_MANIFEST}?v=${Date.now()}`);
if (!response.ok) throw new Error("Arquivo samples-manifest.json não encontrado.");
const fileTree = await response.json();
samplePathMap = {};
buildSamplePathMap(fileTree, "src/samples");
buildSamplePathMap(fileTree, SAMPLE_SRC);
renderFileTree(fileTree, browserContent, "src/samples");
renderFileTree(fileTree, browserContent, SAMPLE_SRC);
} catch (error) {
console.error("Erro ao carregar samples:", error);
browserContent.innerHTML = `<p style="color:var(--accent-red); padding: 10px;">${error.message}</p>`;
@@ -123,7 +124,7 @@ export async function showOpenProjectModal() {
serverProjectsList.innerHTML = "<p>Carregando...</p>";
openProjectModal.classList.add("visible");
try {
const response = await fetch("metadata/mmp-manifest.json");
const response = await fetch(MMP_MANIFEST);
if (!response.ok) throw new Error("Arquivo mmp-manifest.json não encontrado.");
const projects = await response.json();
+4
View File
@@ -82,6 +82,10 @@ export const DEFAULT_PROJECT_XML = `<?xml version="1.0"?>
</song>
</lmms-project>`;
export const SAMPLE_MANIFEST = `src_mmpSearch/metadata/samples-manifest.json`
export const MMP_MANIFEST = `src_mmpSearch/metadata/mmp-manifest.json`
export const SAMPLE_SRC = `src_mmpSearch/src/samples`
/**
* Helper interna para ler o BPM do input.
* @returns {number} O BPM atual.