Commit Graph
41 Commits
Author SHA1 Message Date
ReactorcoremeltdownandClaude Opus 5 dd04a61e22 0.41.1 (77): cleanup and optimisation round (Android and iOS)
Nothing user-visible changes, except that the Android app is half the size and
both are lighter on the battery.

R8 is on for release builds (21.5 MB -> 10.1 MB); only the two JNI classes are
pinned by name, since the app reflects over nothing of its own, and `make dist`
keeps the mapping beside the APK. The Kotlin DSP that core/ replaced in 0.37.0
was still compiled into every APK with nothing calling it — it moves to the test
source set, where it belongs as the reference the C++ is checked against — and
the golden tests' TestVoice wrappers leave core/src for core/tests/voices, so
neither app compiles them either.

Speed: channel gain, mute/solo and the FX chain are read once per audio block
instead of once per frame in Engine::fillBlock (both platforms, bit-identical —
all 61 reference scenarios still match); the transport pollers idle at 100 ms
(Android) and 10 Hz (iOS) instead of polling flat out while a song is stopped,
woken by any transport call; ProjectIo.save builds into one pre-sized buffer and
a burst of edits is coalesced into one engine sync; the Kotlin grain sources and
factory wavetables are built when their editor opens rather than at launch, where
they duplicated ~6 MB the engine already renders in core/; and Xcode builds the
DSP core at -O2, the level the golden tests measure, not -Os.

Fix: `make lint` failed on a manifest asking for ACCESS_FINE_LOCATION without
ACCESS_COARSE_LOCATION (the BLE MIDI scan on Android 8-11), so `make check`
passes again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-18 10:21:09 +01:00
ReactorcoremeltdownandClaude Opus 5.5 cdabf3018b 0.41.0 (76): Keep screen on toggle (Android and iOS)
Settings › Interface: Android sets FLAG_KEEP_SCREEN_ON on the window, iOS turns
the idle timer off; persisted (and in iOS backups).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:15:46 +01:00
ReactorcoremeltdownandClaude Opus 5.5 7041f762e5 0.40.0 (75): Sampler One-shot (Android and iOS)
- Sampler parameter oneShot (Off/On): note-offs don't release its pads; they
  play their whole slice. Transport stop/pause still releases (SampleVoice::
  release), panic kills
- Engine in core/ and the Kotlin reference both implement it; the golden
  Sampler "high" scenario covers it; oneshot_test checks MIDI, song, stop, panic
- ONE-SHOT toggle in both apps' Sampler editors; specs and layouts regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:53:13 +01:00
ReactorcoremeltdownandClaude Opus 5.5 5240019b47 0.39.1 (74): preset bundles between Android and iOS, both ways
iOS couldn't import Android's Sampler preset bundle (a ZIP with the .szp and
its WAVs) and shared sample presets as bare text naming iOS sample ids.

- core/src/io/PresetBundle: import/export in Android's bundle layout
  (padNFile / sfFile), used by iOS IMPORT and SHARE
- bundle_test imports a bundle written by Android's PresetLibrary
  (IosGoldenPresetBundle); PresetBundleInteropTest imports the iOS-written
  fixture with Android's importZip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:39:33 +01:00
ReactorcoremeltdownandClaude Opus 5.5 6688718bed 0.39.0 (73): export and import MIDI mappings as .szm text (Android and iOS)
- SIZZLE-MIDIMAP 1 format: TYPE, NAME, one parameter=CC line each
- core/src/io/MidiMapIo (iOS) and io/MidiMapIo.kt (Android), tested on one
  shared fixture (midimap_test, MidiMapIoTest)
- EXPORT / IMPORT in each device's MIDI learn panel on both platforms
- Params::remove; iOS clears a mapping by removing it
- ios/Makefile regenerates the Xcode project when source folders change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:31:46 +01:00
ReactorcoremeltdownandClaude Opus 5.5 4d9e2328cb 0.38.0 (72): Bluetooth LE MIDI controllers in Settings (Android and iOS)
- Android: BleMidi scans for the BLE MIDI service, connects through
  MidiManager.openBluetoothDevice, remembers and reconnects controllers;
  Settings › MIDI inputs › Bluetooth MIDI (Scan / Connect / Disconnect / Forget)
