-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plans to add Windows support for the VST? #2
Comments
I had a crack at it today. I got the standalone .exe working just now. .vst3 is complaining about some missing factory function (or a 32-bit/64-bit mismatch somewhere). So, soon I'll see if I can get VST3 working, and revisit Projucer to see if I missed any project targets. I can't yet publish the .exe I built, since I need to track down licenses for all files that I release. I have most of them already from the Mac version, but Windows adds a few more libraries. Btw, is VST3 fine for you? It's probably the easiest one for me to get working. |
licenses written. Pretty close now. Just need to make the installer setup the exe and plug-ins (which should be trivial), confirm whether installer is portable, confirm whether the exe and plug-ins themselves are portable, then put it all in a zip with licenses. |
@Archer6621 https://github.com/Birch-san/juicysfplugin/releases/tag/1.0.8 |
Wow, that is awesome, I will try it right away! |
It works great @Birch-san , thank you so much for doing this! The VST2 version was indeed the one I needed, since Ableton Live is a bit behind on their VST3 support, which is rather unfortunate. Would a 32-bit version also be possible? This would ease up the compatibility between other older 32-bit plugins (effects etc) and this one without the necessity of having to use a bridge (again, Ableton Live quirk). It's not a huge deal though, just a nice-to-have. One additional little thing: are there plans to support additional MIDI commands that can control the attack/release times of instruments (MIDI CC 73 and 72)? And the filter cutoff/resonance (MIDI CC 74 and 71)? I think this belongs to certain MIDI feature set (XG?), but I'm not sure how Fluidsynth interprets these or whether it needs a specific configuration for it. Regardless, I'll be using this actively the coming few weeks, mostly for just playing on my keyboard and trying out various soundfonts, I'll report back to you if I run into any serious issues. |
@Archer6621 phew; glad it works. The main reason that it's difficult for me to do 32-bit is that I don't have a 32-bit fluidsynth.dll. I compiled fluidsynth using this MinGW package, which is 64-bit only. Making a 32-bit package would require also having 32-bit libraries for all its dependencies (and their dependencies…). How problematic is Ableton's 64-to-32-bit bridge? Is it easy-to configure (or automatic)? I think FL Studio does it automatically, and they said that the performance penalty is just 1% extra CPU usage. I don't quite know how to add support for those MIDI commands, but potentially it's easy. Probably only a couple of lines of code. Need some help understanding it. Here's how fluidsynth is configured: http://www.fluidsynth.org/api/index.html#CreatingSettings I notice I suspect this is done on a per-voice level. Probably something to do with the generators or modulators, but not sure exactly what to call and when: http://www.fluidsynth.org/api/voice_8h.html However, I'm aware that they're about to drastically change the API (FluidSynth 2.0 is coming soon): https://lists.nongnu.org/archive/html/fluid-dev/2018-05/msg00019.html Maybe it's easier to do this stuff in FluidSynth 2. Or at least more futureproof. Admittedly, I don't currently have a MinGW package definition to let me build FluidSynth 2.0 on Windows (maybe I can make one myself with some small changes to the existing one… unless the dependencies have changed radically). And we can probably stay on FluidSynth 1 forever. But nevertheless: would be nice to not be stuck. At the very least I'd like to know whether there's a big difference in how we'd implement these features in v1 versus v2. Here's the new API: https://github.com/FluidSynth/fluidsynth/tree/v2.0.0.beta1/include/fluidsynth We'd need a plan for how to do this in v1, and check if it has any incompatibilities that stop us upgrading to v2. |
@Birch-san Understandable about the 32-bit version, that's only going to be pain yeah. Bridging in Ableton Live is unfortunately not offered by the DAW itself, users need to make use of something like Jbridge (https://jstuff.wordpress.com/jbridge/) to get 32-bit and 64-bit plugins work together, which I'm trying to avoid for as long as possible but is probably going to be inevitable :P I might also research a bit on how something like this can be implemented, I know that some other VSTs (such as the old SFZ plugin from Cakewalk, and a recent bassmidi implementation, do listen to these MIDI commands and use them to control things like attack/release/filter etc, but I don't know how Fluidsynth handles all this. Maybe I can take a look at how the bassmidi library does it and see whether there's something equivalent for Fluidsynth.. I'll let you know when I find something! Fluidsynth v2 looks promising with all the new stuff that's gonna be in it, it could very well be that the functionality I requested is something that's coming in FS2 (support for default modulators maybe). |
I might've found something, not sure if relevant: https://musescore.org/en/user/527826/blog/2016/05/23/volume-fluidsynth EDIT: According to something from 2016 it seems that filters are unsupported: https://lists.gnu.org/archive/html/fluid-dev/2016-03/msg00013.html |
that's a downer. the release notes for Fluidsynth 2 showed something interesting:
so, their continuous integration system builds 32-bit fluidsynth.dlls and includes some 32-bit libraries. sadly: I see that libsndfile and friends are absent, so those builds don't have support for SF3 soundfonts. but maybe by reading the build log I can work out how they setup their Windows build environment, then consider doing my own build with libsndfile and friends enabled (the hard part would be finding or building zero-dependency 32-bit versions of all those dlls [libsndfile-1.dll, libogg-0.dll, libvorbis-0.dll, libvorbisenc-2.dll, libFLAC-8.dll]) |
Well it's something, haha. I must say that I personally haven't ever used SF3 soundfonts, most of what is out there is SF2. It seems that the main difference is support for sample compression compared to SF2 soundfonts: https://musescore.org/en/node/151611 |
This whole thread seems to be about the envelope thing I mentioned, for controlling attack/release: https://lists.nongnu.org/archive/html/fluid-dev/2018-04/msg00025.html EDIT: according to this it seems that they haven't implemented these messages yet, which is unfortunate: https://lists.nongnu.org/archive/html/fluid-dev/2018-04/msg00035.html Though according to this it seems to be possible to implement this: https://lists.nongnu.org/archive/html/fluid-dev/2018-04/msg00037.html Corresponding pull request: FluidSynth/fluidsynth#164 |
okay, so every voice has generators for certain aspects (for example an attentuation generator). and each generator is influenced by a set of modulators. Soundfont 2.1 generators are defined here (don't know whether that implies that all are hooked up to implementations): https://github.com/FluidSynth/fluidsynth/blob/master/src/synth/fluid_gen.c#L27
likewise, but I found that if you want to use soundfonts with a specific license, the only resource that actually shows licenses is MuseScore's list, and that uses SF3 quite a lot. |
okay, so "use the new API for manipulating default modulators". Looks like we'll definitely be needing FluidSynth 2 (which will be annoying for the Windows release, since I don't have the dlls — unless I ditch SF3 support). Maybe something like this? ...
settings = new_fluid_settings();
...
synth = new_fluid_synth(settings);
// Add a Key Pressure to Initial Attenuation modulator
mod = fluid_mod_new();
// modulator's primary source controller and flags
// fluid_mod_src:
// https://github.com/FluidSynth/fluidsynth/blob/master/include/fluidsynth/mod.h#L61
// fluid_mod_flags:
// https://github.com/FluidSynth/fluidsynth/blob/master/include/fluidsynth/mod.h#L41
// diagrams showing what negative and concave mean:
// https://musescore.org/en/user/527826/blog/2016/05/23/volume-fluidsynth
// fluid_gen_type:
// https://github.com/FluidSynth/fluidsynth/blob/master/include/fluidsynth/gen.h#L36
// https://github.com/FluidSynth/fluidsynth/blob/master/src/synth/fluid_gen.c#L27
fluid_mod_set_source1(mod,
FLUID_MOD_KEYPRESSURE,
FLUID_MOD_CC |
FLUID_MOD_NEGATIVE |
FLUID_MOD_UNIPOLAR |
FLUID_MOD_CONCAVE);
// modulator's secondary source controller and flags
// MIDI CC 74
fluid_mod_set_source2(mod, 74, FLUID_MOD_CC);
// generator for filter cutoff
fluid_mod_set_dest(mod, GEN_FILTERFC);
fluid_mod_set_amount(mod, 13500.0f);
fluid_synth_add_default_mod(synth, mod, FLUID_SYNTH_ADD);
adriver = new_fluid_audio_driver(settings, synth);
... There's a lot of guesses here. GEN_FILTERFC's min, max and def are all different to GEN_ATTENUATION's (which was the example provided). static const fluid_gen_info_t fluid_gen_info[] = {
/* number/name init scale min max def */
{ GEN_FILTERFC, 1, 2, 1500.0f, 13500.0f, 13500.0f },
{ GEN_ATTENUATION, 1, 1, 0.0f, 1440.0f, 0.0f }, Their example was a Any thoughts on what I should set it to? What should a modulated filter cutoff sound like? How do I test this? Is there a MIDI file you can give me? Or better: you could get the FL Studio 20 trial and save out a project. |
I may be able to test it with my M-Audio Keystation 49 II, but I |
I've had a crack at updating to FluidSynth 2 on macOS, but it seems broken; no sound comes out. Even if I run directly (i.e. not using the VST). Edit: they fixed it. FluidSynth 2 working on macOS. now I can do things like try out default modulators. |
I suppose I can make a couple of MIDI test files for you. As far as I know the modulation is relative, meaning that for certain instruments in soundfonts it may have no effect at all. I'll put something together in an hour or so and attach it here, along with a link to a soundfont/instrument from which I know it should respond to the modulators. |
So here are four midi files, all essentially doing the same thing: playing a note every bar, for 8 bars, starting at level 0 for the specified modulator, and ending at level 127 just before the final note strikes, while increasing in a smooth linear fashion inbetween. For the one demonstrating the release time, the notes are shortened to 1/16th notes, but still played at 1 bar interval, to be able to hear the longer release time. I've tested this on Virtual Midi Synth, which can be configured as default MIDI device on Windows, and you can hear the difference there given the right soundfont. But indeed you can also just import the MIDI in any DAW, or just play it back somehow, and the CC data should be there. I tried to find a small soundfont that showed the difference clearly, and found this one, which I used for creating the midi clips: ChoriumRevA. While the piano worked fine for hearing the difference, I recommend using an instrument with more sustain to it, such as strings/flute/etc. I found that the "synth brass 1" instrument works decently for demonstration. I used that bassmidi VST I linked earlier as a representative implementation for creating the clips, you could also compare with that one to see whether it works as intended, which might be handier than me describing what should happen, but I'll do that anyway (for the midi clips):
EDIT: I didn't read that last bit about Fruity Loops. I think you can import MIDI files in that though, just let me know if you run into issues with that and I'll try to make a FL Studio 20 arrangement for you. |
Thanks very much for the test files! I'll have a play. Though, my long holiday ends about now, so progress will be slower from here on out. |
No problem, thanks again for the Windows VST, I'll keep an eye on this! |
Can't wait to use 2.3.0! Genuine thanks for your hard work. Can't wait to play around with it with the windows release |
@KJinx101 thanks for the support. I've now released for Windows: https://github.com/Birch-san/juicysfplugin/releases/tag/2.3.1.win Please tell me whether it works for you.
@Archer6621 all of these are now finished. could you tell me whether it's all working for you (in particular the 32-bit release)? |
Works flawlessly! Mod/Pitch work perfectly with hardware, ASDR is doing exactly what I need and cut-res will definitely be useful! (I can see myself automating cut with the scroll wheel for automating brightness/expressiveness). This is 100% what I was looking for. No real bugs or anything when using it. (Using 64 bit btw) Something you may want to know but isn't necessarily much of a problem, (happened 2x) if you leave the plug in up/unattended for 30 mins or more and interact with it right upon waking up the computer, it may crash FL. Maybe Juce or Fluid has some usage timer or something built in? FL? Either way not a big problem tho. Genuine thanks for your work! 🙏🙏 |
:) glad to hear it's working for you. At some point I need to try making some music with it myself. Thanks for the bug report. I've opened an issue regarding the wake-from-sleep problem (#10) and have documented my initial thoughts on what the cause might be. |
Closing since my own testing indicates that juicysfplugin works on Windows x86 and x64. the various other feature requests in this issue were implemented also. any bugs that are found can be considered separate issues. |
As the title says, just wondering.
I've been looking for a working soundfont playing VST for a while now, and it seems that anything out there is either flawed in following the soundfont specification (the "fake" soundfont players), broken, or very outdated.
The text was updated successfully, but these errors were encountered: