diff options
author | David Robillard <d@drobilla.net> | 2007-07-15 01:56:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-15 01:56:11 +0000 |
commit | 332a3d98138e94903ad9c6d35048b0201ff178c8 (patch) | |
tree | 107ac2a68b8c461a534e82d41e47fedfc5ed9178 /gtk2_ardour/midi_time_axis.cc | |
parent | 74eded425a5244831c80968c1781c3f81f90e996 (diff) |
Selection of visible note range (full range vs fit contents, selectable from midi track menu).
Added note pencil tool, mock note adding (notes can be added visually but don't yet play).
Reworked MidiModel to be notes w/ duration instead of realtime style MIDI events.
Moved layering (stacked/overlaid) from auto time axis down to route time axis since it applies
to MIDI tracks as well.
git-svn-id: svn://localhost/ardour2/trunk@2128 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 48aa78dc06..fb3d67913d 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -157,6 +157,31 @@ MidiTimeAxisView::hide () } void +MidiTimeAxisView::append_extra_display_menu_items () +{ + using namespace Menu_Helpers; + + MenuList& items = display_menu->items(); + + // Note range + Menu *range_menu = manage(new Menu); + MenuList& range_items = range_menu->items(); + range_menu->set_name ("ArdourContextMenu"); + + RadioMenuItem::Group range_group; + + range_items.push_back (RadioMenuElem (range_group, _("Show Full Range"), bind ( + mem_fun(*this, &MidiTimeAxisView::set_note_range), + MidiStreamView::FullRange))); + + range_items.push_back (RadioMenuElem (range_group, _("Fit Contents"), bind ( + mem_fun(*this, &MidiTimeAxisView::set_note_range), + MidiStreamView::ContentsRange))); + + items.push_back (MenuElem (_("Note range"), *range_menu)); +} + +void MidiTimeAxisView::build_automation_action_menu () { using namespace Menu_Helpers; @@ -204,6 +229,17 @@ MidiTimeAxisView::set_note_mode(NoteMode mode) } } + +void +MidiTimeAxisView::set_note_range(MidiStreamView::VisibleNoteRange range) +{ + //if (midi_view()->note_range() != range) { + midi_view()->set_note_range(range); + midi_view()->redisplay_diskstream(); + //} +} + + /** Prompt for a controller with a dialog and add an automation track for it */ void @@ -285,3 +321,4 @@ MidiTimeAxisView::route_active_changed () } } + |