- iOS: the system Bluetooth MIDI panel from Setup › MIDI Sync, connected
  controllers remembered and reconnected at launch via CoreBluetooth

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:57:53 +01:00
ReactorcoremeltdownandClaude Opus 5.5 2bc5cb1cbb 0.37.0 (71): one engine, one version for Android and iOS
- Three source trees: core/ (shared C++ engine, moved from ios/core),
  app/ (Android UI), ios/app/ (iOS UI)
- Android plays through core/ via JNI (EngineHost, jni_engine.cpp): the Oboe
  callback renders natively; the Kotlin model is mirrored as project text and
  applied as a diff, so playback continues through edits
- The Kotlin engine moves to the unit tests as ReferenceEngine (golden reference)
- Shared MasterRecorder in core/src/host, used by both apps; host_test
- versions.properties: one versionName/versionCode for both platforms,
  continuing Android's numbering (iOS 0.6.0/11 -> 0.37.0/71)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:49:46 +01:00
ReactorcoremeltdownandClaude Opus 5.5 64e21e0bcc iOS 0.6.0: milestone 5 (recording, MIDI, input bindings, themes, bundles, backups)
- Master recording (MasterSink ring + writer thread) and the sample recorder
- CoreMIDI in/out: sound module, clock send/follow, virtual "Sizzle" ports;
  platform-free parser/module/clock in core (midi_test)
- Hardware keyboard and gamepads via GameController; rebindable keyboard,
  gamepad and MIDI CC actions; per-parameter MIDI learn
- Colour themes (.szt), project bundles (.szgz), backup & restore;
  ZIP in core with zlib (zip_test against jar and unzip)
