Trim include dependency tree (particularly on evoral/Sequence.hpp).
authorDavid Robillard <d@drobilla.net>
Sun, 15 Feb 2009 23:47:09 +0000 (23:47 +0000)
committerDavid Robillard <d@drobilla.net>
Sun, 15 Feb 2009 23:47:09 +0000 (23:47 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@4589 d708f5d6-7413-0410-9779-e7cbd77b26cf

19 files changed:
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_region_view.cc
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/automation_time_axis.h
gtk2_ardour/ghostregion.cc
gtk2_ardour/piano_roll_header.cc
gtk2_ardour/route_time_axis.cc
libs/ardour/ardour/audioregion.h
libs/ardour/ardour/automatable.h
libs/ardour/ardour/automatable_controls.h [new file with mode: 0644]
libs/ardour/ardour/automatable_sequence.h [new file with mode: 0644]
libs/ardour/ardour/io.h
libs/ardour/ardour/midi_model.h
libs/ardour/ardour/processor.h
libs/ardour/ardour/route.h
libs/ardour/automatable.cc
libs/ardour/automation_control.cc
libs/ardour/plugin_insert.cc

index 9bc12f67113f7c9b36c850f3ffb495d4fb560bb5..1d66dda0b0c4076b3e5f9507c98b0a073a902fca 100644 (file)
 #include <gtkmm2ext/bindable_button.h>
 #include <gtkmm2ext/utils.h>
 
-#include <ardour/audioplaylist.h>
 #include <ardour/audio_diskstream.h>
-#include <ardour/processor.h>
+#include <ardour/audioplaylist.h>
+#include <ardour/event_type_map.h>
 #include <ardour/location.h>
 #include <ardour/panner.h>
 #include <ardour/playlist.h>
+#include <ardour/processor.h>
 #include <ardour/profile.h>
 #include <ardour/session.h>
 #include <ardour/session_playlist.h>
index 102a3fd29ca172c472ce28a7a981b07f87f5af2b..a7eada37e7290bcae118e16bf31ea6bdc88ceb7d 100644 (file)
@@ -44,6 +44,7 @@
 #include "automation_time_axis.h"
 #include "public_editor.h"
 
+#include <ardour/event_type_map.h>
 #include <ardour/session.h>
 
 #include "i18n.h"
index 200a1e2fb29e5841b64d2dd2a1057c6b5f3f9027..9dbc72d96528a02058118105b320545e6fd99323 100644 (file)
@@ -18,8 +18,9 @@
 */
 
 #include <pbd/memento_command.h>
-#include <ardour/session.h>
 #include <ardour/automation_control.h>
+#include <ardour/event_type_map.h>
+#include <ardour/session.h>
 #include "automation_region_view.h"
 #include "public_editor.h"
 
index 151f3edb72f53b7bd9957abf4d0a28b3cfbdad14..48c79040a1acafc892c59ded522c86fabf3336f7 100644 (file)
 */
 
 #include <utility>
-#include <ardour/route.h>
-#include <ardour/automation_control.h>
-#include <pbd/memento_command.h>
 #include <gtkmm2ext/barcontroller.h>
+#include <pbd/memento_command.h>
+#include <ardour/automation_control.h>
+#include <ardour/event_type_map.h>
+#include <ardour/route.h>
 
 #include "ardour_ui.h"
 #include "automation_time_axis.h"
index d749a5fbf0944b78224ef98600ccb630c4f00d2e..f3e0e1e50dd6c407948daad0f5ec13768e0ea883 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <ardour/types.h>
 #include <ardour/automatable.h>
+#include <ardour/automation_list.h>
 
 #include "canvas.h"
 #include "time_axis_view.h"
index 7b92ab815b14b28ef203c621bca75fcc0dd5f889..dd7839612fe42f7332b7496106ffa72d746f8187 100644 (file)
 
 */
 
-#include "simplerect.h"
-#include "waveview.h"
-#include "ghostregion.h"
-#include "midi_time_axis.h"
-#include "automation_time_axis.h"
-#include "midi_streamview.h"
-#include "rgb_macros.h"
+#include <evoral/Note.hpp>
 #include "ardour_ui.h"
+#include "automation_time_axis.h"
 #include "canvas-hit.h"
 #include "canvas-note.h"
+#include "ghostregion.h"
+#include "midi_streamview.h"
+#include "midi_time_axis.h"
+#include "rgb_macros.h"
+#include "simplerect.h"
+#include "waveview.h"
 
 using namespace Editing;
 using namespace ArdourCanvas;
index 5032e97e918f5a63b2a884b53b4bb37aca175e23..9d0f1e504a3d2dae51a28674c1e54e18a76338f9 100644 (file)
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include <iostream>
+#include <evoral/midi_events.h>
 #include <ardour/midi_track.h>
 
 #include "piano_roll_header.h"
 #include "midi_time_axis.h"
 #include "midi_streamview.h"
 
-#include <iostream>
-
 const int no_note = 0xff;
 
 using namespace std;
@@ -41,17 +41,20 @@ PianoRollHeader::Color PianoRollHeader::black_shade_dark = PianoRollHeader::Colo
 PianoRollHeader::Color::Color()
        : r(1.0f)
        , g(1.0f)
-       , b(1.0f) {
+       , b(1.0f)
+{
 }
 
 PianoRollHeader::Color::Color(double _r, double _g, double _b)
        : r(_r)
        , g(_g)
-       , b(_b) {
+       , b(_b)
+{
 }
 
 inline void
-PianoRollHeader::Color::set(const PianoRollHeader::Color& c) {
+PianoRollHeader::Color::set(const PianoRollHeader::Color& c)
+{
        r = c.r;
        g = c.g;
        b = c.b;
@@ -61,8 +64,8 @@ PianoRollHeader::PianoRollHeader(MidiStreamView& v)
        : _view(v) 
        , _highlighted_note(no_note)
        , _clicked_note(no_note)
-       , _dragging(false) {
-
+       , _dragging(false)
+{
        add_events (Gdk::BUTTON_PRESS_MASK |
                    Gdk::BUTTON_RELEASE_MASK |
                    Gdk::POINTER_MOTION_MASK |
@@ -70,7 +73,7 @@ PianoRollHeader::PianoRollHeader(MidiStreamView& v)
                    Gdk::LEAVE_NOTIFY_MASK |
                    Gdk::SCROLL_MASK);
 
-       for(int i = 0; i < 128; ++i) {
+       for (int i = 0; i < 128; ++i) {
                _active_notes[i] = false;
        }
 
@@ -78,17 +81,19 @@ PianoRollHeader::PianoRollHeader(MidiStreamView& v)
 }
 
 inline void
-create_path(Cairo::RefPtr<Cairo::Context> cr, double x[], double y[], int start, int stop) {
+create_path(Cairo::RefPtr<Cairo::Context> cr, double x[], double y[], int start, int stop)
+{
        cr->move_to(x[start], y[start]);
 
-       for(int i = start+1; i <= stop; ++i) {
+       for (int i = start+1; i <= stop; ++i) {
                cr->line_to(x[i], y[i]);
        }
 }
 
 inline void 
 render_rect(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
-            PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow) {
+            PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow)
+{
        cr->set_source_rgb(bg.r, bg.g, bg.b);
        create_path(cr, x, y, 0, 4);
        cr->fill();
@@ -104,7 +109,8 @@ render_rect(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
 
 inline void
 render_cf(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
-               PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow) {
+               PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow)
+{
        cr->set_source_rgb(bg.r, bg.g, bg.b);
        create_path(cr, x, y, 0, 6);
        cr->fill();
@@ -120,7 +126,8 @@ render_cf(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
 
 inline void
 render_eb(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
-               PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow) {
+               PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow)
+{
        cr->set_source_rgb(bg.r, bg.g, bg.b);
        create_path(cr, x, y, 0, 6);
        cr->fill();
@@ -140,7 +147,8 @@ render_eb(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
 
 inline void
 render_dga(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
-                PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow) {
+                PianoRollHeader::Color& bg, PianoRollHeader::Color& tl_shadow, PianoRollHeader::Color& br_shadow)
+{
        cr->set_source_rgb(bg.r, bg.g, bg.b);
        create_path(cr, x, y, 0, 8);
        cr->fill();
@@ -159,21 +167,21 @@ render_dga(Cairo::RefPtr<Cairo::Context> cr, int note, double x[], double y[],
 }
 
 void
-PianoRollHeader::get_path(PianoRollHeader::ItemType note_type, int note, double x[], double y[]) {
+PianoRollHeader::get_path(PianoRollHeader::ItemType note_type, int note, double x[], double y[])
+{
        double y_pos = floor(_view.note_to_y(note)) - 0.5f;
        double note_height;
        double other_y1 = floor(_view.note_to_y(note+1)) + floor(_note_height / 2.0f) + 0.5f;
        double other_y2 = floor(_view.note_to_y(note-1)) + floor(_note_height / 2.0f) - 1.0f;
        double width = get_width();
 
-       if(note == 0) {
+       if (note == 0) {
                note_height = floor(_view.contents_height()) - y_pos;
-       }
-       else {
+       } else {
                note_height = floor(_view.note_to_y(note - 1)) - y_pos;
        }
 
-       switch(note_type) {
+       switch (note_type) {
        case BLACK_SEPARATOR:
                x[0] = 1.5f;
                y[0] = y_pos;
@@ -274,7 +282,8 @@ PianoRollHeader::get_path(PianoRollHeader::ItemType note_type, int note, double
 }
 
 bool
-PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
+PianoRollHeader::on_expose_event (GdkEventExpose* ev)
+{
        GdkRectangle& rect = ev->area;
        double font_size;
        int lowest, highest;
@@ -291,7 +300,7 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
        lowest = max(_view.lowest_note(), _view.y_to_note(y2));
        highest = min(_view.highest_note(), _view.y_to_note(y1));
 
-       if(lowest > 127) {
+       if (lowest > 127) {
                lowest = 0;
        }
 
@@ -322,28 +331,26 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
        //pat->add_color_stop_rgb(1.0, 0.22, 0.22, 0.22);
        //cr->set_source(pat);
 
-       for(int i = lowest; i <= highest; ++i) {
+       for (int i = lowest; i <= highest; ++i) {
                oct_rel = i % 12;
 
-               switch(oct_rel) {
+               switch (oct_rel) {
                case 1:
                case 3:
                case 6:
                case 8:
                case 10:
                        /* black note */
-                       if(i == _highlighted_note) {
+                       if (i == _highlighted_note) {
                                bg.set(black_highlight);
-                       }
-                       else {
+                       } else {
                                bg.set(black);
                        }
 
-                       if(_active_notes[i]) {
+                       if (_active_notes[i]) {
                                tl_shadow.set(black_shade_dark);
                                br_shadow.set(black_shade_light);
-                       }
-                       else {
+                       } else {
                                tl_shadow.set(black_shade_light);
                                br_shadow.set(black_shade_dark);
                        }
@@ -364,18 +371,16 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
 
                default:
                        /* white note */
-                       if(i == _highlighted_note) {
+                       if (i == _highlighted_note) {
                                bg.set(white_highlight);
-                       }
-                       else {
+                       } else {
                                bg.set(white);
                        }
 
-                       if(_active_notes[i]) {
+                       if (_active_notes[i]) {
                                tl_shadow.set(white_shade_dark);
                                br_shadow.set(white_shade_light);
-                       }
-                       else {
+                       } else {
                                tl_shadow.set(white_shade_light);
                                br_shadow.set(white_shade_dark);
                        }
@@ -383,11 +388,10 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
                        switch(oct_rel) {
                        case 0:
                        case 5:
-                               if(i == _view.highest_note()) {
+                               if (i == _view.highest_note()) {
                                        get_path(WHITE_RECT, i, x, y);
                                        render_rect(cr, i, x, y, bg, tl_shadow, br_shadow);
-                               }
-                               else {
+                               } else {
                                        get_path(WHITE_CF, i, x, y);
                                        render_cf(cr, i, x, y, bg, tl_shadow, br_shadow);
                                }
@@ -396,15 +400,13 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
                        case 2:
                        case 7:
                        case 9:
-                               if(i == _view.highest_note()) {
+                               if (i == _view.highest_note()) {
                                        get_path(WHITE_EB, i, x, y);
                                        render_eb(cr, i, x, y, bg, tl_shadow, br_shadow);
-                               }
-                               else if(i == _view.lowest_note()) {
+                               } else if (i == _view.lowest_note()) {
                                        get_path(WHITE_CF, i, x, y);
                                        render_cf(cr, i, x, y, bg, tl_shadow, br_shadow);
-                               }
-                               else {
+                               } else {
                                        get_path(WHITE_DGA, i, x, y);
                                        render_dga(cr, i, x, y, bg, tl_shadow, br_shadow);
                                }
@@ -417,11 +419,10 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
                                create_path(cr, x, y, 0, 1);
                                cr->stroke();
 
-                               if(i == _view.lowest_note()) {
+                               if (i == _view.lowest_note()) {
                                        get_path(WHITE_RECT, i, x, y);
                                        render_rect(cr, i, x, y, bg, tl_shadow, br_shadow);
-                               }
-                               else {
+                               } else {
                                        get_path(WHITE_EB, i, x, y);
                                        render_eb(cr, i, x, y, bg, tl_shadow, br_shadow);
                                }
@@ -436,7 +437,7 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
                }
 
                /* render the name of which C this is */
-               if(oct_rel == 0) {
+               if (oct_rel == 0) {
                        std::stringstream s;
                        double y = floor(_view.note_to_y(i)) - 0.5f;
                        double note_height = floor(_view.note_to_y(i - 1)) - y;
@@ -455,14 +456,14 @@ PianoRollHeader::on_expose_event (GdkEventExpose* ev) {
 }
 
 bool
-PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev) {
+PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev)
+{
        int note = _view.y_to_note(ev->y);
 
-       if(_highlighted_note != no_note) {
-               if(note > _highlighted_note) {
+       if (_highlighted_note != no_note) {
+               if (note > _highlighted_note) {
                        invalidate_note_range(_highlighted_note, note);
-               }
-               else {
+               } else {
                        invalidate_note_range(note, _highlighted_note);
                }
 
@@ -470,13 +471,13 @@ PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev) {
        }
 
        /* redraw already taken care of above */
-       if(_clicked_note != no_note && _clicked_note != note) {
+       if (_clicked_note != no_note && _clicked_note != note) {
                _active_notes[_clicked_note] = false;
                send_note_off(_clicked_note);
 
                _clicked_note = note;
 
-               if(!_active_notes[note]) {
+               if (!_active_notes[note]) {
                        _active_notes[note] = true;
                        send_note_on(note);
                }
@@ -488,21 +489,21 @@ PianoRollHeader::on_motion_notify_event (GdkEventMotion* ev) {
 }
 
 bool
-PianoRollHeader::on_button_press_event (GdkEventButton* ev) {
+PianoRollHeader::on_button_press_event (GdkEventButton* ev)
+{
        int note = _view.y_to_note(ev->y);
 
-       if(ev->type == GDK_BUTTON_PRESS && note >= 0 && note < 128) {
+       if (ev->type == GDK_BUTTON_PRESS && note >= 0 && note < 128) {
                add_modal_grab();
                _dragging = true;
 
-               if(!_active_notes[note]) {
+               if (!_active_notes[note]) {
                        _active_notes[note] = true;
                        _clicked_note = note;
                        send_note_on(note);
                        
                        invalidate_note_range(note, note);
-               }
-               else {
+               } else {
                        _clicked_note = no_note;
                }
        }
@@ -511,14 +512,15 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev) {
 }
 
 bool
-PianoRollHeader::on_button_release_event (GdkEventButton* ev) {
+PianoRollHeader::on_button_release_event (GdkEventButton* ev)
+{
        int note = _view.y_to_note(ev->y);
 
-       if(_dragging) {
+       if (_dragging) {
                remove_modal_grab();
                _dragging = false;
 
-               if(note == _clicked_note) {
+               if (note == _clicked_note) {
                        _active_notes[note] = false;
                        _clicked_note = no_note;
                        send_note_off(note);
@@ -531,7 +533,8 @@ PianoRollHeader::on_button_release_event (GdkEventButton* ev) {
 }
 
 bool
-PianoRollHeader::on_enter_notify_event (GdkEventCrossing* ev) {
+PianoRollHeader::on_enter_notify_event (GdkEventCrossing* ev)
+{
        _highlighted_note = _view.y_to_note(ev->y);
 
        invalidate_note_range(_highlighted_note, _highlighted_note);
@@ -539,14 +542,15 @@ PianoRollHeader::on_enter_notify_event (GdkEventCrossing* ev) {
 }
 
 bool
-PianoRollHeader::on_leave_notify_event (GdkEventCrossing*) {
+PianoRollHeader::on_leave_notify_event (GdkEventCrossing*)
+{
        invalidate_note_range(_highlighted_note, _highlighted_note);
        
-       if(_clicked_note != no_note) {
+       if (_clicked_note != no_note) {
                _active_notes[_clicked_note] = false;
                send_note_off(_clicked_note);
 
-               if(_clicked_note != _highlighted_note) {
+               if (_clicked_note != _highlighted_note) {
                        invalidate_note_range(_clicked_note, _clicked_note);
                }
 
@@ -558,25 +562,28 @@ PianoRollHeader::on_leave_notify_event (GdkEventCrossing*) {
 }
 
 bool
-PianoRollHeader::on_scroll_event (GdkEventScroll* ev) {
+PianoRollHeader::on_scroll_event (GdkEventScroll* ev)
+{
        return true;
 }
 
 void
-PianoRollHeader::note_range_changed() {
+PianoRollHeader::note_range_changed()
+{
        _note_height = floor(_view.note_height()) + 0.5f;
 
        queue_draw();
 
        Glib::RefPtr<Gdk::Window> win = get_window();
 
-       if(win) {
+       if (win) {
                win->process_updates(false);
        }
 }
 
 void
-PianoRollHeader::invalidate_note_range(int lowest, int highest) {
+PianoRollHeader::invalidate_note_range(int lowest, int highest)
+{
        Glib::RefPtr<Gdk::Window> win = get_window();
        Gdk::Rectangle rect;
 
@@ -617,30 +624,33 @@ PianoRollHeader::invalidate_note_range(int lowest, int highest) {
        rect.set_y((int) floor(y));
        rect.set_height((int) floor(height));
 
-       if(win) {
+       if (win) {
                win->invalidate_rect(rect, false);
        }
 }
 
 void
-PianoRollHeader::on_size_request(Gtk::Requisition* r) {
+PianoRollHeader::on_size_request(Gtk::Requisition* r)
+{
        r->width = 20;
 }
 
 void
-PianoRollHeader::on_size_allocate(Gtk::Allocation& a) {
+PianoRollHeader::on_size_allocate(Gtk::Allocation& a)
+{
        DrawingArea::on_size_allocate(a);
        
        _black_note_width = floor(0.7 * get_width()) + 0.5f;
 }
 
 void
-PianoRollHeader::send_note_on(uint8_t note) {
+PianoRollHeader::send_note_on(uint8_t note)
+{
        boost::shared_ptr<ARDOUR::MidiTrack> track = _view.trackview().midi_track();
 
        //cerr << "note on: " << (int) note << endl;
 
-       if(track) {
+       if (track) {
                _event[0] = MIDI_CMD_NOTE_ON;
                _event[1] = note;
                _event[2] = 100;
@@ -650,10 +660,11 @@ PianoRollHeader::send_note_on(uint8_t note) {
 }
 
 void
-PianoRollHeader::send_note_off(uint8_t note) {
+PianoRollHeader::send_note_off(uint8_t note)
+{
        boost::shared_ptr<ARDOUR::MidiTrack> track = _view.trackview().midi_track();
 
-       if(track) {
+       if (track) {
                _event[0] = MIDI_CMD_NOTE_OFF;
                _event[1] = note;
                _event[2] = 100;
index 674fb2db71ebc82a156b02de7ce52f69bf1359e7..543082dd50608f2bb6b064bb4837f3b3e1f2f96d 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <ardour/audioplaylist.h>
 #include <ardour/diskstream.h>
+#include <ardour/event_type_map.h>
 #include <ardour/ladspa_plugin.h>
 #include <ardour/location.h>
 #include <ardour/panner.h>
index 5ebe22e312d276b6290166b45f8b242e1e068eb3..fb54a3c6bca34905492d11d023a34b7c059ef87f 100644 (file)
 #include <pbd/undo.h>
 
 #include <ardour/ardour.h>
-#include <ardour/region.h>
+#include <ardour/automatable_controls.h>
 #include <ardour/gain.h>
 #include <ardour/logcurve.h>
+#include <ardour/region.h>
 
 class XMLNode;
 
index 98ab28d12ddbfe4e55e452dd6ce154e2f1e031ca..61a94d469b4fe3794b2333928d4407c3992de8f3 100644 (file)
 #ifndef __ardour_automatable_h__
 #define __ardour_automatable_h__
 
-#include <set>
 #include <map>
+#include <set>
+#include <string>
 #include <boost/shared_ptr.hpp>
-#include <ardour/event_type_map.h>
 #include <evoral/ControlSet.hpp>
-#include <evoral/Sequence.hpp>
+#include <ardour/types.h>
+
+class XMLNode;
 
 namespace ARDOUR {
 
@@ -58,7 +60,7 @@ public:
        virtual void automation_snapshot(nframes_t now, bool force);
        virtual void transport_stopped(nframes_t now);
 
-       virtual string describe_parameter(Evoral::Parameter param);
+       virtual std::string describe_parameter(Evoral::Parameter param);
        
        AutoState get_parameter_automation_state (Evoral::Parameter param, bool lock = true);
        virtual void set_parameter_automation_state (Evoral::Parameter param, AutoState);
@@ -113,25 +115,6 @@ public:
 };
 
 
-/** Contains notes and controllers */
-template<typename T>
-class AutomatableSequence : public Automatable, public Evoral::Sequence<T> {
-public:
-       AutomatableSequence(Session& s, size_t size)
-               : Evoral::ControlSet()
-               , Automatable(s)
-               , Evoral::Sequence<T>(EventTypeMap::instance())
-       {}
-};
-
-
-/** Contains only controllers */
-class AutomatableControls : public Automatable {
-public:
-       AutomatableControls(Session& s) : Evoral::ControlSet(), Automatable(s) {}
-};
-
-
 } // namespace ARDOUR
 
 #endif /* __ardour_automatable_h__ */
diff --git a/libs/ardour/ardour/automatable_controls.h b/libs/ardour/ardour/automatable_controls.h
new file mode 100644 (file)
index 0000000..39633c0
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+    Copyright (C) 2009 Paul Davis 
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_automatable_controls_h__
+#define __ardour_automatable_controls_h__
+
+#include <evoral/ControlSet.hpp>
+#include <ardour/automatable.h>
+
+namespace ARDOUR {
+
+/** Contains only controllers */
+class AutomatableControls : public Automatable {
+public:
+       AutomatableControls(Session& s) : Evoral::ControlSet(), Automatable(s) {}
+};
+
+} // namespace ARDOUR
+
+#endif /* __ardour_automatable_controls_h__ */
+
diff --git a/libs/ardour/ardour/automatable_sequence.h b/libs/ardour/ardour/automatable_sequence.h
new file mode 100644 (file)
index 0000000..9259234
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+    Copyright (C) 2009 Paul Davis 
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __ardour_automatable_sequence_h__
+#define __ardour_automatable_sequence_h__
+
+#include <evoral/Sequence.hpp>
+#include <ardour/automatable.h>
+
+namespace ARDOUR {
+
+/** Contains notes and controllers */
+template<typename T>
+class AutomatableSequence : public Automatable, public Evoral::Sequence<T> {
+public:
+       AutomatableSequence(Session& s, size_t size)
+               : Evoral::ControlSet()
+               , Automatable(s)
+               , Evoral::Sequence<T>(EventTypeMap::instance())
+       {}
+};
+
+} // namespace ARDOUR
+
+#endif /* __ardour_automatable_sequence_h__ */
+
index c5f90bcd90807859284833b1b8afc63451b2aac2..3ba56708ac3f85d40442f114a37afb6052defb41 100644 (file)
 #include <pbd/controllable.h>
 
 #include <ardour/ardour.h>
-#include <ardour/automatable.h>
-#include <ardour/utils.h>
-#include <ardour/types.h>
-#include <ardour/data_type.h>
-#include <ardour/port_set.h>
+#include <ardour/automatable_controls.h>
+#include <ardour/automation_control.h>
+#include <ardour/bundle.h>
 #include <ardour/chan_count.h>
+#include <ardour/data_type.h>
 #include <ardour/latent.h>
-#include <ardour/automation_control.h>
+#include <ardour/port_set.h>
 #include <ardour/session_object.h>
-#include <ardour/bundle.h>
+#include <ardour/types.h>
+#include <ardour/utils.h>
 
 using std::string;
 using std::vector;
index fb881ae127f0c825d8a1a4fb05fee21612673f40..16d972c3ccc6ef44101e220f9d8a0f0e4ea019e3 100644 (file)
@@ -30,7 +30,7 @@
 #include <ardour/types.h>
 #include <ardour/midi_buffer.h>
 #include <ardour/midi_ring_buffer.h>
-#include <ardour/automatable.h>
+#include <ardour/automatable_sequence.h>
 #include <ardour/types.h>
 #include <evoral/Note.hpp>
 #include <evoral/Sequence.hpp>
index 83d6be0df959cebbd95feadb4301eb0b899e2762..430e281bfc2834207e5e2be2160841f570e81718 100644 (file)
 
 #include <sigc++/signal.h>
 
-#include <ardour/types.h>
 #include <ardour/ardour.h>
+#include <ardour/automatable_controls.h>
 #include <ardour/buffer_set.h>
-#include <ardour/automatable.h>
 #include <ardour/latent.h>
 #include <ardour/session_object.h>
+#include <ardour/types.h>
 
 class XMLNode;
 
index 5e83bd2f1e9f077766777ad2f29a979c1217a47f..98b7fa0d641dae7cdab0aff477576563db507329 100644 (file)
 #define __ardour_route_h__
 
 #include <cmath>
+#include <cstring>
 #include <list>
-#include <set>
 #include <map>
+#include <set>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
 
-#include <pbd/fastlog.h>
 #include <glibmm/thread.h>
+#include <pbd/fastlog.h>
 #include <pbd/xml++.h>
 #include <pbd/undo.h>
 #include <pbd/stateful.h> 
index 82c0c0641271c1cc178cb10be21c1b3778e5b6b1..ce5d37ab4b1fffb365b26db9248eb6fc9d716907 100644 (file)
 #include <pbd/error.h>
 #include <pbd/enumwriter.h>
 #include <midi++/names.h>
-#include <ardour/session.h>
 #include <ardour/automatable.h>
+#include <ardour/event_type_map.h>
 #include <ardour/midi_track.h>
-#include <ardour/plugin_insert.h>
 #include <ardour/panner.h>
+#include <ardour/plugin_insert.h>
+#include <ardour/session.h>
 
 #include "i18n.h"
 
index 2100265a87b513d7e217e17e1732f4c9d5caaaae..85dea59324d48b1d2ac8dfd39f414e9564b43208 100644 (file)
 */
 
 #include <iostream>
+#include <ardour/automatable.h>
 #include <ardour/automation_control.h>
+#include <ardour/event_type_map.h>
 #include <ardour/session.h>
-#include <ardour/automatable.h>
-#include <ardour/midi_track.h>
 
 using namespace std;
 using namespace ARDOUR;
index 75930b78062f3bc5a4965692533969ed4943daf5..726d4b350f1ef14f2875e0220eb660368da7b657 100644 (file)
 #include <pbd/failed_constructor.h>
 #include <pbd/xml++.h>
 
-#include <ardour/plugin_insert.h>
+#include <ardour/audio_buffer.h>
+#include <ardour/automation_list.h>
+#include <ardour/buffer_set.h>
+#include <ardour/event_type_map.h>
+#include <ardour/ladspa_plugin.h>
 #include <ardour/plugin.h>
+#include <ardour/plugin_insert.h>
 #include <ardour/port.h>
 #include <ardour/route.h>
-#include <ardour/ladspa_plugin.h>
-#include <ardour/buffer_set.h>
-#include <ardour/automation_list.h>
-#include <ardour/audio_buffer.h>
 
 #ifdef HAVE_SLV2
 #include <ardour/lv2_plugin.h>