LFOs getting out of sync!
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
### System Information
Ubuntu 24.04
### LMMS Version(s)
1.3.0-alpha.1.627
### Most Recent Working Version
All nightlies with tempo sync function
### Bug Summary
There is an option for syncing LFOs to the tempo of the song. What it does is actually to calculate an approximate value for the LFO and put it in the frequency knob so it completes a period every 1 or 2 beats let's say. This approach however sometimes leads in cases where the value of the LFO frequency doesn't match the BPM of the song thus getting out of sync after a while.
### Expected Behaviour
The LFO to stay in sync with the global tempo
### Steps To Reproduce
In order to test this you can try using a saw-wave as sidechain for a volume knob. I personally tried with the tempo set to 128 BPM and for the frequency to be synced every quarter of a bar. After like 24 bars it started drifting. The more time i gave it the more it lost synchronization with the tempo.
What i would suggest is for the LFO to somehow get triggered to reset itself every 4 or 8 bars so the effects of this approach get minimized. Solving this issue would give LMMS a really strong LFO tool that could be used to sidechain various parameters with complete control just like tools like (if i'm not mistaken) XFer's LFO Tool and Image-Line's Gross beat all in sync with the global tempo.
I ran a test in which i sidechained a sinewave and added a Click every beat so difference can be seen. The first picture is the beginning. The second is the end after 6 minutes:
### Screenshots


Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named. Reproduce on Ubuntu 24.04 with LMMS 1.3.0-alpha.1.627 using a tempo-synced LFO as a sidechain at 128 BPM, then inspect the LFO timing path; done means the LFO remains aligned with the global tempo over many bars.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100