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

Function applyStoredStemSelection

static/js/catalog.js:501–511  ·  view source on GitHub ↗
(track)

Source from the content-addressed store, hash-verified

499}
500
501function applyStoredStemSelection(track) {
502 const stored = track.selectedStems || track.stems || [];
503 const next = stored.filter((name) => STEM_NAMES.includes(name));
504 if (!next.length) return;
505 selectedStems.clear();
506 for (const name of next) selectedStems.add(name);
507 saveSelectedStems();
508 for (const btn of document.querySelectorAll(".stem-choice[data-stem]")) {
509 btn.setAttribute("aria-pressed", String(selectedStems.has(btn.dataset.stem)));
510 }
511}
512
513async function loadTrackIntoStudio(trackId) {
514 let track = tracks[trackId];

Callers 1

loadTrackIntoStudioFunction · 0.85

Calls 1

saveSelectedStemsFunction · 0.90

Tested by

no test coverage detected