Lmms: FreeBoy creating noise

Created on 24 Sep 2017  路  15Comments  路  Source: LMMS/lmms

I was going to post a bug report when I found that it might be related to this issue:
Version 1.1.3 (Ubuntu @17.04)
Also with the newest build from master.

When changing notes, FreeBoy often emits a noise, even though all channels except for Channel 2 are muted.

noise

The picture above shows, how it should look like (approx.) and how it looks by lmms.
(The upper picture was taken with gbsplay by playing the "nearly" same file, with all other tracks muted as well.)

I don't know if this is intended, but not hearing this with VLC which also uses Game Music Emu (granted, I can't mute the other channels so I can't be 100% sure), I guess this is an issue.

EDIT: Also tested by using pasuspender and switching to alsa.

The following is the same wave as above, rendered with the current version of lmms creates even more noise.
I've noticed even a small noise is audible when releasing a note.
(37f6032b4da23b712f4fbc76e930936c08986493)

image

bug upstream

All 15 comments

I believe its because channel 2 is FOR adding noise, so channel 2 simply ned to be muted, if noise is unwanted

Channel 4 is for noise.

I've also experimented a bit, by disabling the setting of the bass.
(Uncommenting the line that uses the bass_freq function of the library)
It seems like the waves start with a lower potential than they should,
then they get compensated towards the center. Then when a new wave starts, it interferes with the old wave, instead of replacing it.

This issue could be from upstream. We recently updated the source to fix a long standing noise issue.

I don't know if this is intended, but not hearing this with VLC which also uses Game Music Emu (granted, I can't mute the other channels so I can't be 100% sure), I guess this is an issue.

We probably use different versions of GBE.

It looks like we're missing an initialization here. According to this, channel 3 volume could be acting up a bit but I don't see any of that. Another problem could be that the registers in general gets the wrong positions because they are moved into place by a shift maneuver. In which case the bug is ours. I'll try and poke that code a bit...

No. That was sweep oriented and channel 3 has none of that so it's good.

I don't know if this is intended, but not hearing this with VLC which also uses Game Music Emu (granted, I can't mute the other channels so I can't be 100% sure), I guess this is an issue.

Do you think you could find out what version of Game Music Emu VLC is using?
Can you upload a zipped mmp project file that demonstrates the issue?

Do you think you could find out what version oof Game Music Emu VLC is using?

0.6.0 according to their master branch. Which version do we ship with?

https://github.com/videolan/vlc/blob/master/contrib/src/gme/rules.mak#L3

Which version do we ship with?

0.6.1 : https://github.com/LMMS/lmms/pull/3618

I can provide a project file.
However this issue is easily reproducible.
It occurs on every note change, when another note is still audible.
Instead of simply terminating the old sample it plays on for a while, then it interferes with the new sample.

Let's assume we play a C. The C wave is generated, now we switch from C to D, the D wave is generated, but instead of simply stopping the C wave before the D wave is played, both start to overlap for a small period of time generating noise.

It occurs on Windows as well as on Linux. I think the NES plugin has this issue as well.

Here is an example project:
https://puu.sh/yg81f/1497dbc1e9.mmpz

freeboyglitchcompare

Here is the project above in a comparison between 1.1.3 and 1.2.0-RC4. It's been greatly improved by the update to 0.6.1 but there's still glitches in there. I think this has a high probability of being an issue in game-music-emu aka upstream.

One of the noise shots up close. The wave is shifted down for ~770 samples. It's shifted down about the same level the whole wave would need to be shifted up in order to have no DC component.
freeboyglitchlevelorig

Faulty part nudged upward.
freeboyglitchlevel

Edit: What happens here is that the waves are displaced and when they overlap that displacement is added up.

@karmux Game Music Emu 0.6.2 has been released. Do you think you could look into updating FreeBoy again?

It's a submodule now, since #3946.

So it needs testing in master.

Was this page helpful?
0 / 5 - 0 ratings