ativar/desativar tracks de áudio, knobs funcionais
This commit is contained in:
1 parent
d3e209d8e8
commit
73a5257aec
5 files changed
+260
-28
No files matched your search
@@ -9,6 +9,9 @@ import {
|
||||
removeLastTrackFromState,
|
||||
updateTrackSample,
|
||||
removeTrackById,
|
||||
setPatternTrackMute,
|
||||
setPatternTrackVolume,
|
||||
setPatternTrackPan,
|
||||
} from "./pattern/pattern_state.js";
|
||||
import {
|
||||
addAudioTrackLane,
|
||||
@@ -1352,6 +1355,33 @@ async function handleActionBroadcast(action) {
|
||||
break;
|
||||
}
|
||||
|
||||
case "SET_PATTERN_TRACK_MUTE": {
|
||||
const { trackId, isMuted } = action;
|
||||
setPatternTrackMute(trackId, !!isMuted);
|
||||
renderAll();
|
||||
saveStateToSession();
|
||||
restartAudioEditorIfPlaying?.();
|
||||
break;
|
||||
}
|
||||
|
||||
case "SET_PATTERN_TRACK_VOLUME": {
|
||||
const { trackId, volume } = action;
|
||||
setPatternTrackVolume(trackId, volume);
|
||||
renderAll();
|
||||
saveStateToSession();
|
||||
restartAudioEditorIfPlaying?.();
|
||||
break;
|
||||
}
|
||||
|
||||
case "SET_PATTERN_TRACK_PAN": {
|
||||
const { trackId, pan } = action;
|
||||
setPatternTrackPan(trackId, pan);
|
||||
renderAll();
|
||||
saveStateToSession();
|
||||
restartAudioEditorIfPlaying?.();
|
||||
break;
|
||||
}
|
||||
|
||||
case "SET_ACTIVE_PATTERN": {
|
||||
// índice que veio do seletor global
|
||||
const { patternIndex } = action;
|
||||
|
||||
Reference in new issue
Block a user