jkotlinski / lsdpack

Standalone LSDj recorder+player
GNU General Public License v2.0
116 stars 18 forks source link

generated .gbs files sound incorrect #20

Closed cyberic99 closed 3 years ago

cyberic99 commented 3 years ago

Hi,

I tried to generate .gbs files from some of our songs.

Some of them sound more or less different than the song played in lsdj.

For instance, here is a .sav file with a short intro on noise channel.

noise_opt.zip

If I comment all rules in writer.cpp::optimize_music_stream(), the .gbs sounds right (noise_ok.gbs)

but with optimizations, it sound incorrect (noise_nok.gbs).

Both .gbs files and the .sav are in the zip.

I tested it with lsdj 4.7.3

Thank you!

jkotlinski commented 3 years ago

Could it be a player issue? When I generate a .gb file and play it back, it sounds OK on my DMG.

cyberic99 commented 3 years ago

OK I'll try to do that

I thought that generating a .gbs was easier to do and to test.

can you confirm that registers optimisations are done also when generating .gb files ?

cyberic99 commented 3 years ago

maybe it is a specific .gbs issue...

For now I reduced the test to the noise channnel, but with rhe wav channel, the result is even worse... but if I disable the optimisations the result is correct

jkotlinski commented 3 years ago

I don’t know. What happens if you use gbs2gb to convert the gbs to gb, then play it on real hardware?

On Thu, 15 Apr 2021 at 23:12, cyberic99 @.***> wrote:

mybe it is a specific .gbs issue...

For now I reduced the test to the noise chaannel, but with rhe wav channel, the result is even worse... but if I disable the optimisations the result is correct

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jkotlinski/lsdpack/issues/20#issuecomment-820734434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY34O6AKXYER3JS2GYMCGDTI5JDBANCNFSM424ESZUQ .

cyberic99 commented 3 years ago

I converted then tested both roms on a GBA. The 'nok' still sounds incorrect, and the 'ok' sounds fine

jkotlinski commented 3 years ago

OK, I think I hear the difference now - I was confused by a bug in Sameboy. It seems enough to comment out optimize_rule(noi_length); ? If you agree, I will push that change.