Old 09-27-2019, 01:57 AM   #1
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default SF2 VST3i synth for Linux/Windows

(the second attempt to post, sorry if it is a duplication)

I have wrapped FluidSynth into VST3 format and compiled it for Linux and Windows.
This VST3i can play "normal" MIDI files or can be used for sketching, the functionality I was completely missing on Linux in REAPER.

Binaries are in https://github.com/AZSlow3/FluidSynt...ree/master/bin
(the source is also there, it is GPL3 plug-in based on GPL3 Steinberg SDK and LGPL2.1 FluidSynth library)

Do not forget to download some GM SoundFond2 and put it into the same directory as "default.sf2". The synth has no GUI at the moment, so it simply silent if it can not find the sound file.
azslow3 is offline   Reply With Quote
Old 09-27-2019, 06:08 AM   #2
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 2,296
Default

No win32 bit? Thanks for sharing, so you wanted to create something like SY-XG50? Or there is farbrausch V2 if you want less standard (midi) sounds. Meaning just a quick way of getting various sounds to play with, a set of sounds, in an uncomplicated manner, so you can concentrate on the music or composition but not the sound selection process. Ideal would be a combination of both, SY-XG50 + V2. Piano (more natural) you could get from the first, some more crazy synth bass like (more electronic) sounds from the second. Natural + electronic, both quickly.
TonE is online now   Reply With Quote
Old 09-27-2019, 07:05 AM   #3
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by azslow3 View Post
(the second attempt to post, sorry if it is a duplication)

I have wrapped FluidSynth into VST3 format and compiled it for Linux and Windows.
This VST3i can play "normal" MIDI files or can be used for sketching, the functionality I was completely missing on Linux in REAPER.

Binaries are in https://github.com/AZSlow3/FluidSynt...ree/master/bin
(the source is also there, it is GPL3 plug-in based on GPL3 Steinberg SDK and LGPL2.1 FluidSynth library)

Do not forget to download some GM SoundFond2 and put it into the same directory as "default.sf2". The synth has no GUI at the moment, so it simply silent if it can not find the sound file.
Very cool Azslow! I already had the largest of the Fluid soundfont files so I had it up and running in a matter of seconds. I created a track template for REAPER that has a REAPER midi control VST set to GM followed by your plugin with "FluidR3 GM.SF2" loaded, so I can now just insert the track template any time I need to play a GM file.

Thanks for creating this and making it available for Linux!
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 09-27-2019, 08:17 AM   #4
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Quote:
Originally Posted by TonE View Post
No win32 bit? Thanks for sharing, so you wanted to create something like SY-XG50? Or there is farbrausch V2 if you want less standard (midi) sounds. Meaning just a quick way of getting various sounds to play with, a set of sounds, in an uncomplicated manner, so you can concentrate on the music or composition but not the sound selection process. Ideal would be a combination of both, SY-XG50 + V2. Piano (more natural) you could get from the first, some more crazy synth bass like (more electronic) sounds from the second. Natural + electronic, both quickly.
Win32 I can compile, if needed. For other platforms (Apple,Arm) someone else can do it.

From intentional functionality it is like Yamaha SY-XG50 / Cakewalk TTS-1 / Roland Hyper Canvas / Creative SB MIDI / Microsoft MIDI. So something to play MIDI files prepared for GM (and extensions) sound set.

But technically it is different. SoundFont 2 is in fact a collection of presets for waveform based synth. The (well described) engine has some weak places, f.e. there is no round-robin. But it has filter, envelopes, LFO, etc. So SF2 files, unlike SY-XG50, do not have fixed set of sounds. There are several editors for that format. So it is more toward V2 you have mentioned.

F.e. see https://musescore.org/en/node/268237
309MB samples sound a bit more natural for me then 4MB (well, probably compressed and with professional processing, but still) SY-XG50 bank.

So far I have noticed a bit dis-balanced for some patched volumes and a need for compression, in direct comparison with TTS-1.

Quote:
Originally Posted by Glennbo
Thanks for creating this and making it available for Linux!
Thanks for testing!
azslow3 is offline   Reply With Quote
Old 09-27-2019, 08:48 AM   #5
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by azslow3 View Post
F.e. see https://musescore.org/en/node/268237
309MB samples sound a bit more natural for me then 4MB (well, probably compressed and with professional processing, but still) SY-XG50 bank.

