What are the Chord Messages?

The DGX-505 supports chords, which are present in the recorded tracks. These chords affect the accompaniment, harmony and performance assist, and are also listed in the lyrics screen.

There is a list of the recognised chords in the manual (p.62), and most of them can also be viewed in the chord dictionary function (although some aren't). Also mentioned are the power chord accompaniment, for example C1+5 and C1+8.

There are some that the screen can display that are not listed in the manual. These are weird combinations that are indicated with a star $*$, which seems to indicate some several different unrecognised chords (the accompaniment works with it), for example trying the accompaniment with the keys C-D♭-E♭ or C-D♭-F♯.

There are also what appears to be inversions/hybrid chords/upper structure thing (I'm not a music theory expert), where a lower note is notated separately after a slash, like "C/G", which you can get

A weird thing to note is that when playing the accompaniment notes/keys are represented as C, D♭, D, E♭, E, F, F♯, G, G♯, A, B♭, B. This means the key of A♭ major is represented as G♯ major and so on. This is not a limitation for the chords data in general, as you can see these A♭ and C♯ chords in the songs.

The chords are present in the supplied MID files on the CD, which gives an opportunity to examine them.

Chords for selected songs

These were already transferred to the DGX-505 flash memory. The following songs' chords looked interesting on the lyrics screen:

America The Beautiful (America.MID)

C A♭7 C/G A7♭9 Dm7 G7 C C♯dim7 G7/D C C♯dim7 G/D G G/B G C C♯dim7 G7 C C♯dim7 G/D G G/D D7 G7 Gaug C Csus4 C G7/D G7 C Dm C7/E C7 F C/G F G7 C Csus4 C G7/D G7 C Dm C7/E C7 F C/E F G7 C F6 Dm C

Turkey In The Straw (Turkey.MID)

C C/B F/A Fm/A♭ C/G G7 C C G7 C C/B F/A Fm/A♭ G7 C F C/E G/B C C/B F/A Fm/A♭ C/G G7 C G7 C G7 C F C/E G/B C C/B F/A Fm/A♭ C/G G7 C F C/E G/B C C/B F/A Fm/A♭ C/G G7 C G7 C

Silent Night (SilentNt.MID)

C G G♯dim7 Am E7♭9/G♯ Am7/G F♯m7♭5 C/G G7sus4 G7 Csus4 C C G7 C G7/D C7/E F C F C G7 G♯dim7 Am F♯m7♭5 C/G G7 C A♭/C D♭/C C

Examination

Let's open up Silent Night in mido, to see the meta messages.


In [1]:
import mido

In [5]:
silent_night = mido.MidiFile('Music/SongCollection/for_CD/SilentNt.MID')

In [6]:
silent_night


Out[6]:
<midi file 'Music/SongCollection/for_CD/SilentNt.MID' type 0, 1 tracks, 2227 messages>

In [7]:
silent_night.ticks_per_beat


Out[7]:
480

In [27]:
silent_metas = [m for m in silent_night.tracks[0] if m.is_meta]

In [28]:
silent_metas


Out[28]:
[<meta message smpte_offset frame_rate=24 hours=0 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>,
 <meta message copyright text='(P) 2004 YAMAHA CORPORATION' time=0>,
 <meta message key_signature key='C' time=0>,
 <meta message time_signature numerator=3 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=8 time=0>,
 <meta message set_tempo tempo=750000 time=0>,
 <meta message sequencer_specific data=(67, 123, 12, 1, 2) time=0>,
 <meta message sequencer_specific data=(67, 123, 0, 88, 70, 48, 50, 0, 27) time=0>,
 <meta message set_tempo tempo=759493 time=80>,
 <meta message set_tempo tempo=769230 time=40>,
 <meta message set_tempo tempo=789473 time=40>,
 <meta message set_tempo tempo=789473 time=60>,
 <meta message set_tempo tempo=805477 time=60>,
 <meta message set_tempo tempo=810810 time=20>,
 <meta message set_tempo tempo=810810 time=40>,
 <meta message set_tempo tempo=816441 time=40>,
 <meta message set_tempo tempo=833333 time=20>,
 <meta message set_tempo tempo=833333 time=5>,
 <meta message set_tempo tempo=833333 time=20>,
 <meta message set_tempo tempo=851189 time=100>,
 <meta message set_tempo tempo=857142 time=20>,
 <meta message set_tempo tempo=857142 time=20>,
 <meta message set_tempo tempo=857142 time=15>,
 <meta message set_tempo tempo=876050 time=10>,
 <meta message set_tempo tempo=882352 time=20>,
 <meta message set_tempo tempo=882352 time=10>,
 <meta message set_tempo tempo=882352 time=20>,
 <meta message set_tempo tempo=909090 time=10>,
 <meta message set_tempo tempo=909090 time=20>,
 <meta message set_tempo tempo=937500 time=40>,
 <meta message set_tempo tempo=937500 time=20>,
 <meta message set_tempo tempo=945060 time=20>,
 <meta message set_tempo tempo=967741 time=20>,
 <meta message set_tempo tempo=967741 time=10>,
 <meta message set_tempo tempo=967741 time=20>,
 <meta message set_tempo tempo=983871 time=10>,
 <meta message set_tempo tempo=1000000 time=20>,
 <meta message set_tempo tempo=1000000 time=10>,
 <meta message set_tempo tempo=1000000 time=10>,
 <meta message set_tempo tempo=1017241 time=10>,
 <meta message set_tempo tempo=1034482 time=20>,
 <meta message set_tempo tempo=1034482 time=10>,
 <meta message set_tempo tempo=1034482 time=10>,
 <meta message set_tempo tempo=1052955 time=10>,
 <meta message set_tempo tempo=1071428 time=20>,
 <meta message set_tempo tempo=1500000 time=30>,
 <meta message end_of_track time=0>]

It seems like most of the meta messages are tempo changes, but there are two sequencer specific meta messages of interest.


In [32]:
silent_seq_spec = [m.data for m in silent_metas if m.type == 'sequencer_specific']

In [33]:
for md in silent_seq_spec:
    print(" ".join(format(b, "02X") for b in md))


43 7B 0C 01 02
43 7B 00 58 46 30 32 00 1B

The chord information must not be meta messages, then. Maybe they're system exclusive...


In [35]:
silent_sysex = [m for m in silent_night.tracks[0] if m.type == 'sysex']

In [36]:
silent_sysex


Out[36]:
[<message sysex data=(126,127,9,1) time=0>,
 <message sysex data=(67,16,76,0,0,126,0) time=480>,
 <message sysex data=(67,16,76,2,1,0,1,0) time=10>,
 <message sysex data=(67,16,76,2,1,32,65,0) time=10>,
 <message sysex data=(127,127,4,1,0,103) time=20>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,7,0,7,0) time=9>,
 <message sysex data=(67,126,2,69,18,69,18) time=0>,
 <message sysex data=(67,126,2,9,8,9,8) time=5>,
 <message sysex data=(67,126,2,4,25,69,30) time=5>,
 <message sysex data=(67,126,2,9,10,7,30) time=0>,
 <message sysex data=(67,126,2,6,11,6,11) time=25>,
 <message sysex data=(67,126,2,0,0,7,30) time=5>,
 <message sysex data=(67,126,2,7,20,7,20) time=80>,
 <message sysex data=(67,126,2,7,19,7,19) time=15>,
 <message sysex data=(67,126,2,0,32,0,32) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=17>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,7,19,7,19) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,7,19,2,30) time=0>,
 <message sysex data=(67,126,2,0,19,4,30) time=0>,
 <message sysex data=(67,126,2,5,0,5,0) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,5,0,5,0) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,7,19,7,19) time=0>,
 <message sysex data=(67,126,2,69,18,69,18) time=0>,
 <message sysex data=(67,126,2,9,8,9,8) time=0>,
 <message sysex data=(67,126,2,6,11,6,11) time=0>,
 <message sysex data=(67,126,2,0,0,7,30) time=0>,
 <message sysex data=(67,126,2,7,19,7,19) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>,
 <message sysex data=(67,126,2,38,0,49,30) time=0>,
 <message sysex data=(67,126,2,34,0,49,30) time=0>,
 <message sysex data=(67,126,2,0,0,0,0) time=0>]

In [40]:
from commons.messages import controlstate

In [43]:
s = controlstate.MidiControlState()
silent_wrapped = [s.feed(m) for m in silent_sysex]
for w in silent_wrapped:
    print(w)


