No reverb, no chorus with 2.1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

No reverb, no chorus with 2.1.0

midi-pascal

Hi,

The reverb and chorus do not work at all using libfluidsynth release 2.1.0, either in my app or in QSynth.

However they work perfectly using the release 2.0.2 (Same code, just re-linked the apps).

Am I missing something?

I was happy to see there are new reverb and chorus in 2.1.0, but it looks like they do not work.

The fluid_synth_set_reverb*() API calls return FLUID_OK

I followed the API calls with the debugger, and the functions do not exit prematurely.

I am on Ubuntu 18.04 LTS, if this can be relevant.

Did I hit a bug?

Regards

Pascal


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

Ceresa Jean-Jacques

Hi, Pascal

>The reverb and chorus do not work at all using libfluidsynth release 2.1.0, either in my app or in QSynth.

Here the reverb and chorus work using the fluisynth application console. Did you try this application before any other one ?

jjc.

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

midi-pascal
In reply to this post by midi-pascal
On 2020-02-14 6:34 a.m., Ceresa Jean-Jacques wrote:

Hi, Pascal

>The reverb and chorus do not work at all using libfluidsynth release 2.1.0, either in my app or in QSynth.

Here the reverb and chorus work using the fluisynth application console. Did you try this application before any other one ?

jjc.

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi jjc,

Using the command-line gives me strange results:

Developpement/fluidsynth-2.1.0/target/bin$ ./fluidsynth -a alsa -ni /usr/share/sounds/sf2/Titanic-200-GM-GS-SoundFont-1.2.sf2 /home/pascal/Documents/midi/Dissroad.mid -R 1 -o synth.reverb.room-size=1.0

./fluidsynth: symbol lookup error: ./fluidsynth: undefined symbol: fluid_free

So I cannot say if it works but, doing the same command in 2.0.2 works and the reverb is audible.

I do not understand what is going wrong here.

Any help is very welcome.

Thanks

Pascal





_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

Ceresa Jean-Jacques
In reply to this post by midi-pascal

Hi Pascal,

 

Here some thoughts

1.1)

> ./fluidsynth: symbol lookup error: ./fluidsynth: undefined symbol: fluid_free

The function fluid_free() should in be in fluid_sys.c (for v2.1.0).

1.2)Then at execution time, If this symbol cannot be found when fluidsynth binary is loaded, probably that the executable is linked with a wrong shared libfluidsynth dynamic library.

 

2) In order for chorus and reverb to be audible:

2.1) CC 93 values (for chorus), and CC 91 (for reverb) should be above 0.

2.2) Also the soundfont in use must never contain modulators that cancel following "default modulators" ("CC 93 to chorus send" and  "CC 91 to reverb send").

jjc.

> Message du 14/02/20 22:37

> De : "midi-pascal" <[hidden email]>
> A : [hidden email]
> Copie à :
> Objet : Re: [fluid-dev] No reverb, no chorus with 2.1.0
>
>
On 2020-02-14 6:34 a.m., Ceresa Jean-Jacques wrote:
>

> Hi, Pascal

> >The reverb and chorus do not work at all using libfluidsynth release 2.1.0, either in my app or in QSynth.

> Here the reverb and chorus work using the fluisynth application console. Did you try this application before any other one ?

> jjc.

>  


>
_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev

> Hi jjc,

> Using the command-line gives me strange results:

> Developpement/fluidsynth-2.1.0/target/bin$ ./fluidsynth -a alsa -ni /usr/share/sounds/sf2/Titanic-200-GM-GS-SoundFont-1.2.sf2 /home/pascal/Documents/midi/Dissroad.mid -R 1 -o synth.reverb.room-size=1.0

> ./fluidsynth: symbol lookup error: ./fluidsynth: undefined symbol: fluid_free

> So I cannot say if it works but, doing the same command in 2.0.2 works and the reverb is audible.

> I do not understand what is going wrong here.

> Any help is very welcome.

> Thanks

> Pascal
>

>
>

>
>

>
>



_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

fluid-dev mailing list
In reply to this post by midi-pascal
As JJC already indicated, your environment is "polluted". The
fluidsynth 2.1.0 binary tries to use the libfluidsynth 2.0.2 . This
cannot work. Execute ldd ./fluidsynth to see which libfluidsynth is
being loaded. Then remove it as well as other fluidsynth leftover
installation files (e.g. headers). Make a clean rebuild of fluidsynth
2.1.0, install it and try again.

Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

