Skip to content

[synth] LFOs and scenes don't reach AMP ATK/HOLD/REL or VOIC/CHRD; an LFO on PTCH moves five times further than on other machines #883

Open

Description

@jankolkmeier

FM Synth 0.1.2-experimental · Octatrack MKII · OS 1.40C · Modwerk beta base cd39c494, over USB

@timhastie

What happens

On an FM SYNTH track:

  1. An LFO on AMP ATK, HOLD or REL has no audible effect, and neither do scene locks on them. The knob and p-locks work.
  2. An LFO on PTCH moves the pitch five times further than the same LFO on a FLEX or STATIC track. DEP 10 on a square wave gives ±10 semitones instead of ±2; moderate depths already span several octaves.
  3. Scene locks on VOIC and CHRD have no effect.

Expected

The same modulation should behave on an FM track as on any other audio track. LFOs and scenes reach ATK/HOLD/REL and VOIC/CHRD, and a pitch LFO's depth means the same pitch range on every machine.

Cause (upstream/synth/poly.s)

  1. Envelope. Since plan B the engine runs the AMP envelope itself. Every frame, sy_ison writes ATK 0 / HOLD INF / REL INF into the DSP voice record. The engine then reads ATK/HOLD/REL from the live lane (CURVALS, 0x80000810 + 72 t + 12..14), which holds the Part's bytes with the trig's locks only. The scene morph and the LFOs write AMP destinations into the voice record's halfwords 0–2 (octabam docs/firmware/LFO.md §5, MIDI.md App. C), so the engine never sees them, and the override erases them.
  2. Pitch. On a synth track one PTCH unit is a semitone, and sy_word stretches the record's PTCH word ×5. The LFO engine adds its output to that word in the stock unit (1/5 semitone), so the LFO's swing is stretched ×5 too.
  3. VOIC/CHRD. Their readers (sy_warm, po_st_note, the held-chord path) use the same lane, which has no scene morph.

Proposed fix (draft PR follows: FM Synth 0.1.3)

  1. Envelope. po_amp_snap keeps the voice record's ATK/HOLD/REL while they are still the frame builder's: at a START in sy_cold, and in sy_ison before the override. All readers use that snapshot, falling back to the lane until a track has one.
  2. Pitch. po_lfo3_depth, the existing detour at the LFO engine's depth read that mutes LFO 3, also divides the depth by 5 on a synth track when the LFO's PMTR is PTCH. An LFO then sweeps as far as on FLEX (full DEP ≈ ±1 octave). The PTCH knob, p-locks and scenes keep their semitone units.
  3. VOIC, CHRD and RATO as counts. Scenes now reach VOIC and CHRD. They are a voice count, a chord shape and a ratio table position, so interpolating them would sweep through unrelated values in between. They therefore jump:
    • the nearer scene's value is used, scene A at a fader position of 64 or more;
    • a scene that doesn't lock the slot, or is switched off, gives the knob's value, as the morph treats it at its end;
    • VOIC and CHRD apply at the next note. RATO applies at once, and an LFO on RATO still adds to it.

Behaviour change to agree on: a saved project with an LFO on an FM track's PTCH swings one fifth as far as before.

Evidence

Emulator: the repository's adapted ot_emu running the flashed base cd39c494, with the package installed over emulated USB. T1 is an FM sine; T1's stem was measured.

Case 0.1.2 patched
Square → PTCH, DEP 10, constant +10.0 semitones +2.0 semitones (as FLEX)
Square → PTCH, DEP 10, moving ±2.0 semitones
Square → REL 30, DEP 60, constant every note 25 ms (LFO ignored) τ ≈ 0.45 s (the REL 90 law)
Part VOIC 3 + CHRD, no scenes chord bit-identical to 0.1.2

Hardware (reported by me, not verified): MKII, base cd39c494, over USB.

  • LFOs on ATK/HOLD/REL/PTCH behave as on FLEX.
  • Scenes on AMP and on VOIC/CHRD work.
  • VOIC/CHRD/RATO switch once at the fader's midpoint, and an unlocked scene plays the knob value.
  • No clicks, stuck notes or hangs.
  • An A/B against FLEX matches for CHROMATIC keys under a PTCH scene lock, keys while stopped with a PTCH LFO, and the PTCH knob on a sounding locked note.

Not measured: chip timing, complete memory bounds, MKI, MIDI note input.

Questions

  • @timhastie: would you take these into your octatrick line? The same code is unchanged at v2.15 (sy_ison, the lane reads, po_lfo3_depth), so the next re-import would otherwise drop them. I'm happy to send the patch upstream.
  • @repeat98: 0.1.2 was released under your owner-approved update. The draft PR needs a new approval for 0.1.3: unchanged UI, so the 0.1.2 captures retained, and the release builds. Or should it fold into FM Synth 0.1.5: scale quantizer on MIDI tracks (the author's 2.13 quantizer) #555's 0.1.4/0.1.5 instead?

Activity

  1. jankolkmeier commented on Oct 24, 2026

    @jankolkmeier
    ContributorAuthor

    Draft fix: #884 (FM Synth 0.1.3). It needs an owner approval for the new source and the release builds; details are in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions