[fluid-dev] Using LADSPA with libfluidsynth: howto
Hi, My MIDI sequencer/editor (Qt project) uses libfluidsynth nicely. I would like to open it to LADSPA effects, but I cannot find any sample code showing how to do it. I see many ladspa references in the API documentation but there is no example showing how to use the functions. Could someone help me on this matter? Thanks in advance. ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
[fluid-dev] No reverb, no chorus with 2.1.0
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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
Re: [fluid-dev] No reverb, no chorus with 2.1.0
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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
Re: [fluid-dev] No reverb, no chorus with 2.1.0
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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
Re: [fluid-dev] No reverb, no chorus with 2.1.0
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 fluid-dev@nongnu.org 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 fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
[fluid-dev] -DCMAKE_INSTALL_PREFIX ignored by cmake
Hi, I just downloaded version 2.1.4 from sources. When I want to build it (Ubuntu 18.04 LTS): cmake .. -D-DCMAKE_INSTALL_PREFIX=../target/ -DLIB_SUFFIX="" -DCMAKE_BUILD_TYPE=Debug gives: ** Build Summary: Build type: Debug Install Prefix: /usr/local Audio / MIDI driver support: ALSA: yes CoreAudio: no CoreMIDI: no DSound: no JACK: yes MidiShare: no Oboe: no OpenSLES: no OS/2 DART: no OSS: yes PortAudio: no PulseAudio: yes SDL2: no WaveOut: no WinMidi: no Support for SF3 files: yes Support for DLS files: no (libinstpatch not found) Audio to file rendering: yes libsndfile: yes Miscellaneous support: D-Bus: yes LADSPA support: yes LASH support: no NETWORK Support: yes IPV6 Support: yes Readline: yes (NOTE: GPL library) systemd: no Developer nerds info: Samples type: double Multithread rendering: yes OpenMP 4.0: yes Profiling: no Debug Build: yes Trap on FPE (debug): no Check FPE (debug): no UBSan (debug): no ** -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: -DCMAKE_INSTALL_PREFIX But I don't want to install fluid in /usr/localbut in ../target/ for testing. Something got wrong with the install directory setting. I want to test 2.1.4 before installing it in /usr/ NOT /usr/local/ Please help! Thanks ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
Re: [fluid-dev] -DCMAKE_INSTALL_PREFIX ignored by cmake
On 2020-07-13 1:37 p.m., Tom M. wrote: cmake .. -D-DCMAKE_INSTALL_PREFIX Find the typo :) Tom Hi, I feel dumb :-( Sorry about that. MP ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
[fluid-dev] Exporting to mp3
Hi, Is it *programmatically (C++)* possible to export to mp3 by connecting libfluidsynth to libmp3lame? I think of using a callback function registered using new_fluid_audio_driver2() but cannot figure how to do it properly from the fluidsynth output. Any advice would be very welcome. Regards, Pascal ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
[fluid-dev] Curiosity about release numbers
Hi, Just out of curiosity, I have a question. I just build and installed v2.1.8 on Unbuntu 18.04 LTS. It works perfectly, but the installed shared library is /usr/lib/libfluidsynth.so.2.3.8. How come 2.1.8 install libfluidsynth.so.2.3.8? Thanks a lot for this beautiful piece of software! Kind regards, Pascal ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev
[fluid-dev] Problems building 2.2.3 on Ubuntu 18.04
Hi, I downloaded the release 2.2.3 and build it. libfluidsynth.so and fluidsynt are buid BUT... I found two problems: 1- /home/pascal/Developpement/fluidsynth-2.2.3/src/midi/fluid_midi.c: In function ‘fluid_player_set_bpm’: /home/pascal/Developpement/fluidsynth-2.2.3/src/midi/fluid_midi.c:2439:5: warning: ‘fluid_player_set_midi_tempo’ is deprecated [-Wdeprecated-declarations] return fluid_player_set_midi_tempo(player, 6000L / bpm); ^~ /home/pascal/Developpement/fluidsynth-2.2.3/src/midi/fluid_midi.c:2416:5: note: declared here int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo) ^~~ 2- The test programs are not build (or not found), so "make test" does not work at all. Test project /home/pascal/Developpement/fluidsynth-2.2.3/build Start 1: test_sample_cache Could not find executable /home/pascal/Developpement/fluidsynth-2.2.3/build/test/test_sample_cache ... 0% tests passed, 25 tests failed out of 25 is there a new make target to build the test programs? So, should I install the new release anyway? Cheers, Pascal PS: My installed cmake version is 3.21.2, does it matters? ___ fluid-dev mailing list fluid-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/fluid-dev