chip-player-js
chip-player-js copied to clipboard
Volume control for external MIDI devices
Why not allow the Chip Player JS volume control to adjust the volume of Web MIDI devices? Even though devices have hardware volume controls, it can be a pain if you have multiple devices.
One of the following methods should work:
-
Sysex master volume
0xF0 0x7F 0xid 0x04 0x01 0xmm 0xnn 0xF7
(ignoring this if it appears in songs) - Multiply all channel volume events (CC 7) by master volume level
- (worst case) Multiply all note velocities by master volume level
This is complicated by MIDI statefulness, but it doesn't have to be perfect. Consider restarting songs acceptable.