brummer10 / Fluida.lv2

Fluidsynth as LV2 plugin
GNU General Public License v2.0
33 stars 4 forks source link

Selecting files in browser does not open anything in reaper for linux #17

Closed vssasks closed 1 year ago

vssasks commented 1 year ago

Selecting files in browser does not open anything in reaper for linux. Inscription None remains near the folder button. Nothing is loaded.

brummer10 commented 1 year ago

You must add a track and load fluida there. Duno why file loading didn't work on the master bus.

vssasks commented 1 year ago

Of course i insert lv2 into a track or item. The result is the same i.e. sf2 is not loaded into lv2. I have 64-bit reaper and 64-bit fluida.lv2 of course self-compiled. Your binary refused to load alltogether.

brummer10 commented 1 year ago

Strange, here it is as it works for me: Peek 2022-12-16 12-52

vssasks commented 1 year ago

Your screenshot does not show that sf2 is loaded. It shows none.

vssasks commented 1 year ago

What's your version of reaper btw? I have noticed that vss3 vst is loaded in one version and works well but in later versions it selfresets to default all the time

brummer10 commented 1 year ago

@vssasks it is a gif, don't you see the animation? It's a old 6+21-dev version.

brummer10 commented 1 year ago

Here is a shot from the gif showing what you want to see fluida_in_reaper

vssasks commented 1 year ago

Does not work for me on 6.31 and 6.47

brummer10 commented 1 year ago

Just checked out v6.71, still works here as expected. Do you use latest checkout from fluida git? Which distribution do you use? I'm on debian/sid by the way.

Also, you may checkout what happen when you save a preset, for example with jalv, with a soundfont loaded. Then load this preset when you use reaper. Did that work?

vssasks commented 1 year ago

I use devuan beowulf based on sysvinit. I used last checkout - i recompiled after issuing 'git checkout' command. I don't have jalv as I use only alsa for audio. Maybe you can save a preset for me? To /home dir fluid gm as I also have it

brummer10 commented 1 year ago

Do you've Ardour? That will as well work for save a preset. And, in Ardour you could load the sound-font via drag n' drop.

vssasks commented 1 year ago

I don't have ardour either

vssasks commented 1 year ago

Perhaps you can rewrite the code to support classical folder browsing or smth like that?

vssasks commented 1 year ago

Or change code to compile with static libs and provide static binary?

brummer10 commented 1 year ago

From Fluida, it is all supported. Look how ardour shows fluida with internal controls: 2022-12-17_05-25

As you could see there is a file browser button, this one is from Ardour. It's simply that reaper didn't support that feature, so there is no way for me to use any internal file browser from reaper to fetch a file. On top of that, reaper didn't forward d n' d events to the plugin, so file loading by d n' d isn't possible neither. The plugin use just libcairo, libX11 and libfluidsynth. Non of them been suited to compile statically as they are linked with glibc. The resulting binary will be huge, very, very huge.

vssasks commented 1 year ago

Thanks for explanations. I will contact reaper developers and let them know about this problem. V6.71 exibits same problem + more cpu consuming than 6.30. Whatever they say each new version is more hungry for cpu.

vssasks commented 1 year ago

Try file selector like in gunshot convolution reverb. It works

Audiojunkie commented 1 year ago

I’m interested in this too, but don’t understand what you mean. 🙂

brummer10 commented 1 year ago

Try file selector like in gunshot convolution reverb. It works

You know that's a VST plugin. VST does direct UI->dsp communication while LV2 communicate like this UI ->host -> dsp -> host -> UI.

brummer10 commented 1 year ago

@vssasks To find out why this file selector didn't work for you in reaper, you may try this one: https://github.com/brummer10/XFileSelect That's the file selector I use in Fluida. build it and run it from terminal, select a file and press "load". Check if the filename is outputted in terminal. If that doesn't work, I could implement some debugging output to find out were it is broken.

vssasks commented 1 year ago

After clicking on selected file xfileselect just disapeared and terminal says: FILE: ~/fluid.sf2

vssasks commented 1 year ago

By disappeared I mean self-terminated is that normal?

brummer10 commented 1 year ago

Yes, that is the expected behave. So it means that the file browser works and forward the filename to the UI. Now, next question will be if the UI is able to forward the name to the engine. When you go to the Fluida source directory and open the file /Fluida/fluida.cpp with a text editor, go to line 592 soundfont = (const char*)(file_path+1); and put a new line below that one were you put fprintf(stderr, "DSP -> %s\n", soundfont.c_str()); save, rebuild and install, then start reaper from terminal, try to load a soundfont with fluida. Now, when the message makes it from the UI to the engine there should be a output in terminal like this: DSP -> /usr/share/sounds/sf2/FluidR3_GM.sf2 If so, then this part even works. Check at this point if you get sound when you play a key on the integrated keyboard. If no output appears it means that for some reason the atom communication from UI to dsp is broken.

vssasks commented 1 year ago

Such mesage is absent. It only shows Alsa: using mmap interleaved

brummer10 commented 1 year ago

I didn't understand the answer, that's the message you get after you've edited, build and install the source files, or you get it independent of that? Just a side step, which lv2-dev version do you use? Maybe update your lv2 headers may help.

vssasks commented 1 year ago

Yes, you understood correctly. I recompiled it with that additional line and installed it. It behaves the same way as the nonedited lv2. Do i need dev version of reaper too?

vssasks commented 1 year ago

Where should i get dev version of lv2?

vssasks commented 1 year ago

Sorry, misunderstood. You meant not fluida.lv2 but lv2-dev pack and it's 1.14-0~dfsg1-2

brummer10 commented 1 year ago

Well, that's a real old version (2016). It may be that your issue with Fluida is related to that. Check out here: https://lv2plug.in/news.html You may download, build and install the latest version of lv2-dev and then rebuild Fluida against that. (Better remove the package from your distribution before you install your self build one) Other LV2 plugs you build by yourself may benefit from that as well.

vssasks commented 1 year ago

Ok, tried fluida recompiled with 1.18-lv2-dev and it did not help...

vssasks commented 1 year ago

Maybe you can make vst version?

brummer10 commented 1 year ago

Strange. You could make a VST by yourself: https://github.com/x42/lv2vst uri for Fluida is https://github.com/brummer10/Fluida.lv2 so echo "https://github.com/brummer10/Fluida.lv2" >> ~/.vst/lv2vst/.whitelist after installing lv2vst should do it.

vssasks commented 1 year ago

Lv2vst helped, thanks! I can now load sf2s and get sounds. Only drawback that after reopening gui banks line becomes empty though sf is still playing i.e. i have to reload entire sf2 in order to load another instrument within same sf2. By the way where can i get ladspa to vst wrapper?