diff --git a/plugins/ladspa_effect/calf/AUTHORS b/plugins/ladspa_effect/calf/AUTHORS index 8c4bf4833..69803a136 100644 --- a/plugins/ladspa_effect/calf/AUTHORS +++ b/plugins/ladspa_effect/calf/AUTHORS @@ -5,7 +5,10 @@ Thorsten Wilms Hans Baier Torben Hohn Markus Schmidt +Tom Szilagyi +Damien Zammit Additional bugfixes/enhancement patches: David Täht Dave Robillard +Alexandre Prokoudine diff --git a/plugins/ladspa_effect/calf/ChangeLog b/plugins/ladspa_effect/calf/ChangeLog index b8f999563..8d5bc92ed 100644 --- a/plugins/ladspa_effect/calf/ChangeLog +++ b/plugins/ladspa_effect/calf/ChangeLog @@ -1,3 +1,53 @@ +Version 0.0.60.0 (unreleased) ++ Awesome new bitmap-based GUI by Markus Schmidt ++ New plugins by Markus Schmidt: + * several EQs (5, 8, 12 bands) + * new compressors (sidechain, multiband, deesser) + * new distortion plugins (based on code by Tom Szilagyi) + * amplitude modulator plugin (pulsator) ++ New experimental plugin - a simple wrapper for Fluidsynth ++ JACK host: save/load of sessions ++ Vintage Delay: fix another reinitialisation bug that caused, + noise bursts on enable/disable, add Width and LR/RL modes ++ many improvements to Monosynth: + * modulation matrix (not compatible with all plugin standards yet) + * PWM in both oscillators + * stretch (pseudo-hard-sync) for oscillator 1 + * detune scaling (depending on pitch) + * second envelope ++ envelopes now have an extra stage called 'Fade': when enabled, + it replaces Sustain with either ramp down to 0% or ramp up to 100% ++ more options in the build system (LASH use can now be disabled) ++ support for LADISH level 1 in calfjackhost (SIGUSR1-triggered Save) ++ uses more recent LV2 extensions (external UI, persist and others) ++ many bugfixes +- removed small plugins - if anyone's interested, please use the old code + in some new project + +Version 0.0.18.6 + ++ LADSPA: do not delete singletons after .so is unloaded ++ Rotary speaker: fix spelling of plugin class + +Version 0.0.18.5 + ++ Vintage Delay: clear buffer on startup and reactivation ++ GUI: fix dodgy icons ++ JACK host: fix a problem with numeric variant of -M option and the new + versions of JACK + +Version 0.0.18.4 + ++ Framework: gcc-4.4 compilation fix (Orcan Ogetbil) + +Version 0.0.18.3 + ++ Framework: do not use x86 assembler code on non-x86 platforms ++ Monosynth, Organ: fix serious audio quality issues ++ Monosynth: implement inertia for cutoff knob and pitch bend, make + pitch bend range adjustable ++ Organ: fix polyphony limit bug + Version 0.0.18.2 + Organ: fix voice stealing of released notes, sort out GUI, add quadratic diff --git a/plugins/ladspa_effect/calf/src/calf/giface.h b/plugins/ladspa_effect/calf/src/calf/giface.h index f930a0ae6..f64908bd0 100644 --- a/plugins/ladspa_effect/calf/src/calf/giface.h +++ b/plugins/ladspa_effect/calf/src/calf/giface.h @@ -388,19 +388,19 @@ extern const char *load_gui_xml(const std::string &plugin_id); struct audio_module_iface { /// Handle MIDI Note On - virtual void note_on(int note, int velocity) = 0; + virtual void note_on(int channel, int note, int velocity) = 0; /// Handle MIDI Note Off - virtual void note_off(int note, int velocity) = 0; + virtual void note_off(int channel, int note, int velocity) = 0; /// Handle MIDI Program Change - virtual void program_change(int program) = 0; + virtual void program_change(int channel, int program) = 0; /// Handle MIDI Control Change - virtual void control_change(int controller, int value) = 0; + virtual void control_change(int channel, int controller, int value) = 0; /// Handle MIDI Pitch Bend /// @param value pitch bend value (-8192 to 8191, defined as in MIDI ie. 8191 = 200 ct by default) - virtual void pitch_bend(int value) = 0; + virtual void pitch_bend(int channel, int value) = 0; /// Handle MIDI Channel Pressure /// @param value channel pressure (0 to 127) - virtual void channel_pressure(int value) = 0; + virtual void channel_pressure(int channel, int value) = 0; /// Called when params are changed (before processing) virtual void params_changed() = 0; /// LADSPA-esque activate function, except it is called after ports are connected, not before @@ -427,9 +427,9 @@ struct audio_module_iface virtual const plugin_metadata_iface *get_metadata_iface() const = 0; /// Set the progress report interface to communicate progress to virtual void set_progress_report_iface(progress_report_iface *iface) = 0; - /// Clear a part of output buffers that have 0s at mask - virtual void process_slice(uint32_t offset, uint32_t end) = 0; - /// The audio processing loop + /// Clear a part of output buffers that have 0s at mask; subdivide the buffer so that no runs > MAX_SAMPLE_RUN are fed to process function + virtual uint32_t process_slice(uint32_t offset, uint32_t end) = 0; + /// The audio processing loop; assumes numsamples <= MAX_SAMPLE_RUN, for larger buffers, call process_slice virtual uint32_t process(uint32_t offset, uint32_t numsamples, uint32_t inputs_mask, uint32_t outputs_mask) = 0; /// Message port processing function virtual uint32_t message_run(const void *valid_ports, void *output_ports) = 0; @@ -461,19 +461,19 @@ public: } /// Handle MIDI Note On - void note_on(int note, int velocity) {} + void note_on(int channel, int note, int velocity) {} /// Handle MIDI Note Off - void note_off(int note, int velocity) {} + void note_off(int channel, int note, int velocity) {} /// Handle MIDI Program Change - void program_change(int program) {} + void program_change(int channel, int program) {} /// Handle MIDI Control Change - void control_change(int controller, int value) {} + void control_change(int channel, int controller, int value) {} /// Handle MIDI Pitch Bend /// @param value pitch bend value (-8192 to 8191, defined as in MIDI ie. 8191 = 200 ct by default) - void pitch_bend(int value) {} + void pitch_bend(int channel, int value) {} /// Handle MIDI Channel Pressure /// @param value channel pressure (0 to 127) - void channel_pressure(int value) {} + void channel_pressure(int channel, int value) {} /// Called when params are changed (before processing) void params_changed() {} /// LADSPA-esque activate function, except it is called after ports are connected, not before @@ -522,15 +522,18 @@ public: } } /// utility function: call process, and if it returned zeros in output masks, zero out the relevant output port buffers - void process_slice(uint32_t offset, uint32_t end) + uint32_t process_slice(uint32_t offset, uint32_t end) { + uint32_t total_out_mask = 0; while(offset < end) { uint32_t newend = std::min(offset + MAX_SAMPLE_RUN, end); uint32_t out_mask = process(offset, newend - offset, -1, -1); + total_out_mask |= out_mask; zero_by_mask(out_mask, offset, newend - offset); offset = newend; } + return total_out_mask; } /// @return line_graph_iface if any virtual const line_graph_iface *get_line_graph_iface() const { return dynamic_cast(this); } diff --git a/plugins/ladspa_effect/calf/src/calf/lv2wrap.h b/plugins/ladspa_effect/calf/src/calf/lv2wrap.h index 77293307e..35f746bc7 100644 --- a/plugins/ladspa_effect/calf/src/calf/lv2wrap.h +++ b/plugins/ladspa_effect/calf/src/calf/lv2wrap.h @@ -99,8 +99,10 @@ struct lv2_instance: public plugin_ctl_iface, public progress_report_iface size_t len = 0; uint32_t type = 0; const void *ptr = (*retrieve)(callback_data, vars[i], &len, &type); - if (ptr && type == string_type) + if (ptr) { + if (type != string_type) + fprintf(stderr, "Warning: type is %d, expected %d\n", (int)type, (int)string_type); printf("Calling configure on %s\n", vars[i]); configure(vars[i], std::string((const char *)ptr, len).c_str()); } @@ -130,14 +132,15 @@ struct lv2_instance: public plugin_ctl_iface, public progress_report_iface if (item->type == midi_event_type) { // printf("Midi message %x %x %x %x %d\n", item->data[0], item->data[1], item->data[2], item->data[3], item->size); + int channel = item->data[0] & 15; switch(item->data[0] >> 4) { - case 8: module->note_off(item->data[1], item->data[2]); break; - case 9: module->note_on(item->data[1], item->data[2]); break; - case 11: module->control_change(item->data[1], item->data[2]); break; - case 12: module->program_change(item->data[1]); break; - case 13: module->channel_pressure(item->data[1]); break; - case 14: module->pitch_bend(item->data[1] + 128 * item->data[2] - 8192); break; + case 8: module->note_off(channel, item->data[1], item->data[2]); break; + case 9: module->note_on(channel, item->data[1], item->data[2]); break; + case 11: module->control_change(channel, item->data[1], item->data[2]); break; + case 12: module->program_change(channel, item->data[1]); break; + case 13: module->channel_pressure(channel, item->data[1]); break; + case 14: module->pitch_bend(channel, item->data[1] + 128 * item->data[2] - 8192); break; } } else diff --git a/plugins/ladspa_effect/calf/src/calf/metadata.h b/plugins/ladspa_effect/calf/src/calf/metadata.h index ecf84e3c3..75505e4e1 100644 --- a/plugins/ladspa_effect/calf/src/calf/metadata.h +++ b/plugins/ladspa_effect/calf/src/calf/metadata.h @@ -150,6 +150,7 @@ struct monosynth_metadata: public plugin_metadata monosynth_metadata(); /// Lookup of table edit interface virtual const table_metadata_iface *get_table_metadata_iface(const char *key) const { if (!strcmp(key, "mod_matrix")) return &mm_metadata; else return NULL; } + const char *const *get_configure_vars() const; }; /// Thor's compressor - metadata diff --git a/plugins/ladspa_effect/calf/src/calf/modmatrix.h b/plugins/ladspa_effect/calf/src/calf/modmatrix.h index d66c32374..08b44cdf3 100644 --- a/plugins/ladspa_effect/calf/src/calf/modmatrix.h +++ b/plugins/ladspa_effect/calf/src/calf/modmatrix.h @@ -22,6 +22,7 @@ #define __CALF_MODMATRIX_H #include "giface.h" +#include namespace dsp { @@ -88,6 +89,32 @@ public: void send_configures(send_configure_iface *); char *configure(const char *key, const char *value); + /// Return a list of configure variables used by the modulation matrix + template + static const char **get_configure_vars() + { + static std::vector names_vector; + static const char *names[rows * 5 + 1]; + + if (names[0] == NULL) + { + for (int i = 0; i < rows; i++) + { + for (int j = 0; j < 5; j++) + { + char buf[40]; + sprintf(buf, "mod_matrix:%d,%d", i, j); + names_vector.push_back(buf); + } + } + for (size_t i = 0; i < names_vector.size(); i++) + names[i] = names_vector[i].c_str(); + names[names_vector.size()] = NULL; + } + + return names; + } + private: std::string get_cell(int row, int column) const; void set_cell(int row, int column, const std::string &src, std::string &error); diff --git a/plugins/ladspa_effect/calf/src/calf/modules.h b/plugins/ladspa_effect/calf/src/calf/modules.h index b9395c68d..19d67e2ca 100644 --- a/plugins/ladspa_effect/calf/src/calf/modules.h +++ b/plugins/ladspa_effect/calf/src/calf/modules.h @@ -230,8 +230,8 @@ public: void deactivate(); /// MIDI control - virtual void note_on(int note, int vel); - virtual void note_off(int note, int vel); + virtual void note_on(int channel, int note, int vel); + virtual void note_off(int channel, int note, int vel); bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context) const; diff --git a/plugins/ladspa_effect/calf/src/calf/modules_dev.h b/plugins/ladspa_effect/calf/src/calf/modules_dev.h index 727e5ec73..628fcd539 100644 --- a/plugins/ladspa_effect/calf/src/calf/modules_dev.h +++ b/plugins/ladspa_effect/calf/src/calf/modules_dev.h @@ -69,18 +69,18 @@ public: void post_instantiate(); void set_sample_rate(uint32_t sr) { srate = sr; } /// Handle MIDI Note On message (by sending it to fluidsynth) - void note_on(int note, int vel); + void note_on(int channel, int note, int vel); /// Handle MIDI Note Off message (by sending it to fluidsynth) - void note_off(int note, int vel); + void note_off(int channel, int note, int vel); /// Handle pitch bend message. - inline void pitch_bend(int value) + inline void pitch_bend(int channel, int value) { fluid_synth_pitch_bend(synth, 0, value + 0x2000); } /// Handle control change messages. - void control_change(int controller, int value); + void control_change(int channel, int controller, int value); /// Handle program change messages. - void program_change(int program); + void program_change(int channel, int program); /// Update variables from control ports. void params_changed() { diff --git a/plugins/ladspa_effect/calf/src/calf/modules_mod.h b/plugins/ladspa_effect/calf/src/calf/modules_mod.h index 78244913b..6b57b0b8a 100644 --- a/plugins/ladspa_effect/calf/src/calf/modules_mod.h +++ b/plugins/ladspa_effect/calf/src/calf/modules_mod.h @@ -128,7 +128,7 @@ public: /// Increase or decrease aspeed towards raspeed, with required negative and positive rate bool incr_towards(float &aspeed, float raspeed, float delta_decc, float delta_acc); uint32_t process(uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask); - virtual void control_change(int ctl, int val); + virtual void control_change(int channel, int ctl, int val); }; /// A multitap stereo chorus thing diff --git a/plugins/ladspa_effect/calf/src/calf/modules_synths.h b/plugins/ladspa_effect/calf/src/calf/modules_synths.h index 2e8dc8ed4..161166813 100644 --- a/plugins/ladspa_effect/calf/src/calf/modules_synths.h +++ b/plugins/ladspa_effect/calf/src/calf/modules_synths.h @@ -127,20 +127,20 @@ public: void end_note(); /// Handle MIDI Note On message (does not immediately trigger a note, as it must start on /// boundary of step_size samples). - void note_on(int note, int vel); + void note_on(int channel, int note, int vel); /// Handle MIDI Note Off message - void note_off(int note, int vel); + void note_off(int channel, int note, int vel); /// Handle MIDI Channel Pressure - void channel_pressure(int value); + void channel_pressure(int channel, int value); /// Handle pitch bend message. - inline void pitch_bend(int value) + inline void pitch_bend(int /*channel*/, int value) { inertia_pitchbend.set_inertia(pow(2.0, (value * *params[par_pwhlrange]) / (1200.0 * 8192.0))); } /// Update oscillator frequency based on base frequency, detune amount, pitch bend scaling factor and sample rate. void set_frequency(); /// Handle control change messages. - void control_change(int controller, int value); + void control_change(int channel, int controller, int value); /// Update variables from control ports. void params_changed(); void activate(); diff --git a/plugins/ladspa_effect/calf/src/calf/organ.h b/plugins/ladspa_effect/calf/src/calf/organ.h index efb39137b..ac415994c 100644 --- a/plugins/ladspa_effect/calf/src/calf/organ.h +++ b/plugins/ladspa_effect/calf/src/calf/organ.h @@ -321,10 +321,10 @@ public: uint32_t message_run(const void *valid_inputs, void *output_ports); public: // overrides - virtual void note_on(int note, int velocity) { dsp::drawbar_organ::note_on(note, velocity); } - virtual void note_off(int note, int velocity) { dsp::drawbar_organ::note_off(note, velocity); } - virtual void control_change(int controller, int value) { dsp::drawbar_organ::control_change(controller, value); } - virtual void pitch_bend(int value) { dsp::drawbar_organ::pitch_bend(value); } + virtual void note_on(int /*channel*/, int note, int velocity) { dsp::drawbar_organ::note_on(note, velocity); } + virtual void note_off(int /*channel*/, int note, int velocity) { dsp::drawbar_organ::note_off(note, velocity); } + virtual void control_change(int /*channel*/, int controller, int value) { dsp::drawbar_organ::control_change(controller, value); } + virtual void pitch_bend(int /*channel*/, int value) { dsp::drawbar_organ::pitch_bend(value); } }; }; diff --git a/plugins/ladspa_effect/calf/src/calf/utils.h b/plugins/ladspa_effect/calf/src/calf/utils.h index 3dd83de60..783a98ad3 100644 --- a/plugins/ladspa_effect/calf/src/calf/utils.h +++ b/plugins/ladspa_effect/calf/src/calf/utils.h @@ -65,16 +65,22 @@ public: } }; -/// Exception-safe mutex lock -class ptlock +class ptlock_base { +protected: ptmutex &mutex; bool locked; + + ptlock_base(ptmutex &_m) + : mutex(_m) + , locked(false) + { + } public: - ptlock(ptmutex &_m) : mutex(_m), locked(true) + bool is_locked() { - mutex.lock(); + return locked; } void unlock() { @@ -85,13 +91,33 @@ public: { locked = false; } - ~ptlock() + ~ptlock_base() { if (locked) mutex.unlock(); } }; +/// Exception-safe mutex lock +class ptlock: public ptlock_base +{ +public: + ptlock(ptmutex &_m) : ptlock_base(_m) + { + locked = mutex.lock(); + } +}; + +/// Exception-safe polling mutex lock +class pttrylock: public ptlock_base +{ +public: + pttrylock(ptmutex &_m) : ptlock_base(_m) + { + locked = mutex.trylock(); + } +}; + /// Exception-safe temporary assignment template class scope_assign diff --git a/plugins/ladspa_effect/calf/src/calf/wavetable.h b/plugins/ladspa_effect/calf/src/calf/wavetable.h index 5c4492cec..836585acb 100644 --- a/plugins/ladspa_effect/calf/src/calf/wavetable.h +++ b/plugins/ladspa_effect/calf/src/calf/wavetable.h @@ -149,10 +149,13 @@ public: inertia_pitchbend.ramp.set_length(crate / 30); // 1/30s inertia_pressure.ramp.set_length(crate / 30); // 1/30s - XXXKF monosynth needs that too } + virtual void note_on(int /*channel*/, int note, int velocity) { dsp::basic_synth::note_on(note, velocity); } + virtual void note_off(int /*channel*/, int note, int velocity) { dsp::basic_synth::note_off(note, velocity); } + virtual void control_change(int /*channel*/, int controller, int value) { dsp::basic_synth::control_change(controller, value); } /// Handle MIDI Channel Pressure - void channel_pressure(int value); + virtual void channel_pressure(int channel, int value); /// Handle pitch bend message. - inline void pitch_bend(int value) + virtual void pitch_bend(int channel, int value) { inertia_pitchbend.set_inertia(pow(2.0, (value * *params[par_pwhlrange]) / (1200.0 * 8192.0))); } diff --git a/plugins/ladspa_effect/calf/src/metadata.cpp b/plugins/ladspa_effect/calf/src/metadata.cpp index 2a76fc588..5bd37eb4d 100644 --- a/plugins/ladspa_effect/calf/src/metadata.cpp +++ b/plugins/ladspa_effect/calf/src/metadata.cpp @@ -22,6 +22,7 @@ #include #include #include +#include using namespace dsp; using namespace calf_plugins; @@ -808,6 +809,11 @@ monosynth_metadata::monosynth_metadata() { } +const char *const *monosynth_metadata::get_configure_vars() const +{ + return mod_matrix_impl::get_configure_vars(); +} + //////////////////////////////////////////////////////////////////////////// CALF_PLUGIN_INFO(organ) = { 0x8481, "Organ", "Calf Organ", "Krzysztof Foltman", calf_plugins::calf_copyright_info, "SynthesizerPlugin" }; diff --git a/plugins/ladspa_effect/calf/src/modmatrix.cpp b/plugins/ladspa_effect/calf/src/modmatrix.cpp index 670051b17..0a320c220 100644 --- a/plugins/ladspa_effect/calf/src/modmatrix.cpp +++ b/plugins/ladspa_effect/calf/src/modmatrix.cpp @@ -134,6 +134,17 @@ char *mod_matrix_impl::configure(const char *key, const char *value) if (row != -1 && column != -1) { string error; + string value_text; + if (value == NULL) + { + const table_column_info &ci = metadata->get_table_columns()[column]; + if (ci.type == TCT_ENUM) + value_text = ci.values[(int)ci.def_value]; + else + if (ci.type == TCT_FLOAT) + value_text = f2s(ci.def_value); + value = value_text.c_str(); + } set_cell(row, column, value, error); if (!error.empty()) return strdup(error.c_str()); diff --git a/plugins/ladspa_effect/calf/src/modules.cpp b/plugins/ladspa_effect/calf/src/modules.cpp index ab2d44e19..c10e0e048 100644 --- a/plugins/ladspa_effect/calf/src/modules.cpp +++ b/plugins/ladspa_effect/calf/src/modules.cpp @@ -380,7 +380,7 @@ void filterclavier_audio_module::deactivate() } -void filterclavier_audio_module::note_on(int note, int vel) +void filterclavier_audio_module::note_on(int channel, int note, int vel) { last_note = note; last_velocity = vel; @@ -401,7 +401,7 @@ void filterclavier_audio_module::note_on(int note, int vel) inertia_filter_module::calculate_filter(); } -void filterclavier_audio_module::note_off(int note, int vel) +void filterclavier_audio_module::note_off(int channel, int note, int vel) { if (note == last_note) { inertia_filter_module::inertia_resonance.set_inertia(param_props[par_max_resonance].min); diff --git a/plugins/ladspa_effect/calf/src/modules_mod.cpp b/plugins/ladspa_effect/calf/src/modules_mod.cpp index f9716c21a..063027ef0 100644 --- a/plugins/ladspa_effect/calf/src/modules_mod.cpp +++ b/plugins/ladspa_effect/calf/src/modules_mod.cpp @@ -231,7 +231,7 @@ void rotary_speaker_audio_module::deactivate() { } -void rotary_speaker_audio_module::control_change(int ctl, int val) +void rotary_speaker_audio_module::control_change(int /*channel*/, int ctl, int val) { if (vibrato_mode == 3 && ctl == 64) { diff --git a/plugins/ladspa_effect/calf/src/monosynth.cpp b/plugins/ladspa_effect/calf/src/monosynth.cpp index a277ae162..97248c28e 100644 --- a/plugins/ladspa_effect/calf/src/monosynth.cpp +++ b/plugins/ladspa_effect/calf/src/monosynth.cpp @@ -607,7 +607,7 @@ void monosynth_audio_module::apply_fadeout() } } -void monosynth_audio_module::note_on(int note, int vel) +void monosynth_audio_module::note_on(int /*channel*/, int note, int vel) { queue_note_on = note; queue_note_on_and_off = false; @@ -616,7 +616,7 @@ void monosynth_audio_module::note_on(int note, int vel) stack.push(note); } -void monosynth_audio_module::note_off(int note, int vel) +void monosynth_audio_module::note_off(int /*channel*/, int note, int vel) { stack.pop(note); if (note == queue_note_on) @@ -653,12 +653,12 @@ void monosynth_audio_module::end_note() envelope2.note_off(); } -void monosynth_audio_module::channel_pressure(int value) +void monosynth_audio_module::channel_pressure(int /*channel*/, int value) { inertia_pressure.set_inertia(value * (1.0 / 127.0)); } -void monosynth_audio_module::control_change(int controller, int value) +void monosynth_audio_module::control_change(int /*channel*/, int controller, int value) { switch(controller) { diff --git a/plugins/ladspa_effect/calf/src/organ.cpp b/plugins/ladspa_effect/calf/src/organ.cpp index c885eaf83..343560760 100644 --- a/plugins/ladspa_effect/calf/src/organ.cpp +++ b/plugins/ladspa_effect/calf/src/organ.cpp @@ -994,7 +994,7 @@ void organ_audio_module::deactivate() void drawbar_organ::render_separate(float *output[], int nsamples) { - float buf[4096][2]; + float buf[MAX_SAMPLE_RUN][2]; dsp::zero(&buf[0][0], 2 * nsamples); basic_synth::render_to(buf, nsamples); if (dsp::fastf2i_drm(parameters->lfo_mode) == organ_voice_base::lfomode_global) diff --git a/plugins/ladspa_effect/calf/src/plugin.cpp b/plugins/ladspa_effect/calf/src/plugin.cpp index 1c8663637..2f78bc967 100644 --- a/plugins/ladspa_effect/calf/src/plugin.cpp +++ b/plugins/ladspa_effect/calf/src/plugin.cpp @@ -189,22 +189,22 @@ void ladspa_instance::process_dssi_event(snd_seq_event_t &event) { switch(event.type) { case SND_SEQ_EVENT_NOTEON: - module->note_on(event.data.note.note, event.data.note.velocity); + module->note_on(event.data.note.channel, event.data.note.note, event.data.note.velocity); break; case SND_SEQ_EVENT_NOTEOFF: - module->note_off(event.data.note.note, event.data.note.velocity); + module->note_off(event.data.note.channel, event.data.note.note, event.data.note.velocity); break; case SND_SEQ_EVENT_PGMCHANGE: - module->program_change(event.data.control.value); + module->program_change(event.data.control.channel, event.data.control.value); break; case SND_SEQ_EVENT_CONTROLLER: - module->control_change(event.data.control.param, event.data.control.value); + module->control_change(event.data.control.channel, event.data.control.param, event.data.control.value); break; case SND_SEQ_EVENT_PITCHBEND: - module->pitch_bend(event.data.control.value); + module->pitch_bend(event.data.control.channel, event.data.control.value); break; case SND_SEQ_EVENT_CHANPRESS: - module->channel_pressure(event.data.control.value); + module->channel_pressure(event.data.control.channel, event.data.control.value); break; } } diff --git a/plugins/ladspa_effect/calf/src/wavetable.cpp b/plugins/ladspa_effect/calf/src/wavetable.cpp index e5ef25904..271fc3ea7 100644 --- a/plugins/ladspa_effect/calf/src/wavetable.cpp +++ b/plugins/ladspa_effect/calf/src/wavetable.cpp @@ -544,7 +544,7 @@ wavetable_audio_module::wavetable_audio_module() } } -void wavetable_audio_module::channel_pressure(int value) +void wavetable_audio_module::channel_pressure(int /*channel*/, int value) { inertia_pressure.set_inertia(value * (1.0 / 127.0)); }