Amostras de áudio funcionais até o momento. Agulha de tempo, mute/solo e ajustado com a velocidade de reprodução

This commit is contained in:
JotaChina committed 2025-10-12 09:23:27 -03:00
1 parent 8c391412e1
commit 602df1db6d
10 files changed
+942 -689

No files matched your search

+15
View File
@@ -11,6 +11,8 @@ import {
initializeAudioContext,
updateMasterVolume,
updateMasterPan,
startAudioEditorPlayback,
stopAudioEditorPlayback,
} from "./audio.js";
import { handleFileLoad, generateMmpFile } from "./file.js";
import {
@@ -33,6 +35,8 @@ document.addEventListener("DOMContentLoaded", () => {
const removeInstrumentBtn = document.getElementById("remove-instrument-btn");
const playBtn = document.getElementById("play-btn");
const stopBtn = document.getElementById("stop-btn");
const audioEditorPlayBtn = document.getElementById("audio-editor-play-btn");
const audioEditorStopBtn = document.getElementById("audio-editor-stop-btn");
const rewindBtn = document.getElementById("rewind-btn");
const metronomeBtn = document.getElementById("metronome-btn");
const mmpFileInput = document.getElementById("mmp-file-input");
@@ -248,6 +252,17 @@ document.addEventListener("DOMContentLoaded", () => {
});
});
// Listeners para os controles do editor de áudio
audioEditorPlayBtn.addEventListener("click", () => {
if (appState.isAudioEditorPlaying) {
stopAudioEditorPlayback();
} else {
startAudioEditorPlayback();
}
});
audioEditorStopBtn.addEventListener("click", stopAudioEditorPlayback);
loadAndRenderSampleBrowser();
renderApp();
setupMasterKnobs();