ardour
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
MidiRegionView Class Reference

#include <midi_region_view.h>

Inheritance diagram for MidiRegionView:
RegionView TimeAxisViewItem Selectable PBD::ScopedConnectionList

Classes

struct  NoteResizeData
 

Public Types

enum  MouseState {
  None, Pressed, SelectTouchDragging, SelectRectDragging,
  SelectVerticalDragging, AddDragging
}
 
typedef Evoral::Note
< Evoral::Beats
NoteType
 
typedef Evoral::Sequence
< Evoral::Beats >::Notes 
Notes
 
typedef std::set< NoteBase * > Selection
 
- Public Types inherited from TimeAxisViewItem
enum  Visibility {
  ShowFrame = 0x1, ShowNameHighlight = 0x2, ShowNameText = 0x4, ShowHandles = 0x8,
  HideFrameLeft = 0x10, HideFrameRight = 0x20, HideFrameTB = 0x40, FullWidthNameHighlight = 0x80
}
 

Public Member Functions

 MidiRegionView (ArdourCanvas::Container *parent, RouteTimeAxisView &tv, boost::shared_ptr< ARDOUR::MidiRegion > r, double samples_per_pixel, uint32_t basic_color)
 
 MidiRegionView (ArdourCanvas::Container *parent, RouteTimeAxisView &tv, boost::shared_ptr< ARDOUR::MidiRegion > r, double samples_per_pixel, uint32_t basic_color, bool recording, Visibility visibility)
 
 MidiRegionView (const MidiRegionView &other)
 
 MidiRegionView (const MidiRegionView &other, boost::shared_ptr< ARDOUR::MidiRegion >)
 
 ~MidiRegionView ()
 
void init (bool wfd)
 
const boost::shared_ptr
< ARDOUR::MidiRegion
midi_region () const
 
MidiTimeAxisViewmidi_view () const
 
MidiStreamViewmidi_stream_view () const
 
void step_add_note (uint8_t channel, uint8_t number, uint8_t velocity, Evoral::Beats pos, Evoral::Beats len)
 
void step_sustain (Evoral::Beats beats)
 
void set_height (double)
 
void apply_note_range (uint8_t lowest, uint8_t highest, bool force=false)
 
ARDOUR::ColorMode color_mode () const
 
uint32_t get_fill_color () const
 
void color_handler ()
 
void show_step_edit_cursor (Evoral::Beats pos)
 
void move_step_edit_cursor (Evoral::Beats pos)
 
void hide_step_edit_cursor ()
 
void set_step_edit_cursor_width (Evoral::Beats beats)
 
void redisplay_model ()
 
GhostRegionadd_ghost (TimeAxisView &)
 
NoteBaseadd_note (const boost::shared_ptr< NoteType > note, bool visible)
 
void resolve_note (uint8_t note_num, Evoral::Beats end_time)
 
void cut_copy_clear (Editing::CutCopyOp)
 
bool paste (framepos_t pos, const ::Selection &selection, PasteContext &ctx)
 
void paste_internal (framepos_t pos, unsigned paste_count, float times, const MidiCutBuffer &)
 
void add_canvas_patch_change (ARDOUR::MidiModel::PatchChangePtr patch, const std::string &displaytext, bool)
 
void get_patch_key_at (Evoral::Beats time, uint8_t channel, MIDI::Name::PatchPrimaryKey &key) const
 
MIDI::Name::PatchPrimaryKey patch_change_to_patch_key (ARDOUR::MidiModel::PatchChangePtr)
 
void change_patch_change (PatchChange &old_patch, const MIDI::Name::PatchPrimaryKey &new_patch)
 
void change_patch_change (ARDOUR::MidiModel::PatchChangePtr, Evoral::PatchChange< Evoral::Beats > const &)
 
void add_patch_change (framecnt_t, Evoral::PatchChange< Evoral::Beats > const &)
 
void move_patch_change (PatchChange &, Evoral::Beats)
 
void delete_patch_change (PatchChange *)
 
void edit_patch_change (PatchChange *)
 
void delete_sysex (SysEx *)
 
void step_patch (PatchChange &patch, bool bank, int delta)
 
void display_patch_changes ()
 
void display_sysexes ()
 
void begin_write ()
 
void end_write ()
 
void extend_active_notes ()
 
void display_model (boost::shared_ptr< ARDOUR::MidiModel > model)
 
void start_note_diff_command (std::string name="midi edit")
 
void note_diff_add_change (NoteBase *ev, ARDOUR::MidiModel::NoteDiffCommand::Property, uint8_t val)
 
void note_diff_add_change (NoteBase *ev, ARDOUR::MidiModel::NoteDiffCommand::Property, Evoral::Beats val)
 
void note_diff_add_note (const boost::shared_ptr< NoteType > note, bool selected, bool show_velocity=false)
 
void note_diff_remove_note (NoteBase *ev)
 
void apply_diff (bool as_subcommand=false)
 
void abort_command ()
 
void note_entered (NoteBase *ev)
 
void note_left (NoteBase *ev)
 
void patch_entered (PatchChange *)
 
void patch_left (PatchChange *)
 
void sysex_entered (SysEx *p)
 
void sysex_left (SysEx *p)
 
void note_mouse_position (float xfraction, float yfraction, bool can_set_cursor=true)
 
void unique_select (NoteBase *ev)
 
void note_selected (NoteBase *ev, bool add, bool extend=false)
 
void note_deselected (NoteBase *ev)
 
void delete_selection ()
 
void delete_note (boost::shared_ptr< NoteType >)
 
size_t selection_size ()
 
void select_all_notes ()
 
void select_range (framepos_t start, framepos_t end)
 
void invert_selection ()
 
void move_selection (double dx, double dy, double cumulative_dy)
 
void note_dropped (NoteBase *ev, ARDOUR::frameoffset_t, int8_t d_note)
 
void select_notes (std::list< boost::shared_ptr< NoteType > >)
 
void select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend)
 
void toggle_matching_notes (uint8_t notenum, uint16_t channel_mask)
 
bool note_in_region_range (const boost::shared_ptr< NoteType > note, bool &visible) const
 
double get_position_pixels ()
 
double get_end_position_pixels ()
 
void begin_resizing (bool at_front)
 
void update_resizing (NoteBase *, bool, double, bool)
 
void commit_resizing (NoteBase *, bool, double, bool)
 
void abort_resizing ()
 
void change_channel (uint8_t channel)
 
MouseState mouse_state () const
 
double snap_to_pixel (double x)
 
framepos_t snap_pixel_to_sample (double x)
 
framepos_t region_beats_to_region_frames (Evoral::Beats beats) const
 
framepos_t region_beats_to_absolute_frames (Evoral::Beats beats) const
 
Evoral::Beats region_frames_to_region_beats (framepos_t) const
 
framepos_t source_beats_to_absolute_frames (Evoral::Beats beats) const
 
framepos_t source_beats_to_region_frames (Evoral::Beats beats) const
 
Evoral::Beats absolute_frames_to_source_beats (framepos_t) const
 
ARDOUR::BeatsFramesConverter
const & 
region_relative_time_converter () const
 
ARDOUR::BeatsFramesConverter
const & 
source_relative_time_converter () const
 
void goto_previous_note (bool add_to_selection)
 
void goto_next_note (bool add_to_selection)
 
void change_note_lengths (bool, bool, Evoral::Beats beats, bool start, bool end)
 
void change_velocities (bool up, bool fine, bool allow_smush, bool all_together)
 
