summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_streamview.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-15 01:56:11 +0000
committerDavid Robillard <d@drobilla.net>2007-07-15 01:56:11 +0000
commit332a3d98138e94903ad9c6d35048b0201ff178c8 (patch)
tree107ac2a68b8c461a534e82d41e47fedfc5ed9178 /gtk2_ardour/midi_streamview.h
parent74eded425a5244831c80968c1781c3f81f90e996 (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_streamview.h')
-rw-r--r--gtk2_ardour/midi_streamview.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_streamview.h b/gtk2_ardour/midi_streamview.h
index ce459e2fad..b8ae33cf46 100644
--- a/gtk2_ardour/midi_streamview.h
+++ b/gtk2_ardour/midi_streamview.h
@@ -58,8 +58,18 @@ class MidiStreamView : public StreamView
void get_selectables (jack_nframes_t start, jack_nframes_t end, list<Selectable* >&);
void get_inverted_selectables (Selection&, list<Selectable* >& results);
- uint8_t lowest_note() const { return _lowest_note; }
- uint8_t highest_note() const { return _highest_note; }
+ enum VisibleNoteRange {
+ FullRange,
+ ContentsRange
+ };
+
+ VisibleNoteRange note_range() { return _range; }
+ void set_note_range(VisibleNoteRange r) { _range = r; }
+
+ uint8_t lowest_note() const { return (_range == FullRange) ? 0 : _lowest_note; }
+ uint8_t highest_note() const { return (_range == FullRange) ? 127 : _highest_note; }
+
+ void update_bounds(uint8_t note_num);
void redisplay_diskstream ();
@@ -73,8 +83,9 @@ class MidiStreamView : public StreamView
void color_handler ();
- uint8_t _lowest_note;
- uint8_t _highest_note;
+ VisibleNoteRange _range;
+ uint8_t _lowest_note;
+ uint8_t _highest_note;
};
#endif /* __ardour_midi_streamview_h__ */