dawdreamer.SamplerProcessor¶
- class dawdreamer.SamplerProcessor¶
The Sampler Processor works like a basic Sampler instrument. It takes a typically short audio sample and can play it back at different pitches and speeds. It has parameters for an ADSR envelope controlling the amplitude and another for controlling a low-pass filter cutoff. Unlike a VST, the parameters don’t need to be between 0 and 1. For example, you can set an envelope attack parameter to 50 to represent 50 milliseconds.
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)add_midi_note
(self, note, velocity, ...[, beats])Add a single MIDI note whose note and velocity are integers between 0 and 127.
clear_midi
(self)Remove all MIDI notes.
get_audio
(self)Get the audio data of the processor after a render, assuming recording was enabled.
get_automation
(*args, **kwargs)Overloaded function.
get_name
(self)Get the user-defined name of a processor instance.
get_num_input_channels
(self)Get the total number of input channels (2 indicates stereo input).
get_num_output_channels
(self)Get the total number of output channels (2 indicates stereo output).
get_parameter
(self, index)Get a parameter's value.
get_parameter_name
(self, index)Get a parameter's name.
get_parameter_size
(self)Get the number of parameters.
get_parameter_text
(self, index)Get a parameter's value as text.
get_parameters_description
(self)Get a list of dictionaries describing the plugin's parameters.
load_midi
(self, filepath, *[, ...])Load MIDI from a file.
save_midi
(self, filepath)After rendering, you can save the MIDI to a file using absolute times (SMPTE format).
set_automation
(self, parameter_name, data, *)Set a parameter's automation with a numpy array.
set_data
(self, data)Set an audio sample.
set_parameter
(self, index, value)Set a parameter's value to a constant.
Attributes
n_midi_events
The number of MIDI events stored in the buffer.
record
Whether recording of this processor is enabled.
record_automation
Whether recording of this processor's automation is enabled.