Where am I going wrong in interpreting this MIDI string?
I have been making some basic MIDI files (based on one created by an app) and they are not behaving exactly as I expected. Take the following string:
00 90 36 50 00 39 50 00 3B 50 00 3E 50 9F 7F B0 7B 00
I understand this as follows:
00 90 - at delta time 0, note on (channel 1):
... 36 50 - note 36, velocity 50
... 00 39 50 - at delta time 0, note 39, velocity 50
... 00 3B 50 - at delta time 0, note 3B, velocity 50
... 00 3E 50 - at delta time 0, note 3E, velocity 50
So it seems as though the 'note on' command opens a sort of bracket and does not need to be repeated for each note.
9F 7F B0 7B 00 (at delta time 9F 7F, all notes off).
When the file contains this string, the notes do not sound. If the note off command is replaced by separate note on commands for each individual note, with the velocity set to zero, the notes do sound and do end - but this means twice as much manual editing down the line, so I want to use the 'all off' approach.
I think I must be misunderstanding something so any pointers would be welcome!
Thanks
1 Comments
Sorted by latest first Latest Oldest Best
The Standard MIDI-File Format Spec. 1.1 says about repeated status bytes:
Running status is used:
status bytes of MIDI channel messages may be omitted if the preceding
event is a MIDI channel message with the same status. The first event
in each MTrk chunk must specify status. Delta-time is not
considered an event itself: it is an integral part of the syntax for
an MTrk event. Notice that running status occurs across delta-times.
The MIDI 1.0 Detailed Specification says:
[controller] Messages 123 through 127 also function as All Notes Off messages. They will turn off all voices
controlled by the assigned Basic Channel. These messages should not be sent periodically, but only for a
specific purpose. In no case should they be used in lieu of Note Off commands to turn off notes which
have been previously turned on. Any All Notes Off command (123-127) may by ignored by a receiver
with no possibility of notes staying on, since any Note On command must have a corresponding specific
Note Off command.
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.