Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

notepat: per-instrument Shift alternate sound layers

Extends the Shift-held alternate-sound mode with complementary voices
for every tonal wave so the global screen outline has a sonic
counterpart across the whole wavetype row:

sine + shift → +octave sine bell ring (×2, 15% vol)
triangle + shift → +perfect 5th triangle (×1.5, 12% vol)
sawtooth + shift → detuned super-saw (+7 Hz, 20% vol)
square + shift → noise "grit" layer (×2, 8% vol)
whistle + shift → breathy blow (noise ×4, 18% vol)
harp + shift → unchanged short-pluck (tight-stretch in C)

Primary voice drops from 0.5 → 0.42 volume while Shift is held (except
harp which uses its own short duration path) so headroom fits the layer
without clipping. All alternate voices are tracked via compositeVoices
so they release together with the primary voice on key-up — no stuck
ghost layers after the main tone fades.

Queued: sample + composite alternate recipes, wobble/flange FX module.

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

+53 -19
+53 -19
fedac/native/pieces/notepat.mjs
··· 3056 3056 }, system, 1); 3057 3057 } else { 3058 3058 // Shift modifiers — per-instrument alternate sound recipes. 3059 - // harp + shift → short staccato pluck (tight stretch in C) 3060 - // whistle+ shift → "blow" — whistle plus a noise layer for 3061 - // breathy/airy character 3059 + // The global outline around the screen is the mode indicator; 3060 + // each wave kit layers a complementary voice (or swaps params) 3061 + // so "shift" reads sonically as "brighter / thicker / alternate" 3062 + // rather than just boosted velocity. 3063 + // 3064 + // sine + shift → +octave bell ring at 30% volume 3065 + // triangle + shift → +perfect 5th (tone × 1.5) at 25% 3066 + // sawtooth + shift → detuned super-saw (offset +7 Hz) at 40% 3067 + // square + shift → noise "grit" layer at 2× pitch, low vol 3068 + // harp + shift → short staccato pluck (tight stretch in C) 3069 + // whistle + shift → breathy "blow" — whistle + noise @ 4× 3070 + // 3071 + // Alternates release together with the primary voice via 3072 + // compositeVoices bookkeeping so key-up kills everything. 3062 3073 const isShortPluck = wave === "harp" && shiftHeld; 3063 - const isMessyBlow = wave === "whistle" && shiftHeld; 3064 3074 synth = sound.synth({ 3065 3075 type: wave, tone: playFreq, 3066 3076 duration: isShortPluck ? 0.4 : Infinity, 3067 - volume: isMessyBlow ? 0.42 : 0.5, 3077 + volume: shiftHeld && !isShortPluck ? 0.42 : 0.5, 3068 3078 attack: currentAttack(), 3069 3079 decay: isShortPluck ? 0.1 : currentDecay(), 3070 3080 pan, 3071 3081 }); 3072 - if (isMessyBlow) { 3073 - // Noise layer riding two octaves above the whistle — reads as 3074 - // breath passing across the whistle mouth. Volume stays low 3075 - // so the pitched tone still dominates; releases with the 3076 - // main voice via compositeVoices bookkeeping below. 3077 - const blow = sound.synth({ 3078 - type: "noise", tone: playFreq * 4, 3079 - duration: Infinity, 3080 - volume: 0.18, 3081 - attack: Math.max(0.02, currentAttack()), 3082 - decay: currentDecay(), 3083 - pan, 3084 - }); 3082 + // Layer the per-wave Shift alternate if applicable. 3083 + const alts = [synth]; 3084 + if (shiftHeld && !isShortPluck) { 3085 + const atk = currentAttack(), dcy = currentDecay(); 3086 + if (wave === "sine") { 3087 + alts.push(sound.synth({ 3088 + type: "sine", tone: playFreq * 2, 3089 + duration: Infinity, volume: 0.15, 3090 + attack: atk * 1.5, decay: dcy, pan, 3091 + })); 3092 + } else if (wave === "triangle") { 3093 + alts.push(sound.synth({ 3094 + type: "triangle", tone: playFreq * 1.5, 3095 + duration: Infinity, volume: 0.12, 3096 + attack: atk, decay: dcy, pan, 3097 + })); 3098 + } else if (wave === "sawtooth") { 3099 + alts.push(sound.synth({ 3100 + type: "sawtooth", tone: playFreq + 7, 3101 + duration: Infinity, volume: 0.20, 3102 + attack: atk, decay: dcy, pan, 3103 + })); 3104 + } else if (wave === "square") { 3105 + alts.push(sound.synth({ 3106 + type: "noise", tone: playFreq * 2, 3107 + duration: Infinity, volume: 0.08, 3108 + attack: Math.max(0.01, atk), decay: dcy, pan, 3109 + })); 3110 + } else if (wave === "whistle") { 3111 + alts.push(sound.synth({ 3112 + type: "noise", tone: playFreq * 4, 3113 + duration: Infinity, volume: 0.18, 3114 + attack: Math.max(0.02, atk), decay: dcy, pan, 3115 + })); 3116 + } 3117 + } 3118 + if (alts.length > 1) { 3085 3119 rememberSound(hitNote.key, { 3086 3120 synth, note: hitNote.letter, octave: hitNote.octave, baseFreq: freq, 3087 - compositeVoices: [synth, blow], 3121 + compositeVoices: alts, 3088 3122 }, system, 1); 3089 3123 } else { 3090 3124 rememberSound(hitNote.key, { synth, note: hitNote.letter, octave: hitNote.octave, baseFreq: freq }, system, 1);