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, const char *file=nullptr, const char *func=nullptr, int lineno=0)

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.
const char * file_ = nullptr
const char * func_ = nullptr
int lineno_ = 0

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,
const char * file = nullptr,
const char * func = nullptr,
int lineno = 0 )
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 95 of file recording_event.h.

◆ file_

const char* zrythm::engine::session::RecordingEvent::file_ = nullptr

Definition at line 111 of file recording_event.h.

◆ func_

const char* zrythm::engine::session::RecordingEvent::func_ = nullptr

Definition at line 112 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 86 of file recording_event.h.

◆ has_midi_event_

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

Definition at line 80 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 102 of file recording_event.h.

◆ lineno_

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

Definition at line 113 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 89 of file recording_event.h.

◆ midi_event_

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

MidiEvent, if midi.

Definition at line 108 of file recording_event.h.

◆ nframes_

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

Number of frames processed in this event.

Definition at line 92 of file recording_event.h.

◆ rbuf_

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

Definition at line 103 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 83 of file recording_event.h.

◆ type_

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

Definition at line 78 of file recording_event.h.


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