title: How do you transpose a midi file?
body: <p>I'm using this MIDI.js library: <a href="https://github.com/mudcube/MIDI.js" rel="noreferrer">https://github.com/mudcube/MIDI.js</a></p>
  
  <p>To load the plugin and play the midi file, I'm doing this:</p>
  
  <pre><code>window.onload = function () {
      MIDI.loadPlugin({
          soundfontUrl: "./soundfont/",
          instruments: [ "acoustic_grand_piano" ],
          callback: function() {
              MIDI.programChange(0, 0);   
                      _player = MIDI.Player;
  
          }
      });
  </code></pre>
  
  <p>};</p>
  
  <pre><code>function playSong(){            
          _player.timeWarp = 1; // speed the song is played back
          _player.loadFile(song[songid], _player.start);
  
          _player.addListener(function(data) {
              var now = data.now; // where we are now
              var end = data.end; // time when song ends
              var channel = data.channel; // channel note is playing on
              var message = data.message; // 128 is noteOff, 144 is noteOn
              var note = data.note; // the note
              var velocity = data.velocity; // the velocity of the note
  
  
          });
  }
  
  var songid = 0;
  var song = ['data:audio/mid;base64,TVRoZAAAAA...
  </code></pre>
  
  <p>My question is, is there anyway to transpose this midi file before playing?  Basically I want to parse a midi file (either a .mid file, or the base64 format), change all the notes by +1 and then send it to the player.  Any way to do this in javascript?</p>