diff --git a/gtk2_ardour/canvas-note-event.h b/gtk2_ardour/canvas-note-event.h index 060e4d9fa9..75747bc288 100644 --- a/gtk2_ardour/canvas-note-event.h +++ b/gtk2_ardour/canvas-note-event.h @@ -92,8 +92,7 @@ public: const boost::shared_ptr note() const { return _note; } - inline static uint32_t meter_style_fill_color(uint8_t vel) - { + inline static uint32_t meter_style_fill_color(uint8_t vel) { if (vel < 64) { return UINT_INTERPOLATE( ARDOUR_UI::config()->canvasvar_MidiNoteMeterColorBase.get(), @@ -108,8 +107,7 @@ public: } /// calculate outline colors from fill colors of notes - inline static uint32_t calculate_outline(uint32_t color) - { + inline static uint32_t calculate_outline(uint32_t color) { return UINT_INTERPOLATE(color, 0x000000ff, 0.5); } diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index af3203ec9b..919d88eacb 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -743,8 +743,8 @@ MidiRegionView::apply_note_range (uint8_t min, uint8_t max, bool force) note->property_y1() = y1; note->property_y2() = y2; } else if (CanvasHit* hit = dynamic_cast(event)) { - double x = trackview.editor().frame_to_pixel((nframes64_t) - event->note()->time() - _region->start()); + double x = trackview.editor().frame_to_pixel( + beats_to_frames(event->note()->time()) - _region->start()); const double diamond_size = midi_stream_view()->note_height() / 2.0; double y = midi_stream_view()->note_to_y(event->note()->note()) + ((diamond_size-2.0) / 4.0); diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 3376a9da9f..7d78ae4365 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -290,6 +290,8 @@ MidiTimeAxisView::append_extra_display_menu_items () MidiStreamView::ContentsRange))); items.push_back (MenuElem (_("Note range"), *range_menu)); + + items.push_back (MenuElem (_("Note mode"), *build_note_mode_menu())); } void diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index f8b34bd459..674fb2db71 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -550,14 +550,17 @@ RouteTimeAxisView::build_display_menu () if (!Profile->get_sae()) { items.push_back (MenuElem (_("Alignment"), *alignment_menu)); - get_diskstream()->AlignmentStyleChanged.connect (mem_fun(*this, &RouteTimeAxisView::align_style_changed)); + get_diskstream()->AlignmentStyleChanged.connect ( + mem_fun(*this, &RouteTimeAxisView::align_style_changed)); RadioMenuItem::Group mode_group; - items.push_back (RadioMenuElem (mode_group, _("Normal mode"), - bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Normal))); + items.push_back (RadioMenuElem (mode_group, _("Normal mode"), bind ( + mem_fun (*this, &RouteTimeAxisView::set_track_mode), + ARDOUR::Normal))); normal_track_mode_item = dynamic_cast(&items.back()); - items.push_back (RadioMenuElem (mode_group, _("Tape mode"), - bind (mem_fun (*this, &RouteTimeAxisView::set_track_mode), ARDOUR::Destructive))); + items.push_back (RadioMenuElem (mode_group, _("Tape mode"), bind ( + mem_fun (*this, &RouteTimeAxisView::set_track_mode), + ARDOUR::Destructive))); destructive_track_mode_item = dynamic_cast(&items.back()); switch (track()->mode()) { @@ -568,6 +571,7 @@ RouteTimeAxisView::build_display_menu () normal_track_mode_item->set_active (); break; } + } get_diskstream()->AlignmentStyleChanged.connect ( mem_fun(*this, &RouteTimeAxisView::align_style_changed)); @@ -581,7 +585,6 @@ RouteTimeAxisView::build_display_menu () items.push_back (MenuElem (_("Color Mode"), *color_mode_menu)); items.push_back (SeparatorElem()); - } } items.push_back (CheckMenuElem (_("Active"), mem_fun(*this, &RouteUI::toggle_route_active)));