- Persistent app settings; audio pauses in the background unless sound module

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:26:01 +01:00
ReactorcoremeltdownandClaude Opus 5.5 435305e42a iOS 0.5.0: hand-built editors (Tape Delay, Tape Engine, Mix Tightener, Granular scope, Wavetable tables, Grain Cloud source)
Effect visualisation through the C++ effect, engine and AU; custom wavetables and
grain sources load and persist with the song; the app's slot editor hosts the
file picker for bespoke views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 10:01:14 +01:00
ReactorcoremeltdownandClaude Opus 5.5 42f66534bf iOS 0.4.1: clearing tiles, deleting presets and slot-editor imports work on iOS 15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:40:32 +01:00
ReactorcoremeltdownandClaude Opus 5.5 962cfd1e2b iOS 0.4.0: Sizzle's Tracker, Mix, Toolbox and Setup tabs on the C++ engine
Ported from the Android tabs by parallel agents (each screen with its own
SizzleSession category); slot editors use the card editor with a preset
library; songs load/save in the Android project format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:32:30 +01:00
ReactorcoremeltdownandClaude Opus 5.5 7bc54e6466 iOS 0.3.1: engine, model and file formats in C++, verified against Kotlin; longer settings
Engine (sequencer, mixer, FX chains, MIDI effects) renders four whole songs like
AudioEngine.kt (two bit-exact, two within 9e-6). ProjectIo / SngFormat / PresetIo
round-trip the Kotlin-written files; Float.toString is JDK 17's, checked on all
2^32 floats. Params now holds 255-character values (sample ids were cut).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 01:50:51 +01:00
ReactorcoremeltdownandClaude Opus 5.5 b6589ee792 iOS 0.3.0: card editors like Android's for every plugin (knobs, switches, tabs, drawings)
Layouts exported from Android's DeviceLayouts (DeviceLayouts.json), iOS layouts
for the devices with hand-built Android editors, SwiftUI editor shared by the
extension and the app, Mac snapshot tool for the editors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:41:33 +01:00
ReactorcoremeltdownandClaude Opus 5.5 47588990ce iOS 0.2.1: don't touch the engine's input node (microphone privacy crash); log benchmark
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:35:18 +01:00
ReactorcoremeltdownandClaude Opus 5.5 7f231c8f79 iOS 0.2.0: instruments as AUv3, in-app host with keyboard, MIDI in and benchmark
Shared SizzleDeviceAU base for effects and instruments; sizzle::Instrument voice
pools; Android's factory presets generated into the specs header; the app hosts
every device in-process (no dependence on the system plugin registry).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 22:17:47 +01:00
ReactorcoremeltdownandClaude Opus 5.5 005e0984de iOS 0.1.2: plugin check can't crash on a stale registration after an update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:10:05 +01:00
ReactorcoremeltdownandClaude Opus 5.5 7d8311a77f iOS 0.1.1: effects read the input where the host puts it (were silent out of process)
Out of process the pulled input arrives by pointer, not in the buffers the
plugin offered. au_test now drives the render block with such an upstream;
it fails on 0.1.0 and passes now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 21:07:05 +01:00
ReactorcoremeltdownandClaude Opus 5.5 dcf85ba915 iOS 0.1.0: the eight audio effects as AUv3 plugins on a C++ core
C++ ports of the Kotlin effects, checked against audio the Kotlin code renders
(25 scenarios, IosGoldenExport); an Objective-C++ AUv3 wrapper checked on the
Mac against the core (parameters, presets, saved state); a container app that
checks each plugin on the device. Built as a TrollStore .ipa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:47:06 +01:00
ReactorcoremeltdownandClaude Opus 5.5 77d6e459b2 iOS: TrollStore AUv3 spike (host app + sine AUv3 + App Group self-test)
Separate tree under ios/ with its own Makefile: XcodeGen project, unsigned
device build ad-hoc signed with entitlements and packed as an .ipa.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:46:45 +01:00
ReactorcoremeltdownandClaude Opus 5.5 0c09c3a0f3 Instrument editors pin the keyboard / sampler pads on the right in landscape (0.36.2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:46:00 +01:00
ReactorcoremeltdownandClaude Opus 5.5 bc257203e3 Wavetable editor fits above the keyboard: one oscillator per tab, table drawn in its card (0.36.1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:34:41 +01:00
ReactorcoremeltdownandClaude Opus 5.5 3170e8dd7a One-tap song transfer from Mikro Seq without the replace dialog, with a backup (0.36.0)
Skipped only for ACTION_VIEW + extra.REPLACE + a content URI whose provider
belongs to cc.tiredsysadmin.android.mikroseq. The replaced song is saved as
"Before Mikro Seq import" first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:01:02 +01:00
ReactorcoremeltdownandClaude Opus 5.5 1eafe20410 Device editors: redraw knobs, switches, faders and drawings on every edit (0.35.1)
The controls were skipped on a revision bump because their arguments compared
equal by identity; they now take the revision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 15:29:55 +01:00
ReactorcoremeltdownandClaude Opus 5.5 2d285592e2 Device editors: grouped, colour-coded cards with knobs, switches, tabs and live drawings (0.35.0)
Instruments and effects without a bespoke editor are laid out by DeviceLayouts
as titled cards per function (source, filter, envelope, modulation, output),
with knobs, segmented switches for short choices, tabs for the larger devices,
envelope / filter / LFO drawings, unit-aware values and a fader-bank graphic EQ.
Replaces the two-column slider grid and the fixed-height swipe pager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:31:46 +01:00
ReactorcoremeltdownandClaude Opus 5.5 e38e2a2707 Armed recording follows external MIDI clock Start/Stop, with its tail (0.34.0)
MidiClock reports Start/Continue/Stop to an onTransport hook before the
receive gate; the engine's recorder now runs while the sequencer plays or an
external clock runs, so an armed take starts on clock Start (also in
sound-module mode) and ends a TAIL after clock Stop. Sizzle's own Stop ends
a clock-started take too. ClockRecordingTest covers start, tail, disarmed
and stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:26:10 +01:00
ReactorcoremeltdownandClaude Opus 5.5 3088912264 Mix: long-press an instrument or FX slot to open its settings (0.33.0)
The mixer's INSTRUMENT and FX dropdowns take a long-press (with a haptic
tick) that opens that toolbox slot's editor via a view-model request; the
Toolbox consumes it and returns to the Mix tab on CLOSE or Back. A tap
still opens the slot menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:55:50 +01:00
ReactorcoremeltdownandClaude Opus 5.5 c8d760ed17 Wavetable instrument: two-oscillator band-limited wavetable synth (0.32.0)
Written for Sizzle (the hub's candidates are GPL-3.0-only, so nothing was
copied): tables kept as spectra and rendered per octave by inverse FFT with
a taper, level picked per control block so high notes don't alias; twelve
generated tables plus Serum / WaveEdit WAV import (clm chunk, frame-size
guessing, rebuilt from the kept WAV after a restart); two oscillators with
position, phase bend and up to 4-voice unison, sub, noise, drive, SVF,
amp and mod envelopes, tempo-synced LFO. 12 factory presets. Played inside
SynthVoice like the Morph Pad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:30:09 +01:00
ReactorcoremeltdownandClaude Opus 5.5 aa023d1f01 Grain Cloud instrument: ECHOFIELD's granular engine ported to Kotlin (0.31.0)
A granular drone machine from ECHOFIELD FM-1 (Philip Bos, MIT): six modes
(Cloud, Dust, Tape, Bloom, Pulse, Drift), up to 32 grains, held notes pitch
the grains, freeze, auto-level. One shared cloud per mixer channel (plus one
for editor audition) with note ownership, so sequencer releases never cut a
held MIDI note. Ten built-in sources synthesised at startup (GrainSources,
GPL), or a loaded/recorded sample kept across restarts. 14 factory presets.
The echofield/ package stays MIT, LICENSES/MIT.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:18:04 +01:00
ReactorcoremeltdownandClaude Opus 5.5 2d59b0429d Morph Pad instrument: FRASIL's drone voice ported to Kotlin (0.30.0)
A new instrument for evolving pads and drones, ported from FRASIL 3.3
(Styves Goupil, an M-VAVE FM-1 firmware, MPL-2.0): a detuned saw choir,
eight drifting additive partials and noise through resonators, an
Ornstein-Uhlenbeck MOTION walk and a shared TIDE. Morph toward any of
FRASIL's 36 drone sounds by hand, by MIDI LFO or over a set time while a
note is held. Played by SynthVoice (so the tracker, live MIDI and audition
pools all get it); the frasil/ package stays MPL-2.0, LICENSES/MPL-2.0.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:04:31 +01:00
ReactorcoremeltdownandClaude Opus 5.5 dae8ac46ac Sound-module mode ignores clock Start/Stop for Sizzle's own song (v0.29.2)
With "Receive MIDI clock" on, Mikro Seq's Start also started Sizzle's
sequencer, so a song imported from Mikro Seq played along with the live
notes, doubling parts that Mikro Seq's mutes could not reach. While
sound-module mode is on, Start/Stop are now ignored (traced as such);
tempo is still followed. Verified on the emulator with MidiTrace, plus a
control run with the mode off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:04:41 +01:00
ReactorcoremeltdownandClaude Opus 5.5 3c248028c9 MIDI trace, spaced block names survive save/load, clearer clock-receive text (v0.29.1)
- input/MidiTrace: optional (setprop log.tag.SizzleMidiTrace VERBOSE) log of
  every received packet with lateness and every note handed to the engine
  with the mixer strips it reaches; flags Sizzle's own transport playing and
  clock Start/Stop acting on it. AudioEngine.describeBusTargets backs it.
- ProjectIo percent-encodes spaces/%/] in [PATTERN name=...], so "C1 muted"
  no longer comes back as "C1"; old files load unchanged.
