OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 Jan Nieuwenhuizen <janneke@gnu.org> | 5 Jan Nieuwenhuizen <janneke@gnu.org> |
6 | 6 |
7 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void | 82 void |
83 Midi_walker::do_start_note (Midi_note *note) | 83 Midi_walker::do_start_note (Midi_note *note) |
84 { | 84 { |
85 Audio_item *ptr = items_[index_]; | 85 Audio_item *ptr = items_[index_]; |
86 assert (note->audio_ == ptr); | 86 assert (note->audio_ == ptr); |
87 int now_ticks = ptr->audio_column_->ticks (); | 87 int now_ticks = ptr->audio_column_->ticks (); |
88 int stop_ticks = int (moment_to_real (note->audio_->length_mom_) * | 88 int stop_ticks = int (moment_to_real (note->audio_->length_mom_) * |
89 Real (384 * 4)) + now_ticks; | 89 Real (384 * 4)) + now_ticks; |
90 for (vsize i = 0; i < stop_note_queue.size (); i++) | 90 for (vsize i = 0; i < stop_note_queue.size (); i++) |
91 { | 91 { |
92 /* if this pitch already in queue */ | 92 /* if this pitch already in queue, and is not already ignored */ |
93 if (stop_note_queue[i].val->get_semitone_pitch () | 93 if (!stop_note_queue[i].ignore_ && |
| 94 stop_note_queue[i].val->get_semitone_pitch () |
94 == note->get_semitone_pitch ()) | 95 == note->get_semitone_pitch ()) |
95 { | 96 { |
96 int queued_ticks | 97 int queued_ticks |
97 = stop_note_queue[i].val->audio_->audio_column_->ticks (); | 98 = stop_note_queue[i].val->audio_->audio_column_->ticks (); |
98 // If the two notes started at the same time, or option is set, | 99 // If the two notes started at the same time, or option is set, |
99 if (now_ticks == queued_ticks || merge_unisons_) | 100 if (now_ticks == queued_ticks || merge_unisons_) |
100 { | 101 { |
101 // merge them. | 102 // merge them. |
102 if (stop_note_queue[i].key < stop_ticks) | 103 if (stop_note_queue[i].key < stop_ticks) |
103 { | 104 { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 { | 214 { |
214 return index_ < items_.size (); | 215 return index_ < items_.size (); |
215 } | 216 } |
216 | 217 |
217 void | 218 void |
218 Midi_walker::operator ++(int) | 219 Midi_walker::operator ++(int) |
219 { | 220 { |
220 assert (ok ()); | 221 assert (ok ()); |
221 index_++; | 222 index_++; |
222 } | 223 } |
OLD | NEW |