+ enum VisibleNoteRange {
+ FullRange,
+ ContentsRange
+ };
+
+ Gtk::Adjustment note_range_adjustment;
+ ArdourCanvas::Group* midi_underlay_group;
+
+ void set_note_range(VisibleNoteRange r);
+
+ inline uint8_t lowest_note() const { return _lowest_note; }
+ inline uint8_t highest_note() const { return _highest_note; }
+
+ void update_note_range(uint8_t note_num);
+
+ void redisplay_diskstream ();
+
+ inline double contents_height() const
+ { return (_trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2); }
+
+ inline double note_to_y(uint8_t note) const
+ { return contents_height()
+ - (note + 1 - lowest_note()) * note_height() + 1; }
+
+ inline uint8_t y_to_note(double y) const
+ { return (uint8_t)((contents_height() - y - 1)
+ / contents_height() * (double)contents_note_range())
+ + lowest_note(); }
+
+ inline double note_height() const
+ { return contents_height() / (double)contents_note_range(); }
+
+ inline uint8_t contents_note_range() const
+ { return highest_note() - lowest_note() + 1; }
+
+ sigc::signal<void> NoteRangeChanged;