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.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.standard.yml +3 -0
  3. data/CHANGELOG.md +5 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +138 -0
  6. data/Rakefile +14 -0
  7. data/examples/enum.rb +30 -0
  8. data/examples/example.sf2 +0 -0
  9. data/examples/ffs_arpeggio.rb +252 -0
  10. data/examples/ffs_example.rb +47 -0
  11. data/examples/ffs_fx.rb +200 -0
  12. data/examples/ffs_metronome.rb +260 -0
  13. data/examples/ffs_midiplay.rb +122 -0
  14. data/examples/ffs_simple.rb +45 -0
  15. data/examples/ffs_test1.rb +41 -0
  16. data/examples/ffs_test3.rb +50 -0
  17. data/examples/fiddle-pointer.rb +18 -0
  18. data/examples/presets-each.rb +66 -0
  19. data/examples/presets-full_scan.rb +59 -0
  20. data/examples/settings-each.rb +106 -0
  21. data/exe/ffs_midiplay.rb +122 -0
  22. data/lib/fiddle_fluidsynth/audio_output/driver.rb +104 -0
  23. data/lib/fiddle_fluidsynth/audio_output/file_renderer.rb +84 -0
  24. data/lib/fiddle_fluidsynth/audio_output.rb +7 -0
  25. data/lib/fiddle_fluidsynth/command_interface/command_interface.rb +90 -0
  26. data/lib/fiddle_fluidsynth/command_interface/handler.rb +95 -0
  27. data/lib/fiddle_fluidsynth/command_interface/server.rb +79 -0
  28. data/lib/fiddle_fluidsynth/command_interface/shell.rb +76 -0
  29. data/lib/fiddle_fluidsynth/command_interface.rb +9 -0
  30. data/lib/fiddle_fluidsynth/core_ext/fiddle.rb +142 -0
  31. data/lib/fiddle_fluidsynth/core_ext/module.rb +123 -0
  32. data/lib/fiddle_fluidsynth/fiddle_fluidsynth.rb +172 -0
  33. data/lib/fiddle_fluidsynth/logging/logging.rb +82 -0
  34. data/lib/fiddle_fluidsynth/logging.rb +6 -0
  35. data/lib/fiddle_fluidsynth/midi_input/driver.rb +77 -0
  36. data/lib/fiddle_fluidsynth/midi_input/events.rb +255 -0
  37. data/lib/fiddle_fluidsynth/midi_input/midi_input.rb +70 -0
  38. data/lib/fiddle_fluidsynth/midi_input/player.rb +289 -0
  39. data/lib/fiddle_fluidsynth/midi_input/router.rb +225 -0
  40. data/lib/fiddle_fluidsynth/midi_input.rb +11 -0
  41. data/lib/fiddle_fluidsynth/misc/misc.rb +162 -0
  42. data/lib/fiddle_fluidsynth/misc.rb +6 -0
  43. data/lib/fiddle_fluidsynth/sequencer/events.rb +679 -0
  44. data/lib/fiddle_fluidsynth/sequencer/sequencer.rb +384 -0
  45. data/lib/fiddle_fluidsynth/sequencer.rb +7 -0
  46. data/lib/fiddle_fluidsynth/settings/settings.rb +465 -0
  47. data/lib/fiddle_fluidsynth/settings.rb +6 -0
  48. data/lib/fiddle_fluidsynth/soundfonts/generators.rb +128 -0
  49. data/lib/fiddle_fluidsynth/soundfonts/loader.rb +506 -0
  50. data/lib/fiddle_fluidsynth/soundfonts/modulators.rb +247 -0
  51. data/lib/fiddle_fluidsynth/soundfonts/soundfonts.rb +64 -0
  52. data/lib/fiddle_fluidsynth/soundfonts/voices.rb +178 -0
  53. data/lib/fiddle_fluidsynth/soundfonts.rb +11 -0
  54. data/lib/fiddle_fluidsynth/synth/audio_rendering.rb +100 -0
  55. data/lib/fiddle_fluidsynth/synth/effect/chorus.rb +269 -0
  56. data/lib/fiddle_fluidsynth/synth/effect/iir_filter.rb +81 -0
  57. data/lib/fiddle_fluidsynth/synth/effect/ladspa.rb +172 -0
  58. data/lib/fiddle_fluidsynth/synth/effect/reverb.rb +207 -0
  59. data/lib/fiddle_fluidsynth/synth/effect.rb +10 -0
  60. data/lib/fiddle_fluidsynth/synth/midi/messages.rb +292 -0
  61. data/lib/fiddle_fluidsynth/synth/midi/setup.rb +235 -0
  62. data/lib/fiddle_fluidsynth/synth/midi/tuning.rb +128 -0
  63. data/lib/fiddle_fluidsynth/synth/midi.rb +9 -0
  64. data/lib/fiddle_fluidsynth/synth/params/params.rb +200 -0
  65. data/lib/fiddle_fluidsynth/synth/params.rb +8 -0
  66. data/lib/fiddle_fluidsynth/synth/soundfont_management.rb +210 -0
  67. data/lib/fiddle_fluidsynth/synth/synth.rb +114 -0
  68. data/lib/fiddle_fluidsynth/synth/voice_control.rb +94 -0
  69. data/lib/fiddle_fluidsynth/synth.rb +18 -0
  70. data/lib/fiddle_fluidsynth/types/types.rb +131 -0
  71. data/lib/fiddle_fluidsynth/types.rb +10 -0
  72. data/lib/fiddle_fluidsynth/util/callback.rb +585 -0
  73. data/lib/fiddle_fluidsynth/util/interface/settings.rb +689 -0
  74. data/lib/fiddle_fluidsynth/util/interface/soundfont.rb +115 -0
  75. data/lib/fiddle_fluidsynth/util/interface/soundfont_preset.rb +69 -0
  76. data/lib/fiddle_fluidsynth/util/interface/soundfont_sample.rb +61 -0
  77. data/lib/fiddle_fluidsynth/util/interface.rb +11 -0
  78. data/lib/fiddle_fluidsynth/util/module_hier.rb +403 -0
  79. data/lib/fiddle_fluidsynth/util/util.rb +467 -0
  80. data/lib/fiddle_fluidsynth/util-after.rb +12 -0
  81. data/lib/fiddle_fluidsynth/util.rb +37 -0
  82. data/lib/fiddle_fluidsynth/version.rb +10 -0
  83. data/lib/fiddle_fluidsynth.rb +57 -0
  84. data/sig/fiddle_fluidsynth.rbs +4 -0
  85. metadata +128 -0
