* MIDI control lanes: Set Interpolationtype according to Parameter
[ardour.git] / libs / evoral / src / Sequence.cpp
index 1facd6761ef1befea21206218c72dffeb103f581..6a860ac83324dfc5038b2380c616d6748db41629 100644 (file)
 #include <algorithm>
 #include <stdexcept>
 #include <stdint.h>
-#include <evoral/Sequence.hpp>
-#include <evoral/ControlList.hpp>
-#include <evoral/Control.hpp>
-#include <evoral/ControlSet.hpp>
-#include <evoral/EventSink.hpp>
-#include <evoral/MIDIParameters.hpp>
-#include <evoral/TypeMap.hpp>
+#include "evoral/Sequence.hpp"
+#include "evoral/ControlList.hpp"
+#include "evoral/Control.hpp"
+#include "evoral/ControlSet.hpp"
+#include "evoral/EventSink.hpp"
+#include "evoral/MIDIParameters.hpp"
+#include "evoral/TypeMap.hpp"
 
 using namespace std;
 
@@ -92,7 +92,7 @@ Sequence::const_iterator::const_iterator(const Sequence& seq, EventTime t)
        
        // find the earliest control event available
        for (Controls::const_iterator i = seq._controls.begin(); i != seq._controls.end(); ++i) {
-               debugout << "Iterator: control: " << i->first.symbol() << endl;
+               debugout << "Iterator: control: " << seq._type_map.to_symbol(i->first) << endl;
                double x, y;
                bool ret = i->second->list()->rt_safe_earliest_event_unlocked(t, DBL_MAX, x, y);
                if (!ret) {
@@ -342,7 +342,7 @@ Sequence::read(EventSink& dst, timestamp_t start, timedur_t nframes, timestamp_t
                debugout << "Using cached iterator at " << _next_read << endl;
        }
 
-       _next_read = (nframes_t) floor (start + nframes);
+       _next_read = (FrameTime) floor (start + nframes);
 
        while (_read_iter != end() && _read_iter->time() < start + nframes) {
                assert(_read_iter->size() > 0);
@@ -628,9 +628,10 @@ Sequence::append_note_off_unlocked(uint8_t chan, EventTime time, uint8_t note_nu
 void
 Sequence::append_control_unlocked(const Parameter& param, EventTime time, double value)
 {
-       debugout << this << " " << param.symbol() << " @ " << time << " \t= \t" << value
+       debugout << this << " " << _type_map.to_symbol(param) << " @ " << time << " \t= \t" << value
                        << " # controls: " << _controls.size() << endl;
-       control(param, true)->list()->rt_add(time, value);
+       boost::shared_ptr<Control> c = control(param, true);
+       c->list()->rt_add(time, value);
 }