midi-pascal
In reply to this post by midi-pascal
On 2020-02-15 2:24 a.m., Tom M. via fluid-dev wrote:

> As JJC already indicated, your environment is "polluted". The
> fluidsynth 2.1.0 binary tries to use the libfluidsynth 2.0.2 . This
> cannot work. Execute ldd ./fluidsynth to see which libfluidsynth is
> being loaded. Then remove it as well as other fluidsynth leftover
> installation files (e.g. headers). Make a clean rebuild of fluidsynth
> 2.1.0, install it and try again.
>
> Tom
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi Tom,

You got it!

I rebuild fluidsynth and forced it to use the locally build
libfluidsynth by setting LD_LIBRARY_PATH.

Now fluidsynth works and I can ear the reverb.

I did the same to my app but the reverb and chorus still do not work
with 2.1.0.

No runtime error, but no effect.

The problem must be on my side.

Thanks a lot for your help.

Regards

Pascal


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

midi-pascal
In reply to this post by midi-pascal
On 2020-02-15 7:42 a.m., midi-pascal wrote:
On 2020-02-15 2:24 a.m., Tom M. via fluid-dev wrote:
As JJC already indicated, your environment is "polluted". The
fluidsynth 2.1.0 binary tries to use the libfluidsynth 2.0.2 . This
cannot work. Execute ldd ./fluidsynth to see which libfluidsynth is
being loaded. Then remove it as well as other fluidsynth leftover
installation files (e.g. headers). Make a clean rebuild of fluidsynth
2.1.0, install it and try again.

Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi Tom,

You got it!

I rebuild fluidsynth and forced it to use the locally build libfluidsynth by setting LD_LIBRARY_PATH.

Now fluidsynth works and I can ear the reverb.

I did the same to my app but the reverb and chorus still do not work with 2.1.0.

No runtime error, but no effect.

The problem must be on my side.

Thanks a lot for your help.

Regards

Pascal


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi,

I found the problem in my app:

I use an audio driver based on the fluidsynth_fx sample program to get the peak output levels while playing.

When using the custom audio driver - new_fluid_audio_driver2() - there is no reverb or chorus.

When using the simple audio driver - new_fluid_audio_driver() - both reverb and chorus work but I loose the peak levels usage. Is there a way to have both?

Regards,

Pascal



_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

Ceresa Jean-Jacques

Hi, Pascal

> When using the custom audio driver - new_fluid_audio_driver2() - there is no reverb or chorus.

 

The Callback function used with new_fluid_audio_driver2() is responsible for rendering the audio to the buffers.

If you don't need multi-channel audio output rendering , you can use fluid_synth_write_s16(), or fluid_synth_write_float(), instead of  fluid_synth_process().

Using fluid_synth_write_s16() you should get reverb and chorus without issues.

jjc

 

> Message du 15/02/20 17:30

> De : "midi-pascal" <[hidden email]>
> A : [hidden email]
> Copie à :
> Objet : Re: [fluid-dev] No reverb, no chorus with 2.1.0
>
>
On 2020-02-15 7:42 a.m., midi-pascal wrote:
>
On 2020-02-15 2:24 a.m., Tom M. via fluid-dev wrote:
>
As JJC already indicated, your environment is "polluted". The
> fluidsynth 2.1.0 binary tries to use the libfluidsynth 2.0.2 . This
> cannot work. Execute ldd ./fluidsynth to see which libfluidsynth is
> being loaded. Then remove it as well as other fluidsynth leftover
> installation files (e.g. headers). Make a clean rebuild of fluidsynth
> 2.1.0, install it and try again.
>
> Tom
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>

> Hi Tom,
>
> You got it!
>
> I rebuild fluidsynth and forced it to use the locally build libfluidsynth by setting LD_LIBRARY_PATH.
>
> Now fluidsynth works and I can ear the reverb.
>
> I did the same to my app but the reverb and chorus still do not work with 2.1.0.
>
> No runtime error, but no effect.
>
> The problem must be on my side.
>
> Thanks a lot for your help.
>
> Regards
>
> Pascal
>
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>

> Hi,

> I found the problem in my app:

> I use an audio driver based on the fluidsynth_fx sample program to get the peak output levels while playing.

