diff options
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/midi_track.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/parameter_types.h | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 2af5b4cf87..a12a0c6087 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -47,6 +47,7 @@ public: void realtime_handle_transport_stopped (); void realtime_locate (); + void non_realtime_locate (framepos_t); boost::shared_ptr<Diskstream> create_diskstream (); void set_diskstream (boost::shared_ptr<Diskstream>); @@ -183,6 +184,9 @@ private: void track_input_active (IOChange, void*); void map_input_active (bool); + /** Update automation controls to reflect any changes in buffers. */ + void update_controls (const BufferSet& bufs); + void filter_channels (BufferSet& bufs, ChannelMode mode, uint32_t mask); /* if mode is ForceChannel, force mask to the lowest set channel or 1 if no diff --git a/libs/ardour/ardour/parameter_types.h b/libs/ardour/ardour/parameter_types.h index 8442d1f1bf..240ad2d956 100644 --- a/libs/ardour/ardour/parameter_types.h +++ b/libs/ardour/ardour/parameter_types.h @@ -24,6 +24,7 @@ #include <stdint.h> #include "ardour/types.h" +#include "evoral/Parameter.hpp" #include "evoral/midi_events.h" namespace ARDOUR { @@ -54,6 +55,26 @@ midi_parameter_type(uint8_t status) } } +inline Evoral::Parameter +midi_parameter(const uint8_t* buf, const uint32_t len) +{ + const uint8_t channel = buf[0] & 0x0F; + switch (midi_parameter_type(buf[0])) { + case MidiCCAutomation: + return Evoral::Parameter(MidiCCAutomation, channel, buf[1]); + case MidiPgmChangeAutomation: + return Evoral::Parameter(MidiPgmChangeAutomation, channel); + case MidiChannelPressureAutomation: + return Evoral::Parameter(MidiChannelPressureAutomation, channel); + case MidiPitchBenderAutomation: + return Evoral::Parameter(MidiPitchBenderAutomation, channel); + case MidiSystemExclusiveAutomation: + return Evoral::Parameter(MidiSystemExclusiveAutomation, channel); + default: + return Evoral::Parameter(NullAutomation); + } +} + inline bool parameter_is_midi(AutomationType type) { |