TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
engine::RenderSpecification Struct Reference

A plain-data description of a single render operation: one output file. More...

#include <tracktion_RenderSpecification.h>

Public Member Functions

juce::var toJSON () const
 Returns the canonical JSON representation of this specification.
 

Static Public Member Functions

static RenderSpecification fromJSON (const juce::var &, juce::StringArray *unknownKeys=nullptr)
 Creates a specification from its canonical JSON representation.
 

Public Attributes

juce::Array< EditItemIDtracks
 The tracks to mix into the render.
 
juce::Array< EditItemIDmutedTracks
 Tracks to include in the render graph but keep silent in the output: they are muted in the Edit while the job renders and restored afterwards.
 
bool includeSourceTracks = false
 If true, findStemSourceTracks() runs over the tracks list when the job is created and the tracks it finds - sidechain sources, aux-send sources and rack feeders the stem depends on - are added to mutedTracks automatically, so the stem sounds as it does in the full mix.
 
juce::Array< EditItemIDclips
 If not empty, only these clips play in the render: everything else on the rendered tracks stays silent.
 
std::optional< TimeRange > time
 The time range to render.
 
bool wrapRemainder = false
 If true, the plugin tail past the end of the range is rendered and mixed back onto the start of the file so it loops seamlessly.
 
juce::File destination
 The destination file to write to.
 
RenderFormat format = RenderFormat::wav
 The format to write.
 
double sampleRate = 44100.0
 The sample rate to render at.
 
int bitDepth = 16
 The bit depth to render at.
 
int quality = 0
 Format-specific quality index, for formats that use one.
 
juce::String channelLayout
 Output channel layout: empty for auto-detect from the Edit, or one of "mono", "stereo", "5.1", "7.1".
 
bool normalise = false
 Normalise the result by peak level.
 
bool normaliseByRMS = false
 Normalise the result by RMS level instead.
 
bool normaliseByLUFS = false
 Normalise the result to an integrated loudness (BS.1770-4) target instead.
 
float normaliseToLevelDb = 0
 The level to normalise to, in dB or LUFS depending on the mode.
 
bool limitTruePeak = true
 LUFS mode only: hold the gain back so the true peak stays under truePeakCeilingDb, even if the result then lands quieter than the loudness target.
 
float truePeakCeilingDb = -1.0f
 The true-peak ceiling to keep under when limitTruePeak is set.
 
bool trimSilence = false
 Trim leading/trailing silence.
 
bool dither = false
 Apply dithering for non-float formats.
 
bool realTime = false
 Render at 1x play speed.
 
bool usePlugins = true
 Include track plugins.
 
bool useMasterPlugins = true
 Include the master plugin chain.
 
juce::StringPairArray metadata
 Metadata pairs to write to the file where supported.
 

Detailed Description

A plain-data description of a single render operation: one output file.

Unlike RenderOptions this has no UI or selection dependencies: items are referenced by EditItemID and everything can be serialised to/from JSON with a single canonical schema (shared by saved presets, command line config files and the scripting API).

Batch operations are lists of specifications: to render each track to its own file, create one specification per track (see createPerTrackSpecifications()) and queue the resulting jobs.

Use validateRenderSpecification() to check a specification against a live Edit and createRenderJob() to turn it into concrete Renderer::Parameters.

Member Function Documentation

◆ toJSON()

juce::var engine::RenderSpecification::toJSON ( ) const

Returns the canonical JSON representation of this specification.

◆ fromJSON()

static RenderSpecification engine::RenderSpecification::fromJSON ( const juce::var &  ,
juce::StringArray *  unknownKeys = nullptr 
)
static

Creates a specification from its canonical JSON representation.

Missing keys take their default values. Unknown keys are ignored and their names appended to unknownKeys if supplied. An unrecognised "format" leaves the default - call renderFormatFromString() first if the caller needs to report that rather than silently fall back.

Member Data Documentation

◆ tracks

juce::Array<EditItemID> engine::RenderSpecification::tracks

The tracks to mix into the render.

If empty, the whole Edit is rendered. Submix folder tracks are valid entries: rendering one includes its child tracks and its plugin chain.

◆ mutedTracks

juce::Array<EditItemID> engine::RenderSpecification::mutedTracks

Tracks to include in the render graph but keep silent in the output: they are muted in the Edit while the job renders and restored afterwards.

Use this for sidechain/rack source tracks that must keep feeding the rendered tracks' processing without being heard.

◆ includeSourceTracks

bool engine::RenderSpecification::includeSourceTracks = false

If true, findStemSourceTracks() runs over the tracks list when the job is created and the tracks it finds - sidechain sources, aux-send sources and rack feeders the stem depends on - are added to mutedTracks automatically, so the stem sounds as it does in the full mix.

Has no effect when tracks is empty (a whole-Edit render already includes everything).

◆ clips

juce::Array<EditItemID> engine::RenderSpecification::clips

If not empty, only these clips play in the render: everything else on the rendered tracks stays silent.

The tracks' plugin chains still run.

See also
Renderer::Parameters::allowedClips

◆ time

std::optional<TimeRange> engine::RenderSpecification::time

The time range to render.

If unset, the whole Edit length is used.

◆ wrapRemainder

bool engine::RenderSpecification::wrapRemainder = false

If true, the plugin tail past the end of the range is rendered and mixed back onto the start of the file so it loops seamlessly.

Forces trimSilence off.

See also
Renderer::Parameters::wrapRemainder

◆ destination

juce::File engine::RenderSpecification::destination

The destination file to write to.

◆ format

RenderFormat engine::RenderSpecification::format = RenderFormat::wav

The format to write.

RenderFormat::midi writes a MIDI file rather than audio, capturing the MIDI arriving at the render graph's output. The audio-only options below (bit depth, quality, channel layout, the normalise family, dither, trimSilence and wrapRemainder) don't apply and are ignored; sampleRate still sets the rate the graph is processed at.

See also
usePlugins

◆ sampleRate

double engine::RenderSpecification::sampleRate = 44100.0

The sample rate to render at.

◆ bitDepth

int engine::RenderSpecification::bitDepth = 16

The bit depth to render at.

◆ quality

int engine::RenderSpecification::quality = 0

Format-specific quality index, for formats that use one.

◆ channelLayout

juce::String engine::RenderSpecification::channelLayout

Output channel layout: empty for auto-detect from the Edit, or one of "mono", "stereo", "5.1", "7.1".

◆ normalise

bool engine::RenderSpecification::normalise = false

Normalise the result by peak level.

◆ normaliseByRMS

bool engine::RenderSpecification::normaliseByRMS = false

Normalise the result by RMS level instead.

◆ normaliseByLUFS

bool engine::RenderSpecification::normaliseByLUFS = false

Normalise the result to an integrated loudness (BS.1770-4) target instead.

If more than one normalise flag is set, LUFS wins, then RMS, then peak.

◆ normaliseToLevelDb

float engine::RenderSpecification::normaliseToLevelDb = 0

The level to normalise to, in dB or LUFS depending on the mode.

◆ limitTruePeak

bool engine::RenderSpecification::limitTruePeak = true

LUFS mode only: hold the gain back so the true peak stays under truePeakCeilingDb, even if the result then lands quieter than the loudness target.

◆ truePeakCeilingDb

float engine::RenderSpecification::truePeakCeilingDb = -1.0f

The true-peak ceiling to keep under when limitTruePeak is set.

◆ trimSilence

bool engine::RenderSpecification::trimSilence = false

Trim leading/trailing silence.

◆ dither

bool engine::RenderSpecification::dither = false

Apply dithering for non-float formats.

◆ realTime

bool engine::RenderSpecification::realTime = false

Render at 1x play speed.

◆ usePlugins

bool engine::RenderSpecification::usePlugins = true

Include track plugins.

For a MIDI render this chooses what gets written: with plugins the MIDI is taken after the track's plugin chain, so MIDI effects are baked in but an external instrument which doesn't pass MIDI through will swallow it; without, the clips' own MIDI is written.

◆ useMasterPlugins

bool engine::RenderSpecification::useMasterPlugins = true

Include the master plugin chain.

◆ metadata

juce::StringPairArray engine::RenderSpecification::metadata

Metadata pairs to write to the file where supported.


The documentation for this struct was generated from the following file: