Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
sample_processor.h File Reference

Sample processor. More...

#include "dsp/fader.h"
#include "dsp/port.h"
#include "dsp/position.h"
#include "dsp/sample_playback.h"
#include "utils/types.h"
Include dependency graph for sample_processor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SampleProcessor
 A processor to be used in the routing graph for playing samples independent of the timeline. More...
 

Macros

#define SAMPLE_PROCESSOR_SCHEMA_VERSION   2
 
#define SAMPLE_PROCESSOR   (AUDIO_ENGINE->sample_processor)
 
#define sample_processor_is_in_active_project(self)    (self->audio_engine && engine_is_in_active_project (self->audio_engine))
 

Typedefs

typedef enum MetronomeType MetronomeType
 

Functions

COLD WARN_UNUSED_RESULT SampleProcessorsample_processor_new (AudioEngine *engine)
 Initializes a SamplePlayback with a sample to play back.
 
COLD void sample_processor_init_loaded (SampleProcessor *self, AudioEngine *engine)
 
void sample_processor_prepare_process (SampleProcessor *self, const nframes_t nframes)
 Clears the buffers.
 
void sample_processor_process (SampleProcessor *self, const nframes_t offset, const nframes_t nframes)
 Process the samples for the given number of frames.
 
void sample_processor_remove_sample_playback (SampleProcessor *self, SamplePlayback *sp)
 Removes a SamplePlayback from the array.
 
void sample_processor_queue_metronome_countin (SampleProcessor *self)
 Queues a metronomem tick at the given offset.
 
void sample_processor_queue_metronome (SampleProcessor *self, MetronomeType type, nframes_t offset)
 Queues a metronomem tick at the given local offset.
 
void sample_processor_queue_sample_from_file (SampleProcessor *self, const char *path)
 Adds a sample to play to the queue from a file path.
 
void sample_processor_queue_file (SampleProcessor *self, const SupportedFile *file)
 Adds a file (audio or MIDI) to the queue.
 
void sample_processor_queue_chord_preset (SampleProcessor *self, const ChordPreset *chord_pset)
 Adds a chord preset to the queue.
 
void sample_processor_stop_file_playback (SampleProcessor *self)
 Stops playback of files (auditioning).
 
void sample_processor_disconnect (SampleProcessor *self)
 
SampleProcessorsample_processor_clone (const SampleProcessor *src)
 To be used for serialization.
 
void sample_processor_free (SampleProcessor *self)
 

Detailed Description

Sample processor.

Definition in file sample_processor.h.

Typedef Documentation

◆ MetronomeType

Definition at line 19 of file sample_processor.h.