summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-07 03:19:04 +0000
committerDavid Robillard <d@drobilla.net>2007-07-07 03:19:04 +0000
commit68653307e666b8daabd2931ce0731d400d947707 (patch)
tree773e4d462feddba5e0fb6fa1bdebd45eec930e95 /libs/ardour/ardour
parentf87954eeb5d6a2a8b12e681ddb171dc1f6d76095 (diff)
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
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/automation_event.h10
-rw-r--r--libs/ardour/ardour/midi_track.h6
-rw-r--r--libs/ardour/ardour/parameter.h22
-rw-r--r--libs/ardour/ardour/types.h5
4 files changed, 42 insertions, 1 deletions
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;