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>
This commit is contained in:
Reactorcoremeltdown
2026-11-16 14:49:46 +01:00
co-authored by Claude Opus 5.5
parent 64e21e0bcc
commit 2bc5cb1cbb
107 changed files with 2921 additions and 1880 deletions
+41 -14
View File
@@ -77,16 +77,20 @@ when it names the published APK. One source means the artifact name and the
manifest can never disagree.
```properties
android.versionName = 0.22.0
android.versionCode = 49
versionName = 0.37.0
versionCode = 71
```
Since 0.37.0 the version is **shared by Android and iOS** (`ios/Makefile` reads
the same two keys and `make -C ios bump-minor` bumps them through the root
Makefile): both apps ship the same features, so every change bumps once, for both.
The file also carries `macos` / `linux` / `bsd` / `windows` slots, set to `-`
until such a port exists, so a port starts from a tracked version instead of
inventing one.
Semantic versioning, applied on every change: **minor** for a feature, **patch**
for a fix or polish. `android.versionCode` always moves by exactly `+1` — both
for a fix or polish. `versionCode` always moves by exactly `+1` — both
F-Droid and the Android package manager order installs by that integer alone,
and a skipped or reused code cannot be taken back once published. `make
bump-minor` / `bump-patch` / `bump-major` does both halves correctly; editing
@@ -377,19 +381,42 @@ in a `LaunchedEffect`, opens the editor, and on CLOSE / Back returns to `returnT
The mixer's INSTRUMENT and FX dropdowns use it on long-press (`RetroDropdown`'s
optional `onLongClick`, with a haptic tick; a tap still opens the menu).
### 5.4.2 iOS/iPadOS AUv3 port
### 5.4.2 Three source trees: shared engine, Android UI, iOS UI (0.37.0)
`ios/` is a separate tree with its own Makefile: Sizzle's devices as AUv3 plugins
in an iPadOS 15+ app installed with TrollStore (0.1.0 ships the eight audio
effects). The DSP is a C++ port of the Kotlin code in `ios/core`, verified
against audio the Kotlin code renders: `app/src/test/.../audio/IosGoldenExport.kt`
writes the reference files and `ios/core/include/sizzle/DeviceSpecs.gen.hpp` when
`SIZZLE_GOLDEN_DIR` is set (`make -C ios golden`); without it the test is skipped.
- **`core/`** — the C++ engine both apps play through: model and file formats,
sequencer and mixer (`engine/`), every instrument and effect, the sample store,
MIDI parsing, ZIP, and `host/` (EngineHost: the song, the engine, live-note
queues, the master recorder and custom wavetable builds behind one lock the
audio thread only try-locks). Tests: `make -C ios core-test` (on the Mac).
- **`app/`** — the Android app: Compose UI, the Kotlin model (the UI's state),
file I/O, input and playback services. `audio/AudioEngine.kt` is the engine's
face: it drives `core/` through `NativeEngine` (JNI, `src/main/cpp/jni_engine.cpp`),
and `native_audio.cpp` renders from it inside the Oboe callback. CMake builds
`core/` into `libsizzle_native.so` as an object library (the device makers are
weak placeholders in `core/src/fx/Registry.cpp`; a static library would link the
placeholders).
- **`ios/app/`** — the iOS app: SwiftUI, the AUv3 plugins, and the
Objective-C++ session around the same core.
What this means for Android work: a change to an effect's DSP or to a device's
parameters makes the iOS reference stale. Run `make -C ios golden core-test`
afterwards and port the change, or note it in `ios/README.md`. See that file for
the design, the porting rules and the test steps.
How the Kotlin model reaches the engine: after every edit (`AppViewModel.touched`
→ `AudioEngine.requestSync`, coalesced to one per main-loop turn), before every
transport or routing call, and every 500 ms as a safety net, `AudioEngine` sends
`ProjectIo.save(project)` to `EngineHost::syncProjectText`. The host parses it
off the lock, compares it with the last text it applied (song settings, each
pattern, arrangement, mixer, each toolbox slot) and copies only what changed
under the lock, so an edit holds the audio thread off for microseconds and
playback continues. Samples go across as they enter `SampleStore` (`put` /
`remove` mirror into the native store). Transport, meters, scope and finished
recordings are polled from a 10 ms thread.
The Kotlin engine (`ReferenceEngine` and the voices and effects under `audio/`,
`frasil/`, `echofield/`, `wavetable/`) is now only a reference: the
`IosGolden*` unit tests render it so the C++ can be checked bit for bit
(`make -C ios golden core-test`). The UI still uses a few of those Kotlin classes
to draw (wavetable frames, Grain Cloud source peaks, sample decoding).
**Parity rule:** every feature or fix lands in both apps in the same change, with
one shared version bump. Engine and DSP work goes into `core/` only.
### 5.5 Sizzle as a background MIDI sound module