mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Put MIDI sync ports in the Ardour tab of the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@7527 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
90c6ca876a
commit
5d8933893c
2 changed files with 42 additions and 0 deletions
|
|
@ -20,6 +20,9 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
|
#include "midi++/manager.h"
|
||||||
|
#include "midi++/mmc.h"
|
||||||
|
|
||||||
#include "ardour/audio_track.h"
|
#include "ardour/audio_track.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
#include "ardour/bundle.h"
|
#include "ardour/bundle.h"
|
||||||
|
|
@ -438,6 +441,44 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ardour's sync ports */
|
||||||
|
|
||||||
|
MIDI::Manager* midi_manager = MIDI::Manager::instance ();
|
||||||
|
if (midi_manager && (type == DataType::MIDI || type == DataType::NIL)) {
|
||||||
|
boost::shared_ptr<Bundle> sync (new Bundle (_("Sync"), inputs));
|
||||||
|
MIDI::MachineControl* mmc = midi_manager->mmc ();
|
||||||
|
AudioEngine& ae = session->engine ();
|
||||||
|
if (inputs) {
|
||||||
|
sync->add_channel (
|
||||||
|
_("MTC in"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->mtc_input_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MIDI control in"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->midi_input_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MIDI clock in"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->midi_clock_input_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MMC in"), DataType::MIDI, ae.make_port_name_non_relative (mmc->input_port()->name())
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
sync->add_channel (
|
||||||
|
_("MTC out"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->mtc_output_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MIDI control out"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->midi_output_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MIDI clock out"), DataType::MIDI, ae.make_port_name_non_relative (midi_manager->midi_clock_output_port()->name())
|
||||||
|
);
|
||||||
|
sync->add_channel (
|
||||||
|
_("MMC out"), DataType::MIDI, ae.make_port_name_non_relative (mmc->output_port()->name())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ardour->add_bundle (sync);
|
||||||
|
}
|
||||||
|
|
||||||
/* Now find all other ports that we haven't thought of yet */
|
/* Now find all other ports that we haven't thought of yet */
|
||||||
|
|
||||||
std::vector<std::string> extra_system[DataType::num_types];
|
std::vector<std::string> extra_system[DataType::num_types];
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ class MachineControl
|
||||||
|
|
||||||
MachineControl (Manager *, jack_client_t *);
|
MachineControl (Manager *, jack_client_t *);
|
||||||
|
|
||||||
|
Port* input_port() { return _input_port; }
|
||||||
Port* output_port() { return _output_port; }
|
Port* output_port() { return _output_port; }
|
||||||
|
|
||||||
void set_receive_device_id (byte id);
|
void set_receive_device_id (byte id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue