summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-02-02 02:36:05 +0000
committerDavid Robillard <d@drobilla.net>2009-02-02 02:36:05 +0000
commit166ef64e3db4ab72b7b1e7455234e2b9ceddf6d8 (patch)
tree0f28067a301556c5c0a67091c691c82960db57c1 /gtk2_ardour/midi_region_view.h
parentead5dd45689be089d79a4a5daad88da737ca4cd9 (diff)
Make (MIDI) event time stamp type a template parameter.
git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r--gtk2_ardour/midi_region_view.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 6dc8e67565..16b11e176b 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -58,6 +58,8 @@ class AutomationRegionView;
class MidiRegionView : public RegionView
{
public:
+ typedef Evoral::Note<ARDOUR::MidiModel::TimeType> NoteType;
+
MidiRegionView (ArdourCanvas::Group *,
RouteTimeAxisView&,
boost::shared_ptr<ARDOUR::MidiRegion>,
@@ -91,7 +93,7 @@ class MidiRegionView : public RegionView
GhostRegion* add_ghost (TimeAxisView&);
- void add_note(const boost::shared_ptr<Evoral::Note> note);
+ void add_note(const boost::shared_ptr<NoteType> note);
void resolve_note(uint8_t note_num, double end_time);
struct ControlEvent
@@ -159,7 +161,7 @@ class MidiRegionView : public RegionView
void display_model(boost::shared_ptr<ARDOUR::MidiModel> model);
void start_delta_command(string name = "midi edit");
- void command_add_note(const boost::shared_ptr<Evoral::Note> note, bool selected);
+ void command_add_note(const boost::shared_ptr<NoteType> note, bool selected);
void command_remove_note(ArdourCanvas::CanvasNoteEvent* ev);
void apply_command();
@@ -264,12 +266,12 @@ class MidiRegionView : public RegionView
/** Play the NoteOn event of the given note immediately
* and schedule the playback of the corresponding NoteOff event.
*/
- void play_midi_note(boost::shared_ptr<Evoral::Note> note);
+ void play_midi_note(boost::shared_ptr<NoteType> note);
/** Play the NoteOff-Event of the given note immediately
* (scheduled by @ref play_midi_note()).
*/
- bool play_midi_note_off(boost::shared_ptr<Evoral::Note> note);
+ bool play_midi_note_off(boost::shared_ptr<NoteType> note);
void clear_events();
void switch_source(boost::shared_ptr<ARDOUR::Source> src);
@@ -317,7 +319,7 @@ class MidiRegionView : public RegionView
/** New notes (created in the current command) which should be selected
* when they appear after the command is applied. */
- std::set< boost::shared_ptr<Evoral::Note> > _marked_for_selection;
+ std::set< boost::shared_ptr<NoteType> > _marked_for_selection;
std::vector<NoteResizeData *> _resize_data;
};