GM System ON
XG System ON
Reverb Type 01(Hall1)
Chorus Type ---(Chorus)
MIDI Master Volume 103
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 07 00 07 00]
[SysEx 43 7E 02 45 12 45 12]
[SysEx 43 7E 02 09 08 09 08]
[SysEx 43 7E 02 04 19 45 1E]
[SysEx 43 7E 02 09 0A 07 1E]
[SysEx 43 7E 02 06 0B 06 0B]
[SysEx 43 7E 02 00 00 07 1E]
[SysEx 43 7E 02 07 14 07 14]
[SysEx 43 7E 02 07 13 07 13]
[SysEx 43 7E 02 00 20 00 20]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 07 13 07 13]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 07 13 02 1E]
[SysEx 43 7E 02 00 13 04 1E]
[SysEx 43 7E 02 05 00 05 00]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 05 00 05 00]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 07 13 07 13]
[SysEx 43 7E 02 45 12 45 12]
[SysEx 43 7E 02 09 08 09 08]
[SysEx 43 7E 02 06 0B 06 0B]
[SysEx 43 7E 02 00 00 07 1E]
[SysEx 43 7E 02 07 13 07 13]
[SysEx 43 7E 02 00 00 00 00]
[SysEx 43 7E 02 26 00 31 1E]
[SysEx 43 7E 02 22 00 31 1E]
[SysEx 43 7E 02 00 00 00 00]

AHA, so they do set the MIDI master volume to something else... Anyway, there are a whole bunch of unknown messages here.


In [44]:
silent_us = silent_wrapped[5:]

In [45]:
len(silent_us)


Out[45]:
31

In [46]:
silent_chords = "C G G♯dim7 Am E7♭9/G♯ Am7/G F♯m7♭5  C/G G7sus4 G7 Csus4 C C G7 C G7/D C7/E F C F C G7 G♯dim7 Am F♯m7♭5 C/G G7 C A♭/C D♭/C C".split()

In [47]:
len(silent_chords)


Out[47]:
31

In [48]:
for w, c in zip(silent_us, silent_chords):
    print(w, c)


[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 00 07 00] G
[SysEx 43 7E 02 45 12 45 12] G♯dim7
[SysEx 43 7E 02 09 08 09 08] Am
[SysEx 43 7E 02 04 19 45 1E] E7♭9/G♯
[SysEx 43 7E 02 09 0A 07 1E] Am7/G
[SysEx 43 7E 02 06 0B 06 0B] F♯m7♭5
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 14 07 14] G7sus4
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 20 00 20] Csus4
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 02 1E] G7/D
[SysEx 43 7E 02 00 13 04 1E] C7/E
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 45 12 45 12] G♯dim7
[SysEx 43 7E 02 09 08 09 08] Am
[SysEx 43 7E 02 06 0B 06 0B] F♯m7♭5
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 26 00 31 1E] A♭/C
[SysEx 43 7E 02 22 00 31 1E] D♭/C
[SysEx 43 7E 02 00 00 00 00] C

Let's try the other two.


In [51]:
america = mido.MidiFile('America.MID')

In [52]:
turkey = mido.MidiFile('Turkey.MID')

In [58]:
for x in [america, turkey]:
    print(x, x.ticks_per_beat)
    for m in x.tracks[0]:
        if m.is_meta and m.type != 'set_tempo':
            print(m)


<midi file 'America.MID' type 0, 1 tracks, 3530 messages> 480
<meta message smpte_offset frame_rate=25 hours=32 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>
<meta message copyright text='(P) 2004 YAMAHA CORPORATION' time=0>
<meta message key_signature key='C' time=0>
<meta message time_signature numerator=4 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=8 time=0>
<meta message sequencer_specific data=(67, 123, 12, 1, 2) time=0>
<meta message sequencer_specific data=(67, 123, 0, 88, 70, 48, 50, 0, 27) time=0>
<meta message end_of_track time=0>
<midi file 'Turkey.MID' type 0, 1 tracks, 3065 messages> 480
<meta message smpte_offset frame_rate=25 hours=32 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>
<meta message copyright text='(P) 2004 YAMAHA CORPORATION' time=0>
<meta message key_signature key='C' time=0>
<meta message time_signature numerator=4 denominator=4 clocks_per_click=24 notated_32nd_notes_per_beat=8 time=0>
<meta message sequencer_specific data=(67, 123, 12, 1, 2) time=0>
<meta message sequencer_specific data=(67, 123, 0, 88, 70, 48, 50, 0, 27) time=0>
<meta message end_of_track time=0>

In [59]:
america_wrapped = [s.feed(m) for m in america.tracks[0] if m.type=='sysex']

In [93]:
turkey_wrapped = [s.feed(m) for m in turkey.tracks[0] if m.type == 'sysex']

In [94]:
america_us = [w for w in america_wrapped if w.message.data[:3] == (0x43, 0x7E, 0x02)]
turkey_us = [w for w in turkey_wrapped if w.message.data[:3] == (0x43, 0x7E, 0x02)]

In [120]:
america_chords = "C A♭7 C/G A7♭9 Dm7 G7 C C♯dim7 G7/D C C♯dim7 G/D G G/B G C C♯dim7 G7 C C♯dim7 G/D G G/D D7 G7 Gaug C Csus4 C G7/D G7 C Dm C7/E C7 F C/G F G7 C Csus4 C G7/D G7 C Dm C7/E C7 F C/E F G7 C F6 Dm C".split()
turkey_chords = "C C/B F/A Fm/A♭ C/G G7 C C G7 C C/B F/A Fm/A♭ G7 C F C/E G/B  C C/B F/A Fm/A♭ C/G G7 C G7 C G7 C F C/E G/B C C/B F/A Fm/A♭ C/G G7 C F C/E G/B C C/B F/A Fm/A♭ C/G G7 C G7 C".split()

In [121]:
len(america_us) == len(america_chords)


Out[121]:
True

In [122]:
len(turkey_us) == len(turkey_chords)


Out[122]:
True

In [123]:
for w, c in zip(america_us, america_chords):
    print(w, c)


[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 26 13 26 13] A♭7
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 09 19 09 19] A7♭9
[SysEx 43 7E 02 02 0A 02 0A] Dm7
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 41 12 41 12] C♯dim7
[SysEx 43 7E 02 07 13 02 1E] G7/D
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 41 12 41 12] C♯dim7
[SysEx 43 7E 02 07 00 02 1E] G/D
[SysEx 43 7E 02 07 00 07 00] G
[SysEx 43 7E 02 07 00 0B 1E] G/B
[SysEx 43 7E 02 07 00 07 00] G
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 41 12 41 12] C♯dim7
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 41 12 41 12] C♯dim7
[SysEx 43 7E 02 07 00 02 1E] G/D
[SysEx 43 7E 02 07 00 07 00] G
[SysEx 43 7E 02 07 00 02 1E] G/D
[SysEx 43 7E 02 02 13 02 13] D7
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 07 07 07 07] Gaug
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 20 00 20] Csus4
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 02 1E] G7/D
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 02 08 02 08] Dm
[SysEx 43 7E 02 00 13 04 1E] C7/E
[SysEx 43 7E 02 00 13 00 13] C7
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 20 00 20] Csus4
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 02 1E] G7/D
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 02 08 02 08] Dm
[SysEx 43 7E 02 00 13 04 1E] C7/E
[SysEx 43 7E 02 00 13 00 13] C7
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 04 1E] C/E
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 05 01 05 01] F6
[SysEx 43 7E 02 02 08 02 08] Dm
[SysEx 43 7E 02 00 00 00 00] C

In [124]:
for w, c in zip(turkey_us, turkey_chords):
    print(w, c)


[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 0B 1E] C/B
[SysEx 43 7E 02 05 00 09 1E] F/A
[SysEx 43 7E 02 05 08 26 1E] Fm/A♭
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 0B 1E] C/B
[SysEx 43 7E 02 05 00 09 1E] F/A
[SysEx 43 7E 02 05 08 26 1E] Fm/A♭
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 04 1E] C/E
[SysEx 43 7E 02 07 00 0B 1E] G/B
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 0B 1E] C/B
[SysEx 43 7E 02 05 00 09 1E] F/A
[SysEx 43 7E 02 05 08 26 1E] Fm/A♭
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 04 1E] C/E
[SysEx 43 7E 02 07 00 0B 1E] G/B
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 0B 1E] C/B
[SysEx 43 7E 02 05 00 09 1E] F/A
[SysEx 43 7E 02 05 08 26 1E] Fm/A♭
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 05 00 05 00] F
[SysEx 43 7E 02 00 00 04 1E] C/E
[SysEx 43 7E 02 07 00 0B 1E] G/B
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 00 00 0B 1E] C/B
[SysEx 43 7E 02 05 00 09 1E] F/A
[SysEx 43 7E 02 05 08 26 1E] Fm/A♭
[SysEx 43 7E 02 00 00 07 1E] C/G
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C
[SysEx 43 7E 02 07 13 07 13] G7
[SysEx 43 7E 02 00 00 00 00] C

