Midi implementation had incorrect value constraints for the following fields of PianoLayer:
hammer_noise_level (spec said 62-66)
tone_character (spec said 59-69)
Using a physical keyboard, generate RDS files with the max/min/other values for these parameters and diff them. Once the value ranges (and meanings) are well understood, update the field comments in the PianoLayer struct, and constrain these values in to_bytes() and from_bytes() similarly to other fields.
Part 2
The PianoLayer has a field called tone_number which I believe should match the equivalent field in ToneLayer. Confirm this using a physical keyboard and then contain the values appropriately when reading & writing PianoLayer.
Note: It should probably only be constrained on PianoLayer if an applicable tone is selected in the ToneLayer, as the PianoLayer values still exist but are not used if the ToneLayer has a non-Piano tone selected.
The "special" piano sounds are at the start of the Tone List, and use MSB=114 (no other tones use this MSB)
On the RD300NX that is tone numbers 1-3, but on the RD700NX it is tone numbers 1-9
This matches with the Midi Implementation spec which says the possible raw values for PianoLayer.tone_number are 0-8 (representing tone numbers 1 to 9)
If the InternalLayer.tone_number value is in the range of these "special" piano sounds (ie. 1-3 for the 300NX), then PianoLayer.tone_number must also match this (important for https://github.com/davidlang42/roland-rds/issues/18)
Part 1
Midi implementation had incorrect value constraints for the following fields of PianoLayer:
Using a physical keyboard, generate RDS files with the max/min/other values for these parameters and diff them. Once the value ranges (and meanings) are well understood, update the field comments in the PianoLayer struct, and constrain these values in to_bytes() and from_bytes() similarly to other fields.
Part 2
The PianoLayer has a field called tone_number which I believe should match the equivalent field in ToneLayer. Confirm this using a physical keyboard and then contain the values appropriately when reading & writing PianoLayer. Note: It should probably only be constrained on PianoLayer if an applicable tone is selected in the ToneLayer, as the PianoLayer values still exist but are not used if the ToneLayer has a non-Piano tone selected.