diff --git a/lily/audio-item.cc b/lily/audio-item.cc index a8a78199c7..cf5b827899 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -129,7 +129,7 @@ moment_to_real (Moment m) int moment_to_ticks (Moment m) { - return int (moment_to_real (m) * 384 * 4); + return int (moment_to_real (m) * MIDI_TICKS * 4); } void Audio_span_dynamic::set_end_moment (Moment mom) diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index 57bb2d4da2..a843abb855 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -23,6 +23,8 @@ #include "audio-item.hh" #include "std-vector.hh" +#define MIDI_TICKS 960 + string int2midi_varint_string (int i); /** diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index d9765c6814..1d1b3196f7 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -86,7 +86,7 @@ Midi_walker::do_start_note (Midi_note *note) assert (note->audio_ == ptr); int now_ticks = ptr->audio_column_->ticks (); int stop_ticks = int (moment_to_real (note->audio_->length_mom_) * - Real (384 * 4)) + now_ticks; + Real (MIDI_TICKS * 4)) + now_ticks; for (vsize i = 0; i < stop_note_queue.size (); i++) { /* if this pitch already in queue, and is not already ignored */