From 68653307e666b8daabd2931ce0731d400d947707 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Jul 2007 03:19:04 +0000 Subject: Note modes: note, percussion. Percussion tracks display diamonds. Separated/fixed MIDI and audio mode menus. CC automation modes: discrete, line. Bar controllers follow setting (hard steps or line) on playback. Sent CC data is always discrete (line not implemented yet). Discrete tracks show no lines, and always show control points. Separated ControlPoint from AutomationLine. Added some basic information (range) to Parameter (to be fleshed out..). git-svn-id: svn://localhost/ardour2/trunk@2123 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/automation_event.h | 10 ++++++++++ libs/ardour/ardour/midi_track.h | 6 +++++- libs/ardour/ardour/parameter.h | 22 ++++++++++++++++++++++ libs/ardour/ardour/types.h | 5 +++++ 4 files changed, 42 insertions(+), 1 deletion(-) (limited to 'libs/ardour/ardour') diff --git a/libs/ardour/ardour/automation_event.h b/libs/ardour/ardour/automation_event.h index 8a9b110714..ac8ce70ff1 100644 --- a/libs/ardour/ardour/automation_event.h +++ b/libs/ardour/ardour/automation_event.h @@ -229,6 +229,15 @@ class AutomationList : public PBD::StatefulDestructible Curve& curve() { return *_curve; } const Curve& curve() const { return *_curve; } + enum InterpolationStyle { + Discrete, + Linear, + Curved + }; + + InterpolationStyle interpolation() const { return _interpolation; } + void set_interpolation(InterpolationStyle style) { _interpolation = style; } + protected: /** Called by unlocked_eval() to handle cases of 3 or more control points. @@ -247,6 +256,7 @@ class AutomationList : public PBD::StatefulDestructible mutable SearchCache _search_cache; Parameter _parameter; + InterpolationStyle _interpolation; EventList _events; mutable Glib::Mutex _lock; int8_t _frozen; diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index aea032f725..2317cd0549 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -57,7 +57,7 @@ public: int use_diskstream (string name); int use_diskstream (const PBD::ID& id); - int set_mode (TrackMode m); + //int set_mode (TrackMode m); void set_latency_delay (nframes_t); @@ -85,6 +85,9 @@ public: MidiTrack* _route; }; + NoteMode note_mode() const { return _note_mode; } + void set_note_mode (NoteMode m) { _note_mode = m; } + protected: XMLNode& state (bool full); @@ -101,6 +104,7 @@ private: void set_state_part_three (); MidiRingBuffer _immediate_events; + NoteMode _note_mode; }; } /* namespace ARDOUR*/ diff --git a/libs/ardour/ardour/parameter.h b/libs/ardour/ardour/parameter.h index 42159a2bbb..803bd889cb 100644 --- a/libs/ardour/ardour/parameter.h +++ b/libs/ardour/ardour/parameter.h @@ -127,6 +127,28 @@ public: } } + /* The below properties are only used for CC right now, but unchanging properties + * of parameters (rather than changing parameters of automation lists themselves) + * should be moved here */ + + inline double min() const { + if (_type == MidiCCAutomation) + return 0.0; + else + return DBL_MIN; + } + + inline double max() const { + if (_type == MidiCCAutomation) + return 127.0; + else + return DBL_MAX; + } + + inline bool is_integer() const { + return (_type == MidiCCAutomation); + } + private: // default copy constructor is ok AutomationType _type; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index cfb9dd49b0..ab54b6c26c 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -143,6 +143,11 @@ namespace ARDOUR { Destructive }; + enum NoteMode { + Note, + Percussion + }; + struct BBT_Time { uint32_t bars; uint32_t beats; -- cgit v1.2.3