Msx Music playback artifacts

By snake

Resident (58)

snake's picture

16-01-2022, 16:28

How did you manage to avoid these annoying audio artifacts you can hear when you play consecutive notes at short distance in the same channel?

Before to play the new note i always have to disable the channel by setting to zero the corresponing register 32-40 (20$-28$), otherwise the new note won't play. The shutdown is always abrupt if the sustain of the old note is still high.

You can reproduce these artifacts through Moonblaster: set a piano track, insert consecutive notes on this track, and play them fast.

Login or register to post comments

By Grauw

Ascended (10558)

Grauw's picture

16-01-2022, 16:35

Hey snake, when you say “setting to zero the corresponing register 32-40 (20$-28$)”, do you mean you set the entire register to zero?

You should only set the key-on bit (bit 4) to zero. The rest if the bits should stay the same as before, otherwise you will hear an abrupt change in pitch as well.

Of course a single channel can only play one sound, so if you play a new note it will abort the currently playing tone. It will apply a short “dump” envelope phase to silence the previous tone, in order to make this more smooth and prevent audible clicks etc.

By snake

Resident (58)

snake's picture

22-01-2022, 01:16

Thanks fot help.
I attempted to change only the bit 4, but there isn't any difference.
I did some experiment with Moonblaster, there are instruments as harpsichord and acoustic bass that aren't affected, but with flute you can hear a bump at every note change (try to write a note every 2 positions and play with 19 tempo). I think it's somehow related to envelope sudden variations.
The only workaround i found is to use more than 1 channel for the same instrument; when you play a new note, you silence the last used channel ("OFF" code of Moonblaster) and, at the same time, you play the new note on another channel (now flute is ok).