So far I have noticed a bit dis-balanced for some patched volumes and a need for compression, in direct comparison with TTS-1.


Thanks for testing!
Grabbed the "SGM-v2.01-NicePianosGuitarsBass-V1.2.sf2" file from the link you provided and did a couple quick A/B tests playing some GM files. Sounds better than the 150MB FluidR3_GM.sf2 file I tried earlier. I don't need GM very often, but this will be a great way to deal with it in Linux. Thanks again!
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 09-27-2019, 10:24 PM   #6
s wave
Human being with feelings
 
Join Date: Sep 2018
Location: Colorado
Posts: 248
Default

Quote:
Originally Posted by azslow3 View Post
(the second attempt to post, sorry if it is a duplication)

I have wrapped FluidSynth into VST3 format and compiled it for Linux and Windows.
This VST3i can play "normal" MIDI files or can be used for sketching, the functionality I was completely missing on Linux in REAPER.

Binaries are in https://github.com/AZSlow3/FluidSynt...ree/master/bin
(the source is also there, it is GPL3 plug-in based on GPL3 Steinberg SDK and LGPL2.1 FluidSynth library)

Do not forget to download some GM SoundFond2 and put it into the same directory as "default.sf2". The synth has no GUI at the moment, so it simply silent if it can not find the sound file.
very nice I have been running fluidsynth/qsynth as a separate set up. 1st of all thanks for doing this.. what is your process to set up for Linux Reaper? Just add it to where the VSTi files go? thx
s wave is offline   Reply With Quote
Old 09-28-2019, 12:56 AM   #7
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Quote:
Originally Posted by s wave View Post
very nice I have been running fluidsynth/qsynth as a separate set up. 1st of all thanks for doing this.. what is your process to set up for Linux Reaper? Just add it to where the VSTi files go? thx
Yes, if your Linux is compatible, just put into some VSTi folder. And make a symbolic link "default.sf2" in the same directory, pointing to some sf2 file (if you are using fluidsynth there must be some already).
If it does not appear in the VST3i list, probably you need to recompile.
azslow3 is offline   Reply With Quote
Old 10-18-2019, 04:18 AM   #8
horn
Human being with feelings
 
horn's Avatar
 
Join Date: Oct 2007
Location: Cologne
Posts: 26
Default That's great

Quote:
Originally Posted by azslow3 View Post
I have wrapped FluidSynth into VST3 format and compiled it for Linux and Windows.
This VST3i can play "normal" MIDI files or can be used for sketching, the functionality I was completely missing on Linux in REAPER.
Wow, that's cool. I have always used VST Synthfont for this task. It works quite well, but under Linux/Wine you have to use an old version, the new ones don't work anymore. With your tool this workaround is no longer necessary. Thank you very much.
__________________
Käptn Horn

Last edited by horn; 10-18-2019 at 04:44 AM.
horn is offline   Reply With Quote
Old 10-18-2019, 09:37 AM   #9
Tobbe
Human being with feelings
 
Tobbe's Avatar
 
Join Date: Sep 2009
Location: Backe, Jämtland, Sweden
Posts: 423
Question

I must be completely stupid. I don't get it where to put my sf2 files. Is it in my .vst3 directory or where? I have tons of sf2 on external hardrive.

"Put it as "default.sf2" into the same directory" does it mean that every sf2 file has to be named default.sf2?

I have the synth here: /home/tobbe/.vst3/FluidSynthVST/ and it showing up in Reaper.

Thanks
__________________
OS: Ubuntu Studio, Reaper For Linux (64Bit) and native linux-vst plugins (16GB RAM) LSP-Suite, Drumgizmo, TpL-Plugins, LinuxSampler/Fantasia, Behringer U-PHORIA UMC22.
Tobbe is offline   Reply With Quote
Old 10-18-2019, 09:53 AM   #10
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by Tobbe View Post
I must be completely stupid. I don't get it where to put my sf2 files. Is it in my .vst3 directory or where? I have tons of sf2 on external hardrive.

"Put it as "default.sf2" into the same directory" does it mean that every sf2 file has to be named default.sf2?

I have the synth here: /home/tobbe/.vst3/FluidSynthVST/ and it showing up in Reaper.

Thanks
The idea is to put *one* General Midi soundfont in the same folder as the synth and the name of the soundfont needs to be default.sf2

Then when you add the plugin, it will load with the General Midi soundfont ready to go, which makes it a General Midi VST.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 10-18-2019, 10:52 AM   #11
Tobbe
Human being with feelings
 