- "Receive MIDI clock" explains that it starts Sizzle's own song, which then
  plays along with incoming notes (the cause of "mutes don't work / only C2"
  reports when used as a sound module with an imported Mikro Seq song).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:00:39 +01:00
ReactorcoremeltdownandClaude Opus 5.5 df64af8c9b MIDI inputs list with per-source switches; reconnect dead virtual sources (v0.29.0)
- Setup -> MIDI Sync lists every MIDI source that can send to Sizzle with a
  switch and its state (Listening / Not connected / Off) plus Reconnect.
  Off-choices persist by a stable MidiSourceKey (Android ids change).
- When the app behind a virtual source dies/restarts, Android keeps the
  device and our connection, drops the service binding and sends no callback,
  so Sizzle went deaf to e.g. a restarted Mikro Seq. A worker thread now
  probes open virtual sources every 3 s (openOutputPort is null from a dead
  server) and reopens dead ones; resume re-scans; zero-open port status is
  also treated as dead.
- Verified on an Android 15 emulator: force-stop + restart Mikro Seq ->
  reconnected within ~3 s, notes flowing with both apps in background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:32:04 +01:00
ReactorcoremeltdownandClaude Opus 5.5 fb9a219e27 Background MIDI sound module and opening .sng from other apps (v0.28.0)
- "Keep running as MIDI sound module" setting: a mediaPlayback foreground
  service (SoundModuleService) keeps Sizzle from being frozen in the
  background, so another app (Mikro Seq) can play its mixer over MIDI with
  the transport stopped. Notification shows open sources and has Stop.
