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

Function wireTransportButtons

static/js/transport.js:417–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

415// ─── Wire transport buttons ───
416
417export function wireTransportButtons() {
418 playBtn.addEventListener("click", togglePlayPause);
419 playMiniBtn?.addEventListener("click", togglePlayPause);
420 stopBtn.addEventListener("click", stopTransport);
421 loopBtn.addEventListener("click", toggleLoop);
422 wireLoopDrag();
423 wireZoomButtons();
424 wireLaneScrollSync();
425 masterFader?.addEventListener("input", () => {
426 setMasterVolume(parseFloat(masterFader.value));
427 applyMix();
428 });
429 masterFader?.addEventListener("dblclick", () => {
430 masterFader.value = "0.5";
431 setMasterVolume(0.5);
432 applyMix();
433 });
434 wireSpeedControl();
435}
436
437function applySpeed(rate) {
438 const clamped = Math.max(0.25, Math.min(2, rate));

Callers 1

main.jsFile · 0.90

Calls 6

setMasterVolumeFunction · 0.90
applyMixFunction · 0.90
wireLoopDragFunction · 0.85
wireZoomButtonsFunction · 0.85
wireLaneScrollSyncFunction · 0.85
wireSpeedControlFunction · 0.85

Tested by

no test coverage detected