# Hardware parity and bug fixes across Audible Instruments, with legacy compatibâŠility for existing patches
**From:** `PlasmaChroma/AudibleInstruments` `bug-fixes-pass` (`7a996db`)
**Into:** `VCVRack/AudibleInstruments` `v2` (`a1cd335`)
**Requires:** VCVRack/pichenettes-eurorack#N (eurorack submodule merge is pre-requisite)
## Summary
This pass fixes bugs reported on the forum and in open pull requests, and brings several modules closer to the hardware firmware. Where a fix changes how an existing patch sounds or behaves, the old behavior is kept for that patch through an explicit **Legacy âŠ** context-menu option.
- **Bug fixes:** Marbles' Y quantizer out-of-bounds read and external-mode X SPREAD scaling, a Plaits crash under fast PWM, Plaits tuning (4.6 cents sharp), Clouds' trigger input treated as a gate, inverted Tides High/Low gates, and the Tides PLL.
- **Hardware features not previously ported:** Marbles panel long presses (deja vu lock, second T bank, scale selection, scale recording), Marbles Y and gate-length controls, Clouds sample-memory slots, Braids BITS/RATE and TRIG hard sync, Frames FRAME STEP pulses, sequencer mode and continuous VCA response.
- **Hardware parity:** Warps level-CV attenuation, the full Stages CV range, Links 3:1 averaging, and orange (not yellow) bicolor LEDs.
- **Eurorack update:** the submodule moves to the resynced eurorack revision. This PR adapts the build and keeps Plaits on its original sixteen models; the new Plaits 1.2 models and Beads come in follow-up PRs.
It addresses or supersedes these open pull requests:
- #107 (Warps level CV)
- #101 (Stages CV range)
- #58 (Frames FRAME STEP)
- #59 (Frames sequencer)
- #103 (Marbles controls). Its controls are covered here, but its 1/16 Y divider default is not adopted: the firmware initializes Y to 1/8, and the manual's 1/16 does not match it.
#56 (Peaks) is a new module port rather than a fix, so it is not included.
## Merging and dependencies
- **Merge the eurorack PR first.** This branch records `eurorack` at `5d02f7c` and depends on its source layout: Plaits `engine2/`, `fm/` and `chords/`, the Tides 2 ramp extractor in `tides2/ramp/`, and Stages without its own ramp extractor. It will not build against the current `9739c02`.
- **Submodule URL:** this branch points `.gitmodules` at `PlasmaChroma/pichenettes-eurorack` (`upstream-sync-pichenettes`) so it can be built for review. Once the eurorack PR is merged, the URL goes back to `VCVRack/pichenettes-eurorack`. If that PR is squash-merged, the submodule pointer must also be bumped to the new commit.
- **No new modules and no slug changes.** New parameters are appended after existing IDs, so saved parameter values and MIDI mappings keep their meaning.
## Commits
| Commit | Description |
| --- | --- |
| `61aed9e` | Update eurorack; keep Plaits' original sixteen models; adapt the build to the new layout |
| `c5487c6` | Marbles: independent Y settings, minor-scale weights, Y divider default |
| `c8affc7` | Links averaging, Tides clock and gates, Clouds trigger edges and sample memory, Marbles gate length and reset |
| `d62aed4` | Warps level CV, Frames FRAME STEP and sequencer, Stages full CV range |
| `2070507` | Marbles knob edit modes for Y and gate controls |
| `d4d60a1` | Marbles T range "/4" label slash rendering |
| `279f06f` | Marbles Y and X1âX3 LEDs show negative voltages in red |
| `d8fff40` | Marbles hardware initial defaults, Y octave scale, settings validation |
| `5eec871` | Marbles self-patched X clock detection; eurorack quantizer guard |
| `9cb70cc` | Marbles panel long presses |
| `7b9c7be` | Marbles external-mode X SPREAD tracks 1 V/oct |
| `c91d1a0` | Marbles scale recording and menu equivalents of long presses |
| `a0ce4fe` | Braids BITS/RATE and TRIG hard sync |
| `24903af` | Replace stale TODOs in Rings, Clouds, Shelves and Ripples |
| `ba7abce` | Frames VCA response matches hardware |
| `75c7489` | Legacy options for the Marbles and Braids changes |
| `7d65093` | Orange for red/green LEDs with both dies lit |
| `d59926d` | Update eurorack for Plaits 48 kHz tuning |
| `7a996db` | Fix `memset` warnings |
## Legacy compatibility
Every behavior change that would alter an existing patch follows the same pattern:
- A per-change flag that is **off for new modules** and is cleared by Initialize.
- It is always saved, and **loads on when its key is missing**, so patches saved before this PR keep their previous behavior.
- It has a context-menu toggle, so users can switch an old patch to hardware behavior.
| Module | Flag (context menu) | Keeps for older patches |
| --- | --- | --- |
| Braids | **Legacy TRIG without hard sync** | TRIG as strike only |
| Clouds | **Legacy trigger-as-gate behavior** | TRIG held high retriggers grains |
| Frames | **Legacy response curve** | The previous 200^x VCA curve, bit-identical |
| Links | **Legacy 3:1 summing (no attenuation)** | Sum of the three inputs, not the average |
| Marbles | **Legacy Y follows X range and knobs** | Y driven by X's range, spread, bias and steps |
| Marbles | **Legacy external X SPREAD scaling** | The previous half-scale external note |
| Marbles | **Legacy self-patched X clock detection** | Detection only with explicit reset enabled |
| Stages | **Legacy limited CV range** | Slider + CV clamped to 0..1 |
| Tides | **Legacy inverted High/Low gates** | Inverted gate polarity |
| Tides | **Legacy clock handling** | Previous PLL edge handling and pitch mapping |
| Warps | **Legacy additive level CV** | Level CV added to the knob, linear knob |
Other loading safeguards:
- **Braids:** a new `settingsVersion` key. The wrapper always saved the whole settings struct with BITS and RATE left at 0 (2 bit, 4 kHz), which it never used. Patches without the key load 16 bit, 96 kHz.
- **Marbles:** saved settings are clamped to firmware ranges, and new settings that are missing load the previous values, such as gate length 0.
## Changes by module
Each module lists what changed, how it relates to the hardware, and the impact on existing patches. Changes from the eurorack update are listed with the module they affect; the eurorack PR has the details.
### Random Sampler (Marbles)
**Independent Y section** (`c5487c6`, `2070507`, `d8fff40`)
- **What:** Y has its own range, spread, bias, steps and divider, which X used to drive. They are set from the context menu or by switching the panel knobs to **Knob edit mode: Y generator** (Y knobs shown in green). Y quantizes to octaves by default, and **Y scale: Same as X** applies X's scale instead.
- **Hardware:** the hardware Y section has its own settings, defaults to a 1/8 divider, and quantizes to octaves. The firmware never loads a scale into Y.
- **Patch impact:** older patches load with **Legacy Y follows X range and knobs**, so their Y output does not change.
**T gate length** (`c8affc7`, `2070507`)
- **What:** **T gate length** and **T gate length randomness** for t1 and t3, from the menu or **Knob edit mode: Gate** (red knobs). t2 stays at 50% duty.
- **Hardware:** the firmware's pulse width mean and deviation settings. The wrapper previously passed 0 for both.
- **Patch impact:** new modules default to 50% length. Older patches load the previous 0 values.
**Explicit reset** (`c8affc7`)
- **What:** **Jitter/Steps CV inputs reset T/X** turns those two CV inputs into reset inputs for T and X. The knobs stay active. Internally clocked X follows a T reset.
- **Hardware:** uses the final firmware's reset-aware generators, which the eurorack update brings in.
- **Patch impact:** off by default and for older patches.
**Self-patched X clock detection** (`5eec871`)
- **What:** the firmware's detector now runs whenever X CLOCK is patched, not only with explicit reset enabled. Once a T output is recognized at X CLOCK, which takes several matching edges, X follows that output's exact internal ramp.
- **Hardware:** matches the firmware. Smooth X shapes its glides from this ramp, so irregular T clocks no longer cause flat holds or jumps.
- **Patch impact:** older patches keep the previous detection through **Legacy self-patched X clock detection**.
**External-mode X SPREAD scaling** (`7b9c7be`)
- **What:** in external mode, X now reproduces the X SPREAD input 1:1 (1 V/oct, clipped at ±5 V), and the jack no longer modulates SPREAD. The wrapper used to compute `V/2 + 2.5 à SPREAD`, marked "TODO Fix the scaling".
- **Hardware:** derived from the X SPREAD input stage on page 3 of the schematic, the default calibration, and the firmware, which sets the SPREAD attenuverter to zero gain in this mode. Checked by running the firmware `XYGenerator` with both formulas.
- **Patch impact:** older patches keep the previous scaling through **Legacy external X SPREAD scaling**. For example, 2 V in at center SPREAD gives 2.25 V in legacy mode and 2.00 V otherwise.
**Panel long presses** (`9cb70cc`)
- **What:** buttons act on release, or on a 2 s long press while still held.
- **DEJA VU** locks the loop, with the LED pulsing.
- **T MODE** selects the second bank of t models, with the LED blinking.
- **X RANGE** enters scale selection. Short presses cycle scales, the LED blinks the scale's color, and the mode ends after 4 s without a press.
- **X RANGE** is ignored while EXT is active, and its LED is off.
- **Hardware:** matches the firmware UI, including its LED timing.
- **Patch impact:** none for older patches. The existing deja vu keys are still saved for older builds, alongside new `t_deja_vu_locked` and `x_deja_vu_locked` keys.
**Scale recording** (`c91d1a0`)
- **What:** long-press EXT to record a scale into the selected slot from X SPREAD, one note per X CLOCK gate. Press EXT to save, which needs at least two notes, or long-press to restore the factory scale. The six slots are saved with the patch.
- **Hardware:** follows the firmware's recording procedure and LED feedback.
- **Patch impact:** older patches load all factory scales.
**Defaults and minor scale** (`c5487c6`, `d8fff40`)
- **What:** new modules default X range to Full (±5 V), previously Positive, and Y to 1/8, previously 1/4. The C minor preset's G# and A weights were swapped and now match the firmware's table.
- **Hardware:** matches the firmware's initial settings and preset scale table.
- **Patch impact:** saved range and divider settings load unchanged. **The minor-scale correction applies to all patches:** X in the minor scale now favors G# over A, as on hardware. There is no legacy option for it.
**Output and mode LEDs** (`279f06f`, `7d65093`)
- **What:** the Y and X1âX3 output LEDs show negative voltages in red. The T/X mode and range LEDs show orange, not yellow, where both colors are lit.
- **Hardware:** matches the bicolor LEDs in the hardware circuit.
- **Patch impact:** visual only.
**Panel label** (`d4d60a1`)
- **What:** fixed the slash rendering in the T range "/4" label, matching hemmer's fix (`4f30ea8`).
**From the eurorack update**
- **Deja vu:** follows the fixed firmware. Loops below 0.5 no longer jump, and 0.5 is a true lock. The mutation draw changed, so a patch's random sequence differs from previous builds.
- **Quantizer guard:** Y at high STEPS read out of bounds. It now rounds to the nearest octave, and all other quantizer output is unchanged.
**Divergences from hardware**
| Divergence | Why |
| --- | --- |
| Y and gate settings are reached through **Knob edit mode** and the context menu | UI adaptation: Rack has no secondary knob layer, so the panel swaps to alternate knobs instead |
| Long-press functions are also in the context menu, which names each panel shortcut | A 2 s hold is not discoverable in Rack |
| Recorded scales are saved in the patch, per module, not in flash | Rack has no flash, and each instance can differ |
| **Y scale: Same as X** option | Rack-only addition. The hardware default (octaves) is used for new modules |
| **Jitter/Steps CV inputs reset T/X** repurposes two CV inputs | Rack-only option for the firmware's reset feature. Off by default |
### Macro Oscillator (Braids)
**BITS and RATE** (`a0ce4fe`)
- **What:** bit depth (2â16 bit) and sample rate reduction (4â96 kHz) in the context menu. They are applied before signature waveshaping, using the firmware's masks and decimation factors.
- **Hardware:** matches the firmware's BITS and RATE settings, including upstream's fixed decimation loop, which holds the reduced sample.
- **Patch impact:** none by default. 16 bit, 96 kHz output is bit-identical to the previous code, and older patches load at those values (see Legacy compatibility).
**TRIG hard sync** (`a0ce4fe`, `75c7489`)
- **What:** TRIG rising edges also hard-sync the models built on the analog oscillator. The wrapper used to pass an empty sync buffer, marked TODO.
- **Hardware:** the firmware writes TRIG edges into the sync buffer.
- **Patch impact:** older patches keep TRIG as strike only through **Legacy TRIG without hard sync**. In those patches, output with TRIG pulses is bit-identical to before.
**Divergences from hardware**
| Divergence | Why |
| --- | --- |
| Hard sync lands one render block (0.25 ms) after the trigger; strikes stay immediate | Blocks are rendered ahead, so the edge is placed at the same position in the next block |
| Decimation counted in 96 kHz samples, also in low CPU mode | Keeps the same reduced rates when rendering at the host rate |
| AD envelope, trigger delay and quantizer settings not supported | Not yet ported (unchanged from before) |
### Macro Oscillator 2 (Plaits)
**Original sixteen models on the 1.2 engine table** (`61aed9e`)
- **What:** firmware 1.2 inserts eight engines before the original sixteen. The wrapper offsets the engine by 8 and does its own model CV quantization and trigger latching, so the panel, saved patches and MODEL CV select the same sixteen models as before. The eight new models are not exposed in this PR.
- **Hardware:** the 1.2 firmware latches model CV on a trigger the same way. The wrapper reproduces that for the sixteen-model range.
- **Patch impact:** the same models are selected. They now run the firmware 1.2 DSP revisions, so they match current hardware and may differ subtly in timbre from the previous build.
**From the eurorack update**
- **Tuning** (`d59926d`): the firmware corrects pitch for the hardware's 47,872.34 Hz codec clock, but Rack renders at exactly 48 kHz, so Macro Oscillator 2 was 4.61 cents sharp (VCVRack/pichenettes-eurorack#3, by Lyle Mills). **Existing patches sound 4.6 cents lower, which is the correct pitch.** Measured A4: 441.172 Hz before, 439.9997 Hz after.
- **Slope oscillator:** fast PWM at low pitch produced extreme samples, which crashed the waveshaping engine ([forum report](https://community.vcvrack.com/t/vanilla-patch-that-crashes-vcv-rack-2/18400)). This is fixed, and ordinary output is unchanged.
**Divergences from hardware:** pitch is computed for 48 kHz instead of the codec clock, because Rack renders at exactly 48 kHz. This gives the same pitch as hardware.
### Texture Synthesizer (Clouds)
**Trigger edges** (`c8affc7`)
- **What:** TRIG fires a grain on the rising edge. A held-high input used to retrigger on every block.
- **Hardware:** the firmware treats TRIG as a trigger.
- **Patch impact:** older patches keep the previous behavior through **Legacy trigger-as-gate behavior**.
**Sample memory** (`c8affc7`)
- **What:** a **Sample memory** context submenu saves and loads four audio-buffer slots, including quality and playback mode. Loading a slot freezes playback. Slots are embedded in the patch as versioned Base64, so presets, duplication and undo carry them, and they are validated on load.
- **Hardware:** the firmware's sample-memory format and loader (`GetPersistentData` and `LoadPersistentData`), unchanged.
- **Patch impact:** none for older patches, which have empty slots.
**Divergences from hardware**
| Divergence | Why |
| --- | --- |
| Slots are saved and loaded from the context menu; the panel LOAD/SAVE button has no function, and its tooltip points to the menu | UI adaptation |
| Slots live in the patch, not in flash | Rack has no flash, and each instance can differ |
| Requests run at the next audio block, so they wait while the engine is paused | Avoids allocation and blocking on the audio thread |
| The live buffer is not saved with the patch automatically | Only explicit saves capture audio, to keep patch files bounded |
### Keyframer/Mixer (Frames)
**FRAME STEP** (`d62aed4`, #58)
- **What:** FRAME STEP emits 5 V, 1 ms pulses when the position crosses a keyframe. It rearms when the nearest keyframe changes, which avoids chatter at a boundary.
- **Hardware:** follows the ordering in `frames.cc`, at the documented 5 V and 1 ms. #58 used 10 V.
- **Patch impact:** the output was previously silent. Patches that use it now receive pulses.
**Sequencer mode** (`d62aed4`, #59)
- **What:** a **Sequencer** mode alongside Keyframer and Poly LFO. Rising FRAME modulation steps through the stored keyframes, wrapping at the end, and an empty sequence is handled.
- **Hardware:** follows the firmware thresholds through the FRAME input's 33k/100k stage, which works out to about 1.67 V to rearm and 3.33 V to advance at maximum MODULATION.
- **Patch impact:** none; it is a new mode, off by default. The existing animation CV scaling is unchanged.
**VCA response** (`ba7abce`)
- **What:** each channel's response is continuous (0â100%), set from a slider in its context menu. It follows the firmware's blend of linear and exponential DAC codes over a 75 dB range. The old curve was a 200^x approximation, about 46 dB, and was also applied in Poly LFO mode, which the firmware keeps linear. Responses are four new parameters, appended after the existing IDs and excluded from randomization, so they support undo and MIDI mapping.
- **Hardware:** matches the firmware's linear table within 0.001 dB, and its integer path within one 12-bit step. At half level with full response, the gain is â37.5 dB, previously â23.6 dB.
- **Patch impact:** older patches keep the previous curve through **Legacy response curve**. They render bit-identically in both Keyframer and Poly LFO modes.
**Divergences from hardware**
| Divergence | Why |
| --- | --- |
| Response set from a menu slider, not by holding a button and turning the channel knob | UI adaptation |
| Sequencer mode selected from the context menu | UI adaptation |
| Floating-point VCA gain, with a closed channel fully silent | No DAC steps, and no 2164 noise floor (â72 to â75 dB) |
### Meta Modulator (Warps)
**Level CV attenuation** (`d62aed4`, #107)
- **What:** the level knobs attenuate their CV inputs with the firmware's squared response, instead of adding the CV to the knob. Unpatched inputs use the knob squared. Internal oscillator pitch control is unchanged.
- **Hardware:** follows `warps/cv_scaler.cc` and the level input stage (36k/100k, 3.3 V ADC reference, firmware gain 1.6).
- **Patch impact:** **for new modules the level knob response is squared even with nothing patched.** Older patches keep the additive, linear behavior through **Legacy additive level CV**.
**Divergences from hardware:** an unpatched input uses the knob squared directly, as the firmware's normalization does. This is not numerically identical to patching 5 V; the manual's description of the normalization is simplified.
### Segment Generator (Stages)
**Full CV range** (`d62aed4`, #101)
- **What:** slider + CV now reaches the firmware's full range (â1 to 1.999995) in every mode, instead of being clamped to 0..1. Outputs saturate at the default DAC limits, about ±8.125 V.
- **Hardware:** matches the firmware's CV reader limits and default DAC calibration. This restores negative slew and sample-and-hold voltages, higher oscillator and envelope rates, and grouped envelope targets.
- **Patch impact:** older patches keep the 0..1 clamp through **Legacy limited CV range**.
**From the eurorack update:** in grouped step sequences, the active step tracks its slider and CV instead of latching at the step start, as in the final firmware. Stages now uses Tides 2's ramp extractor, as upstream does.
**Divergences from hardware**
| Divergence | Why |
| --- | --- |
| Output limits use the nominal DAC calibration | Rack has no per-unit calibration |
| Runs at the host sample rate (unchanged VCV patch) | Times are kept in milliseconds, so behavior matches at any rate |
### Tidal Modulator (Tides)
**High/Low gates** (`c8affc7`)
- **What:** High and Low now go high at the end of attack and the end of release. They were inverted.
- **Hardware:** matches the firmware's flags and the panel.
- **Patch impact:** older patches keep the inverted gates through **Legacy inverted High/Low gates**.
**PLL** (`c8affc7`)
- **What:**
- CLOCK edges reach the PLL as clock edges; they were delivered as gate edges.
- The firmware sync setter, which resets its edge counter, is only called when CLOCK is patched or unpatched, not every block.
- With CLOCK patched, the frequency knob selects a ratio, with unity at the center.
- **Hardware:** matches the firmware's PLL, ratio table and centering.
- **Patch impact:** older patches keep the previous handling through **Legacy clock handling**. Free-running pitch is unchanged.
**Divergences from hardware:** the PLL is enabled by patching CLOCK rather than by holding the range button, and not in Sheep mode. This is unchanged from before.
### Multiples (Links)
**3:1 averaging** (`c8affc7`)
- **What:** the 3:1 section averages its inputs with a fixed gain of 1/3. It used to sum them.
- **Hardware:** matches the Links circuit.
- **Patch impact:** older patches, including those saved with no module data, keep summing through **Legacy 3:1 summing (no attenuation)**.
### Bicolor LEDs: orange instead of yellow (`7d65093`)
- **What:** a shared `GreenRedBicolorLight` (in `plugin.hpp`) shows orange where the red and green dies are both lit. Rack's `GreenRedLight` blends them to pale yellow. With one die lit, the output is identical to `GreenRedLight`.
- **Modules:** Marbles mode and range, Resonator, the Clouds level meter, Stages segment type, Tidal Modulator 2, the Warps carrier light and Streams.
- **Hardware:** Mutable Instruments' bicolor LEDs look orange with both dies lit. Tides' firmware calls this state orange.
- **Patch impact:** visual only.
### Tidal Modulator 2 (Tides 2)
- **This PR:** include path for the moved ramp extractor, and orange LEDs.
- **From the eurorack update:** EOA/EOR gates at control rates are plain pulses instead of band-limited edges, and ratio switching uses the final firmware's hysteresis quantizer. Matches the final firmware.
- **Patch impact:** small. Gate edges at control rate are cleaner.
### Modules with no behavior change
- **Resonator (Rings):** stale TODOs replaced with comments explaining the firmware normalization that already handles them. Orange LEDs.
- **Texture Synthesizer (Clouds):** a TODO asking why dry audio isn't reverberated was replaced: the firmware applies reverb to the wet signal only, as on hardware.
- **Modal Synthesizer (Elements), Tides, Warps, Braids, Frames, Clouds:** `memset` calls cast to `void*` to silence compiler warnings (`7a996db`).
- **Shelves, Ripples:** stale Rack v2 TODOs removed. They already read the engine sample rate.
- **Build:** Makefile paths updated for the new eurorack layout (Plaits `engine2/`, `chords/`, `fm/`; Tides 2 `ramp/`; Stages' removed ramp extractor).
## Verification
- **Build:** Linux, Rack SDK 2. An earlier stage of this pass was also built on Windows. There is no CI, and there was no macOS build.
- **Headless harnesses:** temporary harnesses, not committed, ran the actual wrappers, several of them under AddressSanitizer. Each commit message describes its checks. They covered:
- **Legacy loading:** bit-identical output for older Braids (TRIG) and Frames (Keyframer and Poly LFO) patches. Older Marbles external-mode output (2.25 V vs 2.00 V). Flag round trips and Initialize for every flag.
- **Marbles:** scale recording, X and Y quantization, JSON round trips, rejection of malformed scale slots, menu requests.
- **Stages:** all 12 single-segment type/loop/gate combinations and a grouped envelope, compared against independently configured firmware generators with negative and over-range CV at 44.1, 48 and 96 kHz.
- **Tides:** ratios across all ranges at 44.1, 48 and 96 kHz, including Sheep.
- **Clouds:** held-trigger behavior and all 16 mode/quality buffer combinations.
- **Warps:** normalization, CV attenuation and pitch independence.
- **Frames:** pulse amplitude and duration, boundary rearming and empty sequences.
- **Plaits:** all 16 models with 16 voices. Tuning measured at 48 and 44.1 kHz.
- **LEDs:** `GreenRedBicolorLight` gives the same RGBA as `GreenRedLight` whenever one die is lit.
- **Not done:** no comparison against physical modules. Hardware behavior comes from the firmware source, schematics and manuals. Scaling that depends on analog stages uses nominal component values and default calibration.
đ€ Generated with [Claude Code](https://claude.com/claude-code)