Birch-san / juicysfplugin

Audio plugin (e.g. VST, AU) to play soundfonts on macOS, Windows, Linux
GNU General Public License v3.0
209 stars 27 forks source link

ADSR Envelope Question #49

Open sound8 opened 1 year ago

sound8 commented 1 year ago

As I mentioned in my other post you are the first person I have ever seen add an ADSR envelope to Fluidsynth. Can you tell me, did you program it yourself, or do they now make these parameters available? In past I read that they rely on programmers to add these features but I just wasn't sure if they actually added this to their software, which in my opinion would be great if they did.

I read another post of someone talking about the envelope release, don't think it is exactly the same thing, but I notice the release can be a little sensitive right away. Some soundfonts I have tested build up a rather powerful resonance very quickly when I add a little release to them. I am rather new to your plugin and have not tested a ton of different soundfonts yet to know if it is more an issue with specific soundfonts. Hard to say at the moment I have been coming across some interesting / oddly create soundfonts :) Not sure if anyone else noticed anything?

Last question, sorry, I have a couple of ideas to share, is this program still planned on being updated further?

Birch-san commented 1 year ago

heyo, I used a FluidSynth 2+ feature, the API they exposed for manipulating default modulators:
https://github.com/FluidSynth/fluidsynth/releases/tag/v2.0.0

I do so here:
https://github.com/Birch-san/juicysfplugin/blob/c95eb5755aab634a22dfa778912facd136590d5c/Source/FluidSynthModel.cpp#L116

the mappings I set (polarities, "amounts") are mostly from me trying a few combinations and picking something that gives me a useful range (i.e. you want some ability to make the release last milliseconds, or seconds, but not minutes). but I remember not really being happy in the end with the config I settled on. I can't remember whether I ended up with any way to make ADSR shorter than default. but I do remember it was a difficult thing to fiddle with.

most of it was built by comparing the SoundFont specification to the FluidSynth source code:
gen.h
gen.c

but found it a bit difficult to wrap my head around measuring time bending in "timecents".

the release can be a little sensitive right away

do you mean more sensitive than the soundfont's default value? I can't remember whether my zeroes correspond to "no change" or to "no time". I think I made zero correspond to "no change", which has the problem of "user can't make the ADSR shorter than default because the slider's already at 0".

is this program still planned on being updated further?

no active plans to do so — every spare hour I've had for the last few months has been going into playing around with machine learning. I expect that to continue.
the development, testing and release process is a bit horrid, especially now that I no longer develop on an x86 processor. so even a one-line change has huge overheads to actually release.

other big factors are that I worked on this for several years but only ever made one song with it. I built it since FL Studio Mac didn't have a soundfont player, but now there's an official one. it doesn't have all the features of juicysfplugin, but as a built-in plugin it has nicer windowing behaviour (external plugins on Mac have an unfixable bug where they remain in front when you switch applications).

build up a rather powerful resonance

hmm, is that what "filter cutoff/resonance" (the other sliders) are supposed to solve?
https://github.com/Birch-san/juicysfplugin/blob/c95eb5755aab634a22dfa778912facd136590d5c/Source/FluidSynthModel.cpp#L104