Skip to content

Offline render and Isolate

Engine::render (dsp/offline.rs) runs the real graph on the calling thread with the engine lock held, faster than real time:

  • It saves the transport state, turns off cycle, metronome, count-in, live MIDI, the analyzer and Low Latency Mode, clears every delay line and settles its taps, tells built-in effects it is offline (Effect::set_offline: they may block, so background work lands at the same point every render), starts like playback (automation sent afresh, notes and controllers chased), plays [from, to), then the frames still in the delay compensation with the transport running but nothing new starting (draining, so automation follows them to the end), then tail frames with the transport stopped (so effects ring out), drops the leading latency, and restores everything.
  • render_with_edit (Session::render_with_edit) runs an edit partway through a render, for checks of changes made while playing (pdc_glide_check).
  • Isolate { tracks, tap, fader, effects } renders one track (with the subtracks feeding it) captured before Stereo Out instead of the full mix. tracks lists who plays and whether each is heard, overriding live mute and solo. Used by Export All Tracks, Export Region, Bounce in Place and Freeze (Session::isolate_track).
  • The bounce, export and freeze code is in session/bounce.rs and session/freeze.rs. audio_file::write writes the files: WAV, AIFF (AIFF-C for float) or FLAC, at 16-bit (TPDF dither), 24-bit or 32-bit float. One Quantizer serves every format, so they all hold the same samples.