void AdvancedSequencer::Reset()
{
    Stop();
    driver.AllNotesOff();
    UnmuteAllTracks();
    UnSoloTrack();
    SetTempoScale ( 1.00 );
    seq.ResetAllTracks();
    GoToMeasure ( 0 );
}
 bool AdvancedSequencer::Load( const char *fname )
 {
   char realname[1024];
   
   strcpy( realname, fname );
   int orignamelen = strlen(fname);
   
   chain_mode =false;
   if( orignamelen>0 )
   {
     if( realname[orignamelen-1]=='+' )
     {
       realname[orignamelen-1]=0;
       chain_mode = true;
     }
   }
   
   MIDIFileReadStreamFile mfreader_stream( realname );
   MIDIFileReadMultiTrack track_loader( &tracks );
   MIDIFileRead reader( &mfreader_stream, &track_loader );
   
   Stop();
   driver.AllNotesOff();
   
   tracks.Clear();
   seq.ResetAllTracks();
   
   if( reader.Parse() )
   {
     file_loaded=true;
     
     Reset();
     
     GoToMeasure( 0 );
     ExtractWarpPositions();
     
   }
   else
   {
     file_loaded=false;
   }
   return file_loaded;
 }