LMMS
Loading...
Searching...
No Matches
calf_plugins::organ_audio_module Struct Reference

#include <organ.h>

Inheritance diagram for calf_plugins::organ_audio_module:
calf_plugins::audio_module< organ_metadata > dsp::drawbar_organ calf_plugins::line_graph_iface calf_plugins::organ_metadata calf_plugins::audio_module_iface dsp::basic_synth calf_plugins::organ_enums calf_plugins::organ_enums calf_plugins::plugin_metadata< organ_metadata > calf_plugins::plugin_metadata_iface

Public Types

enum  { param_count = drawbar_organ::param_count }
Public Types inherited from calf_plugins::audio_module< organ_metadata >
typedef organ_metadata metadata_type
Public Types inherited from calf_plugins::organ_enums
enum  {
  par_drawbar1 , par_drawbar2 , par_drawbar3 , par_drawbar4 ,
  par_drawbar5 , par_drawbar6 , par_drawbar7 , par_drawbar8 ,
  par_drawbar9 , par_frequency1 , par_frequency2 , par_frequency3 ,
  par_frequency4 , par_frequency5 , par_frequency6 , par_frequency7 ,
  par_frequency8 , par_frequency9 , par_waveform1 , par_waveform2 ,
  par_waveform3 , par_waveform4 , par_waveform5 , par_waveform6 ,
  par_waveform7 , par_waveform8 , par_waveform9 , par_detune1 ,
  par_detune2 , par_detune3 , par_detune4 , par_detune5 ,
  par_detune6 , par_detune7 , par_detune8 , par_detune9 ,
  par_phase1 , par_phase2 , par_phase3 , par_phase4 ,
  par_phase5 , par_phase6 , par_phase7 , par_phase8 ,
  par_phase9 , par_pan1 , par_pan2 , par_pan3 ,
  par_pan4 , par_pan5 , par_pan6 , par_pan7 ,
  par_pan8 , par_pan9 , par_routing1 , par_routing2 ,
  par_routing3 , par_routing4 , par_routing5 , par_routing6 ,
  par_routing7 , par_routing8 , par_routing9 , par_foldover ,
  par_percdecay , par_perclevel , par_percwave , par_percharm ,
  par_percvel2amp , par_percfmdecay , par_percfmdepth , par_percfmwave ,
  par_percfmharm , par_percvel2fm , par_perctrigger , par_percstereo ,
  par_filterchain , par_filter1type , par_master , par_f1cutoff ,
  par_f1res , par_f1env1 , par_f1env2 , par_f1env3 ,
  par_f1keyf , par_f2cutoff , par_f2res , par_f2env1 ,
  par_f2env2 , par_f2env3 , par_f2keyf , par_eg1attack ,
  par_eg1decay , par_eg1sustain , par_eg1release , par_eg1velscl ,
  par_eg1ampctl , par_eg2attack , par_eg2decay , par_eg2sustain ,
  par_eg2release , par_eg2velscl , par_eg2ampctl , par_eg3attack ,
  par_eg3decay , par_eg3sustain , par_eg3release , par_eg3velscl ,
  par_eg3ampctl , par_lforate , par_lfoamt , par_lfowet ,
  par_lfophase , par_lfomode , par_lfotype , par_transpose ,
  par_detune , par_polyphony , par_quadenv , par_pwhlrange ,
  par_bassfreq , par_bassgain , par_treblefreq , par_treblegain ,
  par_midi , param_count
}
enum  organ_waveform {
  wave_sine , wave_sinepl1 , wave_sinepl2 , wave_sinepl3 ,
  wave_ssaw , wave_ssqr , wave_spls , wave_saw ,
  wave_sqr , wave_pulse , wave_sinepl05 , wave_sqr05 ,
  wave_halfsin , wave_clvg , wave_bell , wave_bell2 ,
  wave_w1 , wave_w2 , wave_w3 , wave_w4 ,
  wave_w5 , wave_w6 , wave_w7 , wave_w8 ,
  wave_w9 , wave_dsaw , wave_dsqr , wave_dpls ,
  wave_count_small , wave_strings = wave_count_small , wave_strings2 , wave_sinepad ,
  wave_bellpad , wave_space , wave_choir , wave_choir2 ,
  wave_choir3 , wave_count , wave_count_big = wave_count - wave_count_small
}
enum  {
  ampctl_none , ampctl_direct , ampctl_f1 , ampctl_f2 ,
  ampctl_all , ampctl_count
}
enum  {
  lfotype_allpass = 0 , lfotype_cv1 , lfotype_cv2 , lfotype_cv3 ,
  lfotype_cvfull , lfotype_count
}
enum  {
  lfomode_off = 0 , lfomode_direct , lfomode_filter1 , lfomode_filter2 ,
  lfomode_voice , lfomode_global , lfomode_count
}
enum  {
  perctrig_first = 0 , perctrig_each , perctrig_eachplus , perctrig_polyphonic ,
  perctrig_count
}