- MIDI notes are routed by MidiSoundModule, owned by SizzleApp next to the
  engine, not by the ViewModel; the UI only mirrors/punches them in. Held
  notes are released per source on disconnect and on CC 120/123. MIDI clock
  follow is wired in SizzleApp. Engine and MIDI ports are ref-counted
  between the Activity and both services.
- MidiByteParser: running status, split packets, realtime, SysEx.
- VIEW/SEND intent filters for .sng (application/x-sizzle-song,
  application/octet-stream, text/plain, .sng path); confirm before replacing.
- SngFormat reader follows the desktop reader: spaced block names, comments,
  loop/group/scale/root, track slot fallback, on-roll blocks first, length
  cap. Mikro Seq 4/4 and 3/4 exports as test fixtures.
- CHANGELOG.md started; handover §5.5/§5.6 and user guide updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:11:18 +01:00
ReactorcoremeltdownandClaude Opus 5 bcec71597d Add an "off" block to the arrangement, with an OFF toolbar button (v0.27.0)
An arrangement slot can now hold Arrangement.NOTE_OFF instead of a block id.
When the playhead reaches one, every track of that lane is released — the
arrangement-level equivalent of a column of note-off cells, for cutting a held
pad or a looping sample without editing the block that started it.

The OFF button sits between FILL and the A/B region controls and writes markers
across the current selection, toggling them away if they are all markers
already. Its label stays "OFF" rather than flipping to CLEAR the way FILL does:
a marker is also "filled", so FILL already reads CLEAR for it, and two adjacent
CLEAR buttons was genuinely confusing on screen. Markers draw in the palette's
`danger` red so they never read as another block.

The note-off branch of triggerCell is factored out into releaseTrack(), so the
marker and a note-off cell release identically — including the whole mixer bus
rather than just that column's voices, which is the existing cell's documented
behaviour and not something worth diverging from here.

Two things the sentinel broke that are easy to miss:

  - The project writer filtered arrangement slots with `pid >= 0`, so a marker
    saved silently and came back empty. Both formats now carry it: .szg writes
    the value as-is, and .sng gets an 'x' alongside '#'/'.'. 'x' is an extension
    to the interchange format — a reader that only knows '#' treats it as empty,
    losing the marker but never mis-parsing the roll.
  - A marker is NOT empty, so the run walk-back in triggerArrangementLine would
    have treated it as part of a contiguous run and played the following block
    from the wrong beat. It is now a boundary (Arrangement.hasBlockAt), and a
    block after a marker restarts from its first beat. It still counts towards
    lastFilledBeat, so playback runs up to it.

Tests cover both round-trips, graceful degradation of an unknown roll
character, and the filled-but-not-a-block distinction. Checked on an emulator
that the button appears and toggles, the marker draws red and distinct from a
block, it survives a background/restore autosave cycle, and playback crosses it
without incident.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 22:42:55 +01:00
ReactorcoremeltdownandClaude Opus 5 68e9ed8b41 Edge-scroll the arrangement roll while dragging a selection (v0.26.0)
A long-press selection drag could only reach what was already on screen — about
four bars — so selecting a long span meant selecting, scrolling, and selecting
again. Dragging into either edge of the roll's viewport now scrolls it under the
finger, and the selection keeps extending while it moves.