void transpose (bool up, bool fine, bool allow_smush)
 
void nudge_notes (bool forward, bool fine)
 
void channel_edit ()
 
void velocity_edit ()
 
void show_list_editor ()
 
Selection selection () const
 
void selection_as_notelist (Notes &selected, bool allow_all_if_none_selected=false)
 
void enable_display (bool)
 
void set_channel_selector_scoped_note (NoteBase *note)
 
NoteBasechannel_selector_scoped_note ()
 
void trim_front_starting ()
 
void trim_front_ending ()
 
void create_note_at (framepos_t t, double y, Evoral::Beats length, bool snap_t)
 
void clear_selection (bool signal=true)
 
ARDOUR::InstrumentInfoinstrument_info () const
 
- Public Member Functions inherited from RegionView
 RegionView (ArdourCanvas::Container *parent, TimeAxisView &time_view, boost::shared_ptr< ARDOUR::Region > region, double samples_per_pixel, uint32_t base_color, bool automation=false)
 
 RegionView (const RegionView &other)
 
 RegionView (const RegionView &other, boost::shared_ptr< ARDOUR::Region > other_region)
 
 ~RegionView ()
 
boost::shared_ptr< ARDOUR::Regionregion () const
 
bool is_valid () const
 
void set_valid (bool yn)
 
virtual void set_samples_per_pixel (double)
 
virtual bool set_duration (framecnt_t, void *)
 
void move (double xdelta, double ydelta)
 
void raise_to_top ()
 
void lower_to_bottom ()
 
bool set_position (framepos_t pos, void *src, double *delta=0)
 
virtual void show_region_editor ()
 
void hide_region_editor ()
 
virtual void region_changed (const PBD::PropertyChange &)
 
uint32_t get_fill_color () const
 
void remove_ghost_in (TimeAxisView &)
 
void remove_ghost (GhostRegion *)
 
virtual void entered ()
 
virtual void exited ()
 
virtual void update_coverage_frames (LayerDisplay)
 
bool trim_front (framepos_t, bool)
 
bool trim_end (framepos_t, bool)
 
void move_contents (ARDOUR::frameoffset_t)
 
virtual void thaw_after_trim ()
 
void set_silent_frames (const ARDOUR::AudioIntervalResult &, double threshold)
 
void drop_silent_frames ()
 
void hide_silent_frames ()
 
ARDOUR::frameoffset_t snap_frame_to_frame (ARDOUR::frameoffset_t) const
 
- Public Member Functions inherited from TimeAxisViewItem
virtual ~TimeAxisViewItem ()
 
framepos_t get_position () const
 
framecnt_t get_duration () const
 
virtual void set_max_duration (framecnt_t, void *)
 
framecnt_t get_max_duration () const
 
virtual void set_min_duration (framecnt_t, void *)
 
framecnt_t get_min_duration () const
 
virtual void set_position_locked (bool, void *)
 
bool get_position_locked () const
 
void set_max_duration_active (bool, void *)
 
bool get_max_duration_active () const
 
void set_min_duration_active (bool, void *)
 
bool get_min_duration_active () const
 
void set_item_name (std::string, void *)
 
virtual std::string get_item_name () const
 
virtual void set_selected (bool yn)
 
void set_sensitive (bool yn)
 
bool sensitive () const
 
TimeAxisViewget_time_axis_view () const
 
void set_name_text (const std::string &)
 
virtual double height () const
 
void set_y (double)
 
void set_color (uint32_t)
 
void set_name_text_color ()
 
ArdourCanvas::Item * get_canvas_frame ()
 
ArdourCanvas::Item * get_canvas_group ()
 
ArdourCanvas::Item * get_name_highlight ()
 
double get_samples_per_pixel () const
 
virtual void drag_start ()
 
virtual void drag_end ()
 
bool dragging () const
 
virtual void raise ()
 
virtual void lower ()
 
bool name_active () const
 
- Public Member Functions inherited from Selectable
 Selectable ()
 
virtual ~Selectable ()
 
bool get_selected () const
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Protected Member Functions

void region_resized (const PBD::PropertyChange &)
 
void set_flags (XMLNode *)
 
void store_flags ()
 
void reset_width_dependent_items (double pixel_width)
 
void parameter_changed (std::string const &p)
 
- Protected Member Functions inherited from RegionView
 RegionView (ArdourCanvas::Container *, TimeAxisView &, boost::shared_ptr< ARDOUR::Region >, double samples_per_pixel, uint32_t basic_color, bool recording, TimeAxisViewItem::Visibility)
 
bool canvas_group_event (GdkEvent *)
 
virtual void region_muted ()
 
void region_locked ()
 
void region_opacity ()
 
virtual void region_renamed ()
 
void region_sync_changed ()
 
std::string make_name () const
 
void lock_toggle ()
 
virtual void set_colors ()
 
virtual void set_sync_mark_color ()
 
- Protected Member Functions inherited from TimeAxisViewItem
 TimeAxisViewItem (const std::string &, ArdourCanvas::Item &, TimeAxisView &, double, uint32_t fill_color, framepos_t, framecnt_t, bool recording=false, bool automation=false, Visibility v=Visibility(0))
 
 TimeAxisViewItem (const TimeAxisViewItem &)
 
void init (ArdourCanvas::Item *, double, uint32_t, framepos_t, framepos_t, Visibility, bool, bool)
 
virtual void set_frame_color ()
 
virtual void set_frame_gradient ()
 
void set_trim_handle_colors ()
 
bool frame_handle_crossing (GdkEvent *, ArdourCanvas::Rectangle *)
 

Private Types

typedef std::list< NoteBase * > Events
 
typedef std::vector
< boost::shared_ptr
< PatchChange > > 
PatchChanges
 
typedef std::vector
< boost::shared_ptr< SysEx > > 
SysExes
 

Private Member Functions

void selection_cleared (MidiRegionView *)
 
void clear_midi_selection ()
 
void play_midi_note (boost::shared_ptr< NoteType > note)
 
void start_playing_midi_note (boost::shared_ptr< NoteType > note)
 
void start_playing_midi_chord (std::vector< boost::shared_ptr< NoteType > > notes)
 
void clear_events (bool with_selection_signal=true)
 
bool canvas_group_event (GdkEvent *ev)
 
bool note_canvas_event (GdkEvent *ev)
 
void midi_channel_mode_changed ()
 
void instrument_settings_changed ()
 
void change_note_channel (NoteBase *, int8_t, bool relative=false)
 
void change_note_velocity (NoteBase *ev, int8_t vel, bool relative=false)
 
void change_note_note (NoteBase *ev, int8_t note, bool relative=false)
 
void change_note_time (NoteBase *ev, ARDOUR::MidiModel::TimeType, bool relative=false)
 
void change_note_length (NoteBase *, ARDOUR::MidiModel::TimeType)
 
void trim_note (NoteBase *ev, ARDOUR::MidiModel::TimeType start_delta, ARDOUR::MidiModel::TimeType end_delta)
 
void clear_selection_except (NoteBase *ev, bool signal=true)
 
void update_drag_selection (framepos_t start, framepos_t end, double y0, double y1, bool extend)
 
void update_vertical_drag_selection (double last_y, double y, bool extend)
 
void add_to_selection (NoteBase *)
 
void remove_from_selection (NoteBase *)
 
void show_verbose_cursor (std::string const &, double, double) const
 
void show_verbose_cursor (boost::shared_ptr< NoteType >) const
 
