Signal Offset in Freeboy causing Clicks and Clipping
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
### Bug Summary
A signal offset is causing clicking on note start/end and sometimes even Clipping, when too many notes are playing at once. If you set bass to something greater than 0, the offset gets filtered out after the first few sample, causing the clicks to only appear at note start.
I believe this has to do with how gameboy audio worked - it was strictly subtractive instead of having a signal center. This also causes clicking when turning a gameboy on or off, which is what I assume LMMS is doing every time a note starts and ends. Treble and Bass filtering isn't possible on gameboy hardware, so I assume that's post processing being done by LMMS.
#### Steps to reproduce
play some notes inside freeboy with all channels disabled
#### Expected behavior
No sound output
#### Actual behavior
Clicking on note start, caused by the offset
#### Woraround
By playing the exact same notes on a second freeboy instance with the same bass setting with all instruments disabled and the signal inverted via the stereo matrix effect, the clicking and offset are mostly cancelled out.
#### Affected LMMS versions
At least master and 1.2.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Freeboy's audio output path and trace how the signal offset is applied when notes start and end, including the bass setting and simultaneous notes. Reproduce the issue with all channels disabled, then verify that note transitions no longer click or clip and that the expected silent output remains silent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100