Speed ramps with how deep into the 56.dp edge zone the finger is, so easing in
creeps for fine work and pushing to the rim covers roughly 15 bars a second.
Both edges, not just the right one: scrolling out is not much use without
scrolling back, and a drag that overshoots has to be able to return.

The subtlety is that a pointer's canvas-local x goes stale the moment the view
moves beneath it, and no new pointer event arrives at all while the finger is
held still at the rim — which is exactly the case that has to keep working. The
drag therefore tracks a VIEWPORT-relative x and recomputes the beat against the
live scroll.value each frame, rather than trusting the last reported position.

The per-frame loop only runs between onDragStart and onDragEnd/onDragCancel,
and it applies a selection update only when the beat under the finger actually
changes, so an edge scroll does not bump the revision sixty times a second.

Verified on an emulator with synthesised motionevents (adb input swipe cannot
hold still long enough to trigger a long press): a right-edge drag carried the
view from bar 1 to bar 34 with the selection following; a left-edge drag
carried it back to bar 12; the scroll stops dead on finger lift, with no drift
four seconds later; and an ordinary drag inside the viewport still selects a
single bar without scrolling at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 22:10:18 +01:00
ReactorcoremeltdownandClaude Opus 5 c2aedcc95c Add an LFO phase dropdown to the synth (v0.25.0)
The synth's LFO always started at phase 0 on every note, so a Square LFO could
only ever gate on-beat-first and a Saw could only ever ramp up. The new
lfophase parameter offsets it in eight 45-degree steps — enough to put the gate
on the off-beat (180) or land a ramp anywhere useful, without a dropdown nobody
wants to scroll.

The offset is applied where the LFO is READ, not seeded into lfoPhase at
note-on. Two reasons: setPatch swaps the patch under a sounding voice, so
turning the knob moves a held note's LFO immediately rather than waiting for
the next trigger; and it matches the toolbox LFO device, which offsets its
phase the same way. Sample & Hold is deliberately unaffected — it clocks on the
raw wrap, and a held random value has no phase to shift.

Presets saved before this existed have no lfophase key, read the default label
and land on 0, which is exactly what they played.

The control reuses the editor's existing EnumParam dropdown and sits beside
WAVE and RATE in the LFO card. Checked on an emulator that three dropdowns
still fit that row at the widest label (PHASE:180°) without crowding, and that
the selection sticks.

Tests: 180 degrees must inverse a square LFO's loud/quiet halves, 90 must leave
both halves audible (a shift, not just an inversion), and the labels must map
onto the cycle with an unknown or missing one falling back to no offset.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 21:53:04 +01:00
ReactorcoremeltdownandClaude Opus 5 deb582727f Harden untrusted-file parsing, drop two audio-thread allocations, prune dead code (v0.24.0)
SECURITY

A crafted .sf2 hung the app. SoundFontLoader's RIFF walk trusted the chunk
sizes in the file: a negative size moved the cursor BACKWARDS, so the walk
re-read the same chunk header forever. runCatching cannot catch that — there is
no exception, just a thread that never returns. 76 bytes was enough. Every seek
in both the chunk and sub-chunk loops is now forced forward, negative sizes end
the walk, and the sample offset is resolved in Long so a hostile 32-bit start
index can no longer wrap Int and land the read somewhere arbitrary.

Neither ZIP import had a decompression budget. The zip-slip path check does not
see a bomb, because its entries are perfectly well-named — they are just
enormous. A restore streams to disk and filled the device; a project bundle
accumulates in memory and exhausted the heap. New ZipLimits budgets both, with
different limits because they fail differently: 512 MB for a restore, 64 MB for
a bundle, 20k entries either way. An over-budget archive is rejected like any
other bad file, leaving existing data untouched.

PlaybackService was exported with no permission, so any app on the device could
bind the MediaSessionService and take transport control. Now exported="false".
Verified on an emulator that this changes nothing that matters: the session is
still the system's media button session, the notification still posts, the
foreground service survives backgrounding, no SecurityException. The only loss
is discovery by external media browsers (Auto, Assistant, Wear), which this app
never supported.