In [126]:
def chord_assign(chord_mapping, wraps, chords, rev_mapping):    
    for w, c in zip(wraps, chords):
        code = w.message.data[-4:]
        if c in chord_mapping:
            assert chord_mapping[c] == code
        else:
            chord_mapping[c] = code
        if code in rev_mapping:
            assert rev_mapping[code] == c
        else:
            rev_mapping[code] = c

cmap = {}
rcmap = {}
chord_assign(cmap, silent_us, silent_chords, rcmap)
chord_assign(cmap, america_us, america_chords, rcmap)
chord_assign(cmap, turkey_us, turkey_chords, rcmap)

In [127]:
def hexspace(x):
    return " ".join(format(b, "02X") for b in x)

for chord, code in sorted(cmap.items()):
    print(hexspace(code), chord)


09 19 09 19 A7♭9
09 08 09 08 Am
09 0A 07 1E Am7/G
26 00 31 1E A♭/C
26 13 26 13 A♭7
00 00 00 00 C
00 00 0B 1E C/B
00 00 04 1E C/E
00 00 07 1E C/G
00 13 00 13 C7
00 13 04 1E C7/E
00 20 00 20 Csus4
41 12 41 12 C♯dim7
02 13 02 13 D7
02 08 02 08 Dm
02 0A 02 0A Dm7
22 00 31 1E D♭/C
04 19 45 1E E7♭9/G♯
05 00 05 00 F
05 00 09 1E F/A
05 01 05 01 F6
05 08 26 1E Fm/A♭
06 0B 06 0B F♯m7♭5
07 00 07 00 G
07 00 0B 1E G/B
07 00 02 1E G/D
07 13 07 13 G7
07 13 02 1E G7/D
07 14 07 14 G7sus4
07 07 07 07 Gaug
45 12 45 12 G♯dim7

It looks like the codes are of the format A B A B, where A is the root and B is the chord type. If both sets of A and B are the same, it's a straight up chord; if the second is different that means there's some sort of inversion thing happening, and the last ends in 1E.

note
C ? 00,31 41
D 22 02 ?
E ? 04 ?
F ? 05 06
G ? 07 45
A 26 09 ?
B ? 0B ?

If I were to hazard a guess at the pattern, I think there's two types going on here. First, there's the basic sequence:

code note
00 C
01 C♯/D♭
02 D
03 D♯/E♭
04 E
05 F
06 F♯/G♭
07 G
08 G♯/A♭
09 A
0A A♯/B♭
0B B

This is used for the base keys, and also F♯, but also not for the lower note if it is C.

This doesn't distinguish between enharmonic notes, so we also have:

lo hi2 3 4
1 C♭ C C♯
2 D♭ D D♯
3 E♭ E E♯
4 F♭ F F♯
5 G♭ G G♯
6 A♭ A A♯
7 B♭ B B♯

Hmm, how could we test this out.


In [128]:
for chord, code in sorted(cmap.items(), key=lambda x:(x[1][1], x[1][0], x[1][2], x[1][3])):
    print(hexspace(code), chord)


00 00 00 00 C
00 00 04 1E C/E
00 00 07 1E C/G
00 00 0B 1E C/B
05 00 05 00 F
05 00 09 1E F/A
07 00 02 1E G/D
07 00 07 00 G
07 00 0B 1E G/B
22 00 31 1E D♭/C
26 00 31 1E A♭/C
05 01 05 01 F6
07 07 07 07 Gaug
02 08 02 08 Dm
05 08 26 1E Fm/A♭
09 08 09 08 Am
02 0A 02 0A Dm7
09 0A 07 1E Am7/G
06 0B 06 0B F♯m7♭5
41 12 41 12 C♯dim7
45 12 45 12 G♯dim7
00 13 00 13 C7
00 13 04 1E C7/E
02 13 02 13 D7
07 13 02 1E G7/D
07 13 07 13 G7
26 13 26 13 A♭7
07 14 07 14 G7sus4
04 19 45 1E E7♭9/G♯
09 19 09 19 A7♭9
00 20 00 20 Csus4
  • 00: Major (C)
  • 01: Sixth (C6)
  • 07: Augmented (Caug)
  • 08: Minor (Cm)
  • 0A: Minor seventh (Cm7)
  • 0B: Minor seventh flatted fifth (Cm7♭5)
  • 12: Diminished seventh (Cdim7)
  • 13: Seventh (C7)
  • 14: Seventh suspended fourth (C7sus4)
  • 19: Seventh flatted ninth (C7♭9)
  • 20: Suspended fourth (Csus4)

    This is the same as the PSR-225, except that these are part of SysEx messages. This would imply that you can't have the same with an open octave 1+8, which makes sense.

Return

After Investigationing V: User Songs, I've returned to continue investigating the supplied Songs for chords.


In [11]:
import mido

In [21]:
import glob
import os.path

In [27]:
midtracks = [(os.path.basename(fn), mido.MidiFile(fn).tracks[0]) for fn in 
             glob.glob(os.path.expanduser('~/Music/SongCollection/for_CD/*.MID'))]

In [32]:
def hexspace(x):
    return " ".join(format(b, '02X') for b in x)

In [71]:
sysex_occurences = {}
for song, track in midtracks:
    song_name = song.partition('.')[0]
    for m in track:
        if m.type == 'sysex':
            sysex_occurences.setdefault(m.data, set()).add(song_name)

In [100]:
def ocprint(ocs, key=None):
    for d in sorted(ocs, key=key):
        print(hexspace(d), ','.join(sorted(ocs[d]))[:75], sep=": ")

In [84]:
seqspec_occurences = {}
for song, track in midtracks:
    song_name = song.partition('.')[0]
    for m in track:
        if m.type == 'sequencer_specific':
            seqspec_occurences.setdefault(m.data, set()).add(song_name)

In [95]:
ocprint(sysex_occurences)


