DhrBaksteen / ArduinoOPL2

Arduino library for use with the OPL2 board (YM3812) and OPL3Duo (YMF262)
MIT License
195 stars 39 forks source link

Update mask used in setWaveForm / getWaveForm to preserve 3rd bit for opl3 #72

Closed isnotinvain closed 3 years ago

isnotinvain commented 3 years ago

Was trying to figure out why my waveforms didn't sound right, then found this. Note that setInstrumet uses the right mask, which is why loading presets / whole instruments works fine.

Far as I can tell it's fine to have this extra 3rd bit around even on an opl2 (though it won't be respected) -- since setInstrument does that already.

I updated setDrumInstrument as well, but I've not read up on the details for drums yet so let me know if I should remove that one.