uint8_t get_velocity_for_add (ARDOUR::MidiModel::TimeType time) const
 
void time_sort_events ()
 
MidiCutBufferselection_as_cut_buffer () const
 
NoteBasefind_canvas_note (boost::shared_ptr< NoteType >)
 
NoteBasefind_canvas_note (NoteType)
 
void update_note (NoteBase *, bool update_ghost_regions=true)
 
void update_sustained (Note *, bool update_ghost_regions=true)
 
void update_hit (Hit *, bool update_ghost_regions=true)
 
void create_ghost_note (double, double)
 
void update_ghost_note (double, double)
 
void maybe_remove_deleted_note_from_selection (NoteBase *)
 
void snap_changed ()
 
bool motion (GdkEventMotion *)
 
bool scroll (GdkEventScroll *)
 
bool key_press (GdkEventKey *)
 
bool key_release (GdkEventKey *)
 
bool button_press (GdkEventButton *)
 
bool button_release (GdkEventButton *)
 
bool enter_notify (GdkEventCrossing *)
 
bool leave_notify (GdkEventCrossing *)
 
void drop_down_keys ()
 
void maybe_select_by_position (GdkEventButton *ev, double x, double y)
 
void get_events (Events &e, Evoral::Sequence< Evoral::Beats >::NoteOperator op, uint8_t val, int chan_mask=0)
 
void display_patch_changes_on_channel (uint8_t, bool)
 
void connect_to_diskstream ()
 
void data_recorded (boost::weak_ptr< ARDOUR::MidiSource >)
 
Evoral::Beats get_grid_beats (framepos_t pos) const
 
void remove_ghost_note ()
 
void mouse_mode_changed ()
 
void enter_internal ()
 
void leave_internal ()
 
framepos_t snap_frame_to_grid_underneath (framepos_t p, framecnt_t &) const
 
ARDOUR::ChannelMode get_channel_mode () const
 
uint16_t get_selected_channels () const
 

Private Attributes

PBD::ScopedConnection _selection_cleared_connection
 
PBD::ScopedConnection _clear_midi_selection_connection
 
PBD::ScopedConnection _channel_mode_changed_connection
 
PBD::ScopedConnection _instrument_changed_connection
 
uint8_t _current_range_min
 
uint8_t _current_range_max
 
ARDOUR::BeatsFramesConverter _region_relative_time_converter
 
ARDOUR::BeatsFramesConverter _source_relative_time_converter
 
boost::shared_ptr
< ARDOUR::MidiModel
_model
 
Events _events
 
PatchChanges _patch_changes
 
SysExes _sys_exes
 
Note ** _active_notes
 
ArdourCanvas::Container * _note_group
 
ARDOUR::MidiModel::NoteDiffCommand_note_diff_command
 
NoteBase_ghost_note
 
double _last_ghost_x
 
double _last_ghost_y
 
ArdourCanvas::Rectangle * _step_edit_cursor
 
Evoral::Beats _step_edit_cursor_width
 
Evoral::Beats _step_edit_cursor_position
 
NoteBase_channel_selection_scoped_note
 
ArdourCanvas::Container * _temporary_note_group
 
MouseState _mouse_state
 
int _pressed_button
 
Selection _selection
 
bool _sort_needed
 
std::set< boost::shared_ptr
< NoteType > > 
_marked_for_selection
 
std::set< boost::shared_ptr
< NoteType > > 
_pending_note_selection
 
std::set< boost::shared_ptr
< NoteType > > 
_marked_for_velocity
 
std::vector< NoteResizeData * > _resize_data
 
PBD::ScopedConnection content_connection
 
Events::iterator _optimization_iterator
 
MidiListEditor_list_editor
 
bool _no_sound_notes
 
PBD::ScopedConnection note_delete_connection
 
PBD::ScopedConnection snap_changed_connection
 
framecnt_t _last_display_zoom
 
double _last_event_x
 
double _last_event_y
 
bool _grabbed_keyboard
 
bool _entered
 
bool _mouse_changed_selection
 
PBD::ScopedConnection _mouse_mode_connection
 
boost::shared_ptr< CursorContext_press_cursor_ctx
 

Static Private Attributes

static PBD::Signal1< void,
MidiRegionView * > 
SelectionCleared
 

Friends

class MidiRubberbandSelectDrag
 
class MidiVerticalSelectDrag
 
class EditNoteDialog
 

Additional Inherited Members

- Static Public Member Functions inherited from TimeAxisViewItem
static void set_constant_heights ()
 
- Public Attributes inherited from TimeAxisViewItem
sigc::signal< void,
std::string, void * > 
ItemRemoved
 
sigc::signal< void,
std::string, std::string, void * > 
NameChanged
 
sigc::signal< void, framepos_t,
void * > 
PositionChanged
 
sigc::signal< void, bool, void * > PositionLockChanged
 
sigc::signal< void, framecnt_t,
void * > 
DurationChanged
 
sigc::signal< void, framecnt_t,
void * > 
MaxDurationChanged
 
sigc::signal< void, framecnt_t,
void * > 
MinDurationChanged
 
- Static Public Attributes inherited from RegionView
static PBD::Signal1< void,
RegionView * > 
RegionViewGoingAway
 
- Static Public Attributes inherited from TimeAxisViewItem
static Pango::FontDescription NAME_FONT
 
static const double NAME_X_OFFSET = 15.0
 
static const double GRAB_HANDLE_TOP = 0.0
 
static const double GRAB_HANDLE_WIDTH = 10.0
 
static int NAME_HEIGHT
 
static double NAME_Y_OFFSET
 
static double NAME_HIGHLIGHT_SIZE
 
static double NAME_HIGHLIGHT_THRESH
 
- Static Protected Member Functions inherited from RegionView
static gint _lock_toggle (ArdourCanvas::Item *, GdkEvent *, void *)
 
- Static Protected Member Functions inherited from TimeAxisViewItem
static gint idle_remove_this_item (TimeAxisViewItem *, void *)
 
- Protected Attributes inherited from RegionView
boost::shared_ptr< ARDOUR::Region_region
 
ArdourCanvas::Polygon * sync_mark
 polgyon for sync position More...
 
ArdourCanvas::Line * sync_line
 polgyon for sync position More...
 
RegionEditoreditor
 
std::vector< ControlPoint * > control_points
 
double current_visible_sync_position
 
bool valid
 see StreamView::redisplay_diskstream() More...
 
bool _enable_display
 see StreamView::redisplay_diskstream() More...
 
double _pixel_width
 
bool in_destructor
 
bool wait_for_data
 
std::vector< GhostRegion * > ghosts
 
std::list
< ArdourCanvas::Rectangle * > 
_coverage_frames
 
std::list
< ArdourCanvas::Rectangle * > 
_silent_frames
 
std::list
< ArdourCanvas::Rectangle * > 
_silent_threshold_frames
 
ArdourCanvas::Text * _silence_text
 
- Protected Attributes inherited from TimeAxisViewItem
TimeAxisViewtrackview
 
bool position_locked
 
framepos_t frame_position
 
framecnt_t item_duration
 
framecnt_t max_item_duration
 
framecnt_t min_item_duration
 
bool max_duration_active
 
bool min_duration_active
 
double samples_per_pixel
 
bool _sensitive
 
std::string item_name
 
bool name_connected
 
bool show_vestigial
 
uint32_t fill_color
 
uint32_t last_item_width
 