43 10 4C 00 00 7E 00: America,AtHome,AuraLee,Babbino,Banjo,BillBail,BrownJug,Camptown,Canon,D_Ags
43 10 4C 02 01 00 01 00: America,AuraLee,Babbino,Banjo,BillBail,BrownJug,Canon,D_Agstin,D_ChTree,D_C
43 10 4C 02 01 00 02 00: Camptown,MyBonnie
43 10 4C 02 01 00 03 00: AtHome,D_Scarbo,Frustime,P_Angels,P_Arabes,P_Candeu,P_Cheval,P_Consol,P_Ino
43 10 4C 02 01 20 41 00: America,AtHome,AuraLee,Babbino,Banjo,BillBail,BrownJug,Camptown,Canon,D_Ags
43 10 4C 02 01 20 41 02: MyBonnie
43 73 01 50 12 00 08 00: Frustime,Mirliton,P_TMarch,Ungaris5
43 73 01 50 12 00 08 7F: Guillaum,P_Cheval,P_MenuBo,P_Moment,P_Violet,Primvera
43 73 01 50 12 00 09 01: Frustime
43 73 01 50 12 00 09 03: Guillaum,Mirliton,P_Cheval,P_MenuBo,P_Moment,P_TMarch,P_Violet,Primvera,Ung
43 7E 02 00 00 00 00: America,AtHome,AuraLee,Babbino,Banjo,BrownJug,Camptown,D_Agstin,D_ChTree,D_
43 7E 02 00 00 04 1E: America,AtHome,Babbino,D_Smoky,D_WeWish,JoyOfMan,MussIDen,P_MenuBa,Turkey,V
43 7E 02 00 00 07 1E: America,AtHome,Banjo,BillBail,D_Three,Frulied,Funicula,IrishEye,Lorelei,Mus
43 7E 02 00 00 0A 1E: Frulied
43 7E 02 00 00 0B 1E: Camptown,Turkey
43 7E 02 00 01 00 01: AuraLee,Banjo,BillBail,BrownJug,PearlFis
43 7E 02 00 01 04 1E: BrownJug
43 7E 02 00 01 07 1E: Lorelei
43 7E 02 00 02 00 02: Banjo
43 7E 02 00 02 07 1E: AtHome
43 7E 02 00 07 00 07: AuraLee,Banjo
43 7E 02 00 08 00 08: Mondshin,Ungaris5
43 7E 02 00 08 07 1E: Frulied,Mondshin,SerenaHy,Ungaris5
43 7E 02 00 0A 00 0A: D_Indian
43 7E 02 00 12 00 12: BrownJug,Frulied
43 7E 02 00 13 00 13: America,AtHome,AuraLee,Banjo,BillBail,D_Smoky,Frulied,Frustime,IrishEye,Lom
43 7E 02 00 13 04 1E: America,Frulied,SilentNt
43 7E 02 00 13 05 1E: Frulied
43 7E 02 00 13 07 1E: AtHome,Liebest3
43 7E 02 00 13 0A 1E: Banjo,IrishEye,Slavon10,Susanna
43 7E 02 00 19 00 19: Toreador
43 7E 02 00 20 00 20: America,D_ChTree,Frulied,SilentNt
43 7E 02 01 0B 01 0B: JoyOfMan
43 7E 02 01 12 01 12: Mondshin
43 7E 02 02 00 00 1E: Thais
43 7E 02 02 00 02 00: Babbino,Canon,D_Scarbo,D_WeWish,Gavotte,JoyOfMan,MagicFlt,Mirliton,Mondshin
43 7E 02 02 00 06 1E: Canon,D_Scarbo,Frulied,Gavotte,JoyOfMan,MagicFlt,Mirliton
43 7E 02 02 00 07 1E: JoyOfMan
43 7E 02 02 00 09 1E: Babbino,Gavotte,P_MenuBa,Thais
43 7E 02 02 08 00 1E: MussIDen
43 7E 02 02 08 02 08: America,AtHome,D_Close,D_Weasel,DanubeWa,Lomond,Lorelei,Mondshin,MussIDen,P
43 7E 02 02 08 05 1E: Lorelei,P_MenuBa,Toreador
43 7E 02 02 08 09 1E: PearlFis
43 7E 02 02 09 09 1E: DanubeWa
43 7E 02 02 0A 00 1E: BrownJug
43 7E 02 02 0A 02 0A: America,BillBail,D_ChTree,D_Close,D_WeWish,D_Weasel,IrishEye,Voglein
43 7E 02 02 13 02 13: America,AtHome,AuraLee,Babbino,D_Close,D_WeWish,Frulied,Funicula,IrishEye,J
43 7E 02 02 13 06 1E: D_ChTree,JoyOfMan,Mondshin
43 7E 02 02 13 07 1E: Lorelei
43 7E 02 02 16 02 16: Banjo
43 7E 02 02 20 02 20: JoyOfMan,Mondshin
43 7E 02 03 00 03 00: Frulied,Frustime,Liebest3,Ungaris5
43 7E 02 03 12 03 12: AtHome
43 7E 02 03 13 03 13: Liebest3,Toreador
43 7E 02 03 19 03 19: Toreador
43 7E 02 04 00 04 00: D_WeWish,Guillaum,Liebest3,Orphee,P_MenuBa,Primvera,Sympho9,Voglein
43 7E 02 04 00 08 1E: Primvera
43 7E 02 04 00 0B 1E: P_MenuBa
43 7E 02 04 00 45 1E: D_WeWish
43 7E 02 04 07 04 07: Guillaum
43 7E 02 04 08 02 1E: JoyOfMan
43 7E 02 04 08 04 08: Babbino,D_Scarbo,Funicula,Gavotte,JoyOfMan,Lomond,Slavon10,Thais
43 7E 02 04 08 07 1E: JoyOfMan,P_MenuBa,Slavon10
43 7E 02 04 08 09 1E: Thais
43 7E 02 04 08 0B 1E: Funicula,Slavon10
43 7E 02 04 09 04 09: D_Scarbo
43 7E 02 04 0A 04 0A: D_Close,D_WeWish,Thais
43 7E 02 04 0B 04 0B: Mirliton
43 7E 02 04 12 04 12: Frustime
43 7E 02 04 13 04 13: DanubeWa,Gavotte,IrishEye,Orphee,P_MenuBa,PearlFis,Toreador
43 7E 02 04 13 0B 1E: AtHome,Funicula
43 7E 02 04 13 45 1E: Funicula,Slavon10
43 7E 02 04 14 04 14: P_MenuBa
43 7E 02 04 19 45 1E: P_MenuBa,SilentNt
43 7E 02 05 00 00 1E: D_ChTree,D_Close,IrishEye,Mondshin,SerenaHy,Toreador
43 7E 02 05 00 05 00: America,AtHome,AuraLee,Banjo,BillBail,Camptown,D_Close,D_Indian,D_Smoky,D_T
43 7E 02 05 00 07 1E: AtHome,D_ChTree,D_Mary,Voglein
43 7E 02 05 00 09 1E: Banjo,Frulied,IrishEye,P_MenuBa,Slavon10,Susanna,Turkey
43 7E 02 05 01 05 01: America,BrownJug,D_Three,Funicula,Surprise
43 7E 02 05 02 05 02: AtHome,D_Close,P_MenuBa
43 7E 02 05 08 05 00: Mondshin
43 7E 02 05 08 05 08: AuraLee,Liebest3,Toreador
43 7E 02 05 08 26 1E: IrishEye,Liebest3,Susanna,Turkey
43 7E 02 05 09 05 09: Mondshin
43 7E 02 05 0A 05 0A: D_Indian
43 7E 02 05 12 05 12: Mirliton
43 7E 02 05 13 05 13: Frustime,Liebest3,Toreador,Ungaris5
43 7E 02 06 00 06 00: Slavon10
43 7E 02 06 08 06 08: Canon,Mirliton,Primvera
43 7E 02 06 0B 06 0B: Banjo,SilentNt,Slavon10
43 7E 02 06 11 06 11: BillBail,Camptown,IrishEye
43 7E 02 06 12 06 12: AtHome,BrownJug
43 7E 02 06 13 06 13: Guillaum
43 7E 02 06 13 46 1E: Slavon10
43 7E 02 06 15 06 15: AtHome
43 7E 02 07 00 00 1E: D_Close
43 7E 02 07 00 02 1E: America,Babbino,Funicula,Voglein
43 7E 02 07 00 05 1E: D_WeWish,Voglein
43 7E 02 07 00 06 1E: JoyOfMan
43 7E 02 07 00 07 00: America,AtHome,Babbino,Banjo,Canon,D_Close,D_Cuckoo,D_Indian,D_London,D_Mar
43 7E 02 07 00 09 1E: Thais
43 7E 02 07 00 0B 1E: America,Babbino,Banjo,JoyOfMan,P_MenuBa,Thais,Turkey
43 7E 02 07 01 07 01: Canon,Gavotte
43 7E 02 07 07 07 07: America
43 7E 02 07 08 02 1E: Mondshin
43 7E 02 07 08 07 08: Frulied,Mirliton,Mondshin,PearlFis,Toreador,Ungaris5
43 7E 02 07 08 0A 1E: Ungaris5
43 7E 02 07 13 00 1E: D_ChTree,Voglein
43 7E 02 07 13 02 1E: America,AtHome,D_Smoky,Frulied,MagicFlt,SilentNt,Voglein
43 7E 02 07 13 05 1E: Frulied
43 7E 02 07 13 07 13: America,AtHome,AuraLee,Banjo,BillBail,BrownJug,Camptown,D_Agstin,D_Close,D_
43 7E 02 07 13 0B 1E: Frulied,Mondshin,MussIDen
43 7E 02 07 14 07 14: AtHome,Banjo,MussIDen,SilentNt,Voglein
43 7E 02 07 16 07 16: BillBail
43 7E 02 07 1A 07 1A: AtHome,BillBail
43 7E 02 07 20 07 20: D_London,MussIDen
43 7E 02 08 0B 08 0B: Mirliton
43 7E 02 08 11 08 11: Mirliton
43 7E 02 09 00 04 1E: D_WeWish,Guillaum,Mirliton,Primvera
43 7E 02 09 00 09 00: AuraLee,Canon,D_Scarbo,Gavotte,Mirliton,Orphee,P_MenuBa,PearlFis,Primvera,T
43 7E 02 09 00 41 1E: Gavotte,Mirliton,MussIDen,P_MenuBa,Thais
43 7E 02 09 01 09 01: Guillaum
43 7E 02 09 08 00 1E: JoyOfMan,P_MenuBa
43 7E 02 09 08 04 1E: P_MenuBa,PearlFis,Toreador
43 7E 02 09 08 07 1E: JoyOfMan
43 7E 02 09 08 09 00: D_Weasel
43 7E 02 09 08 09 08: AtHome,Babbino,D_Agstin,D_ChTree,D_Close,D_WeWish,D_Weasel,DanubeWa,Funicul
43 7E 02 09 09 09 09: Slavon10
43 7E 02 09 0A 07 1E: SilentNt
43 7E 02 09 0A 09 0A: AtHome,Babbino,D_Close
43 7E 02 09 0B 09 0B: Ungaris5
43 7E 02 09 12 09 12: Mondshin
43 7E 02 09 13 04 1E: D_WeWish,Gavotte
43 7E 02 09 13 09 13: AuraLee,Babbino,BillBail,Camptown,D_WeWish,Gavotte,IrishEye,Orphee,PearlFis
43 7E 02 09 13 41 1E: Gavotte,Mondshin
43 7E 02 09 14 09 14: Camptown,Slavon10
43 7E 02 09 19 09 19: America
43 7E 02 09 20 09 20: Canon
43 7E 02 0A 00 02 1E: Frustime
43 7E 02 0A 00 05 1E: Frustime
43 7E 02 0A 00 0A 00: Frustime,PearlFis,Ungaris5
43 7E 02 0A 01 0A 01: Frulied,Toreador
43 7E 02 0A 02 0A 02: PearlFis
43 7E 02 0A 08 0A 08: Toreador
43 7E 02 0A 11 0A 11: Slavon10
43 7E 02 0A 13 0A 13: Frustime,Liebest3
43 7E 02 0A 16 0A 16: Liebest3
43 7E 02 0B 00 06 1E: Thais
43 7E 02 0B 00 0B 00: Guillaum,Primvera,Slavon10
43 7E 02 0B 00 42 1E: Guillaum
43 7E 02 0B 01 0B 01: BillBail
43 7E 02 0B 07 0B 07: Slavon10
43 7E 02 0B 08 02 1E: JoyOfMan
43 7E 02 0B 08 0B 08: Canon,Gavotte
43 7E 02 0B 0A 0B 0A: Babbino
43 7E 02 0B 0B 0B 0B: P_MenuBa
43 7E 02 0B 12 0B 12: Mirliton,Mondshin
43 7E 02 0B 13 06 1E: Slavon10
43 7E 02 0B 13 0B 13: Funicula,Slavon10
43 7E 02 22 00 00 1E: Mondshin
43 7E 02 22 00 22 00: D_London,Mondshin
43 7E 02 22 00 31 1E: SilentNt
43 7E 02 22 02 22 02: AtHome
43 7E 02 22 08 22 08: Liebest3
43 7E 02 22 08 24 1E: Liebest3
43 7E 02 22 09 22 09: Liebest3
43 7E 02 22 16 22 16: BillBail
43 7E 02 25 00 25 00: Toreador
43 7E 02 26 00 26 00: Liebest3,Toreador
43 7E 02 26 00 31 1E: Mondshin,SilentNt
43 7E 02 26 13 23 1E: Mondshin
43 7E 02 26 13 26 13: America,SerenaHy
43 7E 02 31 00 31 00: MyBonnie
43 7E 02 32 13 32 13: MyBonnie
43 7E 02 32 13 44 1E: MyBonnie
43 7E 02 33 00 33 00: Guillaum
43 7E 02 34 00 34 00: MyBonnie
43 7E 02 35 13 35 13: MyBonnie
43 7E 02 36 08 36 08: MyBonnie
43 7E 02 41 08 41 08: Guillaum,Primvera
43 7E 02 41 12 41 12: America,BillBail
43 7E 02 41 13 41 13: Slavon10
43 7E 02 44 12 44 12: AtHome
43 7E 02 44 15 44 15: Liebest3
43 7E 02 44 16 46 1E: Primvera
43 7E 02 45 12 45 12: D_WeWish,SilentNt
43 7E 02 45 13 45 13: Guillaum
43 7E 02 46 08 41 1E: Thais
7E 7F 09 01: America,AtHome,AuraLee,Babbino,Banjo,BillBail,BrownJug,Camptown,Canon,D_Ags
7F 7F 04 01 00 4A: Guillaum
7F 7F 04 01 00 50: DanubeWa,Ungaris5
7F 7F 04 01 00 52: Orphee
7F 7F 04 01 00 55: Gavotte
7F 7F 04 01 00 57: BillBail,D_RowRow,D_Three,IrishEye,Primvera
7F 7F 04 01 00 58: Camptown
7F 7F 04 01 00 59: Slavon10
7F 7F 04 01 00 60: America,AtHome,Banjo,D_Mary,D_Weasel,Frulied,Frustime,Funicula,Surprise,Tha
7F 7F 04 01 00 64: D_Smoky,D_WeWish,MyBonnie,P_Consol,P_Tendre,SaintsGo
7F 7F 04 01 00 67: AuraLee,Babbino,BrownJug,D_Agstin,D_ChTree,D_Close,D_ImMai,D_Indian,D_Londo
7F 7F 04 01 00 70: Canon,D_Scarbo,Lomond,Lorelei,Mondshin,MussIDen,P_Arabes,P_Moment,P_TMarch,
7F 7F 04 01 00 72: D_Cuckoo,P_Progre
7F 7F 04 01 00 74: Mirliton,P_Petite
7F 7F 04 01 00 75: P_Cheval,P_Inocen
7F 7F 04 01 00 76: Liebest3
7F 7F 04 01 00 78: P_Angels,P_Candeu,P_MenuBo
7F 7F 04 01 00 7A: P_Sarafa
7F 7F 04 01 00 7F: P_PChien,P_Violet

