title: How to interpret values of parameters of MIDI file analysis especially the "data" field of "midi.NoteOnEvent"?
body: <p>I am trying to analyse MIDI files using a toolkit <code>python-midi</code> for <code>python</code> (<a href="https://github.com/vishnubob/python-midi" rel="nofollow">link to the repo</a>).</p>
  
  <p>Basically, <strong>my question is about the interpretation of the data</strong> I just extracted. </p>
  
  <p>Here is the data:</p>
  
  <pre><code>mididump.py HHOP-Drums.mid 
  midi.Pattern(format=0, resolution=96, tracks=\
  [midi.Track(\
    [midi.TrackNameEvent(tick=0, text='HHOP-Drums\x00', data=[72, 72, 79, 80, 45, 68, 114, 117, 109, 115, 0]),
     midi.TimeSignatureEvent(tick=0, data=[4, 2, 36, 8]),
     midi.NoteOnEvent(tick=0, channel=0, data=[60, 125]),
     midi.NoteOnEvent(tick=0, channel=0, data=[71, 110]),
     midi.NoteOffEvent(tick=24, channel=0, data=[60, 0]),
     midi.NoteOffEvent(tick=0, channel=0, data=[71, 0]),
     (...)
     midi.NoteOffEvent(tick=12, channel=0, data=[71, 0]),
     midi.NoteOffEvent(tick=0, channel=0, data=[72, 0]),
     midi.NoteOnEvent(tick=0, channel=0, data=[72, 110]),
     midi.NoteOffEvent(tick=24, channel=0, data=[72, 0]),
     midi.EndOfTrackEvent(tick=0, data=[])])])
  </code></pre>
  
  <p><em>(I omitted most of the midi.NoteOn/OffEvent to shorten the code embeded in this question.
  Full analysis of this MIDI track is available here: <a href="http://pastebin.com/5emVhJWb" rel="nofollow">http://pastebin.com/5emVhJWb</a>.)</em></p>
  
  <ol>
  <li>I don't know what does a <code>data</code> field of <code>midi.TrackNameEvent</code> stands for. </li>
  <li>Secondly, a <code>data</code> field of <code>midi.NoteOn/OffEvent</code> is quite obscure. According to the documentation of the <code>python-midi</code> repo:
  
  <blockquote>
    <p>The NoteOnEvent captures the start of note, like a piano player pushing down on a piano key. The tick is when this event occurred, the pitch is the note value of the key pressed, and the velocity represents how hard the key was pressed.</p>
    
    <p>The NoteOffEvent captures the end of note, just like a piano player removing her finger from a depressed piano key. Once again, the tick is when this event occurred, the pitch is the note that is released, and the velocity has no real world analogy and is usually ignored. NoteOnEvents with a velocity of zero are equivalent to NoteOffEvents.</p>
  </blockquote></li>
  </ol>
  
  <p>So, it is easy to guess, that in case of the <code>midi.NoteOn/OffEvent</code> <code>data</code> field, we can interpret it like this: <code>midi.NoteOnEvent(tick=0, channel=0, data=[note_number, velocity])</code>.</p>
  
  <p>Here's the tricky part: The kick drum assigned to C1 in the analysed loop. Accoding to <a href="http://faydoc.tripod.com/formats/mid.htm" rel="nofollow">this explanation of the MIDI standard</a> C1's note number is 12. However, we can see in the output of the analysis, that the note number of the kick drum is 71.</p>
  
  <p>Why is it so?</p>
  
  <hr>
  
  <p><em>Note: What is more, after encoding the results of this analysis back to MIDI, the kickdrum seems to play at the C1 in Logic (a musical software for OS X).</em></p>