Skip to content

[AUv3] Parameter ramps and event sample offsets are ignored #162

Description

@spkfb

[AUv3] Parameter ramps and event sample offsets are ignored

Summary

The AUv3 render-event path does not implement sample-accurate parameter changes.

Parameter events and parameter-ramp events appear to be applied as immediate block-level changes, without respecting their sample time or ramp duration.

Severity

P1 — Automation is functionally incorrect

Affected area

modules/yup_audio_plugin_client/auv3/yup_audio_plugin_client_AUv3.mm

Current behaviour

AURenderEventParameter and AURenderEventParameterRamp are handled without splitting the processing block or applying a ramp over the requested duration.

The implementation does not appear to use:

  • eventSampleTime;
  • the event's offset within the current block;
  • rampDurationSampleFrames.

Impact

  • sample-accurate automation is lost;
  • parameter ramps become discontinuous jumps;
  • fast automation may click or zipper;
  • rendered output differs between hosts or buffer sizes;
  • modulation timing may be shifted to the beginning of the block.

Steps to reproduce

  1. Create a gain parameter.
  2. Schedule a parameter event halfway through a render block.
  3. Render a constant signal.
  4. Inspect the exact sample at which gain changes.
  5. Repeat with a parameter ramp over a known number of frames.

Actual result

The parameter change may be applied to the entire block, and a ramp may be treated as an immediate jump.

Expected result

  • Immediate parameter events should take effect at their specified sample offset.
  • Ramp events should interpolate across the requested duration.
  • Multiple events in one block should be processed in order.

Suggested fix

Process the block in segments:

  1. Determine each event's sample offset relative to the current render timestamp.
  2. Render audio up to the next event.
  3. Apply the event.
  4. For ramp events, provide an internal ramp or render subsegments using the interpolated value.
  5. Continue until the end of the block.

Alternatively, extend the processor API so it can receive sample-accurate parameter events directly.

Acceptance criteria

  • Event sample offsets are respected.
  • Parameter ramps use rampDurationSampleFrames.
  • Multiple events in one block are processed in chronological order.
  • Events outside the current render interval are handled correctly.
  • Behaviour is independent of host buffer size.
  • Tests verify the exact transition sample and ramp shape.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions