diff --git a/SConstruct b/SConstruct
index aab1b830b5..0806ac4d26 100644
--- a/SConstruct
+++ b/SConstruct
@@ -389,6 +389,8 @@ libraries['libgnomecanvas2'].ParseConfig ('pkg-config --cflags --libs libgnomeca
libraries['glade2'] = LibraryInfo()
libraries['glade2'].ParseConfig ('pkg-config --cflags --libs libglade-2.0')
+libraries['usb'] = LibraryInfo (LIBS='usb')
+
#libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
libraries['ardour'] = LibraryInfo (LIBS='ardour', LIBPATH='#libs/ardour', CPPPATH='#libs/ardour')
diff --git a/ardour.rc.in b/ardour.rc.in
index 55948d4f74..96e0fe0a5b 100644
--- a/ardour.rc.in
+++ b/ardour.rc.in
@@ -26,6 +26,7 @@
+
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index 38cac52b40..0ca9def5fe 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -24,6 +24,7 @@ gtkardour.Append(POTFILE=domain + '.pot')
gtkardour.Merge ([
libraries['ardour'],
+ libraries['usb'],
libraries['gtkmm2ext'],
# libraries['flowcanvas'],
libraries['midi++2'],
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 2b7b87f93b..79c81992dc 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1260,14 +1260,6 @@ ARDOUR_UI::map_transport_state ()
}
}
-void
-ARDOUR_UI::send_all_midi_feedback ()
-{
- if (session) {
- session->send_all_midi_feedback();
- }
-}
-
void
ARDOUR_UI::allow_local_only ()
{
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 9c1ae4c45f..e658aa23e9 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -286,8 +286,6 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_toggle_action (transport_actions, X_("ToggleTimeMaster"), _("Time\nmaster"), mem_fun(*this, &ARDOUR_UI::toggle_time_master));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (common_actions, X_("SendAllMidiFeedback"), _("Send All Midi Feedback"), mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback));
- ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack1"), _("Toggle Record Enable Track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0U));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack2"), _("Toggle Record Enable Track2"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 1U));
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index b4a5413d04..6bb6fc45ce 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -141,6 +141,15 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
_route.panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
+ solo_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ mute_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ rec_enable_button->signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ playlist_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ automation_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ size_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ visual_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+ hide_button.signal_button_press_event().connect (mem_fun (*this, &AudioTimeAxisView::select_me), false);
+
solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press), false);
solo_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::solo_release), false);
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press), false);
@@ -1960,3 +1969,10 @@ AudioTimeAxisView::color_handler (ColorID id, uint32_t val)
break;
}
}
+
+bool
+AudioTimeAxisView::select_me (GdkEventButton* ev)
+{
+ editor.get_selection().add (this);
+ return false;
+}
diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h
index 0e2eab66c9..d1fbde3e9c 100644
--- a/gtk2_ardour/audio_time_axis.h
+++ b/gtk2_ardour/audio_time_axis.h
@@ -315,6 +315,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
void map_frozen ();
void color_handler (ColorID, uint32_t);
+ bool select_me (GdkEventButton*);
};
#endif /* __ardour_trackview_h__ */
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index f78ecbbcbe..03ea5ac456 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1394,10 +1394,6 @@ Editor::set_selection_from_loop()
void
Editor::set_selection_from_range (Location& loc)
{
- if (clicked_trackview == 0) {
- return;
- }
-
begin_reversible_command (_("set selection from range"));
selection->set (0, loc.start(), loc.end());
commit_reversible_command ();
@@ -1408,13 +1404,8 @@ Editor::set_selection_from_range (Location& loc)
void
Editor::select_all_selectables_using_time_selection ()
{
-
list touched;
- if (clicked_trackview == 0) {
- return;
- }
-
if (selection->time.empty()) {
return;
}
@@ -1432,10 +1423,10 @@ Editor::select_all_selectables_using_time_selection ()
}
(*iter)->get_selectables (start, end - 1, 0, DBL_MAX, touched);
}
+
begin_reversible_command (_("select all from range"));
selection->set (touched);
commit_reversible_command ();
-
}
@@ -1491,18 +1482,19 @@ Editor::select_all_selectables_using_cursor (Cursor *cursor, bool after)
list touched;
if (after) {
- begin_reversible_command (_("select all after cursor"));
- start = cursor->current_frame ;
- end = session->current_end_frame();
+ begin_reversible_command (_("select all after cursor"));
+ start = cursor->current_frame ;
+ end = session->current_end_frame();
} else {
- if (cursor->current_frame > 0) {
- begin_reversible_command (_("select all before cursor"));
- start = 0;
- end = cursor->current_frame - 1;
- } else {
- return;
- }
+ if (cursor->current_frame > 0) {
+ begin_reversible_command (_("select all before cursor"));
+ start = 0;
+ end = cursor->current_frame - 1;
+ } else {
+ return;
+ }
}
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
@@ -1520,19 +1512,21 @@ Editor::select_all_selectables_between_cursors (Cursor *cursor, Cursor *other_cu
jack_nframes_t end;
list touched;
bool other_cursor_is_first = cursor->current_frame > other_cursor->current_frame;
+
if (cursor->current_frame == other_cursor->current_frame) {
- return;
+ return;
}
+
begin_reversible_command (_("select all between cursors"));
- if ( other_cursor_is_first) {
- start = other_cursor->current_frame;
- end = cursor->current_frame - 1;
-
+ if (other_cursor_is_first) {
+ start = other_cursor->current_frame;
+ end = cursor->current_frame - 1;
+
} else {
- start = cursor->current_frame;
- end = other_cursor->current_frame - 1;
+ start = cursor->current_frame;
+ end = other_cursor->current_frame - 1;
}
-
+
for (TrackViewList::iterator iter = track_views.begin(); iter != track_views.end(); ++iter) {
if ((*iter)->hidden()) {
continue;
diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript
index dd9de55929..8bf62b9c01 100644
--- a/libs/ardour/SConscript
+++ b/libs/ardour/SConscript
@@ -31,6 +31,7 @@ automation.cc
automation_event.cc
configuration.cc
connection.cc
+control_protocol.cc
crossfade.cc
curve.cc
cycle_timer.cc
@@ -41,6 +42,7 @@ externalsource.cc
filesource.cc
gain.cc
gdither.cc
+generic_midi_control_protocol.cc
globals.cc
import.cc
insert.cc
@@ -67,6 +69,7 @@ send.cc
session.cc
session_butler.cc
session_click.cc
+session_control.cc
session_events.cc
session_export.cc
session_feedback.cc
@@ -82,6 +85,7 @@ source.cc
state_manager.cc
stateful.cc
tempo.cc
+tranzport_control_protocol.cc
utils.cc
version.cc
mix.cc
@@ -178,7 +182,7 @@ ardour.Merge ([
libraries['sigc2'],
libraries['pbd3'],
libraries['soundtouch'],
- libraries['midi++2']
+ libraries['midi++2'],
])
diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h
index 7d3a9db8b8..d54264c1c0 100644
--- a/libs/ardour/ardour/configuration_vars.h
+++ b/libs/ardour/ardour/configuration_vars.h
@@ -33,11 +33,12 @@ CONFIG_VARIABLE(bool, timecode_source_is_synced, "timecode-source-is-synced", tr
CONFIG_VARIABLE(bool, latched_record_enable, "latched-record-enable", false)
CONFIG_VARIABLE(bool, use_vst, "use-vst", true)
CONFIG_VARIABLE(bool, quieten_at_speed, "quieten-at-speed", true)
-CONFIG_VARIABLE(uint32_t, midi_feedback_interval_ms, "midi-feedback-interval-ms", 100)
+CONFIG_VARIABLE(uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
CONFIG_VARIABLE(uint32_t, disk_choice_space_threshold, "disk-choice-space-threshold", 57600000)
CONFIG_VARIABLE(uint32_t, destructive_xfade_msecs, "destructive-xfade-msecs", 2)
CONFIG_VARIABLE(SampleFormat, native_file_data_format, "native-file-data-format", ARDOUR::FormatFloat)
CONFIG_VARIABLE(HeaderFormat, native_file_header_format, "native-file-header-format", ARDOUR::WAVE)
+CONFIG_VARIABLE(bool, use_tranzport, "use-tranzport", false)
/* these variables have custom set() methods */
diff --git a/libs/ardour/ardour/control_protocol.h b/libs/ardour/ardour/control_protocol.h
new file mode 100644
index 0000000000..c0869fad9a
--- /dev/null
+++ b/libs/ardour/ardour/control_protocol.h
@@ -0,0 +1,45 @@
+#ifndef ardour_control_protocols_h
+#define ardour_control_protocols_h
+
+#include
+#include
+#include
+
+namespace ARDOUR {
+
+class Route;
+class Session;
+
+class ControlProtocol : sigc::trackable {
+ public:
+ ControlProtocol (Session&, std::string name);
+ virtual ~ControlProtocol();
+
+ virtual int init () { return 0; }
+ virtual bool active() const = 0;
+
+ enum SendWhat {
+ SendRoute,
+ SendGlobal
+ };
+
+ std::string name() const { return _name; }
+
+ void set_send (SendWhat);
+
+ bool send() const { return _send != 0; }
+ bool send_route_feedback () const { return _send & SendRoute; }
+ bool send_global_feedback () const { return _send & SendGlobal; }
+
+ virtual void send_route_feedback (std::list&) {}
+ virtual void send_global_feedback () {}
+
+ protected:
+ ARDOUR::Session& session;
+ SendWhat _send;
+ std::string _name;
+};
+
+}
+
+#endif // ardour_control_protocols_h
diff --git a/libs/ardour/ardour/generic_midi_control_protocol.h b/libs/ardour/ardour/generic_midi_control_protocol.h
new file mode 100644
index 0000000000..75b514f016
--- /dev/null
+++ b/libs/ardour/ardour/generic_midi_control_protocol.h
@@ -0,0 +1,31 @@
+#ifndef ardour_generic_midi_control_protocol_h
+#define ardour_generic_midi_control_protocol_h
+
+#include
+
+namespace MIDI {
+ class Port;
+}
+
+namespace ARDOUR {
+
+class GenericMidiControlProtocol : public ControlProtocol {
+ public:
+ GenericMidiControlProtocol (Session&);
+ virtual ~GenericMidiControlProtocol();
+
+ bool active() const;
+
+ void set_port (MIDI::Port*);
+ MIDI::Port* port () const { return _port; }
+
+ void send_route_feedback (std::list&);
+
+ private:
+ void route_feedback (ARDOUR::Route&, bool);
+ MIDI::Port* _port;
+};
+
+}
+
+#endif // ardour_generic_midi_control_protocol_h
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 1e25c5f38b..1f6f464d24 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -22,12 +22,7 @@
#define __ardour_session_h__
#include
-#if __GNUC__ >= 3
-#include
-using __gnu_cxx::slist;
-#else
-#include
-#endif
+#include
#include