Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

notepat: drum mode swaps only upper octave, add trigger logs

Previously drumMode converted every note (both octaves) to the 12-drum
kit, which didn't match the native kitRight semantics and made it feel
like the button wasn't doing anything — you lost your melody row too.
Now drumMode only intercepts notes prefixed with "+" / "++" (the upper
grid), so the lower octave keeps pitched playback and you can play
melody + drums at once. Added 🥁 console logs on toggle and on each
drum hit so the route is visible while debugging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+10 -5
+10 -5
system/public/aesthetic.computer/disks/notepat.mjs
··· 5958 5958 5959 5959 if (downs[note]) return false; 5960 5960 5961 - // Drum mode: each key fires the shared 12-drum kit instead of a pitched note. 5962 - // Strip octave prefix (++, +, -) and lowercase so "C" or "+c" both land on `c`. 5963 - if (drumMode && soundContext) { 5961 + // 🥁 Drum mode: the upper octave (notes prefixed with "+" or "++") fires the 5962 + // shared 12-drum kit instead of a pitched note. Lower octave stays pitched so 5963 + // you can play melody + drums simultaneously. Mirrors the kitRight behaviour 5964 + // in fedac/native/pieces/notepat.mjs. 5965 + if (drumMode && note.startsWith("+") && soundContext) { 5964 5966 const letter = note.replace(/^[+\-]+/, "").toLowerCase(); 5965 5967 const pan = getPanForButtonNote(note); 5968 + const volume = Math.max(0.1, velocity / 127); 5969 + console.log("🥁 drum:", letter, "from", note, "vol", volume.toFixed(2), "pan", pan.toFixed(2)); 5966 5970 playPercussion(soundContext, letter, { 5967 - volume: Math.max(0.1, velocity / 127), 5971 + volume, 5968 5972 pan, 5969 5973 pitchFactor: 1.0, 5970 5974 phase: "both", ··· 7180 7184 drumBtn?.act(e, { 7181 7185 down: () => api.beep(400), 7182 7186 push: () => { 7183 - api.beep(drumMode ? 200 : 600); 7184 7187 drumMode = !drumMode; 7188 + api.beep(drumMode ? 600 : 200); 7189 + console.log("🥁 drumMode:", drumMode ? "ON (upper octave → drum kit)" : "OFF (pitched)"); 7185 7190 }, 7186 7191 }); 7187 7192