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>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
dae8ac46ac
commit
2d59b0429d
@@ -212,7 +212,7 @@ cc.tiredsysadmin.android.sizzle
|
||||
│
|
||||
├── audio/ The real-time sound engine (own thread)
|
||||
│ ├── Transport.kt TransportState snapshot published to the UI
|
||||
│ ├── SynthVoice.kt One NES-style voice: pulse/triangle/noise + ADSR
|
||||
│ ├── SynthVoice.kt One synth note (3-osc subtractive), or a Morph Pad note via FrasilVoice
|
||||
│ ├── SampleVoice.kt Pitched + sliced playback of a decoded sample
|
||||
│ ├── SampleStore.kt Process-wide decoded-PCM cache + WAV encode/decode
|
||||
│ ├── SampleRecorder.kt Ad-hoc mic/USB capture into a sample
|
||||
@@ -223,6 +223,11 @@ cc.tiredsysadmin.android.sizzle
|
||||
│ ├── NativeAudioBridge.kt JNI bridge to the Oboe callback (calls fillBlock)
|
||||
│ └── AudioEngine.kt Oboe/AudioTrack + sample-accurate sequencer + voice/FX mixing
|
||||
│
|
||||
├── frasil/ MPL-2.0 (not GPL): the Morph Pad, ported from FRASIL (see §5.7)
|
||||
│ ├── FrasilDefs.kt Its settings, editor pages, engine-unit mapping, the 36 drone presets
|
||||
│ ├── FrasilPatch.kt Parsed slot snapshot (+ morph target); FrasilClock (the shared TIDE time)
|
||||
│ └── FrasilVoice.kt One pad note: choir + partials + breath, drift, tide, warmth
|
||||
│
|
||||
├── cpp/native_audio.cpp Low-latency Oboe stream; RT callback pulls audio via JNI
|
||||
│
|
||||
├── io/ Human-readable text persistence
|
||||
@@ -407,6 +412,61 @@ than songs. The ViewModel then holds an `incomingSong`, and `App.kt` asks before
|
||||
stay); the intent is consumed so a rotation can't offer it twice. Mikro Seq's "Open
|
||||
in Sizzle" sends its exported `.sng` this way with a FileProvider URI.
|
||||
|
||||
### 5.7 The Morph Pad (FRASIL port, MPL-2.0)
|
||||
|
||||
The **Morph Pad** instrument (`ToolboxType.MORPH_PAD`) is the drone voice of
|
||||
[FRASIL](https://github.com/styvesgoupil/frasil) 3.3 (commit `e7a8fb2`), a
|
||||
custom firmware for the M-VAVE FM-1 by Styves Goupil, translated from C to Kotlin.
|
||||
It was chosen from the FM-1 firmware hub (thefirmwarehub.com) because it was the
|
||||
cleanest evolving-pad engine there and its licence fits.
|
||||
|
||||
**Licence boundary.** FRASIL is MPL-2.0, which is file-level copyleft. The three
|
||||
files in `frasil/` are derived from FRASIL's files, so they **stay MPL-2.0**: they
|
||||
keep FRASIL's copyright line and the MPL header, and their source must stay
|
||||
published. MPL-2.0 §3.3 lets them live in a GPL program (none of FRASIL's files is
|
||||
marked "Incompatible With Secondary Licenses"); the rest of Sizzle stays
|
||||
GPL-3.0-or-later. The text is in `LICENSES/MPL-2.0.txt`. Keep FRASIL-derived code
|
||||
in that package. Glue code that only uses it (`SynthVoice`, `AudioEngine`, the
|
||||
editor) is Sizzle's own and stays GPL. Most other firmwares on the hub are
|
||||
GPL-3.0-*only*; porting from those would make the whole app GPL-3.0-only, so that
|
||||
was avoided.
|
||||
|
||||
**What was ported** (`engine/dsp/frasil.c`, `engine/params.c`): the voice's three
|
||||
layers (CHOIR: three PolyBLEP saws with SHAPE/SOFT and a one-pole or TPT SVF
|
||||
filter; PARTIALS: eight magic-circle partials with tilt, odd, stretch, formant,
|
||||
EVOLVE and BEAT; BREATH: noise or grains through three resonators), MOTION
|
||||
(an Ornstein-Uhlenbeck walk per drifting value, a step per 256-frame block),
|
||||
TIDE, the mix's DC blocker, warmth and the BODY high-pass, and the 36 drone
|
||||
presets. **Left out:** GLINT, BASS, LEAD, the NUAGE reverb (use an Ambience insert),
|
||||
the master effects, stereo SPREAD, pressure and FRASIL's load shedding.
|
||||
|
||||
**Where it plugs in.** A Morph Pad note is played by a `SynthVoice` whose
|
||||
`SynthPatch.pad` is set: the voice then forwards everything to its embedded
|
||||
`FrasilVoice`. That way every existing synth pool (sequencer, mix-bus/MIDI
|
||||
sound-module, editor audition) plays pads with no change to allocation, stealing
|
||||
or note-off. `AudioEngine.patchForSlot`/`refreshSynthPatches` build the patch
|
||||
(`FrasilPatch.from(slot)`) only when the slot version changes, so knob turns and
|
||||
MIDI-LFO moves reach held notes; `FrasilVoice` glides every value to the new patch
|
||||
over ~25 ms (FRASIL glides its parameters the same way).
|
||||
|
||||
**Rendering.** `FrasilVoice.render()` is per sample, as Sizzle's voices are, but
|
||||
internally FRASIL's structure is kept: a 256-frame block recomputes frequencies,
|
||||
filter coefficients and drift; 64-frame chunks are computed at once and handed out
|
||||
a sample at a time. FRASIL's 44.1 kHz per-step constants are rescaled with its own
|
||||
`br_k` rule (`1 - (1 - k)^(44100/fs)`). The mono mix is centre + sides at -3 dB.
|
||||
TIDE is one shared sine in FRASIL; here `FrasilClock` (advanced once per
|
||||
`fillBlock`) is the shared time, so the voices of a chord swell together.
|
||||
|
||||
**Morph** is Sizzle's addition. FRASIL morphs whole scenes over 1–120 s. Here a
|
||||
pad names one factory sound as **MORPH TO**; **MORPH** sets where a note starts
|
||||
between the slot's own sound and that one (an LFO can move it), and **MORPH TIME**
|
||||
(seconds) carries each held note the rest of the way on a smoothstep. Float values
|
||||
are interpolated; the choir filter TYPE switches at the halfway point.
|
||||
|
||||
**Cost.** On a desktop JVM, 32 voices of the heaviest setting run at about 7 % of
|
||||
real time (`FrasilVoiceTest.cpuBudgetForFullPolyphony`). The level of a held pad
|
||||
is matched to a synth note (`aHeldPadIsAboutAsLoudAsASynthNote`).
|
||||
|
||||
---
|
||||
|
||||
## 6. How to extend
|
||||
|
||||
Reference in New Issue
Block a user