In [91]:
ocprint(seqspec_occurences)


43 7B 00 58 46 30 32 00 1B: America,AtHome,AuraLee,Babbino,Banjo,BillBail,BrownJug,Camptown,Canon,D_Ags
43 7B 0C 01 02: America,AtHome,AuraLee,Babbino,Banjo,BillBail,BrownJug,Camptown,Canon,D_Ags

In [101]:
ocprint({k:v for k, v in sysex_occurences.items() if k[-1] == 0x1E}, key=lambda k:k[-2])


43 7E 02 09 08 00 1E: JoyOfMan,P_MenuBa
43 7E 02 07 00 00 1E: D_Close
43 7E 02 05 00 00 1E: D_ChTree,D_Close,IrishEye,Mondshin,SerenaHy,Toreador
43 7E 02 02 00 00 1E: Thais
43 7E 02 22 00 00 1E: Mondshin
43 7E 02 02 0A 00 1E: BrownJug
43 7E 02 07 13 00 1E: D_ChTree,Voglein
43 7E 02 02 08 00 1E: MussIDen
43 7E 02 07 13 02 1E: America,AtHome,D_Smoky,Frulied,MagicFlt,SilentNt,Voglein
43 7E 02 04 08 02 1E: JoyOfMan
43 7E 02 0B 08 02 1E: JoyOfMan
43 7E 02 07 00 02 1E: America,Babbino,Funicula,Voglein
43 7E 02 07 08 02 1E: Mondshin
43 7E 02 0A 00 02 1E: Frustime
43 7E 02 00 13 04 1E: America,Frulied,SilentNt
43 7E 02 09 08 04 1E: P_MenuBa,PearlFis,Toreador
43 7E 02 00 00 04 1E: America,AtHome,Babbino,D_Smoky,D_WeWish,JoyOfMan,MussIDen,P_MenuBa,Turkey,V
43 7E 02 09 00 04 1E: D_WeWish,Guillaum,Mirliton,Primvera
43 7E 02 09 13 04 1E: D_WeWish,Gavotte
43 7E 02 00 01 04 1E: BrownJug
43 7E 02 00 13 05 1E: Frulied
43 7E 02 07 13 05 1E: Frulied
43 7E 02 02 08 05 1E: Lorelei,P_MenuBa,Toreador
43 7E 02 07 00 05 1E: D_WeWish,Voglein
43 7E 02 0A 00 05 1E: Frustime
43 7E 02 02 00 06 1E: Canon,D_Scarbo,Frulied,Gavotte,JoyOfMan,MagicFlt,Mirliton
43 7E 02 07 00 06 1E: JoyOfMan
43 7E 02 02 13 06 1E: D_ChTree,JoyOfMan,Mondshin
43 7E 02 0B 00 06 1E: Thais
43 7E 02 0B 13 06 1E: Slavon10
43 7E 02 05 00 07 1E: AtHome,D_ChTree,D_Mary,Voglein
43 7E 02 00 00 07 1E: America,AtHome,Banjo,BillBail,D_Three,Frulied,Funicula,IrishEye,Lorelei,Mus
43 7E 02 00 08 07 1E: Frulied,Mondshin,SerenaHy,Ungaris5
43 7E 02 04 08 07 1E: JoyOfMan,P_MenuBa,Slavon10
43 7E 02 09 08 07 1E: JoyOfMan
43 7E 02 02 00 07 1E: JoyOfMan
43 7E 02 00 01 07 1E: Lorelei
43 7E 02 02 13 07 1E: Lorelei
43 7E 02 00 02 07 1E: AtHome
43 7E 02 00 13 07 1E: AtHome,Liebest3
43 7E 02 09 0A 07 1E: SilentNt
43 7E 02 04 00 08 1E: Primvera
43 7E 02 05 00 09 1E: Banjo,Frulied,IrishEye,P_MenuBa,Slavon10,Susanna,Turkey
43 7E 02 02 00 09 1E: Babbino,Gavotte,P_MenuBa,Thais
43 7E 02 02 09 09 1E: DanubeWa
43 7E 02 07 00 09 1E: Thais
43 7E 02 04 08 09 1E: Thais
43 7E 02 02 08 09 1E: PearlFis
43 7E 02 00 00 0A 1E: Frulied
43 7E 02 07 08 0A 1E: Ungaris5
43 7E 02 00 13 0A 1E: Banjo,IrishEye,Slavon10,Susanna
43 7E 02 07 13 0B 1E: Frulied,Mondshin,MussIDen
43 7E 02 07 00 0B 1E: America,Babbino,Banjo,JoyOfMan,P_MenuBa,Thais,Turkey
43 7E 02 04 00 0B 1E: P_MenuBa
43 7E 02 00 00 0B 1E: Camptown,Turkey
43 7E 02 04 08 0B 1E: Funicula,Slavon10
43 7E 02 04 13 0B 1E: AtHome,Funicula
43 7E 02 26 13 23 1E: Mondshin
43 7E 02 22 08 24 1E: Liebest3
43 7E 02 05 08 26 1E: IrishEye,Liebest3,Susanna,Turkey
43 7E 02 26 00 31 1E: Mondshin,SilentNt
43 7E 02 22 00 31 1E: SilentNt
43 7E 02 09 00 41 1E: Gavotte,Mirliton,MussIDen,P_MenuBa,Thais
43 7E 02 46 08 41 1E: Thais
43 7E 02 09 13 41 1E: Gavotte,Mondshin
43 7E 02 0B 00 42 1E: Guillaum
43 7E 02 32 13 44 1E: MyBonnie
43 7E 02 04 19 45 1E: P_MenuBa,SilentNt
43 7E 02 04 00 45 1E: D_WeWish
43 7E 02 04 13 45 1E: Funicula,Slavon10
43 7E 02 06 13 46 1E: Slavon10
43 7E 02 44 16 46 1E: Primvera

