21#ifndef __CALF_MODULES_SYNTHS_H
22#define __CALF_MODULES_SYNTHS_H
37#define MONOSYNTH_WAVE_BITS 12
133 void note_on(
int channel,
int note,
int vel);
135 void note_off(
int channel,
int note,
int vel);
170 bool is_cv(
int param_no)
const {
return false; }
195#if ENABLE_EXPERIMENTAL
Controller controller
Definition main.C:5
float * params[monosynth_metadata::param_count]
Definition giface.h:527
progress_report_iface * progress_report
Definition giface.h:531
audio_module()
Definition giface.h:533
mod_matrix_impl(dsp::modulation_entry *_matrix, calf_plugins::mod_matrix_metadata *_metadata)
Definition modmatrix.cpp:31
char * configure(const char *key, const char *value)
Definition modmatrix.cpp:125
void send_configures(send_configure_iface *)
Definition modmatrix.cpp:113
float detune
Definition modules_synths.h:78
int32_t last_pwshift2
Last value of phase shift for pulse width emulation for OSC2.
Definition modules_synths.h:87
bool gate
A key is kept pressed.
Definition modules_synths.h:55
float ampctl
Definition modules_synths.h:78
float xpose2
Definition modules_synths.h:78
float target_freq
Definition modules_synths.h:77
int wave1
Waveform number - OSC1.
Definition modules_synths.h:66
float modwheel_value
Modulation wheel position (0.f-1.f).
Definition modules_synths.h:81
float velocity
Currently used velocity.
Definition modules_synths.h:118
void deactivate()
LADSPA-esque deactivate function.
Definition monosynth.cpp:761
float odcr
Definition modules_synths.h:79
void apply_fadeout()
Apply anti-click'n'pop fadeout (used at the end of the sound).
Definition monosynth.cpp:645
virtual char * configure(const char *key, const char *value)
DSSI configure call.
Definition modules_synths.h:177
void delayed_note_on()
Definition monosynth.cpp:404
uint32_t process(uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask)
Main processing function.
Definition monosynth.cpp:808
bool queue_note_on_and_off
Whether the queued note has been already released.
Definition modules_synths.h:93
float last_unison
Last value of unison amount.
Definition modules_synths.h:122
float buffer[step_size]
Output buffers, used to ensure updates are done every step_size regardless of process buffer size.
Definition modules_synths.h:62
void activate()
LADSPA-esque activate function, except it is called after ports are connected, not before.
Definition monosynth.cpp:72
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),...
Definition monosynth.cpp:209
int filter_type
Filter type.
Definition modules_synths.h:74
int32_t last_stretch1
Last value of stretch for osc sync emulation for OSC1.
Definition modules_synths.h:89
bool is_noisy(int param_no) const
Practically all the stuff here is noisy.
Definition modules_synths.h:172
monosynth_audio_module()
Definition monosynth.cpp:32
float porta_time
Definition modules_synths.h:79
dsp::biquad_d1_lerp filter2
Definition modules_synths.h:49
float last_xfade
Last value of oscillator mix ratio.
Definition modules_synths.h:120
void calculate_buffer_oscs(float lfo)
Run oscillators.
Definition monosynth.cpp:277
dsp::triangle_lfo lfo1
Definition modules_synths.h:47
dsp::simple_oscillator unison_osc
Definition modules_synths.h:48
float queue_vel
Velocity of the next note to play.
Definition modules_synths.h:95
dsp::triangle_lfo lfo2
Definition modules_synths.h:47
dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > detosc
Definition modules_synths.h:46
float xpose1
Definition modules_synths.h:78
float lfo_bend
Definition modules_synths.h:79
int last_filter_type
Filter type on the last calculate_step.
Definition modules_synths.h:76
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 t...
Definition modules_synths.h:176
bool is_stereo_filter() const
Definition modules_synths.h:186
float start_freq
Definition modules_synths.h:77
void note_off(int channel, int note, int vel)
Handle MIDI Note Off message.
Definition monosynth.cpp:691
void lookup_waveforms()
Set waveform addresses for oscillators.
Definition monosynth.cpp:394
void end_note()
Release a note (physically), called from note-off handler or when note-off has been scheduled after n...
Definition monosynth.cpp:706
int queue_note_on
Next note to play on the next calculate_step.
Definition modules_synths.h:91
dsp::inertia< dsp::exponential_ramp > inertia_cutoff
Smoothed cutoff value.
Definition modules_synths.h:110
dsp::fadeout fadeout2
Fadeout for buffer 2.
Definition modules_synths.h:108
float moddest[moddest_count]
Current calculated mod matrix outputs.
Definition modules_synths.h:124
int last_key
Last triggered note.
Definition modules_synths.h:59
dsp::adsr envelope2
Definition modules_synths.h:101
void channel_pressure(int channel, int value)
Handle MIDI Channel Pressure.
Definition monosynth.cpp:729
dsp::fadeout fadeout
Fadeout for buffer 1.
Definition modules_synths.h:106
static dsp::waveform_family< MONOSYNTH_WAVE_BITS > * waves
Definition modules_synths.h:45
dsp::gain_smoothing master
Smoothing for master volume.
Definition modules_synths.h:104
int32_t last_pwshift1
Last value of phase shift for pulse width emulation for OSC1.
Definition modules_synths.h:85
int prev_wave1
Last used waveform number - OSC1.
Definition modules_synths.h:70
void calculate_buffer_ser()
Run two filters in series to produce mono output samples.
Definition monosynth.cpp:355
int prev_wave2
Last used waveform number - OSC2.
Definition modules_synths.h:72
void post_instantiate(uint32_t)
Called after instantiating (after all the feature pointers are set - including interfaces like progre...
Definition modules_synths.h:151
bool running
The step code is producing non-zero values.
Definition modules_synths.h:51
uint32_t output_pos
Read position within the buffers, on each '0' the buffers are being filled with new data by calculate...
Definition modules_synths.h:64
float cutoff
Definition modules_synths.h:77
uint32_t crate
Definition modules_synths.h:44
float freq
Definition modules_synths.h:77
dsp::biquad_d1_lerp filter
Definition modules_synths.h:49
void reset()
Definition monosynth.cpp:40
dsp::inertia< dsp::exponential_ramp > inertia_pitchbend
Smoothed pitch bend value.
Definition modules_synths.h:112
bool force_fadeout
All notes off fadeout.
Definition modules_synths.h:57
dsp::modulation_entry mod_matrix_data[mod_matrix_slots]
Rows of the modulation matrix.
Definition modules_synths.h:116
float buffer2[step_size]
Definition modules_synths.h:62
float lfo_clock
Delay counter for LFOs.
Definition modules_synths.h:83
void control_change(int channel, int controller, int value)
Handle control change messages.
Definition monosynth.cpp:735
void note_on(int channel, int note, int vel)
Definition monosynth.cpp:681
dsp::keystack stack
Definition modules_synths.h:102
int modwheel_value_int
Integer value for modwheel (0-16383, read from CC1 - MSBs and CC33 - LSBs).
Definition modules_synths.h:97
float separation
Definition modules_synths.h:77
bool get_layers(int index, int generation, unsigned int &layers) const
Definition modules_synths.h:167
dsp::inertia< dsp::linear_ramp > inertia_pressure
Smoothed channel pressure value.
Definition modules_synths.h:114
void pitch_bend(int, int value)
Handle pitch bend message.
Definition modules_synths.h:139
void params_changed()
Update variables from control ports.
Definition monosynth.cpp:786
float fgain
Definition modules_synths.h:77
void calculate_buffer_stereo()
Run two filters (one per channel) to produce stereo output samples.
Definition monosynth.cpp:381
bool is_cv(int param_no) const
Definition modules_synths.h:170
void set_sample_rate(uint32_t sr)
Set sample rate for the plugin.
Definition monosynth.cpp:482
void calculate_step()
Calculate control signals and produce step_size samples of output.
Definition monosynth.cpp:501
float fltctl
Definition modules_synths.h:78
int legato
Legato mode (bitmask).
Definition modules_synths.h:99
dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > osc2
Definition modules_synths.h:46
int wave2
Waveform number - OSC2.
Definition modules_synths.h:68
float xfade
Definition modules_synths.h:78
dsp::adsr envelope1
Envelope Generators.
Definition modules_synths.h:101
void calculate_buffer_single()
Run one filter to produce mono output samples.
Definition monosynth.cpp:369
dsp::waveform_oscillator< MONOSYNTH_WAVE_BITS > osc1
Definition modules_synths.h:46
static void precalculate_waves(progress_report_iface *reporter)
Definition monosynth.cpp:79
bool stopping
This is the last non-zero buffer (set on calculate_step after fadeout is complete,...
Definition modules_synths.h:53
uint32_t srate
Definition modules_synths.h:44
void set_frequency()
Update oscillator frequency based on base frequency, detune amount, pitch bend scaling factor and sam...
Definition monosynth.cpp:771
float fgain_delta
Definition modules_synths.h:77
float get_lfo(dsp::triangle_lfo &lfo, int param)
Definition monosynth.cpp:493
static PuglViewHint int value
Definition pugl.h:1708
JSAMPIMAGE data
Definition jpeglib.h:945
int int32_t
Definition mid.cpp:97
unsigned int uint32_t
Definition mid.cpp:100
Definition benchmark.cpp:53
@ LG_REALTIME_GRAPH
Definition giface.h:181
png_structrp int mode
Definition png.h:1139
'provides live line graph values' interface
Definition giface.h:198
Simple linear fade out for note tails.
Definition envelope.h:212
Single entry in modulation matrix.
Definition modmatrix.h:31
ZCONST char * key
Definition crypt.c:587