- if (tv.is_track())
- stream_base_color = color_map[cMidiTrackBase];
- else
- stream_base_color = color_map[cMidiBusBase];
-
- canvas_rect->property_fill_color_rgba() = stream_base_color;
- canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
+ /* use a group dedicated to MIDI underlays. Audio underlays are not in this group. */
+ midi_underlay_group = new ArdourCanvas::Group (*_canvas_group);
+ midi_underlay_group->lower_to_bottom();
+
+ /* put the note lines in the timeaxisview's group, so it
+ can be put below ghost regions from MIDI underlays*/
+ _note_lines = new ArdourCanvas::LineSet(*_canvas_group, ArdourCanvas::LineSet::Horizontal);
+
+ _note_lines->property_x1() = 0;
+ _note_lines->property_y1() = 0;
+ _note_lines->property_x2() = DBL_MAX;
+ _note_lines->property_y2() = 0;
+
+ _note_lines->signal_event().connect(sigc::bind(
+ sigc::mem_fun(_trackview.editor(), &PublicEditor::canvas_stream_view_event),
+ _note_lines, &_trackview));
+
+ _note_lines->lower_to_bottom();
+
+ color_handler ();
+
+ ColorsChanged.connect(sigc::mem_fun(*this, &MidiStreamView::color_handler));