21#ifndef __CALF_MODULES_DEV_H
22#define __CALF_MODULES_DEV_H
26#if ENABLE_EXPERIMENTAL
27#include <fluidsynth.h>
32#if ENABLE_EXPERIMENTAL
35class fluidsynth_audio_module:
public audio_module<fluidsynth_metadata>
41 fluid_settings_t *settings;
45 std::string soundfont;
47 std::string soundfont_name;
49 std::string soundfont_preset_list;
53 std::map<uint32_t, std::string> sf_preset_names;
57 volatile int status_serial;
59 volatile int set_presets[16];
60 volatile bool soundfont_loaded;
63 void update_preset_num(
int channel);
65 void select_preset_in_channel(
int ch,
int new_preset);
67 fluid_synth_t *create_synth(
int &new_sfid);
70 fluidsynth_audio_module();
73 void set_sample_rate(
uint32_t sr) { srate = sr; }
75 void note_on(
int channel,
int note,
int vel);
77 void note_off(
int channel,
int note,
int vel);
79 inline void pitch_bend(
int channel,
int value)
81 fluid_synth_pitch_bend(
synth, channel,
value + 0x2000);
86 void program_change(
int channel,
int program);
89 void params_changed() {
94 bool is_cv(
int param_no)
const {
return false; }
96 bool is_noisy(
int param_no)
const {
return true; }
100 char *configure(
const char *
key,
const char *
value);
101 void send_configures(send_configure_iface *sci);
102 int send_status_updates(send_updates_iface *sui,
int last_serial);
103 uint32_t message_run(
const void *valid_inputs,
void *output_ports) {
107 ~fluidsynth_audio_module();
Controller controller
Definition main.C:5
SYNTH_T * synth
Definition LocalZynAddSubFx.cpp:47
void process(Alg_seq_ptr seq, bool tempo_flag, double tempo, bool flatten_flag)
Definition allegroconvert.cpp:42
static void deactivate(LV2_Handle instance)
Definition bindings_test_plugin.c:128
Empty implementations for plugin functions.
Definition giface.h:519
static PuglViewHint int value
Definition pugl.h:1708
unsigned int uint32_t
Definition mid.cpp:100
Definition benchmark.cpp:53
ZCONST char * key
Definition crypt.c:587