LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
7.83k stars 988 forks source link

Feedback loop protection - could it be optional? #1232

Open unfa opened 9 years ago

unfa commented 9 years ago

Hey, I really like the new shiny mixer that allows me to do submixes and compress the drum group together while having the great control over individual elements, or the possibility to use send effects for easy, quick and efficient mixing. It's totally awesome!! Plus it's made to protect clumsy users from blowing their eardrums with a feedback loop.

However...

The LMMS-savvy guys might want to be able to create a feedback loop.

This way we could construct some totally freaking-out sound effects. It's starting to look like a modular synthesis environment, just the elements are in racks, not on a desk, but all the wires are there!

I'd like to be able to disable the feedback loop protection just for me, because I want to have fun, yes I understand the risk (trust me, I'm an engineer!).

I propose adding a "[x] FX-mixer feedback loop protection" checkbox in the options window in the "Misc" panel. On by default.

Possible issues are projects that contain mixer feedback loops, that are being loaded by users who have the protection on. I propose pausing the loading and displaying a dialog window in such case:

Title: Warning!

Message: This project contains one or multiple FX-mixer infinite loops. By default LMMS wouldn't let this to be done. Feedback loops might create extremely loud sounds and are prone to get out of control. You can proceed on your own risk - the protection will be disabled only for this session, unless you want to turn it off permanently: Checkbox: [ ] Disable FX-mixer feedback loop protection (see also: Edit > Settings > General > Misc > FX-mixer feedback loop protection)

Buttons: [ Proceed ] [ Cancel ]

diizy commented 9 years ago

On 10/22/2014 08:26 PM, unfa wrote:

Hey, I really like the new shiny mixer that allows me to do submixes and compress the drum group together while having the great control over individual elements, or the possibility to use send effects for easy, quick and efficient mixing. It's totally awesome!! Plus it's made to protect clumsy users from blowing their eardrums with a feedback loop.

However...

The LMMS-savvy guys might want to be able to create a feedback loop.

We process all audio in periods. A period is usually between 256 and 1024 frames, sometimes more, it's configurable in preferences (mislabeled as "buffer size").

For example: Say you have Master plus 3 channels. You route the channels: Channel 3 -> Channel 2 -> Master, Channel 1 -> Master. What happens is the channels are processed, each in period-sized chunks. Ideally, 3 and 1 are processed first, then 2 right after 3 is done, and when all 1-3 are done, Master gets processed.

Now if you were to route, say, Channel 2 back to Channel 3, creating a loop, this would require the fed-back signal to be delayed by at least one period, because by the time Channel 2 is processed, Channel 3 is also already processed, and can only accept more audio at the next period.

So basically, the latency in the feedback loop would be entirely dependent on period size. This would not be samplerate-agnostic, because one fixed-size period is different length on different samplerates. This would cause the feedback to be unpredictable and unreliable.

unfa commented 9 years ago

That's a very important technical thing I didn't take into consideration.

IIRC this can be done in Ardour however (actually you can make a feedback loop with JACK routing itself.

On the other hand - feedback loop without any delay (latency) would be like laser - it'd explode immediately leaving no place to play. So latency is good for them, only it'd be nice to have some control over it.

The biggest problem I see is that different samplerates would produce different loop latencies. Possible solutions I see:

  1. Ignore it and let the adventurous users cope with that;
  2. Display a warning message saying that after the user disables the protection;
  3. Calculate and display latency for loops based on current sampling rate and period size.
unfa commented 7 years ago

I've digged into how VallhallaDSP Shimmer works - and the feedback loop think comes back to me, because it can be used creatively.

I've thought that maybe On the mixer, instead of disabling inputs. where feedback would occur - display an excamaition mark, or a small warning sign - but still allow the user to create a feedback loop with a send. This way the user can make a customized delay effect, like having a decimator or distortion, or pitchshifter in the middle, making it's effect more nad more wet each time the signal returns to the loop.

Ardour allows the user to make a feedback lop (but it warns him) - and having this possible gives he user some extra creative freedom.

Maybe a special option in the Preferences could be added to "Allow creating feedback loops". Disabled by default to prevent beginners to blow their eardrums off accidentally?

This option plus small warning signs in the feedback send points would be great IMHO.

unfa commented 7 years ago

(I closed this issue by accident)

Spekular commented 7 years ago

I still think we need a bkt more protection than just a warning sign, even if the user opts out of feedback loop protection. Perhaps a button that must be held in order to listen? Or a limiter applied by default somehow.

Also, it would probably be good to set up a maximum number of loops (either globally or per loop), would it not?

Rossmaxx commented 3 days ago

No one added feedback loop right? There shouldn't be a warning as there's no feedback loop.

terrortoon commented 3 days ago

Nevermind wrong github page...