int name_text_width
 
bool wide_enough_for_name
 
bool high_enough_for_name
 
ArdourCanvas::Container * group
 
ArdourCanvas::Rectangle * vestigial_frame
 
ArdourCanvas::Rectangle * frame
 
ArdourCanvas::Rectangle * selection_frame
 
ArdourCanvas::Text * name_text
 
ArdourCanvas::Rectangle * name_highlight
 
ArdourCanvas::Rectangle * frame_handle_start
 `frame' (fade) handle for the start of the item, or 0 More...
 
ArdourCanvas::Rectangle * frame_handle_end
 `frame' (fade) handle for the end of the item, or 0 More...
 
double _height
 
Visibility visibility
 
std::string fill_color_name
 
bool _recregion
 
bool _automation
 true if this is an automation region view More...
 
bool _dragging
 
- Protected Attributes inherited from Selectable
bool _selected
 

Detailed Description

Definition at line 65 of file midi_region_view.h.

Member Typedef Documentation

typedef std::list<NoteBase*> MidiRegionView::Events
private

Definition at line 397 of file midi_region_view.h.

Definition at line 69 of file midi_region_view.h.

Definition at line 68 of file midi_region_view.h.

Definition at line 398 of file midi_region_view.h.

typedef std::set<NoteBase*> MidiRegionView::Selection

Definition at line 300 of file midi_region_view.h.

typedef std::vector< boost::shared_ptr<SysEx> > MidiRegionView::SysExes
private

Definition at line 399 of file midi_region_view.h.

Member Enumeration Documentation

Enumerator
None 
Pressed 
SelectTouchDragging 
SelectRectDragging 
SelectVerticalDragging 
AddDragging 

Definition at line 235 of file midi_region_view.h.

Constructor & Destructor Documentation

MidiRegionView::MidiRegionView ( ArdourCanvas::Container *  parent,
RouteTimeAxisView tv,
boost::shared_ptr< ARDOUR::MidiRegion r,
double  samples_per_pixel,
uint32_t  basic_color 
)

Definition at line 97 of file midi_region_view.cc.

MidiRegionView::MidiRegionView ( ArdourCanvas::Container *  parent,
RouteTimeAxisView tv,
boost::shared_ptr< ARDOUR::MidiRegion r,
double  samples_per_pixel,
uint32_t  basic_color,
bool  recording,
TimeAxisViewItem::Visibility  visibility 
)

Definition at line 142 of file midi_region_view.cc.

MidiRegionView::MidiRegionView ( const MidiRegionView other)

Definition at line 199 of file midi_region_view.cc.

MidiRegionView::MidiRegionView ( const MidiRegionView other,
boost::shared_ptr< ARDOUR::MidiRegion region 
)

Definition at line 231 of file midi_region_view.cc.

MidiRegionView::~MidiRegionView ( )

Definition at line 1377 of file midi_region_view.cc.

Member Function Documentation

void MidiRegionView::abort_command ( )

Definition at line 1092 of file midi_region_view.cc.

void MidiRegionView::abort_resizing ( )

Definition at line 2878 of file midi_region_view.cc.

Evoral::Beats MidiRegionView::absolute_frames_to_source_beats ( framepos_t  frames) const

Convert a timestamp in absolute frames to beats measured from source start

Definition at line 2666 of file midi_region_view.cc.

void MidiRegionView::add_canvas_patch_change ( ARDOUR::MidiModel::PatchChangePtr  patch,
const std::string &  displaytext,
bool   
)

Add a new patch change flag to the canvas.

Parameters
patchthe patch change to add
thetext to display in the flag
active_channeltrue to display the flag as on an active channel, false to grey it out for an inactive channel.

Definition at line 1907 of file midi_region_view.cc.

GhostRegion * MidiRegionView::add_ghost ( TimeAxisView tv)
virtual

Implements RegionView.

Definition at line 1526 of file midi_region_view.cc.

NoteBase * MidiRegionView::add_note ( const boost::shared_ptr< NoteType note,
bool  visible 
)

Add a MIDI note to the view (with length).

If in sustained mode, notes with length 0 will be considered active notes, and resolve_note should be called when the corresponding note off event arrives, to properly display the note.

Definition at line 1803 of file midi_region_view.cc.

void MidiRegionView::add_patch_change ( framecnt_t  ,
Evoral::PatchChange< Evoral::Beats > const &   
)

Add a patch change to the region.

Parameters
tTime in frames relative to region position
patchPatch to add; time and channel are ignored (time is converted from t, and channel comes from MidiTimeAxisView::get_channel_for_add())

Definition at line 2035 of file midi_region_view.cc.

void MidiRegionView::add_to_selection ( NoteBase ev)
private

Definition at line 2494 of file midi_region_view.cc.

void MidiRegionView::apply_diff ( bool  as_subcommand = false)

Definition at line 1053 of file midi_region_view.cc.

void MidiRegionView::apply_note_range ( uint8_t  min,
uint8_t  max,
bool  force = false 
)

Apply the current note range from the stream view by repositioning/hiding notes as necessary

Definition at line 1472 of file midi_region_view.cc.

void MidiRegionView::begin_resizing ( bool  at_front)

Begin resizing of some notes. Called by CanvasMidiNote when resizing starts.

Parameters
at_frontwhich end of the note (true == note on, false == note off)

Definition at line 2689 of file midi_region_view.cc.

void MidiRegionView::begin_write ( )

Begin tracking note state for successive calls to add_event

Definition at line 1558 of file midi_region_view.cc.

bool MidiRegionView::button_press ( GdkEventButton *  ev)
private

Definition at line 487 of file midi_region_view.cc.

bool MidiRegionView::button_release ( GdkEventButton *  ev)
private

Definition at line 515 of file midi_region_view.cc.

bool MidiRegionView::canvas_group_event ( GdkEvent *  ev)
privatevirtual

Reimplemented from TimeAxisViewItem.

Definition at line 349 of file midi_region_view.cc.

void MidiRegionView::change_channel ( uint8_t  channel)

Change the channel of the selection.

Parameters
channel- the channel number of the new channel, zero-based

Definition at line 3253 of file midi_region_view.cc.

void MidiRegionView::change_note_channel ( NoteBase event,
int8_t  chn,
bool  relative = false 
)
private

Definition at line 2993 of file midi_region_view.cc.

void MidiRegionView::change_note_length ( NoteBase event,
ARDOUR::MidiModel::TimeType  t 
)
private

Definition at line 3037 of file midi_region_view.cc.

void MidiRegionView::change_note_lengths ( bool  fine,
bool  shorter,
Evoral::Beats  beats,
bool  start,
bool  end 
)

Definition at line 3149 of file midi_region_view.cc.

void MidiRegionView::change_note_note ( NoteBase ev,
int8_t  note,
bool  relative = false 
)
private

Definition at line 2906 of file midi_region_view.cc.

void MidiRegionView::change_note_time ( NoteBase ev,
ARDOUR::MidiModel::TimeType  delta,
bool  relative = false 
)
private

Definition at line 3015 of file midi_region_view.cc.

void MidiRegionView::change_note_velocity ( NoteBase ev,
int8_t  vel,
bool  relative = false 
)
private

Definition at line 2889 of file midi_region_view.cc.

void MidiRegionView::change_patch_change ( PatchChange old_patch,
const MIDI::Name::PatchPrimaryKey &  new_patch 
)

Change old_patch to new_patch.

Parameters
old_patchthe canvas patch change which is to be altered
new_patchnew patch

