@Override
   public void parse() throws IllegalArgumentException
   {
      try
      {
         setTimeStampFormat(TimeStampFormat.getTimeStampFormat(buffer[0]));
      }
      catch (IllegalArgumentException ex)
      {  // ignore the bad value and set it to milliseconds so we can continue parsing the tag
         setTimeStampFormat(TimeStampFormat.MS);
      }
      int index     = 1;
      int bpm       = 0;
      int timeStamp = 0;

      tempoChanges = new Vector<TempoChange>();
      while ((index + 5) < buffer.length)
      {
         if (buffer[index] == (byte)0x00 && buffer[index] == (byte)0x01)
            bpm = buffer[index];
         else
            bpm = (buffer[index] == (byte)0xFF ? 255 + buffer[index + 1] : buffer[index]);
         index  += (buffer[index] == (byte)0xFF ? 2 : 1);
         timeStamp = ((buffer[index] & 0xFF ) << 24) + ((buffer[index + 1] & 0xFF) << 16) + ((buffer[index + 2] & 0xFF) << 8) + (buffer[index + 3] & 0xFF);
         tempoChanges.add(new TempoChange(bpm, timeStamp));
         index += 4;
      }
      dirty = false;    // we just read in the frame info, so the frame body's internal byte buffer is up to date
   }