1

I'm looking for a way to represent chords in a MIDI file.

Note that I'm not looking to represent chord voicings. That can be trivially done with multiple note-on messages. But if I do that, then I have to do some sort of note-on to chord analysis every time I read the MIDI file back in, and that's a major nuisance especially since I already know the chord structures when I write the file.

Rather, I'm looking for something more akin to guitar tablature or fake books. That is, I want to record "C" or "Cm" or "I" or "I" or “iii7" at a particular point in time.

So my questions...

Is there a standard way to do this? (I'm not finding one, but I don't know the current spec thoroughly.)

Is there a non-standard way of doing this?

I'm considering using the "tag" facility of the lyric/display meta event. It appears as though I can invent {@chord=Cm} and that should be transparent to any reader, past, present, or future, who doesn't understand this usage. Am I reading the standard right? Would this be a reasonable, essentially private, non-standard extension?

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
K Richard Pixley
  • 617
  • 1
  • 6
  • 10

2 Answers2

0

The MIDI specification provides for values such as "note on" and "pitch value" (as seen here) which are only represented as integers.

Depending on the MIDI Type (there are 3), you should be able to save the chord values similarly to the way that you suggested. Karaoke files are created this way.

If you are using Windows, you could try something like Noteworthy Composer. The link also contains a suggestion for playback.

0

You are absolutely right, you can implement custom meta event and place such events before groups of NoteOn/NoteOff that represent a chord. I don't know what programming language you use, but for C# you can take a look at DryWetMIDI. It allows create custom meta events, read and write them. This article of the library docs shows how to do this.

Maxim
  • 1,995
  • 1
  • 19
  • 24