Definition at line 1977 of file midi_region_view.cc.

void MidiRegionView::change_patch_change ( ARDOUR::MidiModel::PatchChangePtr  ,
Evoral::PatchChange< Evoral::Beats > const &   
)
void MidiRegionView::change_velocities ( bool  up,
bool  fine,
bool  allow_smush,
bool  all_together 
)

Definition at line 3043 of file midi_region_view.cc.

void MidiRegionView::channel_edit ( )

Definition at line 836 of file midi_region_view.cc.

NoteBase* MidiRegionView::channel_selector_scoped_note ( )
inline

Definition at line 310 of file midi_region_view.h.

void MidiRegionView::clear_events ( bool  with_selection_signal = true)
private

Definition at line 965 of file midi_region_view.cc.

void MidiRegionView::clear_midi_selection ( )
inlineprivate

Definition at line 353 of file midi_region_view.h.

void MidiRegionView::clear_selection ( bool  signal = true)
inline

Definition at line 323 of file midi_region_view.h.

void MidiRegionView::clear_selection_except ( NoteBase ev,
bool  signal = true 
)
private

Definition at line 2136 of file midi_region_view.cc.

void MidiRegionView::color_handler ( )
virtual

Reimplemented from RegionView.

Definition at line 3764 of file midi_region_view.cc.

ARDOUR::ColorMode MidiRegionView::color_mode ( ) const
inline

Definition at line 107 of file midi_region_view.h.

void MidiRegionView::commit_resizing ( NoteBase primary,
bool  at_front,
double  delta_x,
bool  relative 
)

Finish resizing notes when the user releases the mouse button. Parameters the same as for update_resizing().

Definition at line 2811 of file midi_region_view.cc.

void MidiRegionView::connect_to_diskstream ( )
private

Definition at line 340 of file midi_region_view.cc.

void MidiRegionView::create_ghost_note ( double  x,
double  y 
)
private

Definition at line 3685 of file midi_region_view.cc.

void MidiRegionView::create_note_at ( framepos_t  t,
double  y,
Evoral::Beats  length,
bool  snap_t 
)

Add a note to the model, and the view, at a canvas (click) coordinate.

Parameters
ttime in frames relative to the position of the region
yvertical position in pixels
lengthduration of the note in beats
snap_ttrue to snap t to the grid, otherwise false.

Definition at line 923 of file midi_region_view.cc.

void MidiRegionView::cut_copy_clear ( Editing::CutCopyOp  op)

Definition at line 3392 of file midi_region_view.cc.

void MidiRegionView::data_recorded ( boost::weak_ptr< ARDOUR::MidiSource w)
private

Called when a diskstream on our track has received some data. Update the view, if applicable.

Parameters
wSource that the data will end up in.

Definition at line 3835 of file midi_region_view.cc.

void MidiRegionView::delete_note ( boost::shared_ptr< NoteType n)

Definition at line 2126 of file midi_region_view.cc.

void MidiRegionView::delete_patch_change ( PatchChange pc)

Definition at line 2071 of file midi_region_view.cc.

void MidiRegionView::delete_selection ( )

Definition at line 2106 of file midi_region_view.cc.

void MidiRegionView::delete_sysex ( SysEx )

Definition at line 3937 of file midi_region_view.cc.

void MidiRegionView::display_model ( boost::shared_ptr< ARDOUR::MidiModel model)

Definition at line 987 of file midi_region_view.cc.

void MidiRegionView::display_patch_changes ( )

Displays all patch change events in the region as flags on the canvas.

Definition at line 1264 of file midi_region_view.cc.