String.format("%.2f") in three parameter readouts used the default locale, so a
comma-decimal locale rendered knob values inconsistently with the rest of the
monospace UI. Pinned to Locale.US.

PERFORMANCE

Two allocations removed from threads documented as allocation-free:
  - applyLfos() called target.substring(sep + 1) every block for each active
    LFO (~250/s each), in a function that already parses the slot index
    character-by-character to avoid exactly this. Now matched with
    regionMatches, which allocates nothing.
  - busNoteOn() built `(0 until N).map { … }.firstOrNull { … }` twice — a range
    iterator plus an ArrayList per incoming MIDI note. Replaced with an indexed
    freeBusVoice() scan, matching the style used elsewhere in the file.

DEAD CODE

Arrangement.isLaneMuted had no callers (everything reads laneMuted[] directly).
Four tab-title strings and a notification-channel name were left over from an
earlier design — the tabs are composed with literals and media3 names its own
channel. Added the missing android:roundIcon, which is why lint thought
ic_launcher_round was unused; the asset was always meant to be referenced.

Lint is clean of UnusedResources, DefaultLocale and ExportedService. Its
remaining ObsoleteSdkInt advice — merge mipmap-anydpi-v26 into mipmap-anydpi —
is wrong for this AGP version and was reverted: aapt then fails to resolve the
launcher icons at all.

NOT CHANGED, flagged for a decision: android:allowBackup is still true, so
projects, presets, themes and the settings/bindings DataStore go to Google's
cloud backup. That is a standard hardening finding, but it is also a data
portability feature, and the app now has its own backup/restore — a product
call rather than a defect.

New tests: SoundFontLoaderTest (hostile SF2 headers, with timeouts — the hang
reproduces as a TestTimedOutException without the fix) and ZipBombTest (both
import paths, plus a guard that an ordinary backup still restores).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 21:16:29 +01:00
ReactorcoremeltdownandClaude Opus 5 3453f9f003 Band-limit amp modulation so a Square/Saw LFO no longer clicks (v0.23.1)
The amplifier is the only modulation destination with nothing downstream to
absorb a discontinuity. Pitch feeds a phase accumulator and cutoff feeds filter
coefficients, both of which integrate a step away; the amp multiplies the
output sample directly:

    a = ampE * velocity * (1 + mAmp)
    y = filtered * a * OUT_GAIN

A Saw, Square or S&H LFO steps instantaneously, so wiring one to Amp put a
full-scale jump straight on the output — a broadband click at every edge, and
at a musical LFO rate (8 Hz is a 1/8 note at 120 BPM) that is a stream of
clicks several times a second: the reported crackle. Sine and Triangle were
unaffected because they are continuous, which is why only the stepping
waveforms were reported.

mAmp now runs through a 2 ms one-pole, so each edge becomes a short ramp. At
8 Hz a half cycle is 62 ms, so 2 ms is 3% of it and a chop still reads as a
chop. The envelope itself is deliberately NOT smoothed — it is already
continuous, and rounding it there would soften every attack. A note starts at
its modulated level rather than ramping up to it, so triggering on a square
LFO's quiet half does not blip before ducking.

Measured by the new SynthAmpModTest, worst single-sample output jump during
sustain (C3 triangle, filter wide open, LFO -> Amp at full depth):

    waveform     before     after
    Square       0.804      0.018
    S&H          0.705      0.017
    Saw          0.590      0.011
    (no mod)     0.003      0.003

Not addressed, and worth a separate look: the toolbox LFO *device* writes its
target parameter once per ~4 ms block, which steps every target for every
waveform. That is a different mechanism from the synth's own mod matrix and was
not what was reported here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 20:28:51 +01:00
ReactorcoremeltdownandClaude Opus 5 208de84012 Separate the flick from the tap on the tracker and arrangement canvases (v0.23.0)
Both canvases detected their tap with detectTapGestures, which is the wrong
tool next to a scroll container for two reasons:

  - it CONSUMES the initial down, so the scrollable/horizontalScroll wrapped
    around the canvas had to fight for the gesture. A quick flick frequently
    did nothing, or landed as a tap and moved the cursor; only a slow,
    deliberate drag scrolled reliably.
  - it knows nothing about an in-flight fling, so tapping to halt a flick — the
    reflex every scrolling surface trains — selected a cell under a view that
    was still moving.

