Added Midi Tracks View mode.
This commit is contained in:
parent
bd6b4025de
commit
0185c9f25a
@ -46,6 +46,7 @@
|
||||
#include "ardour/debug.h"
|
||||
#include "ardour/location.h"
|
||||
#include "ardour/meter.h"
|
||||
#include "ardour/midi_track.h"
|
||||
#include "ardour/panner.h"
|
||||
#include "ardour/panner_shell.h"
|
||||
#include "ardour/route.h"
|
||||
@ -282,12 +283,18 @@ MackieControlProtocol::get_sorted_routes()
|
||||
|
||||
switch (_view_mode) {
|
||||
case Mixer:
|
||||
sorted.push_back (*it);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
break;
|
||||
case AudioTracks:
|
||||
break;
|
||||
case Busses:
|
||||
break;
|
||||
case MidiTracks:
|
||||
if (is_midi_track(*it)) {
|
||||
sorted.push_back (*it);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
break;
|
||||
case Plugins:
|
||||
break;
|
||||
@ -295,8 +302,6 @@ MackieControlProtocol::get_sorted_routes()
|
||||
break;
|
||||
}
|
||||
|
||||
sorted.push_back (*it);
|
||||
remote_ids.insert (route->remote_control_id());
|
||||
}
|
||||
|
||||
sort (sorted.begin(), sorted.end(), RouteByRemoteId());
|
||||
@ -1987,3 +1992,9 @@ MackieControlProtocol::connection_handler (boost::weak_ptr<ARDOUR::Port> wp1, st
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MackieControlProtocol::is_midi_track (boost::shared_ptr<Route> r) const
|
||||
{
|
||||
return boost::dynamic_pointer_cast<MidiTrack>(r) != 0;
|
||||
}
|
||||
|
@ -146,6 +146,8 @@ class MackieControlProtocol
|
||||
bool zoom_mode () const { return modifier_state() & MODIFIER_ZOOM; }
|
||||
bool metering_active () const { return _metering_active; }
|
||||
|
||||
bool is_midi_track (boost::shared_ptr<ARDOUR::Route>) const;
|
||||
|
||||
void set_view_mode (ViewMode);
|
||||
void set_flip_mode (FlipMode);
|
||||
void set_pot_mode (PotMode);
|
||||
|
@ -858,6 +858,7 @@ Mackie::LedState
|
||||
MackieControlProtocol::miditracks_release (Mackie::Button&)
|
||||
{
|
||||
set_view_mode (MidiTracks);
|
||||
refresh_current_bank();
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
@ -879,6 +880,7 @@ Mackie::LedState
|
||||
MackieControlProtocol::audiotracks_release (Mackie::Button&)
|
||||
{
|
||||
set_view_mode (AudioTracks);
|
||||
refresh_current_bank();
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
@ -900,6 +902,7 @@ Mackie::LedState
|
||||
MackieControlProtocol::aux_release (Mackie::Button&)
|
||||
{
|
||||
set_view_mode (Auxes);
|
||||
refresh_current_bank();
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
@ -911,6 +914,7 @@ Mackie::LedState
|
||||
MackieControlProtocol::busses_release (Mackie::Button&)
|
||||
{
|
||||
set_view_mode (Busses);
|
||||
refresh_current_bank();
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
@ -997,6 +1001,7 @@ Mackie::LedState
|
||||
MackieControlProtocol::view_press (Mackie::Button&)
|
||||
{
|
||||
set_view_mode (Mixer);
|
||||
refresh_current_bank();
|
||||
return none;
|
||||
}
|
||||
Mackie::LedState
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
void set_route (boost::shared_ptr<ARDOUR::Route>, bool with_messages = true);
|
||||
|
||||
// call all signal handlers manually
|
||||
void notify_all();
|
||||
void notify_all ();
|
||||
|
||||
void handle_button (Button&, ButtonState bs);
|
||||
void handle_fader (Fader&, float position);
|
||||
@ -154,7 +154,7 @@ private:
|
||||
|
||||
void reset_saved_values ();
|
||||
|
||||
bool is_midi_track() const;
|
||||
bool is_midi_track () const;
|
||||
|
||||
typedef std::map<Evoral::Parameter,Control*> ControlParameterMap;
|
||||
ControlParameterMap control_by_parameter;
|
||||
|
Loading…
Reference in New Issue
Block a user