/*
- Copyright (C) 1999-2002 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2005-2009 Taybin Rutkin <taybin@taybin.com>
+ * Copyright (C) 2005-2019 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2006-2012 David Robillard <d@drobilla.net>
+ * Copyright (C) 2008 Hans Baier <hansfbaier@googlemail.com>
+ * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2012-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2013 John Emmas <john@creativepost.co.uk>
+ * Copyright (C) 2013 Michael Fisher <mfisher31@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include <string>
#include <cmath>
void
Session::mmc_record_strobe (MIDI::MachineControl &/*mmc*/)
{
- if (Profile->get_trx()) {
-
- /* In Tracks Live, there is no concept of punch, so we just
- treat RecordStrobe like RecordPause. This violates the MMC
- specification.
- */
-
- if (Config->get_mmc_control()) {
- maybe_enable_record();
- }
- return;
- }
-
if (!Config->get_mmc_control() || (_step_editors > 0)) {
return;
}
// Send message at offset 0, sent time is for the start of this cycle
MidiBuffer& mb (_midi_ports->mtc_output_port()->get_midi_buffer (nframes));
- mb.push_back (Port::port_offset(), sizeof (msg), msg);
+ mb.push_back (0, sizeof (msg), msg);
_pframes_since_last_mtc = 0;
return 0;
break;
}
- const samplepos_t msg_time = rint(outbound_mtc_timecode_frame + (quarter_frame_duration * next_quarter_frame_to_send));
+ const samplepos_t msg_time = rint (outbound_mtc_timecode_frame + (quarter_frame_duration * next_quarter_frame_to_send));
// This message must fall within this block or something is broken
assert (msg_time >= start_sample);
void
Session::send_immediate_mmc (MachineControlCommand c)
{
- if (AudioEngine::instance()->in_process_thread()) {
- _mmc->send (c, Port::port_offset());
- } else {
- _mmc->send (c, 0);
- }
-
+ _mmc->send (c, 0);
}
bool
return true;
}
-/***********************************************************************
- OUTBOUND SYSTEM COMMON STUFF
-**********************************************************************/
-
+/* *********************************************************************
+ * OUTBOUND SYSTEM COMMON STUFF
+ **********************************************************************/
void
Session::send_song_position_pointer (samplepos_t)
return _midi_ports->scene_input_port ();
}
+boost::shared_ptr<AsyncMIDIPort>
+Session::vkbd_output_port () const
+{
+ return _midi_ports->vkbd_output_port ();
+}
+
boost::shared_ptr<MidiPort>
Session::midi_clock_output_port () const
{
return _midi_ports->midi_clock_output_port ();
}
-
boost::shared_ptr<MidiPort>
Session::mtc_output_port () const
{
if (!msp.empty()) {
- if (old_midi_target) {
- old_midi_target->input()->disconnect (this);
- }
-
for (vector<string>::const_iterator p = msp.begin(); p != msp.end(); ++p) {
PortManager::MidiPortInformation mpi (AudioEngine::instance()->midi_port_information (*p));