add default key and boolean to define whether or not to enforce it
This commit is contained in:
parent
4801f488c5
commit
fb7dd71c45
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "ardour/midi_channel_filter.h"
|
||||
#include "ardour/midi_ring_buffer.h"
|
||||
#include "ardour/key.h"
|
||||
#include "ardour/track.h"
|
||||
|
||||
namespace ARDOUR
|
||||
|
@ -144,6 +145,12 @@ public:
|
|||
void realtime_handle_transport_stopped ();
|
||||
void region_edited (boost::shared_ptr<Region>);
|
||||
|
||||
MusicalKey const & key() const { return _key; }
|
||||
void set_key (MusicalKey const & key);
|
||||
|
||||
bool enforce_key ();
|
||||
void set_enforce_key (bool yn);
|
||||
|
||||
protected:
|
||||
|
||||
XMLNode& state (bool save_template);
|
||||
|
@ -166,6 +173,9 @@ private:
|
|||
MidiChannelFilter _playback_filter;
|
||||
MidiChannelFilter _capture_filter;
|
||||
|
||||
MusicalKey _key;
|
||||
bool _enforce_key;
|
||||
|
||||
void set_state_part_two ();
|
||||
void set_state_part_three ();
|
||||
|
||||
|
|
|
@ -87,6 +87,8 @@ MidiTrack::MidiTrack (Session& sess, string name, TrackMode mode)
|
|||
, _step_editing (false)
|
||||
, _input_active (true)
|
||||
, _restore_pgm_on_load (true)
|
||||
, _key (MusicalKey (MusicalMode::IonianMajor, 0))
|
||||
, _enforce_key (false)
|
||||
{
|
||||
_session.SessionLoaded.connect_same_thread (*this, boost::bind (&MidiTrack::restore_controls, this));
|
||||
|
||||
|
|
Loading…
Reference in New Issue