@@ -0,0 +1,235 @@
1
+ #
2
+ # filename: fiddle-fluidsynth/synth/midi/setup.rb
3
+ #
4
+
5
+
6
+ # References
7
+ # - fluidsynth.org, [API Reference](https://www.fluidsynth.org/api/modules.html)
8
+ #
9
+ class FiddleFluidSynth
10
+
11
+ # The functions in this section provide interfaces to change the channel
12
+ # type and to configure basic channels, legato and portamento setups.
13
+ # ==== References
14
+ # - API Reference, Synthesizer/[MIDI Channel Setup](https://www.fluidsynth.org/api/group__channel__setup.html)
15
+ # - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
16
+ #
17
+
18
+ # Enumerators.
19
+ #
20
+ #
21
+
22
+ ### Channel Type
23
+
24
+ # The midi channel type used by fluid_synth_set_channel_type().
25
+ enum(
26
+ :fluid_midi_channel_type,
27
+ CHANNEL_TYPE_MELODIC: 0,
28
+ CHANNEL_TYPE_DRUM: 1,
29
+ )
30
+
31
+ ### Basic Channel Mode.
32
+
33
+ # Channel mode bits OR-ed together so that it matches with the midi spec:
34
+ # poly omnion (0), mono omnion (1), poly omnioff (2), mono omnioff (3).
35
+ enum(
36
+ :fluid_channel_mode_flags,
37
+ FLUID_CHANNEL_POLY_OFF: 0x01,
38
+ FLUID_CHANNEL_OMNI_OFF: 0x02)
39
+
40
+ # Indicates the mode a basic channel is set to.
41
+ FLUID_CHANNEL_MODE_MASK_EXT=(FLUID_CHANNEL_OMNI_OFF|FLUID_CHANNEL_POLY_OFF)
42
+ enum(
43
+ :fluid_basic_channel_modes,
44
+ FLUID_CHANNEL_MODE_MASK: FLUID_CHANNEL_MODE_MASK_EXT,
45
+ FLUID_CHANNEL_MODE_OMNION_POLY: FLUID_CHANNEL_MODE_MASK_EXT &
46
+ (~FLUID_CHANNEL_OMNI_OFF&
47
+ ~FLUID_CHANNEL_POLY_OFF),
48
+ FLUID_CHANNEL_MODE_OMNION_MONO: FLUID_CHANNEL_MODE_MASK_EXT &
49
+ (~FLUID_CHANNEL_OMNI_OFF&
50
+ FLUID_CHANNEL_POLY_OFF),
51
+ FLUID_CHANNEL_MODE_OMNIOFF_POLY: FLUID_CHANNEL_MODE_MASK_EXT &
52
+ (FLUID_CHANNEL_OMNI_OFF&
53
+ ~FLUID_CHANNEL_POLY_OFF),
54
+ FLUID_CHANNEL_MODE_OMNIOFF_MONO: FLUID_CHANNEL_MODE_MASK_EXT &
55
+ (FLUID_CHANNEL_OMNI_OFF|
56
+ FLUID_CHANNEL_POLY_OFF),
57
+ FLUID_CHANNEL_MODE_LAST: nil,
58
+ )
59
+
60
+ ### Legato Mode.
61
+
62
+ # Indicates the legato mode a channel is set to n1,n2,n3,.
63
+ enum(
64
+ :fluid_channel_legato_mode,
65
+ FLUID_CHANNEL_LEGATO_MODE_RETRIGGER: nil,
66
+ FLUID_CHANNEL_LEGATO_MODE_MULTI_RETRIGGER: nil,
67
+ FLUID_CHANNEL_LEGATO_MODE_LAST: nil)
68
+
69
+ ### Portamento Mode.
70
+
71
+ # Indicates the portamento mode a channel is set to.
72
+ enum(
73
+ :fluid_channel_portamento_mode,
74
+ FLUID_CHANNEL_PORTAMENTO_MODE_EACH_NOTE: nil,
75
+ FLUID_CHANNEL_PORTAMENTO_MODE_LEGATO_ONLY: nil,
76
+ FLUID_CHANNEL_PORTAMENTO_MODE_STACCATO_ONLY: nil,
77
+ FLUID_CHANNEL_PORTAMENTO_MODE_LAST: nil)
78
+
79
+ ### Breath Mode.
80
+
81
+ # Indicates the breath mode a channel is set to.
82
+ enum(
83
+ :fluid_channel_breath_flags,
84
+ FLUID_CHANNEL_BREATH_POLY: 0x10,
85
+ FLUID_CHANNEL_BREATH_MONO: 0x20,
86
+ FLUID_CHANNEL_BREATH_SYNC: 0x40)
87
+
88
+
89
+ #
90
+ module C
91
+
92
+
93
+ # Functions.
94
+ #
95
+ #
96
+
97
+ ### Channel Type
98
+
99
+ # Set midi channel type.
100
+ extern 'int fluid_synth_set_channel_type(fluid_synth_t*, int, int)'
101
+
102
+
103
+ ### Basic Channel Mode
104
+
105
+ # Disables and unassigns all channels from a basic channel group.
106
+ extern 'int fluid_synth_reset_basic_channel(fluid_synth_t*, int)'
107
+
108
+ # Returns poly mono mode information of any MIDI channel.
109
+ extern 'int fluid_synth_get_basic_channel' +
110
+ '(fluid_synth_t*, int, int*, int*, int*)'
111
+
112
+ # Sets a new basic channel group only.
113
+ extern 'int fluid_synth_set_basic_channel(fluid_synth_t*, int, int, int)'
114
+
115
+
116
+ # Legato Mode.
117
+ #
118
+ #
119
+
120
+ # Sets the legato mode of a channel.
121
+ extern 'int fluid_synth_set_legato_mode(fluid_synth_t*, int, int)'
122
+
123
+ # Gets the legato mode of a channel.
124
+ extern 'int fluid_synth_get_legato_mode(fluid_synth_t*, int, int*)'
125
+
126
+
127
+ # Portamento Mode.
128
+ #
129
+ #
130
+
131
+ # Sets the portamento mode of a channel.
132
+ extern 'int fluid_synth_set_portamento_mode(fluid_synth_t*, int, int)'
133
+
134
+ # Gets the portamento mode of a channel.
135
+ extern 'int fluid_synth_get_portamento_mode(fluid_synth_t*, int, int*)'
136
+
137
+
138
+ # Breath Mode.
139
+ #
140
+ #
141
+
142
+
143
+ # Sets the breath mode of a channel.
144
+ extern 'int fluid_synth_set_breath_mode(fluid_synth_t*, int, int)'
145
+
146
+ # Gets the breath mode of a channel.
147
+ extern 'int fluid_synth_get_breath_mode(fluid_synth_t*, int, int*)'
148
+
149
+
150
+ end
151
+ end
152
+
153
+
154
+ # Lifecycle Functions.
155
+ #
156
+ #
157
+
158
+
159
+ # Functions.
160
+ #
161
+ #
162
+ class FiddleFluidSynth
163
+
164
+ # Channel Type
165
+ #
166
+ #
167
+ def synth_set_channel_type( synth=self.synth, ch: , type: )
168
+ ret = C.fluid_synth_set_channel_type(synth, ch, type)
169
+ ret
170
+ end
171
+
172
+ # Basic Channel Mode.
173
+ #
174
+ #
175
+ def synth_reset_basic_channel( synth=self.synth, ch: )
176
+ ret = C.fluid_synth_reset_basic_channel(synth, ch)
177
+ ret
178
+ end
179
+
180
+ #
181
+ # ==== Args
182
+ #
183
+ def synth_get_basic_channel( synth=self.synth, ch: ,
184
+ basic_ch_out: , mode_out: ,
185
+ val_out: )
186
+ ret = C.fluid_synth_get_basic_channel(
187
+ synth, ch, basic_ch_out, mode_out, val_out)
188
+ ret
189
+ end
190
+ def synth_set_basic_channel( synth=self.synth, ch: , mode: , val: )
191
+ ret = C.fluid_synth_set_basic_channel(synth, ch, mode, val)
192
+ ret
193
+ end
194
+
195
+ # Breath Mode.
196
+ #
197
+ #
198
+ def synth_set_breath_mode( synth=self.synth, ch: , breath_mode: )
199
+ ret = C.fluid_synth_set_breath_mode(synth, ch, breath_mode)
200
+ ret
201
+ end
202
+ def synth_get_breath_mode( synth=self.synth, ch: , out_mode: )
203
+ ret = C.fluid_synth_get_breath_mode(synth, ch, out_mode)
204
+ ret
205
+ end
206
+
207
+ # Legato Mode.
208
+ #
209
+ #
210
+ def synth_set_legato_mode( synth=self.synth, ch: , legato_mode: )
211
+ ret = C.fluid_synth_set_legato_mode(synth, ch, legato_mode)
212
+ ret
213
+ end
214
+ def synth_get_legato_mode( synth=self.synth, ch: , out_mode: )
215
+ ret = C.fluid_synth_get_legato_mode(synth, ch, out_mode)
216
+ ret
217
+ end
218
+
219
+ # Portamento Mode.
220
+ #
221
+ #
222
+ def synth_set_portamento_mode( synth=self.synth, ch: , portamento_mode: )
223
+ ret = C.fluid_synth_set_portamento_mode(synth, ch, portamento_mode)
224
+ ret
225
+ end
226
+ def synth_get_portamento_mode( synth=self.synth, ch: , out_mode: )
227
+ ret = C.fluid_synth_get_portamento_mode(synth, ch, out_mode)
228
+ ret
229
+ end
230
+
231
+
232
+ end
233
+
234
+
235
+ #### endof filename: fiddle-fluidsynth/synth/midi/setup.rb
@@ -0,0 +1,128 @@
1
+ #
2
+ # filename: fiddle-fluidstynth/synth/midi/tuning.rb
3
+ #
4
+
5
+
6
+ # References
7
+ # - fluidsynth.org, [API Reference](https://www.fluidsynth.org/api/modules.html)
8
+ #
9
+ class FiddleFluidSynth
10
+
11
+ # The functions in this section implement the MIDI Tuning Standard
12
+ # interface.
13
+ # ==== References
14
+ # - API Reference, Synthesizer/[MIDI Tuning](https://www.fluidsynth.org/api/group__tuning.html)
15
+ # - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
16
+ #
17
+
18
+ #
19
+ module C
20
+
21
+ # Lifecycle Functions.
22
+ #
23
+ #
24
+
25
+
26
+ # Functions.
27
+ #
28
+ #
29
+
30
+ # Set the tuning of the entire MIDI note scale.
31
+ extern 'int fluid_synth_activate_key_tuning' +
32
+ '(fluid_synth_t*, int, int, char*, double*, int)'
33
+
34
+ # Activate an octave tuning on every octave in the MIDI note scale.
35
+ extern 'int fluid_synth_activate_octave_tuning' +
36
+ '(fluid_synth_t*, int, int, char*, double*, int)'
37
+
38
+ # Activate a tuning scale on a MIDI channel.
39
+ extern 'int fluid_synth_activate_tuning(fluid_synth_t*, int, int, int, int)'
40
+
41
+ # Clear tuning scale on a MIDI channel (use default equal tempered scale).
42
+ extern 'int fluid_synth_deactivate_tuning(fluid_synth_t*, int, int)'
43
+
44
+ # Set tuning values for one or more MIDI notes for an existing tuning.
45
+ extern 'int fluid_synth_tune_notes' +
46
+ '(fluid_synth_t*, int, int, int, int*, double*, int)'
47
+
48
+ # Get the entire note tuning for a given MIDI bank and program.
49
+ extern 'int fluid_synth_tuning_dump' +
50
+ '(fluid_synth_t*, int, int, char*, int, double*)'
51
+
52
+ # Advance to next tuning.
53
+ extern 'int fluid_synth_tuning_iteration_next(fluid_synth_t*, int*, int*)'
54
+
55
+ # Start tuning iteration.
56
+ extern 'void fluid_synth_tuning_iteration_start(fluid_synth_t*)'
57
+
58
+
59
+ end
60
+ end
61
+
62
+
63
+ # Lifecycle Functions.
64
+ #
65
+ #
66
+
67
+
68
+ # Functions.
69
+ #
70
+ #
71
+ class FiddleFluidSynth
72
+
73
+ #
74
+ def synth_activate_key_tuning( synth=self.synth,
75
+ bknum: , pgnum: , name: , pitch: , apply: )
76
+ ret = C.fluid_synth_activate_key_tuning(
77
+ synth, bknum, pgnum, name, pitch, apply)
78
+ ret
79
+ end
80
+
81
+ def synth_activate_octave_tuning( synth=self.synth,
82
+ bknum: , pgnum: , name: , pitch: , apply: )
83
+ ret = C.fluid_synth_activate_octave_tuning(
84
+ synth, bknum, pgnum, name, pitch, apply)
85
+ ret
86
+ end
87
+
88
+ def synth_activate_tuning( synth=self.synth, ch: , bknum: , pgnum: , apply: )
89
+ ret = C.fluid_synth_activate_tuning(synth, ch, bknum, pgnum, apply)
90
+ ret
91
+ end
92
+
93
+ #
94
+ # ==== Args
95
+ # apply:: TRUE to apply tuning change to active notes, FALSE otherwise
96
+ #
97
+ def synth_deactivate_tuning( synth=self.synth, ch: , apply: )
98
+ ret = C.fluid_synth_deactivate_tuning(synth, ch, apply)
99
+ ret
100
+ end
101
+
102
+ def synth_tune_notes( synth=self.synth,
103
+ bknum: , pgnum: , len: , key: , pitch: , apply: )
104
+ ret = C.fluid_synth_tune_notes(synth, bknum, pgnum, len, key, pitch, apply)
105
+ ret
106
+ end
107
+
108
+ def synth_tuning_dump( synth=self.synth,
109
+ bknum: , pgnum: , name: , len: , pitch: )
110
+ ret = C.fluid_synth_tuning_dump(synth, bknum, pgnum, name, len, pitch)
111
+ ret
112
+ end
113
+
114
+ def synth_tuning_iteration_next( synth=self.synth, bknum: , pgnum: )
115
+ ret = C.fluid_synth_tuning_iteration_next(synth, bknum, pgnum)
116
+ ret
117
+ end
118
+
119
+ def synth_tuning_iteration_start( synth=self.synth )
120
+ ret = C.fluid_synth_tuning_iteration_start(synth)
121
+ ret
122
+ end
123
+
124
+
125
+ end
126
+
127
+
128
+ #### endof filename: fiddle-fluidstynth/synth/midi/tuning.rb
@@ -0,0 +1,9 @@
1
+ #
2
+ #
3
+ #
4
+ require_relative "./midi/messages"
5
+ require_relative "./midi/setup"
6
+ require_relative "./midi/tuning"
7
+
8
+
9
+ ####
@@ -0,0 +1,200 @@
1
+ #
2
+ # filename: fiddle-fluidsynth/synth/params/params.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 to control and query synthesis parameters like gain and
12
+ # polyphony count.
13
+ # ==== References
14
+ # - API Reference, Synthesizer/[Parameters](https://www.fluidsynth.org/api/group__synthesis__params.html)
15
+ # - [library fiddle](https://docs.ruby-lang.org/ja/latest/library/fiddle.html)
16
+ #
17
+
18
+
19
+ # Enumerations.
20
+ #
21
+ #
22
+
23
+ FLUID_INTERP_4THORDER_EXT = 4
24
+ FLUID_INTERP_7THORDER_EXT = 7
25
+ enum(
26
+ :fluid_interp,
27
+ FLUID_INTERP_NONE: 0,
28
+ FLUID_INTERP_LINEAR: 1,
29
+ FLUID_INTERP_4THORDER: FLUID_INTERP_4THORDER_EXT,
30
+ FLUID_INTERP_7THORDER: FLUID_INTERP_7THORDER_EXT,
31
+ FLUID_INTERP_DEFAULT: FLUID_INTERP_4THORDER_EXT,
32
+ FLUID_INTERP_HIGHEST: FLUID_INTERP_7THORDER_EXT,
33
+ )
34
+
35
+ enum(
36
+ :fluid_synth_add_mod,
37
+ FLUID_SYNTH_OVERWRITE: nil,
38
+ FLUID_SYNTH_ADD: nil)
39
+
40
+ #
41
+ module C
42
+
43
+
44
+ # Lifecycle Functions.
45
+ #
46
+ #
47
+
48
+
49
+ # Functions.
50
+ #
51
+ #
52
+
53
+ # Adds the specified modulator mod as default modulator to the synth.
54
+ extern 'int fluid_synth_add_default_mod(fluid_synth_t*, fluid_mod_t*, int)'
55
+
56
+ # Get the total count of audio channels.
57
+ extern 'int fluid_synth_count_audio_channels(fluid_synth_t*)'
58
+
59
+ # Get the total number of allocated audio channels.
60
+ extern 'int fluid_synth_count_audio_groups(fluid_synth_t*)'
61
+
62
+ # Get the total number of allocated effects channels.
63
+ extern 'int fluid_synth_count_effects_channels(fluid_synth_t*)'
64
+
65
+ # Get the total number of allocated effects units.
66
+ extern 'int fluid_synth_count_effects_groups(fluid_synth_t*)'
67
+
68
+ # Get the total count of MIDI channels.
69
+ extern 'int fluid_synth_count_midi_channels(fluid_synth_t*)'
70
+
71
+ # Get current number of active voices.
72
+ extern 'int fluid_synth_get_active_voice_count(fluid_synth_t*)'
73
+
74
+ # Get synth output gain value.
75
+ extern 'float fluid_synth_get_gain(fluid_synth_t*)'
76
+
77
+ # Get the internal synthesis buffer size value.
78
+ extern 'int fluid_synth_get_internal_bufsize(fluid_synth_t*)'
79
+
80
+ # Get current synthesizer polyphony (max number of voices).
81
+ extern 'int fluid_synth_get_polyphony(fluid_synth_t*)'
82
+
83
+ # Removes the specified modulator mod from the synth's default modulator
84
+ # list.
85
+ extern 'int fluid_synth_remove_default_mod(fluid_synth_t*, fluid_mod_t*)'
86
+
87
+ # Set synth output gain value.
88
+ extern 'void fluid_synth_set_gain(fluid_synth_t*, float)'
89
+
90
+ # Set synthesis interpolation method on one or all MIDI channels.
91
+ extern 'int fluid_synth_set_interp_method(fluid_synth_t*, int, int)'
92
+
93
+ # Set synthesizer polyphony (max number of voices).
94
+ extern 'int fluid_synth_set_polyphony(fluid_synth_t*, int)'
95
+
96
+ # Set up an event to change the sample-rate of the synth during the next
97
+ # rendering call.
98
+ extern 'void fluid_synth_set_sample_rate(fluid_synth_t*, float)'
99
+
100
+ end
101
+ end
102
+
103
+
104
+ # Lifecycle Functions.
105
+ #
106
+ #
107
+
108
+
109
+ # Functions.
110
+ #
111
+ #
112
+ class FiddleFluidSynth
113
+
114
+ #
115
+ def synth_add_default_mod( synth=self.synth, mod: , mode: )
116
+ ret = C.fluid_synth_add_default_mod(synth,mod,mode)
117
+ ret
118
+ end
119
+
120
+ #
121
+ def synth_count_audio_channels( synth=self.synth )
122
+ ret = C.fluid_synth_count_audio_channels(synth)
123
+ ret
124
+ end
125
+
126
+ def synth_count_audio_groups( synth=self.synth )
127
+ ret = C.fluid_synth_count_audio_groups(synth)
128
+ ret
129
+ end
130
+
131
+ def synth_count_effects_channels( synth=self.synth )
132
+ ret = C.fluid_synth_count_effects_channels(synth)
133
+ ret
134
+ end
135
+
136
+ def synth_count_effects_groups( synth=self.synth )
137
+ ret = C.fluid_synth_count_effects_groups(synth)
138
+ ret
139
+ end
140
+
141
+ def synth_count_midi_channels( synth=self.synth )
142
+ ret = C.fluid_synth_count_midi_channels(synth)
143
+ ret
144
+ end
145
+
146
+ #
147
+ def synth_get_active_voice_count( synth=self.synth )
148
+ ret = C.fluid_synth_get_active_voice_count(synth)
149
+ ret
150
+ end
151
+
152
+ def synth_get_gain( synth=self.synth )
153
+ ret = C.fluid_synth_get_gain(synth)
154
+ ret
155
+ end
156
+
157
+ def synth_get_internal_bufsize( synth=self.synth )
158
+ ret = C.fluid_synth_get_internal_bufsize(synth)
159
+ ret
160
+ end
161
+
162
+ def synth_get_polyphony( synth=self.synth )
163
+ ret = C.fluid_synth_get_polyphony(synth)
164
+ ret
165
+ end
166
+
167
+ #
168
+ def synth_remove_default_mod( synth=self.synth, mod: )
169
+ ret = C.fluid_synth_remove_default_mod(synth, mod)
170
+ ret
171
+ end
172
+
173
+ def synth_set_gain( synth=self.synth, gain: )
174
+ ret = C.fluid_synth_set_gain(synth, gain)
175
+ ret
176
+ end
177
+
178
+ def synth_set_interp_method( synth=self.synth, ch: , interp_method: )
179
+ ret = C.fluid_synth_set_interp_method(synth, ch, interp_method)
180
+ ret
181
+ end
182
+
183
+ def synth_set_polyphony( synth=self.synth, polyphony: )
184
+ ret = C.fluid_synth_set_polyphony(synth, polyphony)
185
+ ret
186
+ end
187
+
188
+ #
189
+ # - [fluid_synth_set_sample_rate()](https://www.fluidsynth.org/api/group__synthesis__params.html#ga58a436738d2a21b160b0732024bb4dbe)
190
+ #
191
+ def synth_set_sample_rate( synth=self.synth, sample_rate: )
192
+ deprecated_msg(__method__)
193
+ ret = C.fluid_synth_set_sample_rate(synth, sample_rate)
194
+ ret
195
+ end
196
+
197
+ end
198
+
199
+
200
+ #### endof filename: fiddle-fluidsynth/synth/params/params.rb
@@ -0,0 +1,8 @@
1
+ #
2
+ # filename: fiddle-fluidsynth/synth/params.rb
3
+ #
4
+
5
+ require_relative "./params/params"
6
+
7
+
8
+ ####