Skip to content

improve sample accurate for vst3 - #15

Merged
erikgrahn13 merged 3 commits into
mainfrom
sample-accurate
Aug 17, 2026
Merged

improve sample accurate for vst3#15
erikgrahn13 merged 3 commits into
mainfrom
sample-accurate

Conversation

@erikgrahn13

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

params[i] = {
parameter.saParam.getParamID(),
SingularityVst3::normalizedToPlain(
parameter.metadata, parameter.smoothed)};

P1 Badge Preserve automation for ParamList::get consumers

When a host supplies a float automation ramp within a block, this stores the value after advancing through every sample as the ordinary ParamList::data value. Existing DSP written against the documented API—such as ExampleEffect, which reads gain once with params.get(13)—is now invoked once for the whole block and therefore applies the ramp's endpoint to every sample. The removed 16-sample slicer previously advanced get() consumers through the block, so this change makes automation substantially less accurate unless every existing plug-in is rewritten to call the new getSample() API.


processEffectPlugin<SampleT>(
inputSpan, outputSpan, data.numSamples, parameterList);

P2 Badge Chunk UI audio data before processing full host blocks

For an effect that calls sendAudioDataToUI, as the checked ExampleEffect does, passing the entire host block here silently truncates stereo blocks larger than 1024 frames: AudioDataExchange::appendInterleavedFloatData can store only 2048 interleaved floats in one AudioDataBlock. The removed ProcessDataSlicer(16) kept every submitted block within that capacity, so hosts using larger processing blocks now send only the prefix of each block to waveform/UI consumers; split UI data into capacity-sized chunks or retain appropriately sized processing slices.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

parameter.smoothed = parameter.saParam.advance(1);
values[static_cast<std::size_t>(sample)] =
SingularityVst3::normalizedToPlain(
parameter.metadata, parameter.smoothed);

P2 Badge Store each parameter value before advancing its cursor

For automation beginning at offset 0, advance(1) moves the SampleAccurate cursor before its value is stored, so every generated value is one sample early. With the added points (0, 0.0) and (7, 1.0), sample 0 consequently receives the interpolated value for sample 1 instead of 0.0—the new test even requires front() > 0.0. Abrupt changes at offset N will likewise affect sample N-1; capture the current value before advancing to the next sample.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@erikgrahn13
erikgrahn13 merged commit 46be717 into main Aug 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant