-
Notifications
You must be signed in to change notification settings - Fork 258
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
Support stereo fx send to LADSPA #1170
Conversation
Kudos, SonarCloud Quality Gate passed! |
@mawe42 In case you have some time these days, could you perhaps have a look at these changes and the related discussion? I'm struggling a bit whether this is useful in general as this is open for over a year now and no comments or feedback have arrived. |
Sure! No time at the moment , but I will look at it early January. |
So far I've only looked at the motivation behind this change and the diff, so I haven't tried it out yet. But from what I can see, this looks like a valuable change. And I'm leaning towards having the stereo fx send always enabled, without config option or compile-time switch. But that would either require three fx sends (mono, left, right), or we would need to change the multi-channel audio drivers as well. For example, the jack driver only supports one reverb and chorus channel at the moment. If we would take the change as-is and always define Not sure what it would mean in terms of performance, but it might be easiest to go for three sends (mono, left + right). Expose all via the LADSPA interface (which would also remove any backwards incompatibilities) and later extend the multichannel audio drivers to also expose the left + right sends. |
Thanks Marcus! I think the jack driver is the only one to handle effects channels, i.e. dsound, wasapi and waveout only handle dry channels currently. So changing jack driver to expose the left and right fx channels should be straight forward. The only benefit for an additional mono channel I see would be to retain backward compatibility in LADSPA, for e.g. |
I think the mono channels would also be required for the internal effects. Currently the sends for the internal reverb and chorus effects only consider Instead of a mono send, we could also sum the left and right sends together before handing them to the internal effects. But do we might run into phase problems here. Hm... more thinking required :-) |
Coming back to this... maybe a way forward would be to upgrade the internal effects to stereo? It would change the "sound" of FluidSynth, but probably for the better. And I wouldn't be too concerned about performance, as computing power even on embedded devices has increased quite a lot since FluidSynth was first written. If we are concerned about performance, we could leave the complile-time switch in but make it default to stereo fx. What do you think? |
Those who are really concerned about performance would disable reverb and chorus anyway. I'm all in favor to upgrade internal fx to stereo. If you've got some time to spare, that would be great :) |
Ok, I'll try to tackle this over the next few weeks. |
But maybe some input from @mrbumpy409 and @jjceresa would be good before I start moving the internal effects to stereo. From what I've read so far, using a stereo reverb instead of mono would quite drastically alter the sound of FluidSynth. Stereo reverbs seem to give more of a "physical room" effect while mono reverbs contribute more of a "sound depth" instead. Having mono reverb (and chrous?) might actually be much better for the default effects of FluidSynth. Maybe the better way forward would be to expose stereo fx sends via LADSPA and jack, but sum the stereo sends before feeding them into our internal effects? |
After more reading on stereo vs. mono reverbs, it seems to me that summing the two fx sends would be the better solution here. Otherwise we might have to implement a completely new reverb effect that takes the stereo fields into account. And that would definitely be much more work than I can handle at the moment. But I'll wait for other opinions before going any further. |
#1157 seems to be closely related to this PR. |
The Lexicon like reverb that I was also planning to implement as part of the linked ticket is just a mono reverb as well (but it reads from stereo input). So the summing option you've suggested sounds fine to me. |
Yes, as actually, internal effects (reverb and chorus) are able to produce true stereo output from mono input . This is due to multiple delays lines presence in those effects from which it is quite easy to pick internal multiple signal to produce multiple output (i.e stereo) out of phase. So, I think it is sufficient to keep mono input for this kind of internal effects. For LADSPA unit input, it is better to expose stereo input. Indeed, as we cannot predict the internal capabilities of the LADSPA loaded effect, it is good for this effect not to be constrained only by mono input. |
Here are my 2 cents on this. I've been working on a soundfont, and in the process of testing it with various tracks, I've noticed, that FluidSynth's current chorus implementation nearly completely neuters most panning effects used in the tracks. It makes tracks sound less dynamic and requires some programs to be made louder, to make them stand out more without the benefit of being panned away from programs on other channels. So, I think chorus should be fully stereo, to allow tracks to take full advantage of panning effects. |
I am closing this now because apparently none of us has time to look into this. If someone is willing to make this ready, I'd happily reopen this again. |
For details, see #1161
Open questions:
#define
/ CMake option?