From 711db34a81eed3748684bc52b17a56292ffe4092 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 25 May 2011 15:19:47 +0000 Subject: Remove MIDI track default channel and its menu, and choose the channel for new notes using MidiTimeAxisView::get_channel_for_add() (fixes #3998 and #3865). git-svn-id: svn://localhost/ardour2/branches/3.0@9585 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/midi_track.h | 4 ---- libs/ardour/midi_track.cc | 12 ------------ 2 files changed, 16 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index d53156751d..35f1ab58e3 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -89,9 +89,6 @@ public: PBD::Signal1 StepEditStatusChange; - uint8_t default_channel() const { return _default_channel; } - void set_default_channel (uint8_t chn); - bool midi_thru() const { return _midi_thru; } void set_midi_thru (bool yn); @@ -126,7 +123,6 @@ protected: MidiRingBuffer _step_edit_ring_buffer; NoteMode _note_mode; bool _step_editing; - uint8_t _default_channel; bool _midi_thru; int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index a2ebef4ef4..3ce88c25b1 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -56,7 +56,6 @@ MidiTrack::MidiTrack (Session& sess, string name, Route::Flag flag, TrackMode mo , _step_edit_ring_buffer(64) // FIXME: size? , _note_mode(Sustained) , _step_editing (false) - , _default_channel (0) , _midi_thru (true) { } @@ -150,10 +149,6 @@ MidiTrack::_set_state (const XMLNode& node, int version, bool call_base) set_midi_thru (prop->value() == "yes"); } - if ((prop = node.property ("default-channel")) != 0) { - set_default_channel ((uint8_t) atoi (prop->value())); - } - XMLNodeList nlist; XMLNodeConstIterator niter; XMLNode *child; @@ -227,7 +222,6 @@ MidiTrack::state(bool full_state) root.add_property ("step-editing", (_step_editing ? "yes" : "no")); root.add_property ("note-mode", enum_2_string (_note_mode)); root.add_property ("midi-thru", (_midi_thru ? "yes" : "no")); - snprintf (buf, sizeof (buf), "%d", (int) _default_channel); root.add_property ("default-channel", buf); return root; @@ -604,12 +598,6 @@ MidiTrack::set_step_editing (bool yn) } } -void -MidiTrack::set_default_channel (uint8_t chn) -{ - _default_channel = std::min ((unsigned int) chn, 15U); -} - void MidiTrack::set_midi_thru (bool yn) { -- cgit v1.2.3