Public Member Functions

 organ_audio_module ()
void post_instantiate (uint32_t sample_rate)
 Called after instantiating (after all the feature pointers are set - including interfaces like progress_report_iface).
void set_sample_rate (uint32_t sr)
 Set sample rate for the plugin.
void params_changed ()
 Called when params are changed (before processing).
void activate ()
 LADSPA-esque activate function, except it is called after ports are connected, not before.
void deactivate ()
 LADSPA-esque deactivate function.
uint32_t process (uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask)
 The audio processing loop; assumes numsamples <= MAX_SAMPLE_RUN, for larger buffers, call process_slice.
bool is_cv (int param_no) const
 No CV inputs for now.
bool is_noisy (int param_no) const
 Practically all the stuff here is noisy.
void execute (int cmd_no)
 Execute menu command with given number.
bool get_graph (int index, int subindex, int phase, float *data, int points, cairo_iface *context, int *mode) const
bool get_layers (int index, int generation, unsigned int &layers) const
char * configure (const char *key, const char *value)
 DSSI configure call.
void send_configures (send_configure_iface *)
 Send all understood configure vars (none by default).
uint32_t message_run (const void *valid_inputs, void *output_ports)
virtual void note_on (int channel, int note, int velocity)
 Handle MIDI Note On.
virtual void note_off (int channel, int note, int velocity)
 Handle MIDI Note Off.
virtual void control_change (int channel, int controller, int value)
 Handle MIDI Control Change.
virtual void pitch_bend (int channel, int value)
Public Member Functions inherited from calf_plugins::audio_module< organ_metadata >
 audio_module ()
void program_change (int channel, int program)
 Handle MIDI Program Change.
void channel_pressure (int channel, int value)
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).
virtual void get_port_arrays (float **&ins_ptrs, float **&outs_ptrs, float **&params_ptrs)
 Return the array of input port pointers.
virtual const plugin_metadata_ifaceget_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_ifaceget_line_graph_iface () const
virtual const phase_graph_ifaceget_phase_graph_iface () const
Public Member Functions inherited from calf_plugins::audio_module_iface
virtual ~audio_module_iface ()
Public Member Functions inherited from dsp::drawbar_organ
 drawbar_organ (organ_parameters *_parameters)
void render_separate (float *output[], int nsamples)
dsp::voicealloc_voice ()
virtual void percussion_note_on (int note, int vel)
virtual void setup (int sr)
void update_params ()
void control_change (int controller, int value)
void pitch_bend (int amt)
 amt = -8192 to 8191
virtual bool check_percussion ()
Public Member Functions inherited from dsp::basic_synth
virtual void trim_voices ()
virtual dsp::voicegive_voice ()
virtual void steal_voice ()
virtual void render_to (float(*output)[2], int nsamples)
virtual void note_on (int note, int vel)
virtual void note_off (int note, int vel)
virtual void on_pedal_release ()
virtual ~basic_synth ()
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 Attributes

dsp::organ_parameters par_values
uint32_t srate
bool panic_flag
bool redraw
std::string var_map_curve
 Value for configure variable map_curve.
Public Attributes inherited from calf_plugins::audio_module< organ_metadata >
float * ins [(organ_metadata::in_count !=0) ? organ_metadata::in_count :1]
float * outs [(organ_metadata::out_count !=0) ? organ_metadata::out_count :1]
float * params [organ_metadata::param_count]
bool questionable_data_reported_in
bool questionable_data_reported_out
progress_report_ifaceprogress_report
Public Attributes inherited from dsp::drawbar_organ
organ_parametersparameters
percussion_voice percussion
scanner_vibrato global_vibrato
two_band_eq eq_l
two_band_eq eq_r

Additional Inherited Members

Protected Types inherited from dsp::basic_synth
typedef basic_pool< dsp::voice * > voice_array
Protected Member Functions inherited from dsp::basic_synth
void init_voices (int count)
void kill_note (int note, int vel, bool just_one)
Protected Attributes inherited from dsp::basic_synth
int sample_rate
 Current sample rate.
bool hold
 Hold pedal state.
bool sostenuto
 Sostenuto pedal state.
voice_array allocated_voices
 All voices available.
voice_array active_voices
 Voices currently playing.
voice_array unused_voices
 Voices allocated, but not used.
std::bitset< 128 > gate
 Gate values for all 128 MIDI notes.
unsigned int polyphony_limit
 Maximum allocated number of channels.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
param_count 

Constructor & Destructor Documentation

◆ organ_audio_module()

organ_audio_module::organ_audio_module ( )

Member Function Documentation

◆ activate()

void organ_audio_module::activate ( )
virtual