> When using the custom audio driver - new_fluid_audio_driver2() - there is no reverb or chorus.

> When using the simple audio driver - new_fluid_audio_driver() - both reverb and chorus work but I loose the peak levels usage. Is there a way to have both?

> Regards,

> Pascal
>

>
>



_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

fluid-dev mailing list
> I use an audio driver based on the fluidsynth_fx sample program

How exactly does your callback function look like? The fluidsynth_fx
example is slightly outdated. Since 2.0.0 it won't work for effects.
I'll update it. But unless you've adjusted the callback, it does not
really explain why 2.0.2 works for you.

Also, pls. which audio driver does fluidsynth use?



Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

midi-pascal
In reply to this post by Ceresa Jean-Jacques
On 2020-02-16 3:08 a.m., Tom M. via fluid-dev wrote:

>> I use an audio driver based on the fluidsynth_fx sample program
> How exactly does your callback function look like? The fluidsynth_fx
> example is slightly outdated. Since 2.0.0 it won't work for effects.
> I'll update it. But unless you've adjusted the callback, it does not
> really explain why 2.0.2 works for you.
>
> Also, pls. which audio driver does fluidsynth use?
>
>
>
> Tom
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi Tom,

Here is my callback function (based on fluidsynth_fx.c sample program):

int ProcessBuffer(void *data, int len, int nfx, float **fx, int nout,
float **out)
{
   fx_data_t* fx_data = (fx_data_t*) data;
   float *out_i;
   // Call the synthesizer to fill the output buffers with its audio output.
   fluid_synth_process(fx_data->synth, len, nfx, fx, nout, out);
   fx_data->fMeterValue[0] = 0.0f;
   fx_data->fMeterValue[1] = 0.0f;
   // Apply our effects here.
   for(int i = 0; i < nout; i++) {
     out_i = out[i];
     for(int j = 0; j < len; j++) {
       // Find the peak level for this buffer run.
       const float fValue = out_i[j];
       if (fx_data->fMeterValue[i & 1] < fValue)
         fx_data->fMeterValue[i & 1] = fValue;
     }
   }
   return FLUID_OK;
}

While debugging I see that nfx is always 0 and fx is NULL.

I read carefully the fluid_synth_process() documentation and the sample
code in fluidsynth_process.c, so I did a small change in my callback by
adding:

   nfx = nout;
   fx = out;

just before the call to fluid_synth_process() and the reverb works now
(no chorus but my app does not use it anyway). I am not sure if my fix
is the right way to go, but it works (half).

With 2.0.2, the reverb worked once but I could not reproduce afterwards
probably because my code is under construction and changes a lot.

The audio driver I use is pulseaudio.

Regards,

Pascal


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

fluid-dev mailing list
Ok, thank you, now it's getting clearer. Your "small change" is
absolutely correct. ATM, only the jack driver supports real
multichannel playback and thus also provides you with dedicated
buffers for reverb and chorus. I've updated the fluidsynth_fx.c
example program accordingly, as well as the documentation of
fluid_audio_func_t:

http://www.fluidsynth.org/api/fluidsynth_fx_8c-example.html
http://www.fluidsynth.org/api/audio_8h.html#a4c108916c658973df5242ae77fefa3d0

(it'll take a few more hours until the doxygen cron job runs and the
changes become visible)


Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: No reverb, no chorus with 2.1.0

midi-pascal
In reply to this post by midi-pascal
On 2020-02-16 2:07 p.m., Tom M. via fluid-dev wrote:

> Ok, thank you, now it's getting clearer. Your "small change" is
> absolutely correct. ATM, only the jack driver supports real
> multichannel playback and thus also provides you with dedicated
> buffers for reverb and chorus. I've updated the fluidsynth_fx.c
> example program accordingly, as well as the documentation of
> fluid_audio_func_t:
>
> http://www.fluidsynth.org/api/fluidsynth_fx_8c-example.html
> http://www.fluidsynth.org/api/audio_8h.html#a4c108916c658973df5242ae77fefa3d0
>
> (it'll take a few more hours until the doxygen cron job runs and the
> changes become visible)
>
>
> Tom
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

Hi Tom,

Thanks a lot for validating my fix and updating the documentation and
the example program and thanks also for your guidance.

Kind regards,

Pascal


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev