When a channel is unmuted, the driver refrains from using it until a note is next played. The reason is that FX might write to the channel while NRxy still contain leftover values, but not the song's; this would produce corrupt sounds. When a note is played, all NRxy registers are initialised, avoiding the issue.
However, the current condition is wrong: all registers may not be written if a note is played, only if an instrument is specified on that cell as well.
This would require moving the AllowedChannels write inside of the "instrument writes" block. Preferably early, as e (the channel mask) eventually gets overwritten from register pressure.
When a channel is unmuted, the driver refrains from using it until a note is next played. The reason is that FX might write to the channel while NRxy still contain leftover values, but not the song's; this would produce corrupt sounds. When a note is played, all NRxy registers are initialised, avoiding the issue.
However, the current condition is wrong: all registers may not be written if a note is played, only if an instrument is specified on that cell as well.
https://github.com/ISSOtm/fortISSimO/blob/91287deb393ff70f75d6ff93a9d8f2d33e82852f/fortISSimO.asm#L530-L541
https://github.com/ISSOtm/fortISSimO/blob/91287deb393ff70f75d6ff93a9d8f2d33e82852f/fortISSimO.asm#L629-L637
https://github.com/ISSOtm/fortISSimO/blob/91287deb393ff70f75d6ff93a9d8f2d33e82852f/fortISSimO.asm#L715-L723
This would require moving the
AllowedChannels
write inside of the "instrument writes" block. Preferably early, ase
(the channel mask) eventually gets overwritten from register pressure.