LMMS / LMMS/lmms

Signal Offset in Freeboy causing Clicks and Clipping

Open
#6,556 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.