In [114]:
ocprint({k:v for k, v in sysex_occurences.items() if k[2] == 0x02 and k[4] >= 0x1E}, key=lambda k:k[4])


43 7E 02 00 20 00 20: America,D_ChTree,Frulied,SilentNt
43 7E 02 02 20 02 20: JoyOfMan,Mondshin
43 7E 02 07 20 07 20: D_London,MussIDen
43 7E 02 09 20 09 20: Canon

No odd chords.


In [113]:
ocprint({k:v for k, v in sysex_occurences.items() if k[2] == 0x02 and k[4] != k[6] and k[6] != 0x1E}, key=lambda k:k[4])


43 7E 02 05 08 05 00: Mondshin
43 7E 02 09 08 09 00: D_Weasel

Hmmm, it looks like there are weird things in D_Weasel and D_Mondshin


In [126]:
ocprint({k:v for k, v in sysex_occurences.items() if k[2] == 0x02 and 
         not((0x20 <= (k[3] & 0xF0) <= 0x40) and ( 0x00 <= (k[3] & 0xF) <= 0x07))},
        key=lambda k:k[3])


43 7E 02 00 00 00 00: America,AtHome,AuraLee,Babbino,Banjo,BrownJug,Camptown,D_Agstin,D_ChTree,D_
43 7E 02 00 13 04 1E: America,Frulied,SilentNt
43 7E 02 00 20 00 20: America,D_ChTree,Frulied,SilentNt
43 7E 02 00 13 00 13: America,AtHome,AuraLee,Banjo,BillBail,D_Smoky,Frulied,Frustime,IrishEye,Lom
43 7E 02 00 13 05 1E: Frulied
43 7E 02 00 00 0A 1E: Frulied
43 7E 02 00 00 07 1E: America,AtHome,Banjo,BillBail,D_Three,Frulied,Funicula,IrishEye,Lorelei,Mus
43 7E 02 00 08 07 1E: Frulied,Mondshin,SerenaHy,Ungaris5
43 7E 02 00 12 00 12: BrownJug,Frulied
43 7E 02 00 00 04 1E: America,AtHome,Babbino,D_Smoky,D_WeWish,JoyOfMan,MussIDen,P_MenuBa,Turkey,V
43 7E 02 00 07 00 07: AuraLee,Banjo
43 7E 02 00 01 00 01: AuraLee,Banjo,BillBail,BrownJug,PearlFis
43 7E 02 00 08 00 08: Mondshin,Ungaris5
43 7E 02 00 0A 00 0A: D_Indian
43 7E 02 00 01 07 1E: Lorelei
43 7E 02 00 13 0A 1E: Banjo,IrishEye,Slavon10,Susanna
43 7E 02 00 02 00 02: Banjo
43 7E 02 00 00 0B 1E: Camptown,Turkey
43 7E 02 00 01 04 1E: BrownJug
43 7E 02 00 19 00 19: Toreador
43 7E 02 00 02 07 1E: AtHome
43 7E 02 00 13 07 1E: AtHome,Liebest3
43 7E 02 01 0B 01 0B: JoyOfMan
43 7E 02 01 12 01 12: Mondshin
43 7E 02 02 00 06 1E: Canon,D_Scarbo,Frulied,Gavotte,JoyOfMan,MagicFlt,Mirliton
43 7E 02 02 13 02 13: America,AtHome,AuraLee,Babbino,D_Close,D_WeWish,Frulied,Funicula,IrishEye,J
43 7E 02 02 08 02 08: America,AtHome,D_Close,D_Weasel,DanubeWa,Lomond,Lorelei,Mondshin,MussIDen,P
43 7E 02 02 00 09 1E: Babbino,Gavotte,P_MenuBa,Thais
43 7E 02 02 08 05 1E: Lorelei,P_MenuBa,Toreador
43 7E 02 02 00 07 1E: JoyOfMan
43 7E 02 02 00 02 00: Babbino,Canon,D_Scarbo,D_WeWish,Gavotte,JoyOfMan,MagicFlt,Mirliton,Mondshin
43 7E 02 02 20 02 20: JoyOfMan,Mondshin
43 7E 02 02 13 06 1E: D_ChTree,JoyOfMan,Mondshin
43 7E 02 02 0A 02 0A: America,BillBail,D_ChTree,D_Close,D_WeWish,D_Weasel,IrishEye,Voglein
43 7E 02 02 09 09 1E: DanubeWa
43 7E 02 02 13 07 1E: Lorelei
43 7E 02 02 00 00 1E: Thais
43 7E 02 02 08 09 1E: PearlFis
43 7E 02 02 16 02 16: Banjo
43 7E 02 02 0A 00 1E: BrownJug
43 7E 02 02 08 00 1E: MussIDen
43 7E 02 03 00 03 00: Frulied,Frustime,Liebest3,Ungaris5
43 7E 02 03 13 03 13: Liebest3,Toreador
43 7E 02 03 19 03 19: Toreador
43 7E 02 03 12 03 12: AtHome
43 7E 02 04 13 04 13: DanubeWa,Gavotte,IrishEye,Orphee,P_MenuBa,PearlFis,Toreador
43 7E 02 04 08 07 1E: JoyOfMan,P_MenuBa,Slavon10
43 7E 02 04 00 04 00: D_WeWish,Guillaum,Liebest3,Orphee,P_MenuBa,Primvera,Sympho9,Voglein
43 7E 02 04 19 45 1E: P_MenuBa,SilentNt
43 7E 02 04 00 0B 1E: P_MenuBa
43 7E 02 04 14 04 14: P_MenuBa
43 7E 02 04 08 04 08: Babbino,D_Scarbo,Funicula,Gavotte,JoyOfMan,Lomond,Slavon10,Thais
43 7E 02 04 08 02 1E: JoyOfMan
43 7E 02 04 0A 04 0A: D_Close,D_WeWish,Thais
43 7E 02 04 00 45 1E: D_WeWish
43 7E 02 04 07 04 07: Guillaum
43 7E 02 04 08 09 1E: Thais
43 7E 02 04 08 0B 1E: Funicula,Slavon10
43 7E 02 04 13 0B 1E: AtHome,Funicula
43 7E 02 04 13 45 1E: Funicula,Slavon10
43 7E 02 04 0B 04 0B: Mirliton
43 7E 02 04 09 04 09: D_Scarbo
43 7E 02 04 12 04 12: Frustime
43 7E 02 04 00 08 1E: Primvera
43 7E 02 05 00 07 1E: AtHome,D_ChTree,D_Mary,Voglein
43 7E 02 05 00 05 00: America,AtHome,AuraLee,Banjo,BillBail,Camptown,D_Close,D_Indian,D_Smoky,D_T
43 7E 02 05 00 09 1E: Banjo,Frulied,IrishEye,P_MenuBa,Slavon10,Susanna,Turkey
43 7E 02 05 02 05 02: AtHome,D_Close,P_MenuBa
43 7E 02 05 08 05 08: AuraLee,Liebest3,Toreador
43 7E 02 05 13 05 13: Frustime,Liebest3,Toreador,Ungaris5
43 7E 02 05 0A 05 0A: D_Indian
43 7E 02 05 00 00 1E: D_ChTree,D_Close,IrishEye,Mondshin,SerenaHy,Toreador
43 7E 02 05 08 05 00: Mondshin
43 7E 02 05 09 05 09: Mondshin
43 7E 02 05 01 05 01: America,BrownJug,D_Three,Funicula,Surprise
43 7E 02 05 08 26 1E: IrishEye,Liebest3,Susanna,Turkey
43 7E 02 05 12 05 12: Mirliton
43 7E 02 06 13 06 13: Guillaum
43 7E 02 06 11 06 11: BillBail,Camptown,IrishEye
43 7E 02 06 0B 06 0B: Banjo,SilentNt,Slavon10
43 7E 02 06 12 06 12: AtHome,BrownJug
43 7E 02 06 08 06 08: Canon,Mirliton,Primvera
43 7E 02 06 00 06 00: Slavon10
43 7E 02 06 13 46 1E: Slavon10
43 7E 02 06 15 06 15: AtHome
43 7E 02 07 00 07 00: America,AtHome,Babbino,Banjo,Canon,D_Close,D_Cuckoo,D_Indian,D_London,D_Mar
43 7E 02 07 13 07 13: America,AtHome,AuraLee,Banjo,BillBail,BrownJug,Camptown,D_Agstin,D_Close,D_
43 7E 02 07 08 07 08: Frulied,Mirliton,Mondshin,PearlFis,Toreador,Ungaris5
43 7E 02 07 13 02 1E: America,AtHome,D_Smoky,Frulied,MagicFlt,SilentNt,Voglein
43 7E 02 07 13 05 1E: Frulied
43 7E 02 07 13 0B 1E: Frulied,Mondshin,MussIDen
43 7E 02 07 00 0B 1E: America,Babbino,Banjo,JoyOfMan,P_MenuBa,Thais,Turkey
43 7E 02 07 00 06 1E: JoyOfMan
43 7E 02 07 00 05 1E: D_WeWish,Voglein
43 7E 02 07 08 0A 1E: Ungaris5
43 7E 02 07 16 07 16: BillBail
43 7E 02 07 1A 07 1A: AtHome,BillBail
43 7E 02 07 00 00 1E: D_Close
43 7E 02 07 00 09 1E: Thais
43 7E 02 07 00 02 1E: America,Babbino,Funicula,Voglein
43 7E 02 07 08 02 1E: Mondshin
43 7E 02 07 14 07 14: AtHome,Banjo,MussIDen,SilentNt,Voglein
43 7E 02 07 01 07 01: Canon,Gavotte
43 7E 02 07 13 00 1E: D_ChTree,Voglein
43 7E 02 07 07 07 07: America
43 7E 02 07 20 07 20: D_London,MussIDen
43 7E 02 08 11 08 11: Mirliton
43 7E 02 08 0B 08 0B: Mirliton
43 7E 02 09 08 09 08: AtHome,Babbino,D_Agstin,D_ChTree,D_Close,D_WeWish,D_Weasel,DanubeWa,Funicul
43 7E 02 09 08 04 1E: P_MenuBa,PearlFis,Toreador
43 7E 02 09 00 41 1E: Gavotte,Mirliton,MussIDen,P_MenuBa,Thais
43 7E 02 09 00 09 00: AuraLee,Canon,D_Scarbo,Gavotte,Mirliton,Orphee,P_MenuBa,PearlFis,Primvera,T
43 7E 02 09 08 00 1E: JoyOfMan,P_MenuBa
43 7E 02 09 13 09 13: AuraLee,Babbino,BillBail,Camptown,D_WeWish,Gavotte,IrishEye,Orphee,PearlFis
43 7E 02 09 08 07 1E: JoyOfMan
43 7E 02 09 00 04 1E: D_WeWish,Guillaum,Mirliton,Primvera
43 7E 02 09 13 04 1E: D_WeWish,Gavotte
43 7E 02 09 0B 09 0B: Ungaris5
43 7E 02 09 01 09 01: Guillaum
43 7E 02 09 0A 09 0A: AtHome,Babbino,D_Close
43 7E 02 09 13 41 1E: Gavotte,Mondshin
43 7E 02 09 12 09 12: Mondshin
43 7E 02 09 14 09 14: Camptown,Slavon10
43 7E 02 09 19 09 19: America
43 7E 02 09 09 09 09: Slavon10
43 7E 02 09 0A 07 1E: SilentNt
43 7E 02 09 08 09 00: D_Weasel
43 7E 02 09 20 09 20: Canon
43 7E 02 0A 01 0A 01: Frulied,Toreador
43 7E 02 0A 00 0A 00: Frustime,PearlFis,Ungaris5
43 7E 02 0A 02 0A 02: PearlFis
43 7E 02 0A 11 0A 11: Slavon10
43 7E 02 0A 08 0A 08: Toreador
43 7E 02 0A 13 0A 13: Frustime,Liebest3
43 7E 02 0A 00 05 1E: Frustime
43 7E 02 0A 00 02 1E: Frustime
43 7E 02 0A 16 0A 16: Liebest3
43 7E 02 0B 0B 0B 0B: P_MenuBa
43 7E 02 0B 08 02 1E: JoyOfMan
43 7E 02 0B 00 0B 00: Guillaum,Primvera,Slavon10
43 7E 02 0B 00 42 1E: Guillaum
43 7E 02 0B 01 0B 01: BillBail
43 7E 02 0B 00 06 1E: Thais
43 7E 02 0B 0A 0B 0A: Babbino
43 7E 02 0B 12 0B 12: Mirliton,Mondshin
43 7E 02 0B 08 0B 08: Canon,Gavotte
43 7E 02 0B 13 0B 13: Funicula,Slavon10
43 7E 02 0B 13 06 1E: Slavon10
43 7E 02 0B 07 0B 07: Slavon10

