-
Hello, I'm testing some custom LADSPA effects (both Win and Linux). CC91/CC93 work correctly and i'm happy. However, the reverb and chorus send are mono. So I'd like to obtain something like this for LADSPA binding: Do you have any tips in exteding this? I already saw I need to change the buffer for rvoice and adjusting the gain calculation for each buffer
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@mawe42 is the LADSPA expert, but he seems to be busy. So, yes the input channels used for reverb and chorus are mono currently. Even for fluidsynth's internal effects. In both cases, the fx unit is expected to create a stereo output signal. You may find more information here and some thoughts about improving this here.
You seem to be on the right track. Rather than using an ugly macro with hard-coded indexing for typedef enum {
DRY_L,
DRY_R,
REV_L,
REV_R,
CHO_L,
CHO_R,
RBUF_COUNT
} fluid_rvoice_bufidx_t; The interesting part will be to adjust the gain calculation of each buffer, here: fluidsynth/src/synth/fluid_voice.c Lines 805 to 817 in 5dcae73 One might think about changing it to something like // left reverb buffer
fluid_voice_calculate_gain_amplitude(voice, fluid_pan(voice->pan, 1) * fluid_balance(voice->balance, 1) * voice->reverb_send); Similar for the right buffer, just like we have done for the CUSTOM_BALANCE generator just a few lines above. More gain logic also lives here, not sure if there are other places which I'm missing... fluidsynth/src/synth/fluid_voice.c Lines 1848 to 1873 in 5dcae73 |
Beta Was this translation helpful? Give feedback.
-
Got it, work as expected. The issue was I didn't understand that I should multiply by 2 the |
Beta Was this translation helpful? Give feedback.
@mawe42 is the LADSPA expert, but he seems to be busy.
So, yes the input channels used for reverb and chorus are mono currently. Even for fluidsynth's internal effects. In both cases, the fx unit is expected to create a stereo output signal. You may find more information here and some thoughts about improving this here.
You seem to be on the right track. Rather than using an ugly macro with hard-coded indexing for
fluid_rvoice_buffers_set_amp
and friends (as done e.g. here), one should think about defining an enum instead