MCPcopy
hub / github.com/stemdeckapp/stemdeck / refreshMixerVisuals

Function refreshMixerVisuals

static/js/mixer.js:110–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108}
109
110export function refreshMixerVisuals() {
111 for (const name of TRACK_NAMES) {
112 const state = mixerState[name];
113 if (!state) continue;
114 // Mixer-column lane header
115 const row = mixerEl.querySelector(`.lane-header[data-stem="${name}"]`);
116 if (row) {
117 const muteBtn = row.querySelector(".mute");
118 const soloBtn = row.querySelector(".solo");
119 if (soloBtn) soloBtn.classList.toggle("active", state.soloed);
120 const iconToggle = row.querySelector(".lane-icon-toggle");
121 if (iconToggle) {
122 iconToggle.classList.toggle("active", !state.muted);
123 iconToggle.setAttribute("aria-pressed", String(!state.muted));
124 }
125 row.classList.toggle("muted", state.muted);
126 const knob = row.querySelector(".lane-knob");
127 if (knob) updateLaneKnobVisual(knob, state.volume);
128 }
129 // Stems-list panel row (mirrors the mixer column buttons)
130 if (stemListEl) {
131 const slRow = stemListEl.querySelector(`span[data-stem="${name}"]`);
132 if (slRow) {
133 const m = slRow.querySelector(".stem-mute");
134 const s = slRow.querySelector(".stem-solo");
135 const mon = slRow.querySelector(".stem-monitor");
136 if (m) {
137 m.classList.toggle("active", state.muted);
138 m.setAttribute("aria-pressed", String(state.muted));
139 }
140 if (s) {
141 s.classList.toggle("active", state.soloed);
142 s.setAttribute("aria-pressed", String(state.soloed));
143 }
144 if (mon) {
145 // Active when this stem is THE lone solo (the "monitor" target).
146 const others = TRACK_NAMES.filter((n) => n !== name);
147 const lone = state.soloed
148 && others.every((n) => !mixerState[n]?.soloed);
149 mon.classList.toggle("active", lone);
150 }
151 slRow.classList.toggle("muted", state.muted);
152 }
153 }
154 }
155}
156
157export function setLaneControlsEnabled(enabled) {
158 for (const b of mixerEl.querySelectorAll(".ms-btn")) b.disabled = !enabled;

Callers 8

destroyPlayerFunction · 0.90
wireUpAudioFunction · 0.90
toggleStemMuteFunction · 0.85
toggleStemSoloFunction · 0.85
soloOnlyStemFunction · 0.85
resetMixerFunction · 0.85
muteAllFunction · 0.85
clearAllSolosFunction · 0.85

Calls 1

updateLaneKnobVisualFunction · 0.85

Tested by

no test coverage detected