fiddle_fluidsynth 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +138 -0
- data/Rakefile +14 -0
- data/examples/enum.rb +30 -0
- data/examples/example.sf2 +0 -0
- data/examples/ffs_arpeggio.rb +252 -0
- data/examples/ffs_example.rb +47 -0
- data/examples/ffs_fx.rb +200 -0
- data/examples/ffs_metronome.rb +260 -0
- data/examples/ffs_midiplay.rb +122 -0
- data/examples/ffs_simple.rb +45 -0
- data/examples/ffs_test1.rb +41 -0
- data/examples/ffs_test3.rb +50 -0
- data/examples/fiddle-pointer.rb +18 -0
- data/examples/presets-each.rb +66 -0
- data/examples/presets-full_scan.rb +59 -0
- data/examples/settings-each.rb +106 -0
- data/exe/ffs_midiplay.rb +122 -0
- data/lib/fiddle_fluidsynth/audio_output/driver.rb +104 -0
- data/lib/fiddle_fluidsynth/audio_output/file_renderer.rb +84 -0
- data/lib/fiddle_fluidsynth/audio_output.rb +7 -0
- data/lib/fiddle_fluidsynth/command_interface/command_interface.rb +90 -0
- data/lib/fiddle_fluidsynth/command_interface/handler.rb +95 -0
- data/lib/fiddle_fluidsynth/command_interface/server.rb +79 -0
- data/lib/fiddle_fluidsynth/command_interface/shell.rb +76 -0
- data/lib/fiddle_fluidsynth/command_interface.rb +9 -0
- data/lib/fiddle_fluidsynth/core_ext/fiddle.rb +142 -0
- data/lib/fiddle_fluidsynth/core_ext/module.rb +123 -0
- data/lib/fiddle_fluidsynth/fiddle_fluidsynth.rb +172 -0
- data/lib/fiddle_fluidsynth/logging/logging.rb +82 -0
- data/lib/fiddle_fluidsynth/logging.rb +6 -0
- data/lib/fiddle_fluidsynth/midi_input/driver.rb +77 -0
- data/lib/fiddle_fluidsynth/midi_input/events.rb +255 -0
- data/lib/fiddle_fluidsynth/midi_input/midi_input.rb +70 -0
- data/lib/fiddle_fluidsynth/midi_input/player.rb +289 -0
- data/lib/fiddle_fluidsynth/midi_input/router.rb +225 -0
- data/lib/fiddle_fluidsynth/midi_input.rb +11 -0
- data/lib/fiddle_fluidsynth/misc/misc.rb +162 -0
- data/lib/fiddle_fluidsynth/misc.rb +6 -0
- data/lib/fiddle_fluidsynth/sequencer/events.rb +679 -0
- data/lib/fiddle_fluidsynth/sequencer/sequencer.rb +384 -0
- data/lib/fiddle_fluidsynth/sequencer.rb +7 -0
- data/lib/fiddle_fluidsynth/settings/settings.rb +465 -0
- data/lib/fiddle_fluidsynth/settings.rb +6 -0
- data/lib/fiddle_fluidsynth/soundfonts/generators.rb +128 -0
- data/lib/fiddle_fluidsynth/soundfonts/loader.rb +506 -0
- data/lib/fiddle_fluidsynth/soundfonts/modulators.rb +247 -0
- data/lib/fiddle_fluidsynth/soundfonts/soundfonts.rb +64 -0
- data/lib/fiddle_fluidsynth/soundfonts/voices.rb +178 -0
- data/lib/fiddle_fluidsynth/soundfonts.rb +11 -0
- data/lib/fiddle_fluidsynth/synth/audio_rendering.rb +100 -0
- data/lib/fiddle_fluidsynth/synth/effect/chorus.rb +269 -0
- data/lib/fiddle_fluidsynth/synth/effect/iir_filter.rb +81 -0
- data/lib/fiddle_fluidsynth/synth/effect/ladspa.rb +172 -0
- data/lib/fiddle_fluidsynth/synth/effect/reverb.rb +207 -0
- data/lib/fiddle_fluidsynth/synth/effect.rb +10 -0
- data/lib/fiddle_fluidsynth/synth/midi/messages.rb +292 -0
- data/lib/fiddle_fluidsynth/synth/midi/setup.rb +235 -0
- data/lib/fiddle_fluidsynth/synth/midi/tuning.rb +128 -0
- data/lib/fiddle_fluidsynth/synth/midi.rb +9 -0
- data/lib/fiddle_fluidsynth/synth/params/params.rb +200 -0
- data/lib/fiddle_fluidsynth/synth/params.rb +8 -0
- data/lib/fiddle_fluidsynth/synth/soundfont_management.rb +210 -0
- data/lib/fiddle_fluidsynth/synth/synth.rb +114 -0
- data/lib/fiddle_fluidsynth/synth/voice_control.rb +94 -0
- data/lib/fiddle_fluidsynth/synth.rb +18 -0
- data/lib/fiddle_fluidsynth/types/types.rb +131 -0
- data/lib/fiddle_fluidsynth/types.rb +10 -0
- data/lib/fiddle_fluidsynth/util/callback.rb +585 -0
- data/lib/fiddle_fluidsynth/util/interface/settings.rb +689 -0
- data/lib/fiddle_fluidsynth/util/interface/soundfont.rb +115 -0
- data/lib/fiddle_fluidsynth/util/interface/soundfont_preset.rb +69 -0
- data/lib/fiddle_fluidsynth/util/interface/soundfont_sample.rb +61 -0
- data/lib/fiddle_fluidsynth/util/interface.rb +11 -0
- data/lib/fiddle_fluidsynth/util/module_hier.rb +403 -0
- data/lib/fiddle_fluidsynth/util/util.rb +467 -0
- data/lib/fiddle_fluidsynth/util-after.rb +12 -0
- data/lib/fiddle_fluidsynth/util.rb +37 -0
- data/lib/fiddle_fluidsynth/version.rb +10 -0
- data/lib/fiddle_fluidsynth.rb +57 -0
- data/sig/fiddle_fluidsynth.rbs +4 -0
- metadata +128 -0
@@ -0,0 +1,269 @@
|
|
1
|
+
#
|
2
|
+
# filename: fiddle-fluidstynth/synth/effect/chorus.rb
|
3
|
+
#
|
4
|
+
|
5
|
+
|
6
|
+
# References
|
7
|
+
# - fluidstynth.org, [MIDI Driver](https://www.fluidsynth.org/api/group__midi__driver.html)
|
8
|
+
#
|
9
|
+
class FiddleFluidSynth
|
10
|
+
|
11
|
+
# Functions for configuring the built-in chorus effect.
|
12
|
+
# ==== References
|
13
|
+
# - API Reference, Synthesizer/[Effect - Chorus](https://www.fluidsynth.org/api/group__chorus__effect.html)
|
14
|
+
# - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
|
15
|
+
#
|
16
|
+
|
17
|
+
# Enumerations
|
18
|
+
#
|
19
|
+
#
|
20
|
+
enum(
|
21
|
+
:fluid_chorus_mod,
|
22
|
+
FLUID_CHORUS_MOD_SINE: 0,
|
23
|
+
FLUID_CHORUS_MOD_TRIANGLE: 1)
|
24
|
+
|
25
|
+
#
|
26
|
+
module C
|
27
|
+
|
28
|
+
# Lifecycle Functions.
|
29
|
+
#
|
30
|
+
#
|
31
|
+
|
32
|
+
|
33
|
+
# Functions.
|
34
|
+
#
|
35
|
+
#
|
36
|
+
|
37
|
+
# Enable or disable chorus on one or all groups.
|
38
|
+
extern 'int fluid_synth_chorus_on(fluid_synth_t*, int, int)'
|
39
|
+
|
40
|
+
# Get chorus depth of all fx groups.
|
41
|
+
extern 'double fluid_synth_get_chorus_depth(fluid_synth_t*)'
|
42
|
+
|
43
|
+
# Get chorus lfo depth of one or all fx groups.
|
44
|
+
extern 'int fluid_synth_get_chorus_group_depth(fluid_synth_t*, int, void*)'
|
45
|
+
|
46
|
+
# Get chorus output level of one or all fx groups.
|
47
|
+
extern 'int fluid_synth_get_chorus_group_level(fluid_synth_t*, int, void*)'
|
48
|
+
|
49
|
+
# Get chorus count nr of one or all fx groups.
|
50
|
+
extern 'int fluid_synth_get_chorus_group_nr(fluid_synth_t*, int, void*)'
|
51
|
+
|
52
|
+
# Get chorus waveform lfo speed of one or all fx groups.
|
53
|
+
extern 'int fluid_synth_get_chorus_group_speed(fluid_synth_t*, int, void*)'
|
54
|
+
|
55
|
+
# Get chorus waveform type of one or all fx groups.
|
56
|
+
extern 'int fluid_synth_get_chorus_group_type(fluid_synth_t*, int, void*)'
|
57
|
+
|
58
|
+
# Get chorus level of all fx groups.
|
59
|
+
extern 'double fluid_synth_get_chorus_level(fluid_synth_t*)'
|
60
|
+
|
61
|
+
# Get chorus voice number (delay line count) value of all fx groups.
|
62
|
+
extern 'int fluid_synth_get_chorus_nr(fluid_synth_t*)'
|
63
|
+
|
64
|
+
# Get chorus speed in Hz of all fx groups.
|
65
|
+
extern 'double fluid_synth_get_chorus_speed(fluid_synth_t*)'
|
66
|
+
|
67
|
+
# Get chorus waveform type of all fx groups.
|
68
|
+
extern 'int fluid_synth_get_chorus_type(fluid_synth_t*)'
|
69
|
+
|
70
|
+
|
71
|
+
### setters.
|
72
|
+
|
73
|
+
# Set chorus parameters to all fx groups.
|
74
|
+
extern 'int fluid_synth_set_chorus' +
|
75
|
+
'(fluid_synth_t*, int, double, double, double, int)'
|
76
|
+
|
77
|
+
# Set the chorus depth of all groups.
|
78
|
+
extern 'int fluid_synth_set_chorus_depth(fluid_synth_t*, double)'
|
79
|
+
|
80
|
+
# Set chorus lfo depth to one or all chorus groups.
|
81
|
+
extern 'int fluid_synth_set_chorus_group_depth(fluid_synth_t*, int, double)'
|
82
|
+
|
83
|
+
# Set chorus output level to one or all chorus groups.
|
84
|
+
extern 'int fluid_synth_set_chorus_group_level(fluid_synth_t*, int, double)'
|
85
|
+
|
86
|
+
# Set chorus voice count nr to one or all chorus groups.
|
87
|
+
extern 'int fluid_synth_set_chorus_group_nr(fluid_synth_t*, int, int)'
|
88
|
+
|
89
|
+
# Set chorus lfo speed to one or all chorus groups.
|
90
|
+
extern 'int fluid_synth_set_chorus_group_speed(fluid_synth_t*, int, double)'
|
91
|
+
|
92
|
+
# Set chorus lfo waveform type to one or all chorus groups.
|
93
|
+
extern 'int fluid_synth_set_chorus_group_type(fluid_synth_t*, int, int)'
|
94
|
+
|
95
|
+
# Set the chorus level of all groups.
|
96
|
+
extern 'int fluid_synth_set_chorus_level(fluid_synth_t*, double)'
|
97
|
+
|
98
|
+
# Set the chorus voice count of all groups.
|
99
|
+
extern 'int fluid_synth_set_chorus_nr(fluid_synth_t*, int)'
|
100
|
+
|
101
|
+
# Enable or disable all chorus groups.
|
102
|
+
extern 'void fluid_synth_set_chorus_on(fluid_synth_t*, int)'
|
103
|
+
|
104
|
+
# Set the chorus speed of all groups.
|
105
|
+
extern 'int fluid_synth_set_chorus_speed(fluid_synth_t*, double)'
|
106
|
+
|
107
|
+
# Set the chorus type of all groups.
|
108
|
+
extern 'int fluid_synth_set_chorus_type(fluid_synth_t*, int)'
|
109
|
+
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
# Lifecycle Functions.
|
116
|
+
#
|
117
|
+
#
|
118
|
+
|
119
|
+
|
120
|
+
# Functions.
|
121
|
+
#
|
122
|
+
#
|
123
|
+
class FiddleFluidSynth
|
124
|
+
|
125
|
+
#
|
126
|
+
def synth_chorus_on( synth=self.synth, fx_group:, fx_on: )
|
127
|
+
ret = C.fluid_synth_chorus_on(synth, fx_group, fx_on)
|
128
|
+
ret
|
129
|
+
end
|
130
|
+
|
131
|
+
#
|
132
|
+
def synth_get_chorus_depth( synth=self.synth )
|
133
|
+
deprecated_msg_instead('synth_get_chorus_group_depth()', meth: __method__)
|
134
|
+
ret = C.fluid_synth_get_chorus_depth(synth)
|
135
|
+
ret
|
136
|
+
end
|
137
|
+
|
138
|
+
def synth_get_chorus_group_depth( synth=self.synth, fx_group: , depth_ms: )
|
139
|
+
ret = C.fluid_synth_get_chorus_group_depth(synth, fx_group, fx_on)
|
140
|
+
ret
|
141
|
+
end
|
142
|
+
|
143
|
+
def synth_get_chorus_group_level( synth=self.synth, fx_group: , level: )
|
144
|
+
ret = C.fluid_synth_get_chorus_group_level(synth, fx_group, fx_on)
|
145
|
+
ret
|
146
|
+
end
|
147
|
+
|
148
|
+
def synth_get_chorus_group_nr( synth=self.synth, fx_group: , nr: )
|
149
|
+
ret = C.fluid_synth_get_chorus_group_nr(synth, fx_group, nr)
|
150
|
+
ret
|
151
|
+
end
|
152
|
+
|
153
|
+
def synth_get_chorus_group_speed( synth=self.synth, fx_group: , speed: )
|
154
|
+
ret = C.fluid_synth_get_chorus_group_speed(synth, fx_group, speed)
|
155
|
+
ret
|
156
|
+
end
|
157
|
+
|
158
|
+
def synth_get_chorus_group_type( synth=self.synth, fx_group: , type: )
|
159
|
+
ret = C.fluid_synth_get_chorus_group_level(synth, fx_group, fx_on)
|
160
|
+
ret
|
161
|
+
end
|
162
|
+
|
163
|
+
def synth_get_chorus_level( synth=self.synth )
|
164
|
+
deprecated_msg_instead('synth_get_chorus_group_level()', meth: __method__)
|
165
|
+
ret = C.fluid_synth_get_chorus_level(synth)
|
166
|
+
ret
|
167
|
+
end
|
168
|
+
|
169
|
+
def synth_get_chorus_nr( synth=self.synth )
|
170
|
+
deprecated_msg_instead('synth_get_chorus_group_nr()', meth: __method__)
|
171
|
+
ret = C.fluid_synth_get_chorus_nr(synth)
|
172
|
+
ret
|
173
|
+
end
|
174
|
+
|
175
|
+
def synth_get_chorus_speed( synth=self.synth )
|
176
|
+
deprecated_msg_instead('synth_get_chorus_group_speed()', meth: __method__)
|
177
|
+
ret = C.fluid_synth_get_chorus_speed(synth)
|
178
|
+
ret
|
179
|
+
end
|
180
|
+
|
181
|
+
def synth_get_chorus_type( synth=self.synth )
|
182
|
+
deprecated_msg_instead('synth_get_chorus_group_type()', meth: __method__)
|
183
|
+
ret = C.fluid_synth_get_chorus_type(synth)
|
184
|
+
ret
|
185
|
+
end
|
186
|
+
|
187
|
+
|
188
|
+
### setters.
|
189
|
+
|
190
|
+
#
|
191
|
+
def synth_set_chorus( synth=self.synth,
|
192
|
+
nr: , level: , speed: , depth_ms: , type: )
|
193
|
+
deprecated_msg_instead(
|
194
|
+
'the individual chorus setter functions', meth: __method__)
|
195
|
+
ret = C.fluid_synth_set_chorus(synth, nr,level,speed,depth_ms,type)
|
196
|
+
ret
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
def synth_set_chorus_depth( synth=self.synth, depth_ms: )
|
201
|
+
deprecated_msg_instead(
|
202
|
+
'synth_set_chorus_group_depth()', meth: __method__)
|
203
|
+
ret = C.fluid_synth_set_chorus_depth(synth, depth_ms)
|
204
|
+
ret
|
205
|
+
end
|
206
|
+
def synth_set_chorus_level( synth=self.synth, level: )
|
207
|
+
deprecated_msg_instead(
|
208
|
+
'synth_set_chorus_group_level()', meth: __method__)
|
209
|
+
ret = C.fluid_synth_set_chorus_level(synth, level)
|
210
|
+
ret
|
211
|
+
end
|
212
|
+
def synth_set_chorus_nr( synth=self.synth, nr: )
|
213
|
+
deprecated_msg_instead(
|
214
|
+
'synth_set_chorus_group_nr()', meth: __method__)
|
215
|
+
ret = C.fluid_synth_set_chorus_nr(synth, nr)
|
216
|
+
ret
|
217
|
+
end
|
218
|
+
def synth_set_chorus_speed( synth=self.synth, speed: )
|
219
|
+
deprecated_msg_instead(
|
220
|
+
'synth_set_chorus_group_speed()', meth: __method__)
|
221
|
+
ret = C.fluid_synth_set_chorus_speed(synth,speed)
|
222
|
+
ret
|
223
|
+
end
|
224
|
+
def synth_set_chorus_type( synth=self.synth, type: )
|
225
|
+
deprecated_msg_instead(
|
226
|
+
'synth_set_chorus_group_type()', meth: __method__)
|
227
|
+
ret = C.fluid_synth_set_chorus_type(synth, type)
|
228
|
+
ret
|
229
|
+
end
|
230
|
+
|
231
|
+
#
|
232
|
+
def synth_set_chorus_on( synth=self.synth, on: )
|
233
|
+
deprecated_msg_instead(
|
234
|
+
'synth_chorus_on()', meth: __method__)
|
235
|
+
ret = C.fluid_synth_set_chorus_on(synth, on)
|
236
|
+
ret
|
237
|
+
end
|
238
|
+
|
239
|
+
# for group.
|
240
|
+
def synth_set_chorus_group_depth( synth=self.synth, fx_group: , depth_ms: )
|
241
|
+
ret = C.fluid_synth_set_chorus_group_depth(synth, fx_group, depth_ms)
|
242
|
+
ret
|
243
|
+
end
|
244
|
+
|
245
|
+
def synth_set_chorus_group_level( synth=self.synth, fx_group: , level: )
|
246
|
+
ret = C.fluid_synth_set_chorus_group_level(synth, fx_group, level)
|
247
|
+
ret
|
248
|
+
end
|
249
|
+
|
250
|
+
def synth_set_chorus_group_nr( synth=self.synth, fx_group: , nr: )
|
251
|
+
ret = C.fluid_synth_set_chorus_group_nr(synth, fx_group, nr)
|
252
|
+
ret
|
253
|
+
end
|
254
|
+
|
255
|
+
def synth_set_chorus_group_speed( synth=self.synth, fx_group: , speed: )
|
256
|
+
ret = C.fluid_synth_set_chorus_group_speed(synth, fx_group, speed)
|
257
|
+
ret
|
258
|
+
end
|
259
|
+
|
260
|
+
def synth_set_chorus_group_type( synth=self.synth, fx_group: , type: )
|
261
|
+
ret = C.fluid_synth_set_chorus_group_type(synth, fx_group, type)
|
262
|
+
ret
|
263
|
+
end
|
264
|
+
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
|
269
|
+
#### endof filename: fiddle-fluidstynth/synth/effect/chorus.rb
|
@@ -0,0 +1,81 @@
|
|
1
|
+
#
|
2
|
+
# filename: fiddle-fluidstynth/synth/effect/iir_filter.rb
|
3
|
+
#
|
4
|
+
|
5
|
+
|
6
|
+
# References
|
7
|
+
# - fluidsynth.org, [API Reference](https://www.fluidsynth.org/api/modules.html)
|
8
|
+
#
|
9
|
+
class FiddleFluidSynth
|
10
|
+
|
11
|
+
# Functions for configuring the built-in IIR filter effect.
|
12
|
+
# ==== References
|
13
|
+
# - API Reference, Synthesizer/[Effect - IIR Filter](https://www.fluidsynth.org/api/group__iir__filter.html)
|
14
|
+
# - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
|
15
|
+
#
|
16
|
+
|
17
|
+
# Enumerations
|
18
|
+
#
|
19
|
+
#
|
20
|
+
|
21
|
+
### fluid_iir_filter_flags.
|
22
|
+
# Specifies optional settings to use for the custom IIR filter.
|
23
|
+
enum(
|
24
|
+
:fluid_iir_filter_flags,
|
25
|
+
FLUID_IIR_Q_LINEAR: 1 << 0,
|
26
|
+
FLUID_IIR_Q_ZERO_OFF: 1 << 1,
|
27
|
+
FLUID_IIR_Q_NO_GAIN_AMP: 1 << 2
|
28
|
+
)
|
29
|
+
|
30
|
+
### fluid_iir_filter_type.
|
31
|
+
# Specifies the type of filter to use for the custom IIR filter.
|
32
|
+
enum(
|
33
|
+
:fluid_iir_filter_type,
|
34
|
+
FLUID_IIR_DISABLED: 0,
|
35
|
+
FLUID_IIR_LOWPASS: nil,
|
36
|
+
FLUID_IIR_HIGHPASS: nil,
|
37
|
+
FLUID_IIR_LAST: nil)
|
38
|
+
|
39
|
+
#
|
40
|
+
module C
|
41
|
+
|
42
|
+
# Lifecycle Functions.
|
43
|
+
#
|
44
|
+
#
|
45
|
+
|
46
|
+
|
47
|
+
# Functions.
|
48
|
+
#
|
49
|
+
#
|
50
|
+
|
51
|
+
# Configure a general-purpose IIR biquad filter.
|
52
|
+
extern 'int fluid_synth_set_custom_filter(fluid_synth_t*, int, int)'
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
# Lifecycle Functions.
|
59
|
+
#
|
60
|
+
#
|
61
|
+
|
62
|
+
|
63
|
+
# Functions.
|
64
|
+
#
|
65
|
+
#
|
66
|
+
class FiddleFluidSynth
|
67
|
+
|
68
|
+
#
|
69
|
+
# ==== Args
|
70
|
+
# type:: fluid_iir_filter_type.
|
71
|
+
# flags:: fluid_iir_filter_flag.
|
72
|
+
#
|
73
|
+
def synth_set_custom_filter( synth=self.synth, type: , flags: )
|
74
|
+
ret = C.fluid_synth_set_custom_filter(synth,type,flags)
|
75
|
+
ret
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
#### endof filename: fiddle-fluidstynth/synth/effect/iir_filter.rb
|
@@ -0,0 +1,172 @@
|
|
1
|
+
#
|
2
|
+
# filename: fiddle-fluidstynth/synth/effect/ladspa.rb
|
3
|
+
#
|
4
|
+
|
5
|
+
|
6
|
+
# References
|
7
|
+
# - fluidstynth.org, [API Reference](https://www.fluidsynth.org/api/modules.html)
|
8
|
+
#
|
9
|
+
class FiddleFluidSynth
|
10
|
+
|
11
|
+
# Functions for configuring the LADSPA effects unit.
|
12
|
+
# ==== References
|
13
|
+
# - API Reference, Synthesizer/[Effect - LADSPA](https://www.fluidsynth.org/api/group__ladspa.html)
|
14
|
+
# - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
|
15
|
+
#
|
16
|
+
|
17
|
+
#
|
18
|
+
module C
|
19
|
+
|
20
|
+
# Lifecycle Functions.
|
21
|
+
#
|
22
|
+
#
|
23
|
+
|
24
|
+
|
25
|
+
# Functions.
|
26
|
+
#
|
27
|
+
#
|
28
|
+
|
29
|
+
# Activate the LADSPA fx instance and each configured effect.
|
30
|
+
extern 'int fluid_ladspa_activate(fluid_ladspa_fx_t*)'
|
31
|
+
|
32
|
+
# Create and add a new audio buffer.
|
33
|
+
extern 'int fluid_ladspa_add_buffer(fluid_ladspa_fx_t*, char*)'
|
34
|
+
|
35
|
+
# Create an instance of a LADSPA plugin as an effect.
|
36
|
+
extern 'int fluid_ladspa_add_effect(fluid_ladspa_fx_t*, void*, void*, void*)'
|
37
|
+
|
38
|
+
# Check if a named user buffer exists.
|
39
|
+
extern 'int fluid_ladspa_buffer_exists(fluid_ladspa_fx_t*, void*)'
|
40
|
+
|
41
|
+
# Do a sanity check for problems in the LADSPA setup.
|
42
|
+
extern 'int fluid_ladspa_check(fluid_ladspa_fx_t*, void*, int)'
|
43
|
+
|
44
|
+
# Deactivate a LADSPA fx instance and all configured effects.
|
45
|
+
extern 'int fluid_ladspa_deactivate(fluid_ladspa_fx_t*)'
|
46
|
+
|
47
|
+
# Check if the effect plugin supports the run_adding and
|
48
|
+
# set_run_adding_gain interfaces necessary for output mixing.
|
49
|
+
extern 'int fluid_ladspa_effect_can_mix(fluid_ladspa_fx_t*, void*)'
|
50
|
+
|
51
|
+
# Connect an effect audio port to a host port or buffer.
|
52
|
+
extern 'int fluid_ladspa_effect_link(fluid_ladspa_fx_t*, void*, void*, void*)'
|
53
|
+
|
54
|
+
# Check if the named port exists on an effect.
|
55
|
+
extern 'int fluid_ladspa_effect_port_exists(fluid_ladspa_fx_t*, void*, void*)'
|
56
|
+
|
57
|
+
# Set the value of an effect control port.
|
58
|
+
extern 'int fluid_ladspa_effect_set_control(fluid_ladspa_fx_t*, void*, void*, float)'
|
59
|
+
|
60
|
+
# Set if the effect should replace everything in the output buffers
|
61
|
+
# (mix = 0, default) or add to the buffers with a fixed gain (mix = 1).
|
62
|
+
extern 'int fluid_ladspa_effect_set_mix(fluid_ladspa_fx_t*, void*, int, float)'
|
63
|
+
|
64
|
+
# Check if a named host port exists.
|
65
|
+
extern 'int fluid_ladspa_host_port_exists(fluid_ladspa_fx_t*, void*)'
|
66
|
+
|
67
|
+
# Check if the LADSPA engine is currently used to render audio.
|
68
|
+
extern 'int fluid_ladspa_is_active(fluid_ladspa_fx_t*)'
|
69
|
+
|
70
|
+
# Reset the LADSPA effects engine.
|
71
|
+
extern 'int fluid_ladspa_reset(fluid_ladspa_fx_t*)'
|
72
|
+
|
73
|
+
# Return the LADSPA effects instance used by FluidSynth.
|
74
|
+
extern 'fluid_ladspa_fx_t* fluid_synth_get_ladspa_fx(fluid_synth_t*)'
|
75
|
+
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
# Lifecycle Functions.
|
82
|
+
#
|
83
|
+
#
|
84
|
+
|
85
|
+
|
86
|
+
# Functions.
|
87
|
+
#
|
88
|
+
#
|
89
|
+
class FiddleFluidSynth
|
90
|
+
|
91
|
+
#
|
92
|
+
def ladspa_activate( fx )
|
93
|
+
ret = C.fluid_ladspa_activate(fx)
|
94
|
+
ret
|
95
|
+
end
|
96
|
+
|
97
|
+
def ladspa_add_buffer( fx, name: )
|
98
|
+
ret = C.fluid_ladspa_add_buffer(fx,name)
|
99
|
+
ret
|
100
|
+
end
|
101
|
+
|
102
|
+
def ladspa_add_effect( fx, name: , lib_name: , plugin_name: )
|
103
|
+
ret = C.fluid_ladspa_add_effect(fx,name)
|
104
|
+
ret
|
105
|
+
end
|
106
|
+
|
107
|
+
def ladspa_buffer_exists( fx, name: )
|
108
|
+
ret = C.fluid_ladspa_buffer_exists(fx,name)
|
109
|
+
ret
|
110
|
+
end
|
111
|
+
|
112
|
+
def ladspa_check( fx, err: , err_size: )
|
113
|
+
ret = C.fluid_ladspa_check(fx,err,err_size)
|
114
|
+
ret
|
115
|
+
end
|
116
|
+
|
117
|
+
def ladspa_deactivate( fx )
|
118
|
+
ret = C.fluid_ladspa_deactivate(fx)
|
119
|
+
ret
|
120
|
+
end
|
121
|
+
|
122
|
+
def ladspa_effect_can_mix( fx, name: )
|
123
|
+
ret = C.fluid_ladspa_effect_can_mix(fx,name)
|
124
|
+
ret
|
125
|
+
end
|
126
|
+
|
127
|
+
def ladspa_effect_link( fx, effect_name: , port_name: , name: )
|
128
|
+
ret = C.fluid_ladspa_effect_link(fx,effect_name,port_name,name)
|
129
|
+
ret
|
130
|
+
end
|
131
|
+
|
132
|
+
def ladspa_effect_port_exists( fx, effect_name: , port_name: )
|
133
|
+
ret = C.fluid_ladspa_effect_port_exists(fx,effect_name,port_name)
|
134
|
+
ret
|
135
|
+
end
|
136
|
+
|
137
|
+
def ladspa_effect_set_control( fx, effect_name: , port_name: , val: )
|
138
|
+
ret = C.fluid_ladspa_effect_set_control(fx,effect_name,port_name,val)
|
139
|
+
ret
|
140
|
+
end
|
141
|
+
|
142
|
+
def ladspa_effect_set_mix( fx, name: , mix: , gain: )
|
143
|
+
ret = C.fluid_ladspa_effect_set_mix(fx,name,mix,gain)
|
144
|
+
ret
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
def ladspa_host_port_exists( fx, name: )
|
149
|
+
ret = C.fluid_ladspa_host_port_exists(fx,name)
|
150
|
+
ret
|
151
|
+
end
|
152
|
+
|
153
|
+
def ladspa_is_active( fx )
|
154
|
+
ret = C.fluid_ladspa_is_active(fx)
|
155
|
+
ret
|
156
|
+
end
|
157
|
+
|
158
|
+
def ladspa_reset( fx )
|
159
|
+
ret = C.fluid_ladspa_reset(fx)
|
160
|
+
ret
|
161
|
+
end
|
162
|
+
|
163
|
+
def synth_ladspa_get_ladspa_fx( synth=self.synth )
|
164
|
+
ret = C.fluid_synth_get_ladspa_fx(synth)
|
165
|
+
ret
|
166
|
+
end
|
167
|
+
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
|
172
|
+
#### endof filename: fiddle-fluidstynth/synth/effect/ladspa.rb
|