Bring the note mode menu back from the dead.
Fix percussive note (diamonds) placement. git-svn-id: svn://localhost/ardour2/branches/3.0@4587 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3cfb9126af
commit
5b71b9333a
@ -92,8 +92,7 @@ public:
|
||||
|
||||
const boost::shared_ptr<NoteType> 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);
|
||||
}
|
||||
|
||||
|
@ -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<CanvasHit*>(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);
|
||||
|
@ -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
|
||||
|
@ -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<RadioMenuItem*>(&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<RadioMenuItem*>(&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)));
|
||||
|
Loading…
Reference in New Issue
Block a user