In [125]:
ocprint({k:v for k, v in sysex_occurences.items() if k[2] == 0x02 and 
         not (0x00 <= k[3] <= 0x0B)},
        key=lambda k:k[3])


43 7E 02 22 16 22 16: BillBail
43 7E 02 22 00 22 00: D_London,Mondshin
43 7E 02 22 00 00 1E: Mondshin
43 7E 02 22 02 22 02: AtHome
43 7E 02 22 00 31 1E: SilentNt
43 7E 02 22 08 24 1E: Liebest3
43 7E 02 22 08 22 08: Liebest3
43 7E 02 22 09 22 09: Liebest3
43 7E 02 25 00 25 00: Toreador
43 7E 02 26 13 23 1E: Mondshin
43 7E 02 26 00 31 1E: Mondshin,SilentNt
43 7E 02 26 13 26 13: America,SerenaHy
43 7E 02 26 00 26 00: Liebest3,Toreador
43 7E 02 31 00 31 00: MyBonnie
43 7E 02 32 13 32 13: MyBonnie
43 7E 02 32 13 44 1E: MyBonnie
43 7E 02 33 00 33 00: Guillaum
43 7E 02 34 00 34 00: MyBonnie
43 7E 02 35 13 35 13: MyBonnie
43 7E 02 36 08 36 08: MyBonnie
43 7E 02 41 08 41 08: Guillaum,Primvera
43 7E 02 41 12 41 12: America,BillBail
43 7E 02 41 13 41 13: Slavon10
43 7E 02 44 12 44 12: AtHome
43 7E 02 44 16 46 1E: Primvera
43 7E 02 44 15 44 15: Liebest3
43 7E 02 45 12 45 12: D_WeWish,SilentNt
43 7E 02 45 13 45 13: Guillaum
43 7E 02 46 08 41 1E: Thais