Replaced with detectScrollAwareTaps, shared by both canvases: it leaves the
down unconsumed so the scroll container sees the whole gesture, drops the tap
as soon as the finger travels past touch slop or the container claims a drag,
and treats a touch landing on a moving view as "stop here" rather than
"select".

Also fixes a regression from v0.22.1: keeping the cursor row on screen was
written as a standing clamp inside the scroll accessor, which made it a
constraint on the viewport rather than a reaction to the cursor moving. With
the cursor on line 0 it pinned the grid to the top and no amount of dragging
could scroll it. It is now a snapshotFlow on the cursor line that nudges the
offset only when the cursor actually moves off screen, so free scrolling is
unconstrained and a tapped cell still never moves.

Verified on an emulator (Pixel, API 34): a fast flick on the pattern grid now
flings across the whole 64-line pattern where it previously did not move at
all; a slow drag tracks 1:1 with no overshoot; a tap lands on the exact cell
and leaves the view still; the arrangement roll flings from bar 1 to bar 31 and
taps the right lane/bar. The tap-stops-a-fling path is not covered — adb cannot
inject a tap inside the fling window.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 20:06:14 +01:00
ReactorcoremeltdownandClaude Opus 5 1815566b6c Keep the tapped cell under the finger on a scrolled pattern grid (v0.22.1)
On a pattern long enough to overflow the viewport, tapping a cell moved the
grid: the follow logic re-centred the viewport on the cursor the moment it
changed, so the row that was just tapped slid up to the middle of the screen,
well away from the fingertip. The hit test itself was correct — the view moved
out from under it.

While not playing the view now holds still and scrolls only far enough to keep
the cursor row on screen, so a tap never moves it and an off-screen cursor
(arrow keys, punch-in advancing a row) still comes back into view. Centring on
the playhead during playback is unchanged, as is the flick-to-detach.

Also clip the Canvas. Compose does not clip a Canvas to its bounds, and the
grid deliberately draws one row past each edge to fill the partially scrolled
rows, so a scrolled grid painted over the toolbar above it.

Verified on an emulator (Pixel, API 34): before the fix a tap near the bottom
of a 64-line pattern jumped the row to the middle; after it the row stays under
the tap, scroll-then-tap lands on the right cell, an off-screen cursor is
pulled back to the nearest edge, and the playhead still centres during
playback.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 17:09:39 +01:00
ReactorcoremeltdownandClaude Opus 5 fdee7853e5 Adopt the cc.tiredsysadmin namespace and a Makefile entrypoint (v0.22.0)
Brings the project in line with CLAUDE.md:

- Application id / namespace is now cc.tiredsysadmin.android.sizzle
  (cc.tiredsysadmin.<os>.<application>), including the two JNI symbols in
  native_audio.cpp — JNI resolves by mangled package path, so renaming the
  package alone would fail at runtime, not at build time.
- Versions move to versions.properties at the repo root, read by both Gradle
  and the Makefile, with slots for the other platforms. The release APK name
  now derives from applicationId instead of being spelled out.
- Makefile becomes the build/publish entrypoint: atomic targets with real
  dependencies (deps, check, staging, release, install, dist, bump-*), and a
  manual-only publish split into publish-apk / publish-metadata, which also
  regenerates the F-Droid metadata from versions.properties.
- Annotate the two lint errors in MainActivity that this surfaced
  (ComponentActivity.dispatchKeyEvent's LIBRARY_GROUP_PREFIX restriction,
  media3's UnstableApi) so `make check` is green rather than advisory.
- Document identity, versioning, build types and publishing in the handover
  doc; point the README at make.

NOTE: the id change makes this a different app to Android and to F-Droid.
Installs of space.rcmd.android.sizzle will not be upgraded by it and will sit
side by side with the new one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-11-03 16:54:48 +01:00