Tobbe's Avatar
 
Join Date: Sep 2009
Location: Backe, Jämtland, Sweden
Posts: 423
Talking

Got it! Thanks GlennMan
__________________
OS: Ubuntu Studio, Reaper For Linux (64Bit) and native linux-vst plugins (16GB RAM) LSP-Suite, Drumgizmo, TpL-Plugins, LinuxSampler/Fantasia, Behringer U-PHORIA UMC22.
Tobbe is offline   Reply With Quote
Old 10-19-2019, 01:32 AM   #12
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Current version support soundfont selection, but all of them should be in the same folder as this vst3. That works fine with symbolic links on Linux.

On Windows there are some issues. I have not managed to make working symlinks and on one computer the plug-in does not pickup correct file/restore set file. To be solved.
azslow3 is offline   Reply With Quote
Old 10-19-2019, 04:33 AM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

In Win10, hence off-topic here:

I don't see anything but the naked (Reaper generated) parameter UI, and even after moving an appropriately renamed sf2 file in the VST3 folder I don't get a sound, either.
I moved FluidSynthVST and the sf2 directly in VST3. Should I use a subdirectory ?

How is FluidSynth to get a GUI ? Is that part to the sf2 file ? Are there such files publicly available for testing ? Hopefully such GUI will not only show parameters but activity, as well...

-Michael
mschnell is offline   Reply With Quote
Old 10-19-2019, 08:58 AM   #14
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

EDIT: all up to the moment bugs are fixes, plug-in should be able to load different sound fonts as desired (on both platforms)

For GUI: there is no GUI.

PS. Many MIDI files sound better with Timbres Of Heaven font. But some old MIDI, written for SoundBlaster and alike output, sound more authentic with PRO7USE-GM-Basic

Last edited by azslow3; 10-19-2019 at 02:06 PM.
azslow3 is offline   Reply With Quote
Old 11-26-2019, 06:27 PM   #15
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by azslow3 View Post
(the second attempt to post, sorry if it is a duplication)

I have wrapped FluidSynth into VST3 format and compiled it for Linux and Windows.
This VST3i can play "normal" MIDI files or can be used for sketching, the functionality I was completely missing on Linux in REAPER.

Binaries are in https://github.com/AZSlow3/FluidSynt...ree/master/bin
(the source is also there, it is GPL3 plug-in based on GPL3 Steinberg SDK and LGPL2.1 FluidSynth library)

Do not forget to download some GM SoundFond2 and put it into the same directory as "default.sf2". The synth has no GUI at the moment, so it simply silent if it can not find the sound file.
Now that I'm experimenting with my new 4GB Raspberry Pi, I'm wondering how big of a deal would it be to compile this for ARM. Sure would be cool to have SF2 functionality on a Raspberry Pi.

Especially something like this with GM functionality.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 11-27-2019, 01:48 AM   #16
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

I do not have Raspberry Pi. But FluidSynth lib exists there, VST3 SDK should also work.

Intel NUC like things are full scale small form factor computers. And there are cheap Intel based tablets (if flash disk performance is acceptable).

Raspberry is good for experimenting with electronic, when $2 micro-controllers can not do the job.

For TV I use Amazon stick. Dirty cheap. Since I use Amazon Video and Netflix, they will "spy" me on any device. BTW the mic is in the remote control and batteries last for many months... I do think continuous audio recording can be so efficient.
I charge my mobile once per week, with inet/wifi always on. So again, I do not think someone listen/watch me (audio/video calls discharge the phone in hours).

I mean I prefer to use hardware and software for what it was thought.
azslow3 is offline   Reply With Quote
Old 11-27-2019, 09:12 AM   #17
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Ah well, I was hoping it was a simple matter of giving the compiler a directive of the target OS, but it sounds more involved.

The new 4GB raspberry Pi computers are a lot more capable than for just experimenting. I recorded a test in REAPER for Raspberry Pi using a 2GB set of sampled drums yesterday, and the Pi did quite well, which is what made me think an SF2 player that would run on a Pi would be pretty cool.

I use Rokus for Netflix, but also have a dedicated Linux server running MythTV that streams live and recorded HDTV to Raspberry Pi clients running Kodi on the TVs throughout the house.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 11-27-2019, 12:14 PM   #18
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

Quote:
Originally Posted by Glennbo View Post
hich is what made me think an SF2 player that would run on a Pi would be pretty cool.
Yeah. Kontakt for the Pi would be much better (and I am rather sure the performance would not be a limitation for most libraries). But a versatile SF2 player would be a great start.

-Michael
mschnell is offline   Reply With Quote
Old 11-27-2019, 02:47 PM   #19
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by mschnell View Post
Yeah. Kontakt for the Pi would be much better (and I am rather sure the performance would not be a limitation for most libraries). But a versatile SF2 player would be a great start.

-Michael
Kontakt on a Pi would prolly need some serious overclocking. I'm running mine at stock speed right now, which did OK with a 2GB set of drums running in the native REAPER for ARM RS5K. I am pretty confident that a native SF2 player would run fine too, but running WINE to host a Windows sampler would be a fairly tall task.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 11-27-2019, 03:47 PM   #20
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

Unfortunately I don't think there ever will be Kontakt for ARM/Linux by Native Instruments, so we can't evaluate performance issues .

Wine does not run on ARM, and only potentially will if there is Windows for ARM - which AFAIK in fact supposedly soon will be available for some hardware. ("W I N E" means Wine Is Not an Emulator).
-Michael

Last edited by mschnell; 11-27-2019 at 11:32 PM.
mschnell is offline   Reply With Quote
Old 11-27-2019, 06:47 PM   #21
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

I don't see Kontakt ever being offered in any native Linux flavor, but a soundfont player would go a long ways toward making REAPER for Raspberry Pi a usable composition tool for midi.

Here on the REAPER feature request hotline, I will officially suggest that Cockos should concoct a simple soundfont player to include with the other Rea plugins for all versions of REAPER.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 11-27-2019, 11:37 PM   #22
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

Quote:
Originally Posted by Glennbo View Post
I will officially suggest that Cockos should concoct a simple soundfont player to include with the other Rea plugins for all versions of REAPER.
While they very understandably will not do this to be bundled with Reaper (due to tons of arising support requests), a separate "unsupported" download (similar to the OSCIIBot project) could be thinkable.

Of course it should hold the most advanced SF2 player available (maintained in source code by some community project), Cocos providing compiled files for all versions of Reaper.

A good thing, but does not help the users and provides of the thousands of great libraries available for Kontakt

-Michael
mschnell is offline   Reply With Quote
Old 11-29-2019, 11:32 AM   #23
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by mschnell View Post
While they very understandably will not do this to be bundled with Reaper (due to tons of arising support requests), a separate "unsupported" download (similar to the OSCIIBot project) could be thinkable.

Of course it should hold the most advanced SF2 player available (maintained in source code by some community project), Cocos providing compiled files for all versions of Reaper.

A good thing, but does not help the users and provides of the thousands of great libraries available for Kontakt

-Michael
Well, now that you can get a Raspberry Pi with 4GB of RAM, and that can easily be overclocked over 2.0Ghz, it could sure use some VSTi sampler support.

Pianoteq runs fine even on my older Raspberry Pi 3 B+ with only 1GB of RAM, but it's modeled, not sampled. Now that Pis can be had with 4GB of RAM, sampled instruments can actually work on that platform. Running 2GB of sampled drums on my Pi 4 is the only thing I've been able to try because ReaSample-o-Matic 5000 is the one and only sample instrument VSTi for REAPER on ARM.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 12-01-2019, 02:45 AM   #24
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Quote:
Originally Posted by Glennbo View Post
Ah well, I was hoping it was a simple matter of giving the compiler a directive of the target OS, but it sounds more involved.
Theoretically, it should work like that. cmake should do the trick.
But practically, when something is not tested it does not work
azslow3 is offline   Reply With Quote
Old 12-01-2019, 07:52 AM   #25
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by azslow3 View Post
Theoretically, it should work like that. cmake should do the trick.
But practically, when something is not tested it does not work
Maybe one day I'll attempt to compile something again. All my previous attempts have only ended with installing tons of crap I didn't need trying to rectify errors popping up during the compile. Too many flavors of too many support libraries for me.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 12-01-2019, 04:09 PM   #26
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

Quote:
Originally Posted by Glennbo View Post
it could sure use some VSTi sampler support.
Agreed. But for "some sampler" there might be a hand full of sounds in varying quality. For Kontaklt there are thousands of instruments, many in really high quality. And AFAIK, the Kontakt library format is independent of the OS and the CPU architecture .

-Michael
mschnell is offline   Reply With Quote
Old 12-01-2019, 04:58 PM   #27
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Quote:
Originally Posted by mschnell View Post
Agreed. But for "some sampler" there might be a hand full of sounds in varying quality. For Kontaklt there are thousands of instruments, many in really high quality. And AFAIK, the Kontakt library format is independent of the OS and the CPU architecture .

-Michael
Kontakt is never going to be ported to Raspberry Pi so I don't even consider it as a potential contender.

That said, I have some very decent quality soundfonts that I've collected over the years, and used to use extensively before buying Kontakt. Kontakt is an astronomically tall order for a Pi IMHO, but a soundfont player isn't.

BTW, I'm on day two of running my 4GB Pi4 at 2.14Ghz, and no thermal issues at all. The solid aluminum heat sink case gets pretty warm to the touch, but not scalding.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 12-01-2019, 11:24 PM   #28
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 8,633
Default

Quote:
Originally Posted by Glennbo View Post
Kontakt is never going to be ported to Raspberry Pi so I don't even consider it as a potential contender.
Unfortunately I can't disagree on that POV, as there is no sign from NI to even consider taking a look at Linux, or other Archs than X86, which seems rather short sighted, regarding the rapid development with ARM hardware and the fact that even M$ provides Windows (now: IOT, already testabel: Desktop) for ARM.

But there is Open Office as a Contender for M$ Word files on the RasPi ...

Quote:
Originally Posted by Glennbo View Post
That said, I have some very decent quality soundfonts that I've collected over the years, and used to use extensively before buying Kontakt. Kontakt is an astronomically tall order for a Pi IMHO, but a soundfont player isn't.
That of course is correct, but the scripting power Kontakt provides ways to do realistic sound that are not (yet) possible with SF (see e.g. https://samplemodeling.com/en/products.php, and if you like songs I provided in the "Music/Collaboration" subforum. (And obvious the number of available complex libraries is unbeatable.)

-Michael

Last edited by mschnell; 12-02-2019 at 05:56 AM.
mschnell is offline   Reply With Quote
Old 12-02-2019, 02:40 AM   #29
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

SF2 is detailed specification how the sound should be produced from SF2 file. Including characteristics for all components and correct interpretation for all parameters. There are just two problems:
* it is "gray". It was never declared as an open format.
* it is old and originally (old) hardware oriented. Some features are not there.

SFZ provides more features and it is license clean. So that can be the format for "bundled" plug-in. It also has some limitations:
* no "single file" preset+waveforms
* not bank oriented (not possible replace GM/GS to play "standard" MIDI files)
* while it defines many extras, it still does not support "scripts".
But many sound libraries exist, commercial and free.

NI/IK multimedia/etc. do own things. They will never be open. Even Steinberg, which has moved the world with semi-open VST, at the end has killed own baby.
azslow3 is offline   Reply With Quote
Old 12-02-2019, 09:35 AM   #30
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

Looking over at the KXStudio news I see this feature bullet.

"armhf and arm64 are now supported targets, taking Raspberry Pi 3 as the minimum specs. With this, the repos will support 32 and 64bit Intel-based architecture, plus 32 and 64bit ARM."

So I guess that Carla might be a viable way to get a sample player working on a Raspberry Pi. I've used Carla as a VSTi in REAPER for Linux before and it played all my SF2/SFZ files fine.

I will have to look deeper into this new support for Raspberry Pi that FalkTX is now saying exists.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 12-02-2019, 10:53 AM   #31
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,309
Default

I added KXStudio repositories to my 4GB Pi4 and BAM, I'm running Carla Rack as a VSTi in REAPER for ARM and it loads my soundfonts.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 01-06-2020, 09:29 AM   #32
DrTT
Human being with feelings
 
Join Date: Jan 2019
Posts: 38
Thumbs up

Hello azslow3,


first of all thanks for your fantastic plugin!

It is a real life-saver for me, because for months I have been looking for a VSTi replicating an external fluidsynth (or a least some midi-to-wav) command-line processing bit-exactly.

I use an external processing chain from notation files to mp4 (see here for details) via fluidsynth and sox and want to preview possible settings for this chain via Reaper. For the sox effects I had to build my own JSFX (see this forum thread), but for the midi-to-wav conversion I was simply out of luck so far, because most soundfont or SFZ VSTi do not have a command-line version at all and the existing soundfont VSTi render something far off of command-line fluidsynth (here my desperate Reaper forum post from last November).

I have tested your VSTi as described in my forum post with S. Christian Collins's test soundfont and midi file. So far your VSTi is spot-on, thanks for your effort and especially diligence!

Nevertheless I have two questions:
  • When I render midi via your VSTi to file, there is an offset of about 1.32732ms between the external fluidsynth generated file and the file rendered via Reaper and FluidsynthVST. I assume this is processing latency in Reaper (it is around 64 samples for a 44.1k sampling rate). Is this the correct explanation or do I miss something completely different?
  • You seem to have integrated the fluidsynth library statically into your DLL. Is it possible that you provide your DLL with an external linkage to the libfluidsynth.dll (where this goes into the same directory als fluidsynthvst.vst3)? This would allow to simply change the libfluidsynth version without having to recompile and reinstall FluidsynthVST.

Best regards,
DrTT
DrTT is offline   Reply With Quote
Old 01-07-2020, 11:51 AM   #33
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Quote:
Originally Posted by DrTT View Post
Hello azslow3,
Nevertheless I have two questions:
  • When I render midi via your VSTi to file, there is an offset of about 1.32732ms between the external fluidsynth generated file and the file rendered via Reaper and FluidsynthVST. I assume this is processing latency in Reaper (it is around 64 samples for a 44.1k sampling rate). Is this the correct explanation or do I miss something completely different?
There is no rules to delay output waveform. So I do not do this intentionally. But sound generator (fluidsynth) can produce some shift. Note that I do not initialize any SF2 generator parameters explicitly, so the result can be different from command line (in case fluidsynth does that in command line wrapper).


Finally, FluidSynth has native LV2. You can use LV2 into VST wrapper (f.e. mentioned Carla) to make it work inside REAPER (and compare results).

Quote:
  • You seem to have integrated the fluidsynth library statically into your DLL. Is it possible that you provide your DLL with an external linkage to the libfluidsynth.dll (where this goes into the same directory als fluidsynthvst.vst3)? This would allow to simply change the libfluidsynth version without having to recompile and reinstall FluidsynthVST.
I have specially made it static, on perpose. Since VluidSynthVST is a tiny wrapper around FluidSynth, I think it is simpler to recompile the combination then hope already compiled wrapper will work correctly with newer/older library.
But you can easily compile what you want yourself, just comment glib "hack" initialization and specify dynamic linking with fluidsynth.

About your "exact match" different SF2 players. SF2 prescribe the way to generate the sound, but it was not thought to prescribe exact waveform. I guess even different FluidSynth versions can generate not matching waveforms. Do not forget that almost all SF2 are not just "copy waveform at the time of MIDI note", SF2 is a complete synth, with parametric tone generator, filter, oscillators, envelopes and effects. There is no one single "right" way to implement that, the reason for 1000s of different synths with almost the same "blocks" co-exist.

Even the same FluidSynth engine can generate different results when wrapped different way, but in such case it is possible to find from where that difference comes.
azslow3 is offline   Reply With Quote
Old 01-07-2020, 03:59 PM   #34
DrTT
Human being with feelings
 
Join Date: Jan 2019
Posts: 38
Default

Quote:
Quote:
offset of about 1.32732ms between the external fluidsynth generated file and the file rendered via Reaper and FluidsynthVST
There is no rules to delay output waveform. So I do not do this intentionally. But sound generator (fluidsynth) can produce some shift. Note that I do not initialize any SF2 generator parameters explicitly, so the result can be different from command line (in case fluidsynth does that in command line wrapper).
When I apply a compensation of -58 samples (which is -1.315ms, I was wrong with my initial measurement) and render the output of your FluidsynthVST to file, this perfectly cancels out a phase inverted externally generated fluidsynth track. So you initialize fluidsynth correctly by using libfluidsynth (which probably does some internal initialization).

This is the reason why I am so enthusiastic about your solution.

Quote:
FluidSynth has native LV2. You can use LV2 into VST wrapper...
The results with your VST and rendering to file are perfect (when doing latency compensation). I just do not want to add an additional layer of complexity, but thanks for the hint anyhow.

The only problem left is that live rendering does not cancel out like the rendered files do, but I assume it is not your problem (see this post).

Quote:
Quote:
You seem to have integrated the fluidsynth library statically into your DLL...
I have specially made it static, on purpose...
But you can easily compile what you want yourself, just comment glib "hack" initialization and specify dynamic linking with fluidsynth.
I will think about it. If you separate the DLLs, then one could (hopefully) just exchange the libfluidsynth DLL for a newer version without having to recompile. But I understand your handling argument.

Quote:
..."exact match"... SF2 prescribe the way to generate the sound, but it was not thought to prescribe exact waveform. I guess even different FluidSynth versions can generate not matching waveforms.
I know the principle logic of soundfonts and fluidsynth and, of course, your argumentation is absolutely plausible. But my naive assumption is that when you use the same libfluidsynth, timely feed it with midi events and fetch the resulting audio samples, it should produce exactly the same result as the command-line fluidsynth (going through the same process).

And the surprise is: your implementation does exactly that. Thanks!

I only have to solve the mystery of why live rendering differs from file rendering...
DrTT is offline   Reply With Quote
Old 01-08-2020, 07:44 AM   #35
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 784
Default

Ok, I have checked.

Apart from not working .so in my build folder, which was easy to fix (I have not checked what is on github yet... if it is the same, I wonder how I could use it before and other people could use it before ):

If I render (just by "render track" or by "export") correctly, it is NULL with live played track. But it should be correctly rendered and played, that means:
* live play is generated in current audio sample rate. So project sample rate (for track rendering) and export sample rate (for export) should be set to the same value (all 3 can be different!). That can be checked by deep zooming rendered/re-imported item and "record track output" test, they should have the same "dots density".
* playback should be started from zero (REAPER tries to restore MIDI settings when configured to do so, but that can fail. F.e. imagine some instrument was changed, but not all CC settings are set explicitly, assuming defaults. "Last seen" CC from previous instrument is not what produce desired sound then and DAW has no way to find any dependencies. Apart from already discussed oscilators...).
azslow3 is offline   Reply With Quote
Old 02-24-2020, 02:38 PM   #36
DrTT
Human being with feelings
 
Join Date: Jan 2019
Posts: 38
Default

Hello azslow3,

sorry for the late response; I've been quite busy in the last month and also wanted to check some ideas on that topic before a follow-up...
In between I contacted the maintainer of fluidsynth whether it is possible to have some processing start time parameter defined in libfluidsynth (which could be used by fluidsynthVST and be set to the DAW time at processing start); but he found good arguments why this might be hopeless in the general case with similar reasoning as you had in your post.
Granted, if we cannot handle a soundfont with complex oscillator logic in such a way, why not use/create a soundfont with just simple sample playback and envelopes?
In my opinion its playback should be completely time-independent: the sample playback and the envelope starts at the time of the noteon, release at the noteoff, so there is no surprising magic here.
I tried this with a naive midi file and a stripped down piano soundfont.
As always the fluidsynth wave file and the live rendered audio from fluidsynthVST completely cancel out when starting at t=0 (but in contrast to you I need an offset of -64 samples in Reaper for the VSTi).
Unfortunately when starting at an arbitrary position this cancellation does not work. And to be honest I do not understand why my above reasoning fails...

Best regards
DrTT
DrTT is offline   Reply With Quote
Old 02-25-2020, 06:27 AM   #37
DrTT
Human being with feelings
 
Join Date: Jan 2019
Posts: 38
Default

Dear all,

sorry to answer my own questions 🙄

I was baffled why sample-exact cancellation does not happen when comparing externally rendered fluidsynth with a live rendered fluidsynthVST in Reaper. Or it works only in special circumstances.

The explanation is easy: when starting at an arbitrary playing position, rendering in the VST starts its processing blocks raster at this cursor position which typically does not match the processing block raster in the externally rendered file.

When starting at t=0, those rasters coincide; hence the audio tracks perfectly cancel out. But e.g. when assuming a raster of 64 samples and an external sampling rate of 44.1kHz and starting playback at t=10s, the internal VST is at phase 0 (samples), while the external renderer is at phase (44100 * 10) MOD 64 = 40.

By this reasoning everything should be fine if we start playback at processing raster positions. So if we shift the playback cursor to 10s plus 24 samples, i.e. to position 10.000544s, the cancellation works perfectly.

I've written a small script that adapts loop selection boundaries and edit cursor accordingly. If anybody is interested, I can provide it.

This, of course, only applies to sounds without free-running oscillators (for example for modulation or chorus). Otherwise you're simply out of luck.

Thanks to the fluidsynth developers for pointing out that background information!

Best regards,
DrTT
DrTT is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.