Zrythm
a highly automated and intuitive digital audio workstation
|
The audio engine. More...
#include <dsp/engine.h>
Data Fields | |
uint_fast64_t | cycle |
Cycle count to know which cycle we are in. | |
void * | client |
gint | handled_jack_buffer_size_change |
Whether pending jack buffer change was handled (buffers reallocated). | |
AudioEngineJackTransportType | transport_type |
Whether transport master/client or no connection with jack transport. | |
AudioBackend | audio_backend |
Current audio backend. | |
MidiBackend | midi_backend |
Current MIDI backend. | |
nframes_t | block_length |
Audio buffer size (block length), per channel. | |
size_t | midi_buf_size |
Size of MIDI port buffers in bytes. | |
sample_rate_t | sample_rate |
Sample rate. | |
double | frames_per_tick |
Number of frames/samples per tick. | |
double | ticks_per_frame |
Reciprocal of AudioEngine::frames_per_tick. | |
int | buf_size_set |
True iff buffer size callback fired. | |
Router * | router |
The processing graph router. | |
HardwareProcessor * | hw_in_processor |
Input device processor. | |
HardwareProcessor * | hw_out_processor |
Output device processor. | |
Port * | midi_clock_in |
MIDI Clock input TODO. | |
Port * | midi_clock_out |
MIDI Clock output. | |
ControlRoom * | control_room |
The ControlRoom. | |
AudioPool * | pool |
Audio file pool. | |
StereoPorts * | dummy_input |
Used during tests to pass input data for recording. | |
StereoPorts * | monitor_out |
Monitor - these should be the last ports in the signal chain. | |
int | trigger_midi_activity |
Flag to tell the UI that this channel had MIDI activity. | |
Port * | midi_editor_manual_press |
Manual note press events from the piano roll. | |
Port * | midi_in |
Port used for receiving MIDI in messages for binding CC and other non-recording purposes. | |
nframes_t | nframes |
Number of frames/samples in the current cycle, per channel. | |
ZixSem | port_operation_lock |
Semaphore for blocking DSP while a plugin and its ports are deleted. | |
gint | run |
Ok to process or not. | |
bool | preparing_to_export |
To be set to true when preparing to export. | |
gint | exporting |
1 if currently exporting. | |
gint | panic |
Send note off MIDI everywhere. | |
void * | playback_handle |
void * | seq_handle |
void * | hw_params |
void * | sw_params |
float * | alsa_out_buf |
ALSA audio buffer. | |
gint | filled_stereo_out_bufs |
Flag used when processing in some backends. | |
gint | preparing_for_process |
Flag used to check if we are inside engine_process_prepare(). | |
void * | port_audio_stream |
float * | port_audio_out_buf |
Port Audio output buffer. | |
void * | mme_in_devs [1024] |
int | num_mme_in_devs |
void * | mme_out_devs [1024] |
int | num_mme_out_devs |
uint32_t | sdl_dev |
void * | rtaudio |
void * | pulse_mainloop |
void * | pulse_context |
void * | pulse_stream |
gboolean | pulse_notified_underflow |
GThread * | dummy_audio_thread |
Dummy audio DSP processing thread. | |
int | stop_dummy_audio_thread |
Set to 1 to stop the dummy audio thread. | |
Transport * | transport |
Timeline metadata like BPM, time signature, etc. | |
PanLaw | pan_law |
Pan law. | |
PanAlgorithm | pan_algo |
Pan algorithm. | |
gint64 | last_time_taken |
Time taken to process in the last cycle. | |
gint64 | max_time_taken |
Max time taken to process in the last few cycles. | |
gint64 | timestamp_start |
Timestamp at the start of the current cycle. | |
gint64 | timestamp_end |
Expected timestamp at the end of the current cycle. | |
gint64 | last_timestamp_start |
Timestamp at start of previous cycle. | |
gint64 | last_timestamp_end |
Timestamp at end of previous cycle. | |
nframes_t | remaining_latency_preroll |
When first set, it is equal to the max playback latency of all initial trigger nodes. | |
SampleProcessor * | sample_processor |
int | capture_cc |
To be set to 1 when the CC from the Midi in port should be captured. | |
midi_byte_t | last_cc [3] |
Last MIDI CC captured. | |
gint64 | last_xrun_notification |
Last time an XRUN notification was shown. | |
bool | denormal_prevention_val_positive |
Whether the denormal prevention value (1e-12 ~ 1e-20) is positive. | |
float | denormal_prevention_val |
gint64 | zrythm_start_time |
Time at start to keep track if trial limit is reached. | |
int | limit_reached |
Flag to keep track of the first time the limit is reached. | |
BounceMode | bounce_mode |
If this is on, only tracks/regions marked as "for bounce" will be allowed to make sound. | |
BounceStep | bounce_step |
Bounce step cache. | |
bool | bounce_with_parents |
Whether currently bouncing with parents (cache). | |
Metronome * | metronome |
The metronome. | |
MPMCQueue * | ev_queue |
Event queue. | |
ObjectPool * | ev_pool |
Object pool of event structs to avoid allocation. | |
guint | process_source_id |
ID of the event processing source func. | |
int | processing_events |
Whether currently processing events. | |
gint64 | last_events_process_started |
Time last event processing started. | |
gint64 | last_events_processed |
Time last event processing completed. | |
gint | cycle_running |
Whether the cycle is currently running. | |
bool | pre_setup |
Whether the engine is already pre-set up. | |
bool | setup |
Whether the engine is already set up. | |
bool | activated |
Whether the engine is currently activated. | |
Project * | project |
Pointer to owner project, if any. | |
bool | updating_frames_per_tick |
True while updating frames per tick. | |
AudioEnginePositionInfo | pos_nfo_before |
Position info at the end of the previous cycle before moving the transport. | |
AudioEnginePositionInfo | pos_nfo_current |
Position info at the start of the current cycle. | |
AudioEnginePositionInfo | pos_nfo_at_end |
Expected position info at the end of the current cycle. | |
bool AudioEngine::activated |
AudioBackend AudioEngine::audio_backend |
nframes_t AudioEngine::block_length |
BounceMode AudioEngine::bounce_mode |
bool AudioEngine::bounce_with_parents |
int AudioEngine::buf_size_set |
int AudioEngine::capture_cc |
ControlRoom* AudioEngine::control_room |
The ControlRoom.
uint_fast64_t AudioEngine::cycle |
gint AudioEngine::cycle_running |
bool AudioEngine::denormal_prevention_val_positive |
Whether the denormal prevention value (1e-12 ~ 1e-20) is positive.
This should be swapped often to avoid DC offset prevention algorithms removing it.
See https://www.earlevel.com/main/2019/04/19/floating-point-denormals/ for details.
GThread* AudioEngine::dummy_audio_thread |
StereoPorts* AudioEngine::dummy_input |
ObjectPool* AudioEngine::ev_pool |
MPMCQueue* AudioEngine::ev_queue |
gint AudioEngine::filled_stereo_out_bufs |
double AudioEngine::frames_per_tick |
gint AudioEngine::handled_jack_buffer_size_change |
HardwareProcessor* AudioEngine::hw_in_processor |
HardwareProcessor* AudioEngine::hw_out_processor |
midi_byte_t AudioEngine::last_cc[3] |
gint64 AudioEngine::last_events_process_started |
gint64 AudioEngine::last_events_processed |
gint64 AudioEngine::last_time_taken |
gint64 AudioEngine::last_timestamp_end |
gint64 AudioEngine::last_timestamp_start |
gint64 AudioEngine::last_xrun_notification |
int AudioEngine::limit_reached |
gint64 AudioEngine::max_time_taken |
MidiBackend AudioEngine::midi_backend |
size_t AudioEngine::midi_buf_size |
Port* AudioEngine::midi_clock_in |
Port* AudioEngine::midi_clock_out |
Port* AudioEngine::midi_editor_manual_press |
Manual note press events from the piano roll.
The events from here should be read by the corresponding track processor's MIDI in port (TrackProcessor.midi_in). To avoid having to recalculate the graph to reattach this port to the correct track processor, only connect this port to the initial processor in the routing graph and fetch the events manually when processing the corresponding track processor.
Port* AudioEngine::midi_in |
StereoPorts* AudioEngine::monitor_out |
nframes_t AudioEngine::nframes |
PanAlgorithm AudioEngine::pan_algo |
float* AudioEngine::port_audio_out_buf |
ZixSem AudioEngine::port_operation_lock |
AudioEnginePositionInfo AudioEngine::pos_nfo_at_end |
AudioEnginePositionInfo AudioEngine::pos_nfo_before |
AudioEnginePositionInfo AudioEngine::pos_nfo_current |
bool AudioEngine::pre_setup |
gint AudioEngine::preparing_for_process |
Flag used to check if we are inside engine_process_prepare().
bool AudioEngine::preparing_to_export |
guint AudioEngine::process_source_id |
int AudioEngine::processing_events |
Project* AudioEngine::project |
nframes_t AudioEngine::remaining_latency_preroll |
SampleProcessor* AudioEngine::sample_processor |
sample_rate_t AudioEngine::sample_rate |
bool AudioEngine::setup |
int AudioEngine::stop_dummy_audio_thread |
double AudioEngine::ticks_per_frame |
Reciprocal of AudioEngine::frames_per_tick.
gint64 AudioEngine::timestamp_end |
gint64 AudioEngine::timestamp_start |
Transport* AudioEngine::transport |
AudioEngineJackTransportType AudioEngine::transport_type |
int AudioEngine::trigger_midi_activity |
bool AudioEngine::updating_frames_per_tick |
True while updating frames per tick.
gint64 AudioEngine::zrythm_start_time |