Expand description
Rendering a preset and its notes to audio through a synth.
A Renderer plays a RenderJob: the plug-in state of a preset, the
notes and the Recipe. It returns the audio and a RenderRecord
that names everything the audio depends on, so a later comparison can
cite it. Calibration, compare, refine, the bench and the dataset all
render through this trait and add no recipe field of their own.
Renders of one preset are not bit-identical: a synth starts its unison voices at random phases. Compare two renders within the repeat-render spread, never sample by sample.
fake::FakeRenderer is a seeded additive synth, so the render code runs
in CI with no plug-in. plugin::PluginRenderer renders through a real
plug-in in the sound-to-patch-host process, with the state that
state::preset_state builds.
Modules§
- check
- The load check: a render counts only when the plug-in kept the preset.
- fake
- A fake renderer for tests: a seeded additive synth with no plug-in.
- file
- The
rendercommand: a preset and a MIDI file to a WAV file and a render record, through the load check. - plugin
- The renderer that plays a job through a real plug-in.
- recipe
- The render recipe: the one fixed performance that every render plays.
- session
- The render session: the one worker pool that calibration, refine, the bench and the dataset render through. None of them owns a pool.
- spread
- The repeat-render spread: the noise floor that every later comparison cites.
- state
- The plug-in state of a preset, and the check of a state the plug-in saved back.
- timing
- Render and load timing, the table refine sets its budget from.
- vita
- The open Vital engine as a
Renderer, for single notes in tests and CI with no Vital licence. - wire
- The protocol between the library’s
render::plugin::PluginRendererand the plug-in host process,sound-to-patch-host.
Structs§
- ClipEnd
- Where a clip ends.
- Control
- A controller change and its time.
- Host
Identity - What renders: the synth and its build, the host and the architecture of the process that loads the plug-in.
- Note
Event - A note-on or note-off at a sample frame of the clip.
- Preset
State - The plug-in state of a preset: the bytes a synth loads as its state, and the synth they belong to. Each synth’s render state adapter builds it.
- Recipe
- The render recipe.
Recipe::currentis the only constructor, so a recipe always matches its version. - Render
Job - One render: the preset state, the notes, the tempo and the recipe.
- Render
Note - One note to play: a MIDI key, its start and end in the clip and its velocity.
- Render
Record - Everything a render depends on, so a consumer can cite it and analyze the audio with the same notes.
- Rendered
- The audio of a render and its record.
- Tail
Watch - Finds the end of a clip while it renders, one frame at a time.
Enums§
- Control
Kind - A MIDI controller change at a time of the clip. A plug-in in a VST3 host gets controllers only through its MIDI mapping; a controller it does not map is dropped without an error.
- Event
Kind - Whether a note event starts or ends a note.
- Material
- What kind of sound a recipe clip plays. A pluck plays as a lead.
- Oversampling
- The oversampling of Vital, its only quality setting. The preset stores it as the index of the factor.
- Play
Error - A note or a controller change that cannot be played.
- PreRoll
- One step of the pre-roll, which plays after the state load and before the clip and is thrown away.
- Process
Mode - How the host tells the plug-in it processes.
- Render
Error - A render that failed.
Constants§
- MAX_
CONTROLLER - The largest value of a MIDI controller: 7 bits.
- MAX_KEY
- The highest MIDI key.
- MAX_
NOTE_ END - The latest time a note may end: 10 minutes. A clip holds every sample in memory, and a longer part than a stem takes splits into several renders.
- MAX_
PITCH_ BEND - The largest pitch bend value: 14 bits.
- PITCH_
BEND_ CENTRE - The pitch bend value of no bend, the centre of the 14-bit range.
- RECIPE_
VERSION - The version of
Recipe::current.
Traits§
Functions§
- frame_
of - The frame of a time: the time times the rate, rounded to the nearest sample.
- note_
events - Turns notes into events sorted by frame, a note-off before a note-on on the same frame.
- notes_
of_ list - The render notes of a note list, such as the one the MIDI reader
gives. A note without a velocity takes
default.