In [127]:
control_occurences = {}
for song, track in midtracks:
    song_name = song.partition('.')[0]
    for m in track:
        if m.type == 'control_change':
            control_occurences.setdefault(m.control, set()).add(song_name)

In [128]:
control_occurences


Out[128]:
{0: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 32: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 7: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 10: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 11: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 91: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 93: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 101: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 100: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 6: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 64: {'AtHome',
  'Babbino',
  'Canon',
  'D_WeWish',
  'DanubeWa',
  'Gavotte',
  'JoyOfMan',
  'Lomond',
  'Lorelei',
  'Mondshin',
  'P_Angels',
  'P_Cheval',
  'P_Consol',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'SilentNt',
  'Surprise'},
 1: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'BillBail',
  'BrownJug',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Liebest3',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Angels',
  'P_Arabes',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_Inocen',
  'P_MenuBa',
  'P_MenuBo',
  'P_Moment',
  'P_PChien',
  'P_Petite',
  'P_Progre',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'P_Violet',
  'PearlFis',
  'Primvera',
  'SaintsGo',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 74: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_London',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Consol',
  'P_MenuBa',
  'P_Tendre',
  'PearlFis',
  'Primvera',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 71: {'America',
  'AtHome',
  'AuraLee',
  'Babbino',
  'Banjo',
  'Camptown',
  'Canon',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_London',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Frulied',
  'Frustime',
  'Funicula',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'JoyOfMan',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mirliton',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'Orphee',
  'P_Consol',
  'P_MenuBa',
  'P_Tendre',
  'PearlFis',
  'Primvera',
  'SerenaHy',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Sympho9',
  'Thais',
  'Toreador',
  'Turkey',
  'Ungaris5',
  'Voglein'},
 73: {'AtHome',
  'AuraLee',
  'Babbino',
  'Canon',
  'D_Close',
  'D_Cuckoo',
  'D_London',
  'D_Scarbo',
  'D_Smoky',
  'DanubeWa',
  'Frulied',
  'Funicula',
  'Gavotte',
  'IrishEye',
  'Lomond',
  'Lorelei',
  'MagicFlt',
  'Mondshin',
  'MyBonnie',
  'Orphee',
  'P_Consol',
  'P_MenuBa',
  'PearlFis',
  'Primvera',
  'SerenaHy',
  'SilentNt',
  'Surprise',
  'Thais',
  'Ungaris5'},
 99: {'Frustime', 'MyBonnie', 'P_Consol'},
 98: {'Frustime', 'MyBonnie', 'P_Consol'},
 72: {'MyBonnie', 'P_Consol'},
 94: {'America', 'Camptown'}}

In [130]:
from commons.messages import wrappers

In [134]:
def cwrap(c):
    try:
        return wrappers.Control(c)
    except ValueError:
        return c

[cwrap(c) for c in control_occurences]


Out[134]:
[<Control.BANK_MSB: 0>,
 <Control.BANK_LSB: 32>,
 <Control.VOLUME: 7>,
 <Control.PAN: 10>,
 <Control.EXPRESSION: 11>,
 <Control.REVERB: 91>,
 <Control.CHORUS: 93>,
 <Control.RPN_MSB: 101>,
 <Control.RPN_LSB: 100>,
 <Control.DATA_MSB: 6>,
 <Control.PEDAL: 64>,
 <Control.MODULATION: 1>,
 <Control.BRIGHTNESS: 74>,
 <Control.HARMONIC: 71>,
 <Control.ATTACK: 73>,
 99,
 98,
 <Control.RELEASE: 72>,
 94]

We have controls 99, 98, 94 not recognised.


In [147]:
m_occurences = {}
for song, track in midtracks:
    song_name = song.partition('.')[0]
    for m in track:
        if m.type not in {
            'note_on', 'note_off', 'pitchwheel', 'control_change', 'sysex', 'program_change', 'set_tempo',
            'end_of_track', 'key_signature', 'time_signature', 'copyright', 'sequencer_specific',
        }:
            m_occurences.setdefault(mido.frozen.freeze_message(m.copy(time=0)), set()).add(song_name)

In [148]:
m_occurences


Out[148]:
{<frozen meta message smpte_offset frame_rate=25 hours=32 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>: {'America',
  'AuraLee',
  'Babbino',
  'BillBail',
  'Camptown',
  'Canon',
  'D_Agstin',
  'D_ChTree',
  'D_Close',
  'D_Cuckoo',
  'D_ImMai',
  'D_Indian',
  'D_London',
  'D_Mary',
  'D_RowRow',
  'D_Scarbo',
  'D_Smoky',
  'D_Three',
  'D_WeWish',
  'D_Weasel',
  'DanubeWa',
  'Gavotte',
  'Guillaum',
  'IrishEye',
  'Liebest3',
  'Lorelei',
  'Mondshin',
  'MussIDen',
  'MyBonnie',
  'P_Candeu',
  'P_Cheval',
  'P_Consol',
  'P_PChien',
  'P_Petite',
  'P_Sarafa',
  'P_TMarch',
  'P_Tendre',
  'SaintsGo',
  'SerenaHy',
  'Sympho9',
  'Toreador',
  'Turkey'},
 <frozen meta message smpte_offset frame_rate=24 hours=0 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>: {'AtHome',
  'Banjo',
  'BrownJug',
  'Frulied',
  'Frustime',
  'Funicula',
  'JoyOfMan',
  'Lomond',
  'MagicFlt',
  'Mirliton',
  'Orphee',
  'P_Angels',
  'P_MenuBa',
  'P_Moment',
  'PearlFis',
  'Primvera',
  'SilentNt',
  'Slavon10',
  'Surprise',
  'Susanna',
  'Thais',
  'Ungaris5',
  'Voglein'},
 <frozen meta message smpte_offset frame_rate=25 hours=33 minutes=0 seconds=0 frames=0 sub_frames=0 time=0>: {'P_Arabes',
  'P_Inocen',
  'P_MenuBo',
  'P_Progre',
  'P_Violet'},
 <frozen meta message marker text='XG System on' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB TYPE' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PARAMETER 1' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PARAMETER 2' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PARAMETER 3' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PARAMETER 4' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PARAMETER 5' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB RETURN' time=0>: {'P_Consol'},
 <frozen meta message marker text='REVERB PAN' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS TYPE' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 1' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 2' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 3' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 4' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 5' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 6' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 7' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 8' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PARAMETER 9' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS RETURN' time=0>: {'P_Consol'},
 <frozen meta message marker text='CHORUS PAN' time=0>: {'P_Consol'},
 <frozen meta message marker text='SEND CHORUS TO REVERB' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION TYPE' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 1' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 2' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 3' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 4' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 5' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 6' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 7' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 8' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 9' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PARAMETER 10' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION RETURN' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PAN' time=0>: {'P_Consol'},
 <frozen meta message marker text='SEND VARIATION TO REVERB' time=0>: {'P_Consol'},
 <frozen meta message marker text='SEND VARIATION TO CHORUS' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION CONNECTION' time=0>: {'P_Consol'},
 <frozen meta message marker text='VARIATION PART' time=0>: {'P_Consol'},
 <frozen meta message marker text='MasterVolume' time=0>: {'P_Consol'}}

P_Consol has a bunch of weird stuff in it.


In [ ]: