mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 19 forks source link

Clean up and fix MIDI note calculation #99

Closed TpmKranz closed 1 year ago

TpmKranz commented 1 year ago

When I noticed that the note display was off for A, A♯, and B, I tried to fix it and fell into the rabbit hole of that calculation macro, which literally contained MAGIC. 😄 Since the {,alt}midi plugouts also produced tracks where the wave channel was an octave too high, I reduced that as well and only afterwards found that the other channels were right before. So now the calculation also takes the channel into account.

Let me know if there are still things left unclear.

I'd also like to tackle the noise channel in the near future, since I think it should be possible to map it to percussion events, but for this I'll need to do a little more research.

ranma commented 1 year ago

Thanks!