void MidiRegionView::display_patch_changes_on_channel ( uint8_t  channel,
bool  active_channel 
)
private
Parameters
active_channeltrue to display patch changes fully, false to display them `greyed-out' (as on an inactive channel)

Definition at line 1278 of file midi_region_view.cc.

void MidiRegionView::display_sysexes ( )

Displays all system exclusive events in the region as flags on the canvas.

Definition at line 1292 of file midi_region_view.cc.

void MidiRegionView::drop_down_keys ( )
private

Definition at line 3721 of file midi_region_view.cc.

void MidiRegionView::edit_patch_change ( PatchChange pc)

Definition at line 3917 of file midi_region_view.cc.

void MidiRegionView::enable_display ( bool  yn)
virtual

Reimplemented from RegionView.

Definition at line 3776 of file midi_region_view.cc.

void MidiRegionView::end_write ( )

Destroy note state for add_event

Definition at line 1573 of file midi_region_view.cc.

void MidiRegionView::enter_internal ( )
private

Definition at line 444 of file midi_region_view.cc.

bool MidiRegionView::enter_notify ( GdkEventCrossing *  ev)
private

Definition at line 409 of file midi_region_view.cc.

void MidiRegionView::extend_active_notes ( )

Extend active notes to rightmost edge of region (if length is changed)

Definition at line 1610 of file midi_region_view.cc.

NoteBase * MidiRegionView::find_canvas_note ( boost::shared_ptr< NoteType note)
private

Definition at line 1100 of file midi_region_view.cc.

NoteBase * MidiRegionView::find_canvas_note ( NoteType  note)
private

This version finds any canvas note matching the supplied note.

Definition at line 1121 of file midi_region_view.cc.

ChannelMode MidiRegionView::get_channel_mode ( ) const
private

Definition at line 4053 of file midi_region_view.cc.

double MidiRegionView::get_end_position_pixels ( )

Get the region end position in pixels relative to session.

Definition at line 2648 of file midi_region_view.cc.

void MidiRegionView::get_events ( Events e,
Evoral::Sequence< Evoral::Beats >::NoteOperator  op,
uint8_t  val,
int  chan_mask = 0 
)
private

Definition at line 1135 of file midi_region_view.cc.

uint32_t MidiRegionView::get_fill_color ( ) const
virtual

Reimplemented from TimeAxisViewItem.

Definition at line 3351 of file midi_region_view.cc.

Evoral::Beats MidiRegionView::get_grid_beats ( framepos_t  pos) const
private

Get grid type as beats, or default to 1 if not snapped to beats.

Definition at line 4068 of file midi_region_view.cc.

void MidiRegionView::get_patch_key_at ( Evoral::Beats  time,
uint8_t  channel,
MIDI::Name::PatchPrimaryKey &  key 
) const

Look up the given time and channel in the 'automation' and set keys accordingly.

Parameters
timethe time of the patch change event
channelthe MIDI channel of the event a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will will be set according to the result of the lookup

Definition at line 1955 of file midi_region_view.cc.

double MidiRegionView::get_position_pixels ( )

Get the region position in pixels relative to session.

Definition at line 2641 of file midi_region_view.cc.

uint16_t MidiRegionView::get_selected_channels ( ) const
private

Definition at line 4060 of file midi_region_view.cc.

uint8_t MidiRegionView::get_velocity_for_add ( ARDOUR::MidiModel::TimeType  time) const
private

Definition at line 3989 of file midi_region_view.cc.

void MidiRegionView::goto_next_note ( bool  add_to_selection)

Definition at line 3554 of file midi_region_view.cc.

void MidiRegionView::goto_previous_note ( bool  add_to_selection)

Definition at line 3591 of file midi_region_view.cc.

void MidiRegionView::hide_step_edit_cursor ( )

Definition at line 3814 of file midi_region_view.cc.

void MidiRegionView::init ( bool  wfd)
virtual

Reimplemented from RegionView.

Definition at line 263 of file midi_region_view.cc.

InstrumentInfo & MidiRegionView::instrument_info ( ) const

Definition at line 327 of file midi_region_view.cc.

void MidiRegionView::instrument_settings_changed ( )
private

Definition at line 3386 of file midi_region_view.cc.

void MidiRegionView::invert_selection ( void  )

Definition at line 2215 of file midi_region_view.cc.

bool MidiRegionView::key_press ( GdkEventKey *  ev)
private

Definition at line 724 of file midi_region_view.cc.

bool MidiRegionView::key_release ( GdkEventKey *  ev)
private

Definition at line 826 of file midi_region_view.cc.

void MidiRegionView::leave_internal ( )
private

Definition at line 467 of file midi_region_view.cc.

bool MidiRegionView::leave_notify ( GdkEventCrossing *  )
private

Definition at line 418 of file midi_region_view.cc.

void MidiRegionView::maybe_remove_deleted_note_from_selection ( NoteBase cne)
private

Definition at line 2096 of file midi_region_view.cc.

void MidiRegionView::maybe_select_by_position ( GdkEventButton *  ev,
double  x,
double  y 
)
private

Definition at line 3727 of file midi_region_view.cc.

void MidiRegionView::midi_channel_mode_changed ( )
private

Definition at line 3366 of file midi_region_view.cc.

const boost::shared_ptr< ARDOUR::MidiRegion > MidiRegionView::midi_region ( ) const

Definition at line 334 of file midi_region_view.cc.

MidiStreamView* MidiRegionView::midi_stream_view ( ) const
inline

Definition at line 98 of file midi_region_view.h.

MidiTimeAxisView* MidiRegionView::midi_view ( ) const
inline

Definition at line 95 of file midi_region_view.h.

bool MidiRegionView::motion ( GdkEventMotion *  ev)
private

Definition at line 610 of file midi_region_view.cc.

void MidiRegionView::mouse_mode_changed ( )
private

Definition at line 427 of file midi_region_view.cc.

MouseState MidiRegionView::mouse_state ( ) const
inline

Definition at line 244 of file midi_region_view.h.

void MidiRegionView::move_patch_change ( PatchChange pc,
Evoral::Beats  t 
)

Definition at line 2058 of file midi_region_view.cc.

void MidiRegionView::move_selection ( double  dx,
double  dy,
double  cumulative_dy 
)

Definition at line 2515 of file midi_region_view.cc.

void MidiRegionView::move_step_edit_cursor ( Evoral::Beats  pos)

Definition at line 3802 of file midi_region_view.cc.

bool MidiRegionView::note_canvas_event ( GdkEvent *  ev)
private
void MidiRegionView::note_deselected ( NoteBase ev)

Definition at line 2394 of file midi_region_view.cc.

void MidiRegionView::note_diff_add_change ( NoteBase ev,
ARDOUR::MidiModel::NoteDiffCommand::Property  property,
uint8_t  val 
)

Definition at line 1033 of file midi_region_view.cc.

void MidiRegionView::note_diff_add_change ( NoteBase ev,
ARDOUR::MidiModel::NoteDiffCommand::Property  property,
Evoral::Beats  val 
)

Definition at line 1043 of file midi_region_view.cc.

void MidiRegionView::note_diff_add_note ( const boost::shared_ptr< NoteType note,
bool  selected,
bool  show_velocity = false 
)

Definition at line 1011 of file midi_region_view.cc.

void MidiRegionView::note_diff_remove_note ( NoteBase ev)

Definition at line 1025 of file midi_region_view.cc.

void MidiRegionView::note_dropped ( NoteBase ev,
ARDOUR::frameoffset_t  dt,
int8_t  d_note 
)

Definition at line 2558 of file midi_region_view.cc.

void MidiRegionView::note_entered ( NoteBase ev)

Definition at line 3265 of file midi_region_view.cc.

bool MidiRegionView::note_in_region_range ( const boost::shared_ptr< NoteType note,
bool &  visible 
) const

Return true iff the note is within the extent of the region.

Parameters
visiblewill be set to true if the note is within the visible note range, false otherwise.

Definition at line 1675 of file midi_region_view.cc.

void MidiRegionView::note_left ( NoteBase ev)

Definition at line 3279 of file midi_region_view.cc.

void MidiRegionView::note_mouse_position ( float  xfraction,
float  yfraction,
bool  can_set_cursor = true 
)

Definition at line 3332 of file midi_region_view.cc.

void MidiRegionView::note_selected ( NoteBase ev,
bool  add,
bool  extend = false 
)

Definition at line 2341 of file midi_region_view.cc.

void MidiRegionView::nudge_notes ( bool  forward,
bool  fine 
)

Definition at line 3183 of file midi_region_view.cc.

void MidiRegionView::parameter_changed ( std::string const &  p)
protected

Definition at line 190 of file midi_region_view.cc.

bool MidiRegionView::paste ( framepos_t  pos,
const ::Selection selection,
PasteContext ctx 
)

This method handles undo

Definition at line 3450 of file midi_region_view.cc.

void MidiRegionView::paste_internal ( framepos_t  pos,
unsigned  paste_count,
float  times,
const MidiCutBuffer mcb 
)

This method handles undo

Definition at line 3478 of file midi_region_view.cc.

MIDI::Name::PatchPrimaryKey MidiRegionView::patch_change_to_patch_key ( ARDOUR::MidiModel::PatchChangePtr  )

Convert a given PatchChange into a PatchPrimaryKey

Definition at line 1942 of file midi_region_view.cc.

void MidiRegionView::patch_entered ( PatchChange p)

Definition at line 3291 of file midi_region_view.cc.

void MidiRegionView::patch_left ( PatchChange )

Definition at line 3303 of file midi_region_view.cc.

void MidiRegionView::play_midi_note ( boost::shared_ptr< NoteType note)
private

Play the NoteOn event of the given note immediately and schedule the playback of the corresponding NoteOff event.

Definition at line 1625 of file midi_region_view.cc.

void MidiRegionView::redisplay_model ( )

Definition at line 1149 of file midi_region_view.cc.

framepos_t MidiRegionView::region_beats_to_absolute_frames ( Evoral::Beats  beats) const
inline

Convert a timestamp in beats into absolute frames

Definition at line 266 of file midi_region_view.h.

framepos_t MidiRegionView::region_beats_to_region_frames ( Evoral::Beats  beats) const

Convert a timestamp in beats into frames (both relative to region position)

Definition at line 2677 of file midi_region_view.cc.

Evoral::Beats MidiRegionView::region_frames_to_region_beats ( framepos_t  frames) const

Convert a timestamp in frames to beats (both relative to region position)

Definition at line 2683 of file midi_region_view.cc.

ARDOUR::BeatsFramesConverter const& MidiRegionView::region_relative_time_converter ( ) const
inline

Definition at line 281 of file midi_region_view.h.

void MidiRegionView::region_resized ( const PBD::PropertyChange what_changed)
protectedvirtual

Reimplemented from RegionView.

Definition at line 1405 of file midi_region_view.cc.

void MidiRegionView::remove_from_selection ( NoteBase ev)
private

Definition at line 2471 of file midi_region_view.cc.

void MidiRegionView::remove_ghost_note ( )
private

Definition at line 3704 of file midi_region_view.cc.

void MidiRegionView::reset_width_dependent_items ( double  pixel_width)
protectedvirtual

Reimplemented from RegionView.

Definition at line 1424 of file midi_region_view.cc.

void MidiRegionView::resolve_note ( uint8_t  note,
Evoral::Beats  end_time 
)

Resolve an active MIDI note (while recording).

Definition at line 1585 of file midi_region_view.cc.

bool MidiRegionView::scroll ( GdkEventScroll *  ev)
private

Definition at line 693 of file midi_region_view.cc.

void MidiRegionView::select_all_notes ( )

Definition at line 2192 of file midi_region_view.cc.

void MidiRegionView::select_matching_notes ( uint8_t  notenum,
uint16_t  channel_mask,
bool  add,
bool  extend 
)

Definition at line 2245 of file midi_region_view.cc.

void MidiRegionView::select_notes ( std::list< boost::shared_ptr< NoteType > >  notes)

Used for selection undo/redo. The requested notes most likely won't exist in the view until the next model redisplay.

Definition at line 2230 of file midi_region_view.cc.

void MidiRegionView::select_range ( framepos_t  start,
framepos_t  end 
)

Definition at line 2202 of file midi_region_view.cc.

Selection MidiRegionView::selection ( ) const
inline

Definition at line 301 of file midi_region_view.h.

MidiCutBuffer * MidiRegionView::selection_as_cut_buffer ( ) const
private

Definition at line 3433 of file midi_region_view.cc.

void MidiRegionView::selection_as_notelist ( Notes selected,
bool  allow_all_if_none_selected = false 
)

Definition at line 3628 of file midi_region_view.cc.

void MidiRegionView::selection_cleared ( MidiRegionView rv)
private

Called when the selection has been cleared in any MidiRegionView.

Parameters
rvMidiRegionView that the selection was cleared in.

Definition at line 4042 of file midi_region_view.cc.

size_t MidiRegionView::selection_size ( )
inline

Definition at line 197 of file midi_region_view.h.

void MidiRegionView::set_channel_selector_scoped_note ( NoteBase note)
inline

Definition at line 309 of file midi_region_view.h.

void MidiRegionView::set_flags ( XMLNode )
protected
void MidiRegionView::set_height ( double  height)
virtual

Set the height of this item.

Parameters
hnew height

Reimplemented from RegionView.

Definition at line 1445 of file midi_region_view.cc.

void MidiRegionView::set_step_edit_cursor_width ( Evoral::Beats  beats)

Definition at line 3822 of file midi_region_view.cc.

void MidiRegionView::show_list_editor ( )

Definition at line 908 of file midi_region_view.cc.

void MidiRegionView::show_step_edit_cursor ( Evoral::Beats  pos)

Definition at line 3785 of file midi_region_view.cc.

void MidiRegionView::show_verbose_cursor ( std::string const &  ,
double  ,
double   
) const
private
void MidiRegionView::show_verbose_cursor ( boost::shared_ptr< NoteType n) const
private

Definition at line 3950 of file midi_region_view.cc.

void MidiRegionView::snap_changed ( )
private

Definition at line 3711 of file midi_region_view.cc.

framepos_t MidiRegionView::snap_frame_to_grid_underneath ( framepos_t  p,
framecnt_t  
) const
private
Parameters
pA session framepos.
grid_framesFilled in with the number of frames that a grid interval is at p.
Returns
p snapped to the grid subdivision underneath it.

Definition at line 4020 of file midi_region_view.cc.

framepos_t MidiRegionView::snap_pixel_to_sample ( double  x)

Snap a region relative pixel coordinate to frame units.

Parameters
xa pixel coordinate relative to region start
Returns
the snapped framepos_t coordinate relative to region start
Parameters
xPixel relative to the region position.
Returns
Snapped frame relative to the region position.

Definition at line 2625 of file midi_region_view.cc.

double MidiRegionView::snap_to_pixel ( double  x)

Snap a region relative pixel coordinate to pixel units.

Parameters
xa pixel coordinate relative to region start
Returns
the snapped pixel coordinate relative to region start
Parameters
xPixel relative to the region position.
Returns
Snapped pixel relative to the region position.

Definition at line 2635 of file midi_region_view.cc.

framepos_t MidiRegionView::source_beats_to_absolute_frames ( Evoral::Beats  beats) const

Convert a timestamp in beats measured from source start into absolute frames

Definition at line 2655 of file midi_region_view.cc.

framepos_t MidiRegionView::source_beats_to_region_frames ( Evoral::Beats  beats) const
inline

Convert a timestamp in beats measured from source start into region-relative frames

Definition at line 275 of file midi_region_view.h.

ARDOUR::BeatsFramesConverter const& MidiRegionView::source_relative_time_converter ( ) const
inline

Definition at line 285 of file midi_region_view.h.

void MidiRegionView::start_note_diff_command ( std::string  name = "midi edit")

Definition at line 1002 of file midi_region_view.cc.

void MidiRegionView::start_playing_midi_chord ( std::vector< boost::shared_ptr< NoteType > >  notes)
private

Definition at line 1652 of file midi_region_view.cc.

void MidiRegionView::start_playing_midi_note ( boost::shared_ptr< NoteType note)
private

Definition at line 1645 of file midi_region_view.cc.

void MidiRegionView::step_add_note ( uint8_t  channel,
uint8_t  number,
uint8_t  velocity,
Evoral::Beats  pos,
Evoral::Beats  len 
)

Definition at line 1864 of file midi_region_view.cc.

void MidiRegionView::step_patch ( PatchChange patch,
bool  bank,
int  delta 
)

Change a patch to the next or previous bank/program.

Parameters
bankIf true, step bank, otherwise, step program.
deltaAmount to adjust number.

Definition at line 2084 of file midi_region_view.cc.

void MidiRegionView::step_sustain ( Evoral::Beats  beats)

Definition at line 1896 of file midi_region_view.cc.

void MidiRegionView::store_flags ( )
protected
void MidiRegionView::sysex_entered ( SysEx p)

Definition at line 3312 of file midi_region_view.cc.

void MidiRegionView::sysex_left ( SysEx p)

Definition at line 3323 of file midi_region_view.cc.

void MidiRegionView::time_sort_events ( )
private

Definition at line 3541 of file midi_region_view.cc.

void MidiRegionView::toggle_matching_notes ( uint8_t  notenum,
uint16_t  channel_mask 
)

Definition at line 2318 of file midi_region_view.cc.

void MidiRegionView::transpose ( bool  up,
bool  fine,
bool  allow_smush 
)

Definition at line 3104 of file midi_region_view.cc.

void MidiRegionView::trim_front_ending ( )
virtual

Called when a start trim has finished

Reimplemented from RegionView.

Definition at line 3904 of file midi_region_view.cc.

void MidiRegionView::trim_front_starting ( )
virtual

Called when a front trim is about to begin

Reimplemented from RegionView.

Definition at line 3893 of file midi_region_view.cc.

void MidiRegionView::trim_note ( NoteBase ev,
ARDOUR::MidiModel::TimeType  start_delta,
ARDOUR::MidiModel::TimeType  end_delta 
)
private

Definition at line 2921 of file midi_region_view.cc.

void MidiRegionView::unique_select ( NoteBase ev)

Definition at line 2169 of file midi_region_view.cc.

void MidiRegionView::update_drag_selection ( framepos_t  start,
framepos_t  end,
double  y0,
double  y1,
bool  extend 
)
private

Definition at line 2400 of file midi_region_view.cc.

void MidiRegionView::update_ghost_note ( double  x,
double  y 
)
private

Definition at line 3649 of file midi_region_view.cc.

void MidiRegionView::update_hit ( Hit ev,
bool  update_ghost_regions = true 
)
private

Definition at line 1763 of file midi_region_view.cc.

void MidiRegionView::update_note ( NoteBase note,
bool  update_ghost_regions = true 
)
private

Definition at line 1691 of file midi_region_view.cc.

void MidiRegionView::update_resizing ( NoteBase primary,
bool  at_front,
double  delta_x,
bool  relative 
)

Update resizing notes while user drags.

Parameters
primary`primary' note for the drag; ie the one that is used as the reference in non-relative mode.
at_frontwhich end of the note (true == note on, false == note off)
delta_xchange in mouse position since the start of the drag
relativetrue if relative resizing is taking place, false if absolute resizing. This only makes a difference when multiple notes are being resized; in relative mode, each note's length is changed by the amount of the drag. In non-relative mode, all selected notes are set to have the same start or end point as the primary note.

