09-27-2019, 01:57 AM | #1 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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. |
09-27-2019, 06:08 AM | #2 |
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
|
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.
|
09-27-2019, 07:05 AM | #3 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Thanks for creating this and making it available for Linux! |
|
09-27-2019, 08:17 AM | #4 | ||
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
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:
|
||
09-27-2019, 08:48 AM | #5 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
|
|
09-27-2019, 10:24 PM | #6 | |
Human being with feelings
Join Date: Sep 2018
Location: Colorado
Posts: 429
|
Quote:
|
|
09-28-2019, 12:56 AM | #7 | |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
If it does not appear in the VST3i list, probably you need to recompile. |
|
10-18-2019, 04:18 AM | #8 |
Human being with feelings
Join Date: Oct 2007
Location: Cologne
Posts: 26
|
That's great
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. |
10-18-2019, 09:37 AM | #9 |
Human being with feelings
Join Date: Sep 2009
Location: Northern Lights
Posts: 742
|
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: Manjaro KDE Plasma, Reaper For Linux (64Bit) native linux-vst plugins, LSP-Plugins, TpL-Plugins, Harrison's AVA & VST Plugins. Behringer U-PHORIA UMC22. |
10-18-2019, 09:53 AM | #10 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Then when you add the plugin, it will load with the General Midi soundfont ready to go, which makes it a General Midi VST. |
|
10-18-2019, 10:52 AM | #11 |
Human being with feelings
Join Date: Sep 2009
Location: Northern Lights
Posts: 742
|
Got it! Thanks GlennMan
__________________
OS: Manjaro KDE Plasma, Reaper For Linux (64Bit) native linux-vst plugins, LSP-Plugins, TpL-Plugins, Harrison's AVA & VST Plugins. Behringer U-PHORIA UMC22. |
10-19-2019, 01:32 AM | #12 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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. |
10-19-2019, 04:33 AM | #13 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
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 |
10-19-2019, 08:58 AM | #14 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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. |
11-26-2019, 06:27 PM | #15 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
Especially something like this with GM functionality. |
|
11-27-2019, 01:48 AM | #16 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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. |
11-27-2019, 09:12 AM | #17 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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. |
11-27-2019, 12:14 PM | #18 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
Quote:
-Michael |
|
11-27-2019, 02:47 PM | #19 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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.
|
11-27-2019, 03:47 PM | #20 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
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. |
11-27-2019, 06:47 PM | #21 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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. |
11-27-2019, 11:37 PM | #22 | |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
Quote:
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 |
|
11-29-2019, 11:32 AM | #23 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
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. |
|
12-01-2019, 02:45 AM | #24 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
|
12-01-2019, 07:52 AM | #25 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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.
|
12-01-2019, 04:09 PM | #26 |
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
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 |
12-01-2019, 04:58 PM | #27 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
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. |
|
12-01-2019, 11:24 PM | #28 | ||
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
|
Quote:
But there is Open Office as a Contender for M$ Word files on the RasPi ... Quote:
-Michael Last edited by mschnell; 12-02-2019 at 05:56 AM. |
||
12-02-2019, 02:40 AM | #29 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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. |
12-02-2019, 09:35 AM | #30 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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. |
12-02-2019, 10:53 AM | #31 |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
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.
|
01-06-2020, 09:29 AM | #32 |
Human being with feelings
Join Date: Jan 2019
Posts: 66
|
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:
Best regards, DrTT |
01-07-2020, 11:51 AM | #33 | ||
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
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:
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. |
||
01-07-2020, 03:59 PM | #34 | ||||||
Human being with feelings
Join Date: Jan 2019
Posts: 66
|
Quote:
This is the reason why I am so enthusiastic about your solution. Quote:
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:
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... |
||||||
01-08-2020, 07:44 AM | #35 |
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
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...). |
02-24-2020, 02:38 PM | #36 |
Human being with feelings
Join Date: Jan 2019
Posts: 66
|
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 |
02-25-2020, 06:27 AM | #37 |
Human being with feelings
Join Date: Jan 2019
Posts: 66
|
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 |
03-06-2021, 01:39 AM | #38 |
Human being with feelings
Join Date: Mar 2009
Location: Europa (not Jupiter's moon)
Posts: 167
|
This is exactly what I was looking for, brilliant, thanks a lot! Now I can easily quickly import a midifile into my midi template (thanks Glennbo for the hint) in Reaper instead of messing about with Carla or other wine tricks.
|
03-06-2021, 07:07 AM | #39 | |
Human being with feelings
Join Date: Mar 2008
Location: Planet Earth
Posts: 9,055
|
Quote:
What ever happened to azslow3? He used to post here a lot and was adding tweaks like this and his Sonar project importer. |
|
03-06-2021, 02:17 PM | #40 |
Human being with feelings
Join Date: Jan 2021
Posts: 32
|
Try https://sfz.tools/sfizz/ - sfz (not sf2) vst3/lv2 synth
besides full GM you can find high quality sfz banks for drums, piano, etc
__________________
Reaper / Bitwig / Surge XT / u-he / TAL / Speedrum / LSP |
Thread Tools | |
Display Modes | |
|
|