renderizando projetos no mmpCreator
Deploy / Deploy (push) Successful in 2m3s Details

This commit is contained in:
JotaChina 2025-12-28 11:59:26 -03:00
parent 53a47d1a4c
commit 2a223afb21
2 changed files with 15 additions and 3 deletions

View File

@ -129,6 +129,19 @@ document.addEventListener("DOMContentLoaded", () => {
const removePatternBtn = document.getElementById("remove-pattern-btn");
const downloadPackageBtn = document.getElementById("download-package-btn");
// Renderizar projeto
const renderAudioBtn = document.getElementById("render-audio-btn");
// salvar projeto .mmp (faz mais sentido com o ícone de save)
saveMmpBtn?.addEventListener("click", generateMmpFile);
// renderizar áudio
renderAudioBtn?.addEventListener("click", () => {
console.log("[UI] Cliquei em render-audio-btn");
renderProjectAndDownload();
});
// Download projeto
downloadPackageBtn?.addEventListener("click", generateMmpFile);
@ -369,13 +382,12 @@ document.addEventListener("DOMContentLoaded", () => {
if (file) handleFileLoad(file).then(() => closeOpenProjectModal());
});
uploadSampleBtn?.addEventListener("click", () => sampleFileInput?.click());
saveMmpBtn?.addEventListener("click", renderProjectAndDownload);
addInstrumentBtn?.addEventListener("click", () => {
initializeAudioContext();
sendAction({ type: "ADD_TRACK" });
});
removeInstrumentBtn?.addEventListener("click", () => {
initializeAudioContext();

View File

@ -145,7 +145,7 @@
<span style="margin-left: 8px">Salvar projeto</span>
<i
class="fa-solid fa-file-audio"
id="save-mmp-btn"
id="render-audio-btn"
title="Renderizar áudio (WAV/MP3/OGG/FLAC)"
></i>
<span style="margin-left: 8px">Renderizar</span>