Definition at line 2738 of file midi_region_view.cc.

void MidiRegionView::update_sustained ( Note ev,
bool  update_ghost_regions = true 
)
private

Update a canvas note's size from its model note.

Parameters
evCanvas note to update.
update_ghost_regionstrue to update the note in any ghost regions that we have, otherwise false.

Definition at line 1707 of file midi_region_view.cc.

void MidiRegionView::update_vertical_drag_selection ( double  last_y,
double  y,
bool  extend 
)
private

Definition at line 2448 of file midi_region_view.cc.

void MidiRegionView::velocity_edit ( )

Definition at line 872 of file midi_region_view.cc.

Friends And Related Function Documentation

friend class EditNoteDialog
friend

Definition at line 355 of file midi_region_view.h.

friend class MidiRubberbandSelectDrag
friend

Definition at line 339 of file midi_region_view.h.

friend class MidiVerticalSelectDrag
friend

Definition at line 340 of file midi_region_view.h.

Member Data Documentation

Note** MidiRegionView::_active_notes
private

Definition at line 408 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::_channel_mode_changed_connection
private

Definition at line 370 of file midi_region_view.h.

NoteBase* MidiRegionView::_channel_selection_scoped_note
private

Definition at line 417 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::_clear_midi_selection_connection
private

this handles the case when the "external" world wants us to clear our internal selections

