A MIDI event that carries the MIDI master volume message tells a MIDI device to set its master volume to a certain level.
The MIDI master volume message is a universal real time system exclusive message (a system exclusive message to which all MIDI devices should consider responding and should do so immediately). System exclusive messages belong to the category of MIDI system common messages.
The MIDI master volume message has the following format.
0xF0 0x7F 0xid 0x04 0x01 0xmm 0xnn 0xF7
0xF0 is the message status byte and shows that this is a system exclusive message. 0x7F shows that this is a universal real time system exclusive message (a message to which all device should consider responding and should do so immediately). 0xid is the system exclusive channel, usually the manufacturer ID, but could be anywhere from 0x00 to 0x7F (from 0 to 127), where 0x7F prompts all devices to respond. 0x04 and 0x01 are the sub IDs of the universal system exclusive message and show that this is a master volume system exclusive message (0x04 shows that this is a device control message and 0x01 shows that this is a master volume message). 0xmm and 0xnn together form a 14-bit volume value. 0xmm carries the low 7 bits and 0xnn carries the high 7 bits of the 14-bit value. Hence, the volume is between 0x0000 and 0x3FFF, where usually 0x0000 is zero, 0x3FFF is maximum, and 0x1FFF is the middle. 0xF7 signifies the end of the system exclusive message.
The following is an example of a MIDI master volume message.
0xF0 0x7F 0x7F 0x04 0x01 0x7F 0x3F 0xF7
0xF0 shows that this is a system exclusive message. 0x7F shows that this is a universal real time system exclusive message. The next 0x7F shows that all devices should respond to this message. 0x04 shows that this is a device control message. 0x01 shows that this is a master volume message. 0x7F and 0x3F have the binary representation 01111111 and 00111111 and so form the 14-bit value 1111111111111, which is 0x1FFF. 0xF7 is the end of the system exclusive message. Thus, this is a master volume message that tells the device to set its master volume to 0x1FFF (usually the middle).
The volume of MIDI devices can also be adjusted with MIDI controller messages. If the device has more than one sound module, however, controller messages will only adjust the volume of individual modules. Master volume messages will adjust the master volume.
Musical Instrument Digital Interface (MIDI)