|
LMMS
|
#include <modules_synths.h>
Public Member Functions | |
| monosynth_audio_module () | |
| void | set_sample_rate (uint32_t sr) |
| Set sample rate for the plugin. | |
| void | delayed_note_on () |
| void | end_note () |
| Release a note (physically), called from note-off handler or when note-off has been scheduled after note-on (very short queued note). | |
| void | note_on (int channel, int note, int vel) |
| void | note_off (int channel, int note, int vel) |
| Handle MIDI Note Off message. | |
| void | channel_pressure (int channel, int value) |
| Handle MIDI Channel Pressure. | |
| void | pitch_bend (int, int value) |
| Handle pitch bend message. | |
| void | set_frequency () |
| Update oscillator frequency based on base frequency, detune amount, pitch bend scaling factor and sample rate. | |
| void | control_change (int channel, int controller, int value) |
| Handle control change messages. | |
| void | params_changed () |
| Update variables from control ports. | |
| void | activate () |
| LADSPA-esque activate function, except it is called after ports are connected, not before. | |
| void | deactivate () |
| LADSPA-esque deactivate function. | |
| void | post_instantiate (uint32_t) |
| Called after instantiating (after all the feature pointers are set - including interfaces like progress_report_iface). | |
| void | lookup_waveforms () |
| Set waveform addresses for oscillators. | |
| void | calculate_buffer_oscs (float lfo) |
| Run oscillators. | |
| void | calculate_buffer_ser () |
| Run two filters in series to produce mono output samples. | |
| void | calculate_buffer_single () |
| Run one filter to produce mono output samples. | |
| void | calculate_buffer_stereo () |
| Run two filters (one per channel) to produce stereo output samples. | |
| bool | get_graph (int index, int subindex, int phase, float *data, int points, cairo_iface *context, int *mode) const |
| Retrieve filter graph (which is 'live' so it cannot be generated by get_static_graph), or fall back to get_static_graph. | |
| bool | get_layers (int index, int generation, unsigned int &layers) const |
| bool | is_cv (int param_no) const |
| bool | is_noisy (int param_no) const |
| Practically all the stuff here is noisy. | |
| uint32_t | process (uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask) |
| Main processing function. | |
| virtual void | send_configures (send_configure_iface *sci) |
| Send all configure variables set within a plugin to given destination (which may be limited to only those that plugin understands). | |
| virtual char * | configure (const char *key, const char *value) |
| DSSI configure call. | |
| Public Member Functions inherited from calf_plugins::audio_module< monosynth_metadata > | |
| audio_module () | |
| void | program_change (int channel, int program) |
| Handle MIDI Program Change. | |
| void | execute (int cmd_no) |
| Execute menu command with given number. | |
| int | send_status_updates (send_updates_iface *sui, int last_serial) |
| Send all supported status vars (none by default). | |
| void | params_reset () |
| Reset parameter values for epp:trigger type parameters (ones activated by oneshot push button instead of check box). | |
| uint32_t | message_run (const void *valid_ports, void *output_ports) |
| virtual void | get_port_arrays (float **&ins_ptrs, float **&outs_ptrs, float **¶ms_ptrs) |
| Return the array of input port pointers. | |
| virtual const plugin_metadata_iface * | get_metadata_iface () const |
| Return metadata object. | |
| virtual void | set_progress_report_iface (progress_report_iface *iface) |
| Set the progress report interface to communicate progress to. | |
| void | zero_by_mask (uint32_t mask, uint32_t offset, uint32_t nsamples) |
| utility function: zero port values if mask is 0 | |
| uint32_t | process_slice (uint32_t offset, uint32_t end) |
| utility function: call process, and if it returned zeros in output masks, zero out the relevant output port buffers | |
| virtual const line_graph_iface * | get_line_graph_iface () const |
| virtual const phase_graph_iface * | get_phase_graph_iface () const |
| Public Member Functions inherited from calf_plugins::monosynth_metadata | |
| monosynth_metadata () | |
| virtual const table_metadata_iface * | get_table_metadata_iface (const char *key) const |
| Lookup of table edit interface. | |
| void | get_configure_vars (std::vector< std::string > &names) const |
| obtain array of names of configure variables (or NULL is none needed) | |
| Public Member Functions inherited from calf_plugins::plugin_metadata< monosynth_metadata > | |
| const char * | get_name () const |
| const char * | get_id () const |
| const char * | get_label () const |
| int | get_input_count () const |
| int | get_output_count () const |
| int | get_inputs_optional () const |
| int | get_outputs_optional () const |
| int | get_param_count () const |
| bool | get_midi () const |
| bool | requires_midi () const |
| bool | requires_instance_access () const |
| bool | is_rt_capable () const |
| int | get_param_port_offset () const |
| char * | get_gui_xml (const char *prefix) const |
| Return custom XML. | |
| plugin_command_info * | get_commands () const |
| const parameter_properties * | get_param_props (int param_no) const |
| const char ** | get_port_names () const |
| bool | is_cv (int param_no) const |
| is a given parameter a control voltage? | |
| bool | is_noisy (int param_no) const |
| is the given parameter non-interpolated? | |
| const ladspa_plugin_info & | get_plugin_info () const |
| bool | get_simulate_stereo_input () const |
| bool | sends_live_updates () const |
| Public Member Functions inherited from calf_plugins::plugin_metadata_iface | |
| virtual | ~plugin_metadata_iface () |
| Do-nothing destructor to silence compiler warning. | |
| Public Member Functions inherited from calf_plugins::audio_module_iface | |
| virtual | ~audio_module_iface () |
| Public Member Functions inherited from calf_plugins::line_graph_iface | |
| virtual bool | get_moving (int index, int subindex, int &direction, float *data, int x, int y, int &offset, uint32_t &color) const |
| virtual bool | get_dot (int index, int subindex, int phase, float &x, float &y, int &size, cairo_iface *context) const |
| virtual bool | get_gridline (int index, int subindex, int phase, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const |
| virtual std::string | get_crosshair_label (int x, int y, int sx, int sy, float q, int dB, int name, int note, int cents) const |
| virtual | ~line_graph_iface () |
| Standard destructor to make compiler happy. | |
| Public Member Functions inherited from calf_plugins::mod_matrix_impl | |
| mod_matrix_impl (dsp::modulation_entry *_matrix, calf_plugins::mod_matrix_metadata *_metadata) | |
| void | calculate_modmatrix (float *moddest, int moddest_count, float *modsrc) |
| Process modulation matrix, calculate outputs from inputs. | |
| void | send_configures (send_configure_iface *) |
| char * | configure (const char *key, const char *value) |
| virtual const dsp::modulation_entry * | get_default_mod_matrix_value (int row) const |
Public Attributes | |
| uint32_t | srate |
| uint32_t | crate |
| dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > | osc1 |
| dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > | osc2 |
| dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > | detosc |
| dsp::triangle_lfo | lfo1 |
| dsp::triangle_lfo | lfo2 |
| dsp::simple_oscillator | unison_osc |
| dsp::biquad_d1_lerp | filter |
| dsp::biquad_d1_lerp | filter2 |
| bool | running |
| The step code is producing non-zero values. | |
| bool | stopping |
| This is the last non-zero buffer (set on calculate_step after fadeout is complete, the next calculate_step will zero running). | |
| bool | gate |
| A key is kept pressed. | |
| bool | force_fadeout |
| All notes off fadeout. | |
| int | last_key |
| Last triggered note. | |
| float | buffer [step_size] |
| Output buffers, used to ensure updates are done every step_size regardless of process buffer size. | |
| float | buffer2 [step_size] |
| uint32_t | output_pos |
| Read position within the buffers, on each '0' the buffers are being filled with new data by calculate_step. | |
| int | wave1 |
| Waveform number - OSC1. | |
| int | wave2 |
| Waveform number - OSC2. | |
| int | prev_wave1 |
| Last used waveform number - OSC1. | |
| int | prev_wave2 |
| Last used waveform number - OSC2. | |
| int | filter_type |
| Filter type. | |
| int | last_filter_type |
| Filter type on the last calculate_step. | |
| float | freq |
| float | start_freq |
| float | target_freq |
| float | cutoff |
| float | fgain |
| float | fgain_delta |
| float | separation |
| float | detune |
| float | xpose1 |
| float | xpose2 |
| float | xfade |
| float | ampctl |
| float | fltctl |
| float | odcr |
| float | porta_time |
| float | lfo_bend |
| float | modwheel_value |
| Modulation wheel position (0.f-1.f). | |
| float | lfo_clock |
| Delay counter for LFOs. | |
| int32_t | last_pwshift1 |
| Last value of phase shift for pulse width emulation for OSC1. | |
| int32_t | last_pwshift2 |
| Last value of phase shift for pulse width emulation for OSC2. | |
| int32_t | last_stretch1 |
| Last value of stretch for osc sync emulation for OSC1. | |
| int | queue_note_on |
| Next note to play on the next calculate_step. | |
| bool | queue_note_on_and_off |
| Whether the queued note has been already released. | |
| float | queue_vel |
| Velocity of the next note to play. | |
| int | modwheel_value_int |
| Integer value for modwheel (0-16383, read from CC1 - MSBs and CC33 - LSBs). | |
| int | legato |
| Legato mode (bitmask). | |
| dsp::adsr | envelope1 |
| Envelope Generators. | |
| dsp::adsr | envelope2 |
| dsp::keystack | stack |
| dsp::gain_smoothing | master |
| Smoothing for master volume. | |
| dsp::fadeout | fadeout |
| Fadeout for buffer 1. | |
| dsp::fadeout | fadeout2 |
| Fadeout for buffer 2. | |
| dsp::inertia< dsp::exponential_ramp > | inertia_cutoff |
| Smoothed cutoff value. | |
| dsp::inertia< dsp::exponential_ramp > | inertia_pitchbend |
| Smoothed pitch bend value. | |
| dsp::inertia< dsp::linear_ramp > | inertia_pressure |
| Smoothed channel pressure value. | |
| dsp::modulation_entry | mod_matrix_data [mod_matrix_slots] |
| Rows of the modulation matrix. | |
| float | velocity |
| Currently used velocity. | |
| float | last_xfade |
| Last value of oscillator mix ratio. | |
| float | last_unison |
| Last value of unison amount. | |
| float | moddest [moddest_count] |
| Current calculated mod matrix outputs. | |
| Public Attributes inherited from calf_plugins::audio_module< monosynth_metadata > | |
| float * | ins [(monosynth_metadata::in_count !=0) ? monosynth_metadata::in_count :1] |
| float * | outs [(monosynth_metadata::out_count !=0) ? monosynth_metadata::out_count :1] |
| float * | params [monosynth_metadata::param_count] |
| bool | questionable_data_reported_in |
| bool | questionable_data_reported_out |
| progress_report_iface * | progress_report |
| Public Attributes inherited from calf_plugins::monosynth_metadata | |
| mod_matrix_metadata | mm_metadata |
Static Public Attributes | |
| static dsp::waveform_family< MONOSYNTH_WAVE_BITS > * | waves |
| Static Public Attributes inherited from calf_plugins::plugin_metadata< monosynth_metadata > | |
| static const char * | port_names [] |
| static parameter_properties | param_props [] |
| static ladspa_plugin_info | plugin_info |
Private Member Functions | |
| void | reset () |
| float | get_lfo (dsp::triangle_lfo &lfo, int param) |
| void | apply_fadeout () |
| Apply anti-click'n'pop fadeout (used at the end of the sound). | |
| void | calculate_step () |
| Calculate control signals and produce step_size samples of output. | |
| bool | is_stereo_filter () const |
Static Private Member Functions | |
| static void | precalculate_waves (progress_report_iface *reporter) |
Monosynth-in-making. Parameters may change at any point, so don't make songs with it! It lacks inertia for parameters, even for those that really need it.
| monosynth_audio_module::monosynth_audio_module | ( | ) |
|
virtual |
LADSPA-esque activate function, except it is called after ports are connected, not before.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
|
private |
Apply anti-click'n'pop fadeout (used at the end of the sound).
| void monosynth_audio_module::calculate_buffer_oscs | ( | float | lfo | ) |
Run oscillators.
| void monosynth_audio_module::calculate_buffer_ser | ( | ) |
Run two filters in series to produce mono output samples.
| void monosynth_audio_module::calculate_buffer_single | ( | ) |
Run one filter to produce mono output samples.
| void monosynth_audio_module::calculate_buffer_stereo | ( | ) |
Run two filters (one per channel) to produce stereo output samples.
|
private |
Calculate control signals and produce step_size samples of output.
Handle MIDI Channel Pressure.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
|
inlinevirtual |
DSSI configure call.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
Handle control change messages.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
|
virtual |
LADSPA-esque deactivate function.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
| void monosynth_audio_module::delayed_note_on | ( | ) |
| void monosynth_audio_module::end_note | ( | ) |
Release a note (physically), called from note-off handler or when note-off has been scheduled after note-on (very short queued note).
|
virtual |
Retrieve filter graph (which is 'live' so it cannot be generated by get_static_graph), or fall back to get_static_graph.
Reimplemented from calf_plugins::line_graph_iface.
|
inlinevirtual |
Return which layers need to be redrawn in the next GTK drawing cycle
| index | Parameter/graph identifier (usually tied to particular plugin control port) |
| generation | The overall amount of drawing cycles since the last full refresh of all surfaces |
| layers | Bitmask defining the layers to be redrawn (see layers_flags above) |
| true | there's at least one layer to be redrawn; false nothing to draw in this cycle |
Reimplemented from calf_plugins::line_graph_iface.
|
private |
|
inlinevirtual |
| true | if the filter 1 is to be used for the left channel and filter 2 for the right channel No CV inputs for now |
Implements calf_plugins::plugin_metadata_iface.
|
inlinevirtual |
Practically all the stuff here is noisy.
Implements calf_plugins::plugin_metadata_iface.
|
inlineprivate |
| false | if filters are to be connected in series and sent (mono) to both channels |
| void monosynth_audio_module::lookup_waveforms | ( | ) |
Set waveform addresses for oscillators.
Handle MIDI Note Off message.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
Handle MIDI Note On message (does not immediately trigger a note, as it must start on boundary of step_size samples).
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
|
virtual |
Update variables from control ports.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
Handle pitch bend message.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
Called after instantiating (after all the feature pointers are set - including interfaces like progress_report_iface).
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
|
staticprivate |
|
virtual |
Main processing function.
Implements calf_plugins::audio_module_iface.
|
private |
|
inlinevirtual |
Send all configure variables set within a plugin to given destination (which may be limited to only those that plugin understands).
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
| void monosynth_audio_module::set_frequency | ( | ) |
Update oscillator frequency based on base frequency, detune amount, pitch bend scaling factor and sample rate.
Set sample rate for the plugin.
Reimplemented from calf_plugins::audio_module< monosynth_metadata >.
| float calf_plugins::monosynth_audio_module::ampctl |
| float calf_plugins::monosynth_audio_module::buffer[step_size] |
Output buffers, used to ensure updates are done every step_size regardless of process buffer size.
| float calf_plugins::monosynth_audio_module::buffer2[step_size] |
| uint32_t calf_plugins::monosynth_audio_module::crate |
| float calf_plugins::monosynth_audio_module::cutoff |
| dsp::waveform_oscillator<MONOSYNTH_WAVE_BITS> calf_plugins::monosynth_audio_module::detosc |
| float calf_plugins::monosynth_audio_module::detune |
| dsp::adsr calf_plugins::monosynth_audio_module::envelope2 |
| dsp::fadeout calf_plugins::monosynth_audio_module::fadeout |
Fadeout for buffer 1.
| dsp::fadeout calf_plugins::monosynth_audio_module::fadeout2 |
Fadeout for buffer 2.
| float calf_plugins::monosynth_audio_module::fgain |
| float calf_plugins::monosynth_audio_module::fgain_delta |
| dsp::biquad_d1_lerp calf_plugins::monosynth_audio_module::filter |
| dsp::biquad_d1_lerp calf_plugins::monosynth_audio_module::filter2 |
| float calf_plugins::monosynth_audio_module::fltctl |
| bool calf_plugins::monosynth_audio_module::force_fadeout |
All notes off fadeout.
| float calf_plugins::monosynth_audio_module::freq |
| bool calf_plugins::monosynth_audio_module::gate |
A key is kept pressed.
| dsp::inertia<dsp::exponential_ramp> calf_plugins::monosynth_audio_module::inertia_cutoff |
Smoothed cutoff value.
| dsp::inertia<dsp::exponential_ramp> calf_plugins::monosynth_audio_module::inertia_pitchbend |
Smoothed pitch bend value.
| dsp::inertia<dsp::linear_ramp> calf_plugins::monosynth_audio_module::inertia_pressure |
Smoothed channel pressure value.
| int calf_plugins::monosynth_audio_module::last_key |
Last triggered note.
| int32_t calf_plugins::monosynth_audio_module::last_pwshift1 |
Last value of phase shift for pulse width emulation for OSC1.
| int32_t calf_plugins::monosynth_audio_module::last_pwshift2 |
Last value of phase shift for pulse width emulation for OSC2.
| int32_t calf_plugins::monosynth_audio_module::last_stretch1 |
Last value of stretch for osc sync emulation for OSC1.
| float calf_plugins::monosynth_audio_module::last_unison |
Last value of unison amount.
| float calf_plugins::monosynth_audio_module::last_xfade |
Last value of oscillator mix ratio.
| int calf_plugins::monosynth_audio_module::legato |
Legato mode (bitmask).
| dsp::triangle_lfo calf_plugins::monosynth_audio_module::lfo1 |
| dsp::triangle_lfo calf_plugins::monosynth_audio_module::lfo2 |
| float calf_plugins::monosynth_audio_module::lfo_bend |
| float calf_plugins::monosynth_audio_module::lfo_clock |
Delay counter for LFOs.
| dsp::gain_smoothing calf_plugins::monosynth_audio_module::master |
Smoothing for master volume.
| dsp::modulation_entry calf_plugins::monosynth_audio_module::mod_matrix_data[mod_matrix_slots] |
Rows of the modulation matrix.
| float calf_plugins::monosynth_audio_module::moddest[moddest_count] |
Current calculated mod matrix outputs.
| float calf_plugins::monosynth_audio_module::modwheel_value |
Modulation wheel position (0.f-1.f).
| int calf_plugins::monosynth_audio_module::modwheel_value_int |
Integer value for modwheel (0-16383, read from CC1 - MSBs and CC33 - LSBs).
| float calf_plugins::monosynth_audio_module::odcr |
| dsp::waveform_oscillator<MONOSYNTH_WAVE_BITS> calf_plugins::monosynth_audio_module::osc1 |
| dsp::waveform_oscillator<MONOSYNTH_WAVE_BITS> calf_plugins::monosynth_audio_module::osc2 |
| uint32_t calf_plugins::monosynth_audio_module::output_pos |
Read position within the buffers, on each '0' the buffers are being filled with new data by calculate_step.
| float calf_plugins::monosynth_audio_module::porta_time |
| int calf_plugins::monosynth_audio_module::prev_wave1 |
Last used waveform number - OSC1.
| int calf_plugins::monosynth_audio_module::prev_wave2 |
Last used waveform number - OSC2.
| int calf_plugins::monosynth_audio_module::queue_note_on |
Next note to play on the next calculate_step.
| bool calf_plugins::monosynth_audio_module::queue_note_on_and_off |
Whether the queued note has been already released.
| float calf_plugins::monosynth_audio_module::queue_vel |
Velocity of the next note to play.
| bool calf_plugins::monosynth_audio_module::running |
The step code is producing non-zero values.
| float calf_plugins::monosynth_audio_module::separation |
| uint32_t calf_plugins::monosynth_audio_module::srate |
| dsp::keystack calf_plugins::monosynth_audio_module::stack |
| float calf_plugins::monosynth_audio_module::start_freq |
| bool calf_plugins::monosynth_audio_module::stopping |
This is the last non-zero buffer (set on calculate_step after fadeout is complete, the next calculate_step will zero running).
| float calf_plugins::monosynth_audio_module::target_freq |
| dsp::simple_oscillator calf_plugins::monosynth_audio_module::unison_osc |
| float calf_plugins::monosynth_audio_module::velocity |
Currently used velocity.
| int calf_plugins::monosynth_audio_module::wave1 |
Waveform number - OSC1.
| int calf_plugins::monosynth_audio_module::wave2 |
Waveform number - OSC2.
|
static |
| float calf_plugins::monosynth_audio_module::xfade |
| float calf_plugins::monosynth_audio_module::xpose1 |
| float calf_plugins::monosynth_audio_module::xpose2 |