]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-walker.cc
Run grand replace for 2015.
[lilypond.git] / lily / midi-walker.cc
index 59a2c387239290c2d399d16d41aece2c1814e421..bc6c93dc56344f0a5a8b3b96078dfcdf0ac6d7c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -52,15 +52,15 @@ audio_item_less (Audio_item *const a,
   return a->get_column ()->when_ < b->get_column ()->when_;
 }
 
-Midi_walker::Midi_walker (Audio_staff *audio_staff, Midi_track *track)
+Midi_walker::Midi_walker (Audio_staff *audio_staff, Midi_track *track, int start_tick)
 {
   track_ = track;
   index_ = 0;
   items_ = audio_staff->audio_items_;
   vector_sort (items_, audio_item_less);
-  //Pieces that begin with grace notes start at negative times. This
+  //Scores that begin with grace notes start at negative times. This
   //is OK - MIDI output doesn't use absolute ticks, only differences.
-  last_tick_ = items_.empty () ? 0 : items_[0]->audio_column_->ticks ();
+  last_tick_ = start_tick;
   percussion_ = audio_staff->percussion_;
   merge_unisons_ = audio_staff->merge_unisons_;
 }