electronoora / webaudio-mod-player

MOD/S3M/XM module player for Web Audio
https://mod.haxor.fi/
MIT License
364 stars 54 forks source link

Lotus3 mod #3

Closed patuwwy closed 9 years ago

patuwwy commented 9 years ago

When playing module from LOTUS3 game, module quiality drops at ~0:50 mod: http://patrykfalba.eu/entries/lotus3/music/l3_cd3_lotus3.mod

player: http://patrykfalba.eu/entries/lotus3/ (with added analyser in player)

Module is playing ok in winamp.

patuwwy commented 9 years ago

The problem is caused by E0x effect in song. As suggested by the author, I disabled setting filter in effect_t0_e0 function.

Thanks

sagamusix commented 7 years ago

The effect_t0_e0 implementation is actually wrong, E0x enables the LED filter if x is even and disables it if x is odd. In particular, E00 enables the filter and E01 disables it. If implemented correctly, the Lotus music plays correctly.

electronoora commented 7 years ago

Changed the Protracker E0x effect to only look at the least significant bit of the parameter.

sagamusix commented 7 years ago

Looking at the code, it's still not quite correct: The filter should be disabled if the bit is set. Also, the " // look ahead at very first row to see if filter gets enabled" (line 280) needs to be updated accordingly.

electronoora commented 7 years ago

Ah, damnit. Ok, should be fixed now.

https://mod.haxor.fi/Patrick_Phelan/l3_cd3_lotus3.mod