a-High/LowPass allow 8K samples inclusive
[ardour.git] / gtk2_ardour / midi_region_view.h
index b5972cb9d2d28f4669d0492f8518285e4677261b..93ce1e5011e95caaba0bd3af9be58eec17f14aac 100644 (file)
@@ -355,6 +355,9 @@ private:
 
        friend class MidiRubberbandSelectDrag;
        friend class MidiVerticalSelectDrag;
+       friend class NoteDrag;
+       friend class NoteCreateDrag;
+       friend class HitCreateDrag;
 
        friend class EditNoteDialog;
 
@@ -517,6 +520,13 @@ private:
 
         ARDOUR::ChannelMode get_channel_mode() const;
         uint16_t get_selected_channels () const;
+
+       inline double contents_height() const { return (_height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2); }
+       inline double contents_note_range () const { return (double)(_current_range_max - _current_range_min + 1); }
+       inline double note_height() const { return contents_height() / contents_note_range(); }
+
+       double note_to_y (uint8_t note) const;
+       uint8_t y_to_note (double y) const;
 };