LADSPA-esque activate function, except it is called after ports are connected, not before.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ configure()

char * organ_audio_module::configure ( const char * key,
const char * value )
virtual

DSSI configure call.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ control_change()

virtual void calf_plugins::organ_audio_module::control_change ( int channel,
int controller,
int value )
inlinevirtual

Handle MIDI Control Change.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ deactivate()

void organ_audio_module::deactivate ( )
virtual

LADSPA-esque deactivate function.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ execute()

void organ_audio_module::execute ( int cmd_no)
virtual

Execute menu command with given number.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ get_graph()

bool organ_audio_module::get_graph ( int index,
int subindex,
int phase,
float * data,
int points,
cairo_iface * context,
int * mode ) const
virtual

Obtain subindex'th graph of parameter 'index'

Parameters
indexparameter/graph number (usually tied to particular plugin control port)
subindexgraph number (there may be multiple overlaid graphs for one parameter, eg. for monosynth 2x12dB filters)
phase0 if in cache phase or 1 if in realtime phase
databuffer for normalized output values
pointsnumber of points to fill
contextcairo context to adjust (for multicolour graphs etc.)
Return values
truegraph data was returned; subindex+1 graph may or may not be available
falsegraph data was not returned; subindex+1 graph does not exist either

Reimplemented from calf_plugins::line_graph_iface.

◆ get_layers()

bool organ_audio_module::get_layers ( int index,
int generation,
unsigned int & layers ) const
virtual

Return which layers need to be redrawn in the next GTK drawing cycle

Parameters
indexParameter/graph identifier (usually tied to particular plugin control port)
generationThe overall amount of drawing cycles since the last full refresh of all surfaces
layersBitmask defining the layers to be redrawn (see layers_flags above)
Return values
truethere's at least one layer to be redrawn; false nothing to draw in this cycle

Reimplemented from calf_plugins::line_graph_iface.

◆ is_cv()

bool calf_plugins::organ_audio_module::is_cv ( int param_no) const
inlinevirtual

No CV inputs for now.

Implements calf_plugins::plugin_metadata_iface.

◆ is_noisy()

bool calf_plugins::organ_audio_module::is_noisy ( int param_no) const
inlinevirtual

Practically all the stuff here is noisy.

Implements calf_plugins::plugin_metadata_iface.

◆ message_run()

uint32_t organ_audio_module::message_run ( const void * valid_ports,
void * output_ports )
virtual

Handle 'message context' port message

  • output_ports pointer to bit array of output port "changed" flags, note that 0 = first audio input, not first parameter (use input_count + output_count)

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ note_off()

virtual void calf_plugins::organ_audio_module::note_off ( int channel,
int note,
int velocity )
inlinevirtual

Handle MIDI Note Off.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ note_on()

virtual void calf_plugins::organ_audio_module::note_on ( int channel,
int note,
int velocity )
inlinevirtual

Handle MIDI Note On.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ params_changed()

void organ_audio_module::params_changed ( )
virtual

Called when params are changed (before processing).

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ pitch_bend()

virtual void calf_plugins::organ_audio_module::pitch_bend ( int channel,
int value )
inlinevirtual

Handle MIDI Pitch Bend

Parameters
valuepitch bend value (-8192 to 8191, defined as in MIDI ie. 8191 = 200 ct by default)

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ post_instantiate()

void organ_audio_module::post_instantiate ( uint32_t )
virtual

Called after instantiating (after all the feature pointers are set - including interfaces like progress_report_iface).

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ process()

uint32_t organ_audio_module::process ( uint32_t offset,
uint32_t numsamples,
uint32_t inputs_mask,
uint32_t outputs_mask )
virtual

The audio processing loop; assumes numsamples <= MAX_SAMPLE_RUN, for larger buffers, call process_slice.

Implements calf_plugins::audio_module_iface.

◆ send_configures()

void organ_audio_module::send_configures ( send_configure_iface * sci)
virtual

Send all understood configure vars (none by default).

Reimplemented from calf_plugins::audio_module< organ_metadata >.

◆ set_sample_rate()

void calf_plugins::organ_audio_module::set_sample_rate ( uint32_t sr)
inlinevirtual

Set sample rate for the plugin.

Reimplemented from calf_plugins::audio_module< organ_metadata >.

Member Data Documentation

◆ panic_flag

bool calf_plugins::organ_audio_module::panic_flag

◆ par_values

dsp::organ_parameters calf_plugins::organ_audio_module::par_values

◆ redraw

bool calf_plugins::organ_audio_module::redraw
mutable

◆ srate

uint32_t calf_plugins::organ_audio_module::srate

◆ var_map_curve

std::string calf_plugins::organ_audio_module::var_map_curve

Value for configure variable map_curve.


The documentation for this struct was generated from the following files: