The Preset menu only had sfxr's effects: each a fixed pitch on every
key that dies away by itself. Now its top half holds instruments to
play melodies, basses and drums on.
- Instruments: Square Lead, Pulse Lead, Echo Lead, Octave Arp, Synth
Brass, Detuned Saws, String Pad, Organ, Flute, Bell, Pluck, Triangle
Bass, Pluck Bass and Drum Kit. A line in the menu parts them from the
seven effects below.
- Their Chips follow the note, and all but Bell, Pluck and the drums
hold it while the key is held.
- They come out the same every time they are picked. Randomize and
Mutate make a variant, as before.
- They use what the graph already has: two Chips through a Mix for
Detuned Saws, String Pad, Organ, Flute and Bell, an Envelope on a
Filter's cutoff for Brass, Pluck and Pluck Bass, a Pitch for the
detune and the octave, a Delay for Echo Lead and Bell.
- Drum Kit uses single notes 36 to 46: kick, snare, closed and open
hat on their General MIDI keys, each ending by itself.
- A small Sketch helper lays the nodes on a grid. The sfxr presets use
it too and come out as before.
- Numbers keep to the steps of their rows. Pulse Lead's duty is 0.13,
not 0.125, because the field rounds to 0.01.
Tests:
- Unit chip-presets: 12 green (5 new). Every instrument compiles
without a problem, doubles its frequency an octave up, holds unless
struck and is the same on every pick. The drum kit sounds on exactly
36, 38, 42 and 46. Countercheck with Follow note forced off: red.
- e2e 34 (CI image on stein2, melektaus-atx was off): ALL PASSED,
65 checks (1 new). A first run had the scheduler's looped-bar check
red by 10 ticks between two clock reads, which the presets do not
touch; the second run was green.
- Gate (stein2): CHECK EXIT 0, 256 files, 3974 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Chip could play a sound, but finding a good one meant typing a dozen
numbers. sfxr's buttons do that in one click: a kind of sound drawn
anew every time, a wild draw, or a small nudge. The Instrument tab now
has the same, and plays the result at once.
- Preset menu with Pickup, Laser, Explosion, Powerup, Hit, Jump and
Blip. It puts a new graph in place of the instrument's, as one undo
step: Notes for all 128 notes, Chip, Envelope, Filter, Bitcrusher,
Output. The Chip keeps its own frequency with follow note off, so
every key plays the same effect, and sustain 0 ends it by itself.
- The presets are sfxr's generators, worked out into Hz, semitones and
seconds with sfxr's own formulas, in chipPresets.ts. sfxr's envelope
holds and falls in a line, ours falls quick at first. So the decay
is three times sfxr's hold and fall.
- Randomize draws every number of the Chips, Envelopes, Filters and
Bitcrushers anew, as sfxr's randomizer does. Waves, filter types,
the Bitcrusher's mix and an Envelope's from and to stay.
- Mutate moves each of those numbers a little, one in two. A 0 stays
0, so nothing that was off comes on.
- An input fed by an edge is left alone by both. Both are grey while
the graph has none of those nodes.
- Audition, off by default as in the Pattern tab, plays the note last
played again 150 ms after a change to the graph rests.
- Preset, Randomize and Mutate always play that note, for up to 2 s.
- ReplaceGraphCommand swaps nodes and edges and keeps groups and notes.
- The info on the right of the header kept 220 px and was cut off
with the four new buttons. 140 px still fit "No sound picked".
Not done: punch, filter sweeps and the phaser of sfxr (#341).
Tests:
- Unit chip-presets (new) 7. Counter-check: a wrong Hz formula and
fed inputs not left alone turn 3 of them red. Unit tests of the
instrument tab, graph commands and sound FX nodes: 49 files, 851
green.
- e2e 34 (melektaus-atx): ALL PASSED, 64 checks (4 new): Preset,
Randomize and Mutate, Audition, three undos back to the Sample.
- Screenshot with a Laser preset: the header fits at 1280 px, the
chain is fitted, the Chip is a saw with its duty grey.
- Gate (melektaus-atx): CHECK EXIT 0, 256 files, 3969 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>