lmms icon indicating copy to clipboard operation
lmms copied to clipboard

metronome lag

Open SalutanisOrkonus opened this issue 1 year ago • 6 comments

Bug Summary

Relatively recently it feels like, the metronome seems to frequently cause the program to lag even in an almost empty project, which makes it very hard to use and work with for, say for example, getting the bpm right for drum loops

Steps to reproduce

Turn on metronome

Expected behavior

it's fine

Actual behavior

it weirdly lags sometimes (not as in the metronome is sometimes off beat, it makes the program itself stutter and/or lag for a split moment)

Affected LMMS versions

1.3.0-alpha.1.430+g999c10e4b

SalutanisOrkonus avatar Oct 09 '23 20:10 SalutanisOrkonus

I don't know if it's related, but the metronome also has an extreme sidechain effect on the tracks. The whole song silences when it plays. Maybe this is intentional though.

mirk0dex avatar Dec 16 '23 20:12 mirk0dex

The file 6932-MetronomeProblem.zip demonstrates the problem as described by @mirk0dex. It's a project with one 3OSC instance that plays a low sine note. You can clearly hear clicks when the metronome is active. The clicks disappear when the metronome is inactive.

Is this what you wanted to describe @SalutanisOrkonus?

The clicks are also present if the content of the files metronome01.ogg and metronome02.ogg are replaced with pure silence. This indicates that the master stream is indeed replaced with the metronome sound. IMO the metronome should not duck anything but it should just be mixed with the stream of the master channel.

I haven't found the code which introduces the silencing whenever the metronome is playing. The journey seems to start in AudioEngine::handleMetronome though where SamplePlayHandles for the metronome clicks are added.

IMHO the AudioEngine is not a fitting place for the metronome functionality. The AudioEngine should be used by something which provides the metronome functionality, either directly or even with some more layers in between.

michaelgregorius avatar Dec 20 '23 14:12 michaelgregorius

No, I was referring to the program in general lagging on a bunch of metronome clicks always, but it seems that doesn't actually happen all the time anymore? still definitely happens in this project I'm trying my hand at making DnB in though

SalutanisOrkonus avatar Dec 20 '23 17:12 SalutanisOrkonus

What tempo does your song have @SalutanisOrkonus? I wonder if you problem is releated to #4038 (although I cannot reproduce the problem reported there on my machine).

michaelgregorius avatar Dec 21 '23 14:12 michaelgregorius

Just 155

SalutanisOrkonus avatar Dec 21 '23 18:12 SalutanisOrkonus

I cannot reproduce the sidechain effect that was referenced in https://github.com/LMMS/lmms/issues/6932#issuecomment-1858919293 and https://github.com/LMMS/lmms/issues/6932#issuecomment-1864526644 anymore.

Can you still reproduce the original problem @SalutanisOrkonus? Perhaps it has been fixed in the meantime as well.

michaelgregorius avatar Apr 29 '24 20:04 michaelgregorius