KungFuFurby / AddMusicKFF

Fork of AddMusicK, a compiler/inserter of music for Super Mario World
23 stars 16 forks source link

Remote commands don't work with legato #382

Open kkevinm opened 1 year ago

kkevinm commented 1 year ago

Remote command types 2 and 3 don't trigger if legato is active in the channels (1 and 4 work fine). For example:

#amk 2

(!900)[v255]
(!901)[v0]

#0
@0 (!900,-1) (!901,1,$30) $f4$01 / c2

#1
@0 (!900,-1) (!901,2,$30) $f4$01 / c2

#2
@0 (!900,-1) (!901,3) $f4$01 / c4 r4

Here the volume changes midnote only in channel #0. Notably in case of command type 3 the note doesn't key off at the rest as expected, but the remote command isn't triggered.

KungFuFurby commented 1 year ago

That sounds like a failure to detect the end of the note in readahead due to legato terminating the check early for whatever reason.

If I fix this, it's a hot patch case for playback consistency reasons. The last thing I need is to accidentally break more songs when fixing these kind of cases up, as I was initially notified that I was breaking songs by mistake I think while I was enchanting readahead if I recall correctly.