10#ifndef __AUDIO_SAMPLE_PROCESSOR_H__
11#define __AUDIO_SAMPLE_PROCESSOR_H__
27TYPEDEF_STRUCT (
Graph);
35#define SAMPLE_PROCESSOR (AUDIO_ENGINE->sample_processor)
37#define sample_processor_is_in_active_project(self) \
38 (self->audio_engine && engine_is_in_active_project (self->audio_engine))
50 int num_current_samples;
Backend for faders or other volume/gain controls.
Ports that transfer audio/midi/other signals to one another.
MetronomeType
The type of the metronome sound.
void sample_processor_prepare_process(SampleProcessor *self, const nframes_t nframes)
Clears the buffers.
void sample_processor_queue_metronome_countin(SampleProcessor *self)
Queues a metronomem tick at the given offset.
void sample_processor_queue_file(SampleProcessor *self, const SupportedFile *file)
Adds a file (audio or MIDI) to the queue.
void sample_processor_remove_sample_playback(SampleProcessor *self, SamplePlayback *sp)
Removes a SamplePlayback from the array.
SampleProcessor * sample_processor_clone(const SampleProcessor *src)
To be used for serialization.
void sample_processor_queue_chord_preset(SampleProcessor *self, const ChordPreset *chord_pset)
Adds a chord preset to the queue.
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_stop_file_playback(SampleProcessor *self)
Stops playback of files (auditioning).
void sample_processor_queue_metronome(SampleProcessor *self, MetronomeType type, nframes_t offset)
Queues a metronomem tick at the given local offset.
COLD WARN_UNUSED_RESULT SampleProcessor * sample_processor_new(AudioEngine *engine)
Initializes a SamplePlayback with a sample to play back.
void sample_processor_process(SampleProcessor *self, const nframes_t offset, const nframes_t nframes)
Process the samples for the given number of frames.
uint32_t nframes_t
Frame count.
A framework from playing back samples independent of the timeline, such as metronomes and samples fro...
A preset of chord descriptors.
A Fader is a processor that is used for volume controls and pan.
Container for passing midi events through ports.
A setting for a specific plugin descriptor.
A Position is made up of bars.beats.sixteenths.ticks.
A sample playback handle to be used by the engine.
A processor to be used in the routing graph for playing samples independent of the timeline.
PluginSetting * instrument_setting
Instrument for MIDI auditioning.
Fader * fader
Fader connected to the main output.
Tracklist * tracklist
Tracklist for file auditioning.
SamplePlayback current_samples[256]
An array of samples currently being played.
AudioEngine * audio_engine
Pointer to owner audio engin, if any.
bool roll
Whether to roll or not.
Position file_end_pos
Position the file ends at.
Graph * graph
Temp processing graph.
ZixSem rebuilding_sem
Semaphore to be locked while rebuilding the sample processor tracklist and graph.
Position playhead
Playhead for the tracklist (used when auditioning files).
Metadata for a supported file.
The Tracklist contains all the tracks in the Project.