Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::engine::session::RecordingEvent Class Reference

A recording event. More...

#include <src/engine/session/recording_event.h>

Collaboration diagram for zrythm::engine::session::RecordingEvent:

Public Types

enum class  Type {
  StartTrackRecording , StartAutomationRecording , Midi , Audio ,
  Automation , PauseTrackRecording , PauseAutomationRecording , StopTrackRecording ,
  StopAutomationRecording
}

Public Member Functions

void init (const Type type, const structure::tracks::Track &track, const EngineProcessTimeInfo &time_nfo, std::source_location source_location=std::source_location::current())

Data Fields

Type type_ = Type::Audio
bool has_midi_event_ = false
structure::tracks::TrackUuid track_uuid_
 The identifier of the track this event is for.
unsigned_frame_t g_start_frame_w_offset_ = 0
 Global start frames of the event (including offset).
nframes_t local_offset_ = 0
 Offset in current cycle that this event starts from.
nframes_t nframes_ = 0
 Number of frames processed in this event.
int automation_track_idx_ = 0
 Index of automation track, if automation.
std::array< float, 8192 > lbuf_ {}
 The actual data (if audio).
std::array< float, 8192 > rbuf_ {}
dsp::MidiEvent midi_event_
 MidiEvent, if midi.
std::source_location source_location_

Detailed Description

A recording event.

During recording, a recording event must be sent in each cycle for all record-enabled tracks.

Recording events are queued for the recording thread to handle.

Definition at line 23 of file recording_event.h.

Member Enumeration Documentation

◆ Type

Enumerator
Midi 

These events are for processing any range.

PauseTrackRecording 

These events are for temporarily stopping recording (eg, when outside the punch range or when looping).

The nframes must always be 0 for these events.

Definition at line 26 of file recording_event.h.

Member Function Documentation

◆ init()

void zrythm::engine::session::RecordingEvent::init ( const Type type,
const structure::tracks::Track & track,
const EngineProcessTimeInfo & time_nfo,
std::source_location source_location = std::source_location::current () )
inline

Definition at line 50 of file recording_event.h.

Field Documentation

◆ automation_track_idx_

int zrythm::engine::session::RecordingEvent::automation_track_idx_ = 0

Index of automation track, if automation.

Definition at line 85 of file recording_event.h.

◆ g_start_frame_w_offset_

unsigned_frame_t zrythm::engine::session::RecordingEvent::g_start_frame_w_offset_ = 0

Global start frames of the event (including offset).

Definition at line 76 of file recording_event.h.

◆ has_midi_event_

bool zrythm::engine::session::RecordingEvent::has_midi_event_ = false

Definition at line 70 of file recording_event.h.

◆ lbuf_

std::array<float, 8192> zrythm::engine::session::RecordingEvent::lbuf_ {}

The actual data (if audio).

This will be nframes_ times the number of channels in the track.

Definition at line 92 of file recording_event.h.

◆ local_offset_

nframes_t zrythm::engine::session::RecordingEvent::local_offset_ = 0

Offset in current cycle that this event starts from.

Definition at line 79 of file recording_event.h.

◆ midi_event_

dsp::MidiEvent zrythm::engine::session::RecordingEvent::midi_event_

MidiEvent, if midi.

Definition at line 98 of file recording_event.h.

◆ nframes_

nframes_t zrythm::engine::session::RecordingEvent::nframes_ = 0

Number of frames processed in this event.

Definition at line 82 of file recording_event.h.

◆ rbuf_

std::array<float, 8192> zrythm::engine::session::RecordingEvent::rbuf_ {}

Definition at line 93 of file recording_event.h.

◆ source_location_

std::source_location zrythm::engine::session::RecordingEvent::source_location_

Definition at line 101 of file recording_event.h.

◆ track_uuid_

structure::tracks::TrackUuid zrythm::engine::session::RecordingEvent::track_uuid_

The identifier of the track this event is for.

Definition at line 73 of file recording_event.h.

◆ type_

Type zrythm::engine::session::RecordingEvent::type_ = Type::Audio

Definition at line 68 of file recording_event.h.


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