Introduction

MDR_<two_digits>.EVT is a kind of file that appears in MDR Floppy Disks used in YAMAHA EL Series Electones, along with a MDR_<the_same_two_digits>.B00. The files’ main functionality is to provide automatic Registration shift while you are playing. Also, in songs with XG Support (XGサポート) marking on their scores, the file plays some “background music” using a separate XG-compatible Sound Module (or Tone Generator as YAMAHA calls it) which is included in some models such as my EL-700.

Many famous works created/arranged for Electone, such as 5000 Watt Power, Real in “D”, Star Wars Main Theme, Libertango, has XG Support or an XG-supported version. I believe that some people (apparently including me) will find “background music” imperfect and want to make some modification, so understanding EVT file format is essential if one want to achieve this.

MIDI Implementation on Electone

Like other electronic keyboards, Electone has MIDI ports and can receive/send MIDI messages. If you connect an Electone to a MIDI sequencer with a MIDI cable, you will find that the Notes in Channel 1 play Upper Voice, Notes in Channel 5-14 play XG sound, Notes in Channel 15 play Keyboard Percussion, and most magically, a Program Change in Channel 16 will make your Electone switch Registration Memory!

An EVT file works almost the same way: sending some MIDI messages to your Electone at the correct time, with some exceptions that particular messages will be ignored if received from MIDI port but accepted if received from an EVT file.

It seems that we will meet “MIDI message” quite often. The idea of MIDI message, or MIDI event, is not complicated, as they are just a sequence of bytes (or integers between 0~255, to explain “byte”) being sent between MIDI devices. And the thing they describe is even simpler: a “Note On” message specifies which note is pressed and with what amount of velocity, a “Pitch Wheel” message represents the current position of the Pitch Wheel, etc. Most of the MIDI messages Electone can send/receive are covered in the Appendix of Owner’s Manual.

So What’s Inside an EVT File?

You may have played MIDI files or even made one using a sequencer. The difference between MIDI files and Waveform files (WAV, MP3, FLAC, APE, etc.) is that MIDI files don’t contain exact waveform of the sound. Instead, they carry a bunch of MIDI messages and their timestamps. When playing a MIDI file, MIDI messages are sent to a Sound Module at their corresponding time, and the resultant waveform is generated by the Sound Module. So different model of Sound Module may produce very different sound even for the same MIDI file.

EVT file is also a “MIDI File”: It describes a bunch of MIDI messages/events and their timestamps, so I think its EVT comes from the abbrevation of “event”. But its format is a little bit different from “Standard MIDI Files” (SMF). To learn about SMF, there are many good lecture notes such as here, here and here. Following content assumes you have a basic understanding of how SMF files describe MIDI message sequences.

Acknowledgement: Following information is inferred from Serge’s source code

An EVT file is essentially an SMF Format 0 file except that:

  • The header has a fixed length of 256 bytes and doesn’t seem to contain any useful information for us.
  • There are no “Delta Time” bytes between MIDI messages, instead, there are dedicated message types for Delta Time.
  • Delta Time has a fixed unit: millisecond. That is to say, one tick is always one millisecond in EVT files.
  • Also, there’s no Tempo or Time/Key Signature information in EVT files.
  • In the representation of a SysEx message in SMF file, there is a Variable Length Quantity situated immediately after the first byte F0. The quantity represents the number of bytes behind it, including the tailing F7. This Variable Length Quantity is not sent to MIDI device when playing the file. SysEx messages in EVT files don’t contain the Variable Length Quantity. Instead, they are the same as the messages sent to Electone.
  • It introduces some new message types, including:
    • F3 <byte>: Single byte Delta Time. The Delta Time between the previous event and following events is <byte> milliseconds.
    • F4 <byte1> <byte2>: Double byte Delta Time. The Delta Time is (<byte1> + 128 x <byte2>) ms
    • FE <byte>: Realtime Messages, where <byte> could be:
      • 78: Timing Clock. Similar to MIDI clock signal inside a MIDI cable, this happens every 1/24 beat. Tempo can only be inferred from the time between Timing Clocks.
      • 7A: Start. This occurs when Rhythm Start is pressed.
      • 4C: Stop. This occurs when Rhythm stops.
    • F1 00: Debut. This event seems to always immediately behind the header.
    • F2 01: Finish. This event marks the ending of the event sequence. The bytes following it contain song name and lots of F6s
  • Some types of SysEx message need to be mentioned:
    • F0 43 70 70 78 SC NC F7: Bar Signal. This seems to be essential if you are playing a song with Rhythm Sequence and doing Fast Forward/Reverse on the MDR. If Bar Signal is missing, Rhythm Sequence will not play after Fast Forward/Reverse.
    • F0 43 70 70 70 12 F7: Next Song. It’s an External MDR message not covered in Owner’s Manual. This message makes Electone read the next B00 file into its internal memory, but without User Voice, User Pattern. This message only works when playing an MDR song, and is ignored if received through MIDI ports.