Definition at line 352 of file midi_region_view.h.

uint8_t MidiRegionView::_current_range_max
private

Definition at line 395 of file midi_region_view.h.

uint8_t MidiRegionView::_current_range_min
private

Definition at line 394 of file midi_region_view.h.

bool MidiRegionView::_entered
private

Definition at line 502 of file midi_region_view.h.

Events MidiRegionView::_events
private

Definition at line 405 of file midi_region_view.h.

NoteBase* MidiRegionView::_ghost_note
private

Definition at line 411 of file midi_region_view.h.

bool MidiRegionView::_grabbed_keyboard
private

Definition at line 501 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::_instrument_changed_connection
private

Definition at line 372 of file midi_region_view.h.

framecnt_t MidiRegionView::_last_display_zoom
private

Definition at line 497 of file midi_region_view.h.

double MidiRegionView::_last_event_x
private

Definition at line 499 of file midi_region_view.h.

double MidiRegionView::_last_event_y
private

Definition at line 500 of file midi_region_view.h.

double MidiRegionView::_last_ghost_x
private

Definition at line 412 of file midi_region_view.h.

double MidiRegionView::_last_ghost_y
private

Definition at line 413 of file midi_region_view.h.

MidiListEditor* MidiRegionView::_list_editor
private

Definition at line 462 of file midi_region_view.h.

std::set< boost::shared_ptr<NoteType> > MidiRegionView::_marked_for_selection
private

New notes (created in the current command) which should be selected when they appear after the command is applied.

Definition at line 437 of file midi_region_view.h.

std::set< boost::shared_ptr<NoteType> > MidiRegionView::_marked_for_velocity
private

New notes (created in the current command) which should have visible velocity when they appear after the command is applied.

Definition at line 444 of file midi_region_view.h.

boost::shared_ptr<ARDOUR::MidiModel> MidiRegionView::_model
private

Definition at line 404 of file midi_region_view.h.

bool MidiRegionView::_mouse_changed_selection
private

Definition at line 504 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::_mouse_mode_connection
private

Definition at line 508 of file midi_region_view.h.

MouseState MidiRegionView::_mouse_state
private

Definition at line 424 of file midi_region_view.h.

bool MidiRegionView::_no_sound_notes
private

Definition at line 463 of file midi_region_view.h.

ARDOUR::MidiModel::NoteDiffCommand* MidiRegionView::_note_diff_command
private

Definition at line 410 of file midi_region_view.h.

ArdourCanvas::Container* MidiRegionView::_note_group
private

Definition at line 409 of file midi_region_view.h.

Events::iterator MidiRegionView::_optimization_iterator
private

Definition at line 453 of file midi_region_view.h.

PatchChanges MidiRegionView::_patch_changes
private

Definition at line 406 of file midi_region_view.h.

std::set< boost::shared_ptr<NoteType> > MidiRegionView::_pending_note_selection
private

Notes that should be selected when the model is redisplayed.

Definition at line 440 of file midi_region_view.h.

boost::shared_ptr<CursorContext> MidiRegionView::_press_cursor_ctx
private

Definition at line 510 of file midi_region_view.h.

int MidiRegionView::_pressed_button
private

Definition at line 425 of file midi_region_view.h.

ARDOUR::BeatsFramesConverter MidiRegionView::_region_relative_time_converter
private

Definition at line 401 of file midi_region_view.h.

std::vector<NoteResizeData *> MidiRegionView::_resize_data
private

Definition at line 446 of file midi_region_view.h.

Selection MidiRegionView::_selection
private

Currently selected NoteBase objects

Definition at line 428 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::_selection_cleared_connection
private

Definition at line 347 of file midi_region_view.h.

bool MidiRegionView::_sort_needed
private

Definition at line 430 of file midi_region_view.h.

ARDOUR::BeatsFramesConverter MidiRegionView::_source_relative_time_converter
private

Definition at line 402 of file midi_region_view.h.

ArdourCanvas::Rectangle* MidiRegionView::_step_edit_cursor
private

Definition at line 414 of file midi_region_view.h.

Evoral::Beats MidiRegionView::_step_edit_cursor_position
private

Definition at line 416 of file midi_region_view.h.

Evoral::Beats MidiRegionView::_step_edit_cursor_width
private

Definition at line 415 of file midi_region_view.h.

SysExes MidiRegionView::_sys_exes
private

Definition at line 407 of file midi_region_view.h.

ArdourCanvas::Container* MidiRegionView::_temporary_note_group
private

A group used to temporarily reparent _note_group to during start trims, so that the notes don't move with the parent region view.

Definition at line 422 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::content_connection
private

connection used to connect to model's ContentChanged signal

Definition at line 449 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::note_delete_connection
private

Definition at line 465 of file midi_region_view.h.

PBD::Signal1< void, MidiRegionView * > MidiRegionView::SelectionCleared
staticprivate

Emitted when the selection has been cleared in one MidiRegionView, with the expectation that others will clear their selections in sympathy.

Definition at line 346 of file midi_region_view.h.

PBD::ScopedConnection MidiRegionView::snap_changed_connection
private

Definition at line 469 of file midi_region_view.h.


The documentation for this class was generated from the following files: