summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/ChangeLog2
-rw-r--r--muse/muse/audio.cpp9
-rw-r--r--muse/muse/sync.cpp101
-rw-r--r--muse/muse/sync.h12
-rw-r--r--muse/muse/widgets/midisyncimpl.cpp142
-rw-r--r--muse/muse/widgets/midisyncimpl.h3
6 files changed, 220 insertions, 49 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index 775dd561..2a796b0d 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,4 +1,6 @@
31.01.2010
+ * Changed: Midi sync window: Clock is now seperated from other real time commands (play/stop etc). (T356)
+31.01.2010
* Fixed: Midi sync in: Should be very solid and 'in time' now, play/stop/continue. (T356)
- Re-coded to begin incrementing immediately upon first-clock detection. Forbid MusE to send transport commands
while in external sync mode - our sync router handles that. Was causing problems.
diff --git a/muse/muse/audio.cpp b/muse/muse/audio.cpp
index 3e8ce004..1fb53bc8 100644
--- a/muse/muse/audio.cpp
+++ b/muse/muse/audio.cpp
@@ -789,7 +789,8 @@ void Audio::seek(const Pos& p)
{
MidiPort* mp = &midiPorts[port];
MidiDevice* dev = mp->device();
- if(!dev || !mp->syncInfo().MCOut())
+ //if(!dev || !mp->syncInfo().MCOut())
+ if(!dev || !mp->syncInfo().MRTOut())
continue;
// Added by T356: Shall we check for device write open flag to see if it's ok to send?...
@@ -979,7 +980,8 @@ void Audio::startRolling()
mp->sendMMCDeferredPlay();
//if(genMCSync && si.MCOut())
- if(si.MCOut())
+ //if(si.MCOut())
+ if(si.MRTOut())
{
if(curTickPos)
mp->sendContinue();
@@ -1214,7 +1216,8 @@ void Audio::stopRolling()
}
//if(genMCSync && si.MCOut()) // Midi Clock
- if(si.MCOut()) // Midi Clock
+ //if(si.MCOut()) // Midi Clock
+ if(si.MRTOut()) //
{
// send STOP and
// "set song position pointer"
diff --git a/muse/muse/sync.cpp b/muse/muse/sync.cpp
index 7ef16261..f5b983fc 100644
--- a/muse/muse/sync.cpp
+++ b/muse/muse/sync.cpp
@@ -73,22 +73,27 @@ MidiSyncInfo::MidiSyncInfo()
_idOut = 127;
_idIn = 127;
_sendMC = false;
+ _sendMRT = false;
_sendMMC = false;
_sendMTC = false;
_recMC = false;
+ _recMRT = false;
_recMMC = false;
_recMTC = false;
_lastClkTime = 0.0;
_lastTickTime = 0.0;
+ _lastMRTTime = 0.0;
_lastMMCTime = 0.0;
_lastMTCTime = 0.0;
_clockTrig = false;
_tickTrig = false;
+ _MRTTrig = false;
_MMCTrig = false;
_MTCTrig = false;
_clockDetect = false;
_tickDetect = false;
+ _MRTDetect = false;
_MMCDetect = false;
_MTCDetect = false;
_recMTCtype = 0;
@@ -115,14 +120,17 @@ MidiSyncInfo& MidiSyncInfo::operator=(const MidiSyncInfo &sp)
_lastClkTime = sp._lastClkTime;
_lastTickTime = sp._lastTickTime;
+ _lastMRTTime = sp._lastMRTTime;
_lastMMCTime = sp._lastMMCTime;
_lastMTCTime = sp._lastMTCTime;
_clockTrig = sp._clockTrig;
_tickTrig = sp._tickTrig;
+ _MRTTrig = sp._MRTTrig;
_MMCTrig = sp._MMCTrig;
_MTCTrig = sp._MTCTrig;
_clockDetect = sp._clockDetect;
_tickDetect = sp._tickDetect;
+ _MRTDetect = sp._MRTDetect;
_MMCDetect = sp._MMCDetect;
_MTCDetect = sp._MTCDetect;
_recMTCtype = sp._recMTCtype;
@@ -146,9 +154,11 @@ MidiSyncInfo& MidiSyncInfo::copyParams(const MidiSyncInfo &sp)
_idOut = sp._idOut;
_idIn = sp._idIn;
_sendMC = sp._sendMC;
+ _sendMRT = sp._sendMRT;
_sendMMC = sp._sendMMC;
_sendMTC = sp._sendMTC;
setMCIn(sp._recMC);
+ _recMRT = sp._recMRT;
_recMMC = sp._recMMC;
_recMTC = sp._recMTC;
_recRewOnStart = sp._recRewOnStart;
@@ -190,6 +200,20 @@ void MidiSyncInfo::setTime()
if(_tickDetect && (t - _lastTickTime) >= 1.0) // Set detect indicator timeout to about 1 second.
_tickDetect = false;
+ if(_MRTTrig)
+ {
+ _MRTTrig = false;
+ _lastMRTTime = t;
+ }
+ else
+ if(_MRTDetect && (t - _lastMRTTime) >= 1.0) // Set detect indicator timeout to about 1 second.
+ {
+ _MRTDetect = false;
+ // Give up the current midi sync in port number if we took it...
+ //if(curMidiSyncInPort == _port)
+ // curMidiSyncInPort = -1;
+ }
+
if(_MMCTrig)
{
_MMCTrig = false;
@@ -247,6 +271,18 @@ void MidiSyncInfo::setMCIn(const bool v)
}
//---------------------------------------------------------
+// setMRTIn
+//---------------------------------------------------------
+
+void MidiSyncInfo::setMRTIn(const bool v)
+{
+ _recMRT = v;
+ // If sync receive was turned off, clear the current midi sync in port number so another port can grab it.
+ //if(!_recMRT && _port != -1 && curMidiSyncInPort == _port)
+ // curMidiSyncInPort = -1;
+}
+
+//---------------------------------------------------------
// setMMCIn
//---------------------------------------------------------
@@ -294,6 +330,19 @@ void MidiSyncInfo::trigTickDetect()
}
//---------------------------------------------------------
+// trigMRTDetect
+//---------------------------------------------------------
+
+void MidiSyncInfo::trigMRTDetect()
+{
+ _MRTDetect = true;
+ _MRTTrig = true;
+ // Set the current midi sync in port number if it's not taken...
+ //if(_recMRT && curMidiSyncInPort == -1)
+ // curMidiSyncInPort = _port;
+}
+
+//---------------------------------------------------------
// trigMMCDetect
//---------------------------------------------------------
@@ -365,6 +414,8 @@ void MidiSyncInfo::read(Xml& xml)
_idIn = xml.parseInt();
else if (tag == "sendMC")
_sendMC = xml.parseInt();
+ else if (tag == "sendMRT")
+ _sendMRT = xml.parseInt();
else if (tag == "sendMMC")
_sendMMC = xml.parseInt();
else if (tag == "sendMTC")
@@ -373,6 +424,8 @@ void MidiSyncInfo::read(Xml& xml)
// _sendContNotStart = xml.parseInt();
else if (tag == "recMC")
_recMC = xml.parseInt();
+ else if (tag == "recMRT")
+ _recMRT = xml.parseInt();
else if (tag == "recMMC")
_recMMC = xml.parseInt();
else if (tag == "recMTC")
@@ -402,8 +455,8 @@ void MidiSyncInfo::write(int level, Xml& xml)
// return;
// All defaults? Nothing to write.
- if(_idOut == 127 && _idIn == 127 && !_sendMC && !_sendMMC && !_sendMTC &&
- /* !_sendContNotStart && */ !_recMC && !_recMMC && !_recMTC && _recRewOnStart)
+ if(_idOut == 127 && _idIn == 127 && !_sendMC && !_sendMRT && !_sendMMC && !_sendMTC &&
+ /* !_sendContNotStart && */ !_recMC && !_recMRT && !_recMMC && !_recMTC && _recRewOnStart)
return;
xml.tag(level++, "midiSyncInfo");
@@ -420,7 +473,9 @@ void MidiSyncInfo::write(int level, Xml& xml)
if(_sendMC)
xml.intTag(level, "sendMC", true);
- if(_sendMMC)
+ if(_sendMRT)
+ xml.intTag(level, "sendMRT", true);
+ if(_sendMRT)
xml.intTag(level, "sendMMC", true);
if(_sendMTC)
xml.intTag(level, "sendMTC", true);
@@ -429,6 +484,8 @@ void MidiSyncInfo::write(int level, Xml& xml)
if(_recMC)
xml.intTag(level, "recMC", true);
+ if(_recMRT)
+ xml.intTag(level, "recMRT", true);
if(_recMMC)
xml.intTag(level, "recMMC", true);
if(_recMTC)
@@ -726,16 +783,19 @@ void MidiSeq::setSongPosition(int port, int midiBeat)
if (midiInputTrace)
printf("set song position port:%d %d\n", port, midiBeat);
- midiPorts[port].syncInfo().trigMCSyncDetect();
+ //midiPorts[port].syncInfo().trigMCSyncDetect();
+ midiPorts[port].syncInfo().trigMRTDetect();
//if (!extSyncFlag.value())
// External sync not on? Clock in not turned on?
- if(!extSyncFlag.value() || !midiPorts[port].syncInfo().MCIn())
+ //if(!extSyncFlag.value() || !midiPorts[port].syncInfo().MCIn())
+ if(!extSyncFlag.value() || !midiPorts[port].syncInfo().MRTIn())
return;
// Re-transmit song position to other devices if clock out turned on.
for(int p = 0; p < MIDI_PORTS; ++p)
- if(p != port && midiPorts[p].syncInfo().MCOut())
+ //if(p != port && midiPorts[p].syncInfo().MCOut())
+ if(p != port && midiPorts[p].syncInfo().MRTOut())
midiPorts[p].sendSongpos(midiBeat);
curExtMidiSyncTick = (config.division * midiBeat) / 4;
@@ -815,15 +875,27 @@ void MidiSeq::realtimeSystemInput(int port, int c)
MidiPort* mp = &midiPorts[port];
// Trigger on any tick, clock, or realtime command.
- if(c == 0xf9)
+ if(c == 0xf9) // Tick
mp->syncInfo().trigTickDetect();
else
+ if(c == 0xf8) // Clock
mp->syncInfo().trigMCSyncDetect();
+ else
+ mp->syncInfo().trigMRTDetect(); // Other
- // External sync not on? Clock in not turned on?
- if(!extSyncFlag.value() || !mp->syncInfo().MCIn())
+ // External sync not on? Clock in not turned on? Otherwise realtime in not turned on?
+ if(!extSyncFlag.value())
return;
-
+ if(c == 0xf8)
+ {
+ if(!mp->syncInfo().MCIn())
+ return;
+ }
+ else
+ if(!mp->syncInfo().MRTIn())
+ return;
+
+
switch(c) {
case 0xf8: // midi clock (24 ticks / quarter note)
{
@@ -1125,7 +1197,8 @@ void MidiSeq::realtimeSystemInput(int port, int c)
case 0xfa: // start
// Re-transmit start to other devices if clock out turned on.
for(int p = 0; p < MIDI_PORTS; ++p)
- if(p != port && midiPorts[p].syncInfo().MCOut())
+ //if(p != port && midiPorts[p].syncInfo().MCOut())
+ if(p != port && midiPorts[p].syncInfo().MRTOut())
{
// p3.3.31
// If we aren't rewinding on start, there's no point in re-sending start.
@@ -1180,7 +1253,8 @@ void MidiSeq::realtimeSystemInput(int port, int c)
case 0xfb: // continue
// Re-transmit continue to other devices if clock out turned on.
for(int p = 0; p < MIDI_PORTS; ++p)
- if(p != port && midiPorts[p].syncInfo().MCOut())
+ //if(p != port && midiPorts[p].syncInfo().MCOut())
+ if(p != port && midiPorts[p].syncInfo().MRTOut())
midiPorts[p].sendContinue();
if (debugSync)
@@ -1207,7 +1281,8 @@ void MidiSeq::realtimeSystemInput(int port, int c)
{
// Re-transmit stop to other devices if clock out turned on.
for(int p = 0; p < MIDI_PORTS; ++p)
- if(p != port && midiPorts[p].syncInfo().MCOut())
+ //if(p != port && midiPorts[p].syncInfo().MCOut())
+ if(p != port && midiPorts[p].syncInfo().MRTOut())
midiPorts[p].sendStop();
playPendingFirstClock = false;
diff --git a/muse/muse/sync.h b/muse/muse/sync.h
index 8b164b90..21150ea6 100644
--- a/muse/muse/sync.h
+++ b/muse/muse/sync.h
@@ -26,9 +26,11 @@ class MidiSyncInfo
int _idIn;
bool _sendMC;
+ bool _sendMRT;
bool _sendMMC;
bool _sendMTC;
bool _recMC;
+ bool _recMRT;
bool _recMMC;
bool _recMTC;
@@ -39,16 +41,19 @@ class MidiSyncInfo
double _lastClkTime;
double _lastTickTime;
+ double _lastMRTTime;
double _lastMMCTime;
double _lastMTCTime;
double _lastActTime[MIDI_CHANNELS];
bool _clockTrig;
bool _tickTrig;
+ bool _MRTTrig;
bool _MMCTrig;
bool _MTCTrig;
bool _actTrig[MIDI_CHANNELS];
bool _clockDetect;
bool _tickDetect;
+ bool _MRTDetect;
bool _MMCDetect;
bool _MTCDetect;
bool _actDetect[MIDI_CHANNELS];
@@ -68,18 +73,22 @@ class MidiSyncInfo
void setIdIn(const int v) { _idIn = v; }
bool MCOut() const { return _sendMC; }
+ bool MRTOut() const { return _sendMRT; }
bool MMCOut() const { return _sendMMC; }
bool MTCOut() const { return _sendMTC; }
bool MCIn() const { return _recMC; }
+ bool MRTIn() const { return _recMRT; }
bool MMCIn() const { return _recMMC; }
bool MTCIn() const { return _recMTC; }
void setMCOut(const bool v) { _sendMC = v; }
+ void setMRTOut(const bool v) { _sendMRT = v; }
void setMMCOut(const bool v) { _sendMMC = v; }
void setMTCOut(const bool v) { _sendMTC = v; }
void setMCIn(const bool v);
+ void setMRTIn(const bool v);
void setMMCIn(const bool v);
void setMTCIn(const bool v);
@@ -101,6 +110,9 @@ class MidiSyncInfo
int recMTCtype() const { return _recMTCtype; }
void setRecMTCtype(int t) { _recMTCtype = t; }
+ bool MRTDetect() const { return _MRTDetect; }
+ void trigMRTDetect();
+
bool MMCDetect() const { return _MMCDetect; }
void trigMMCDetect();
diff --git a/muse/muse/widgets/midisyncimpl.cpp b/muse/muse/widgets/midisyncimpl.cpp
index 2c5cbb8c..3a3b687b 100644
--- a/muse/muse/widgets/midisyncimpl.cpp
+++ b/muse/muse/widgets/midisyncimpl.cpp
@@ -34,9 +34,9 @@
#include "driver/audiodev.h"
#include "audio.h"
-enum { DEVCOL_NO = 0, DEVCOL_NAME, DEVCOL_IN, DEVCOL_TICKIN, DEVCOL_MMCIN, DEVCOL_MTCIN, DEVCOL_MTCTYPE,
- DEVCOL_RID, DEVCOL_RCLK, DEVCOL_RMMC, DEVCOL_RMTC, DEVCOL_RREWSTART,
- DEVCOL_TID, DEVCOL_TCLK, DEVCOL_TMMC, DEVCOL_TMTC, /* DEVCOL_TREWSTART, */ };
+enum { DEVCOL_NO = 0, DEVCOL_NAME, DEVCOL_IN, DEVCOL_TICKIN, DEVCOL_MRTIN, DEVCOL_MMCIN, DEVCOL_MTCIN, DEVCOL_MTCTYPE,
+ DEVCOL_RID, DEVCOL_RCLK, DEVCOL_RMRT, DEVCOL_RMMC, DEVCOL_RMTC, DEVCOL_RREWSTART,
+ DEVCOL_TID, DEVCOL_TCLK, DEVCOL_TMRT, DEVCOL_TMMC, DEVCOL_TMTC, /* DEVCOL_TREWSTART, */ };
//MidiSyncInfo tmpMidiSyncPorts[MIDI_PORTS];
@@ -57,18 +57,21 @@ void MSyncHeaderTip::maybeTip(const QPoint &pos)
case DEVCOL_NO: p = QHeader::tr("Port Number"); break;
case DEVCOL_NAME: p = QHeader::tr("Name of the midi device associated with"
" this port number"); break;
- case DEVCOL_IN: p = QHeader::tr("Midi realtime input detected"); break;
+ case DEVCOL_IN: p = QHeader::tr("Midi clock input detected"); break;
case DEVCOL_TICKIN: p = QHeader::tr("Midi tick input detected"); break;
+ case DEVCOL_MRTIN: p = QHeader::tr("Midi real time input detected"); break;
case DEVCOL_MMCIN: p = QHeader::tr("MMC input detected"); break;
case DEVCOL_MTCIN: p = QHeader::tr("MTC input detected"); break;
case DEVCOL_MTCTYPE: p = QHeader::tr("Detected SMPTE format"); break;
case DEVCOL_RID: p = QHeader::tr("Receive id number. 127 = Global. Double click to edit."); break;
- case DEVCOL_RCLK: p = QHeader::tr("Accept midi realtime input"); break;
+ case DEVCOL_RCLK: p = QHeader::tr("Accept midi clock input"); break;
+ case DEVCOL_RMRT: p = QHeader::tr("Accept midi real time input"); break;
case DEVCOL_RMMC: p = QHeader::tr("Accept MMC input"); break;
case DEVCOL_RMTC: p = QHeader::tr("Accept MTC input"); break;
- case DEVCOL_RREWSTART: p = QHeader::tr("Receiving start rewinds before playing"); break;
+ case DEVCOL_RREWSTART: p = QHeader::tr("Receive start rewinds before playing"); break;
case DEVCOL_TID: p = QHeader::tr("Transmit id number. 127 = Global. Double click to edit."); break;
- case DEVCOL_TCLK: p = QHeader::tr("Send midi realtime output"); break;
+ case DEVCOL_TCLK: p = QHeader::tr("Send midi clock output"); break;
+ case DEVCOL_TMRT: p = QHeader::tr("Send midi realtime output"); break;
case DEVCOL_TMMC: p = QHeader::tr("Send MMC output"); break;
case DEVCOL_TMTC: p = QHeader::tr("Send MTC output"); break;
//case DEVCOL_TREWSTART: p = QHeader::tr("Send continue instead of start"); break;
@@ -92,10 +95,12 @@ QString MSyncWhatsThis::text(const QPoint& pos)
case DEVCOL_NAME:
return QHeader::tr("Name of the midi device associated with this port number");
case DEVCOL_IN:
- return QHeader::tr("Midi realtime input detected, including clock/start/stop/continue, and song position.\n"
- "Current port actually used is red. Click to force a port to be current.");
+ return QHeader::tr("Midi clock input detected.\n"
+ "Current port actually used is red.\nClick to force a port to be used.");
case DEVCOL_TICKIN:
return QHeader::tr("Midi tick input detected");
+ case DEVCOL_MRTIN:
+ return QHeader::tr("Midi realtime input detected, including\n start/stop/continue, and song position.");
case DEVCOL_MMCIN:
return QHeader::tr("MMC input detected, including stop/play/deferred play, and locate.");
//"Current port actually used is red. Click to force a port to be current.");
@@ -108,28 +113,38 @@ QString MSyncWhatsThis::text(const QPoint& pos)
case DEVCOL_RID:
return QHeader::tr("Receive id number. 127 = global receive all, even if not global.");
case DEVCOL_RCLK:
- return QHeader::tr("Accept midi realtime input, including clock/start/stop/continue, and song position.\n"
- "Only one input is used for clock. Auto-acquire: If two or more port realtime inputs\n"
- "are enabled, the first clock detected is used, until clock is lost, then another\n"
- "can take over. Non-clock events (start,stop etc) are accepted by ALL enabled ports.\n"
- "This means you may have several master devices connected, and muse will accept input\n"
- "from any, including one clock (best if each turns off its clock at stop, so muse can\n"
- "re-acquire the clock from another port. Click on detect indicator to force another.)");
+ return QHeader::tr("Accept midi clock input. Only one input is used for clock.\n"
+ "Auto-acquire: If two or more port realtime inputs are enabled,\n"
+ " the first clock detected is used, until clock is lost,\n"
+ " then another can take over. Best if each turns off its clock\n"
+ " at stop, so MusE can re-acquire the clock from another port.\n"
+ "Click on detect indicator to force another.");
+ case DEVCOL_RMRT:
+ return QHeader::tr("Accept midi realtime input, including\n start/stop/continue, and song position.\n"
+ "Non-clock events (start,stop etc) are\n accepted by ALL enabled ports.\n"
+ "This means you may have several master\n devices connected, and muse will accept\n"
+ " input from them.");
case DEVCOL_RMMC:
return QHeader::tr("Accept MMC input, including stop/play/deferred play, and locate.");
case DEVCOL_RMTC:
return QHeader::tr("Accept MTC input, including forward quarter-frame sync and full-frame locate.\n"
- "See rmc column for more help.");
+ "See 'rc' column for more help.");
case DEVCOL_RREWSTART:
- return QHeader::tr("When start is received, rewind before playing. It may be impossible\n"
- " to rewind fast enough to synchronize with the external device.");
+ return QHeader::tr("When start is received, rewind before playing.\n"
+ "Note: It may be impossible to rewind fast\n"
+ " enough to synchronize with the external device.");
case DEVCOL_TID:
return QHeader::tr("Transmit id number. 127 = global transmit to all.");
case DEVCOL_TCLK:
- return QHeader::tr("Send midi realtime output, including clock/start/stop/continue, and song position. "
- "If 'Slave to External Sync' is chosen, muse can re-transmit midi realtime input "
- " messages to any other chosen ports. This means you may have several slave devices "
- "connected, and muse can re-send realtime messages to any or all of them. ");
+ return QHeader::tr("Send midi clock output. If 'Slave to External Sync' is chosen,\n"
+ " muse can re-transmit clock to any other chosen ports.");
+ case DEVCOL_TMRT:
+ return QHeader::tr("Send midi realtime output, including start/stop/continue,\n"
+ " and song position. If 'Slave to external sync' is chosen,\n"
+ " muse can re-transmit midi realtime input messages to any\n"
+ " other chosen ports. This means you may have several slave\n"
+ " devices connected, and muse can re-send realtime messages\n"
+ " to any or all of them.");
case DEVCOL_TMMC:
return QHeader::tr("Send MMC output");
case DEVCOL_TMTC:
@@ -181,9 +196,11 @@ void MidiSyncLViewItem::copyFromSyncInfo(const MidiSyncInfo &sp)
_idOut = sp.idOut();
_idIn = sp.idIn();
_sendMC = sp.MCOut();
+ _sendMRT = sp.MRTOut();
_sendMMC = sp.MMCOut();
_sendMTC = sp.MTCOut();
_recMC = sp.MCIn();
+ _recMRT = sp.MRTIn();
_recMMC = sp.MMCIn();
_recMTC = sp.MTCIn();
_recRewOnStart = sp.recRewOnStart();
@@ -200,9 +217,11 @@ void MidiSyncLViewItem::copyToSyncInfo(MidiSyncInfo &sp)
sp.setIdOut(_idOut);
sp.setIdIn(_idIn);
sp.setMCOut(_sendMC);
+ sp.setMRTOut(_sendMRT);
sp.setMMCOut(_sendMMC);
sp.setMTCOut(_sendMTC);
sp.setMCIn(_recMC);
+ sp.setMRTIn(_recMRT);
sp.setMMCIn(_recMMC);
sp.setMTCIn(_recMTC);
sp.setRecRewOnStart(_recRewOnStart);
@@ -261,49 +280,59 @@ MidiSyncConfig::MidiSyncConfig(QWidget* parent, const char* name)
devicesListView->setAllColumnsShowFocus(true);
devicesListView->addColumn(tr("Port"));
devicesListView->addColumn(tr("Device Name"), 120);
- devicesListView->addColumn(tr("i"));
- devicesListView->addColumn(tr("t"));
- devicesListView->addColumn(tr("m"));
devicesListView->addColumn(tr("c"));
+ devicesListView->addColumn(tr("k"));
+ devicesListView->addColumn(tr("r"));
+ devicesListView->addColumn(tr("m"));
+ devicesListView->addColumn(tr("t"));
devicesListView->addColumn(tr("type"));
devicesListView->addColumn(tr("rid")); // Receive
- devicesListView->addColumn(tr("rmc")); // Receive
- devicesListView->addColumn(tr("rmmc")); // Receive
- devicesListView->addColumn(tr("rmtc")); // Receive
- devicesListView->addColumn(tr("rrs")); // Receive
+ devicesListView->addColumn(tr("rc")); // Receive
+ devicesListView->addColumn(tr("rr")); // Receive
+ devicesListView->addColumn(tr("rm")); // Receive
+ devicesListView->addColumn(tr("rt")); // Receive
+ devicesListView->addColumn(tr("rw")); // Receive
devicesListView->addColumn(tr("tid")); // Transmit
- devicesListView->addColumn(tr("tmc")); // Transmit
- devicesListView->addColumn(tr("tmmc")); // Transmit
- devicesListView->addColumn(tr("tmtc")); // Transmit
+ devicesListView->addColumn(tr("tc")); // Transmit
+ devicesListView->addColumn(tr("tr")); // Transmit
+ devicesListView->addColumn(tr("tm")); // Transmit
+ devicesListView->addColumn(tr("tt")); // Transmit
//devicesListView->addColumn(tr("trs")); // Transmit
devicesListView->setFocusPolicy(NoFocus);
devicesListView->setColumnAlignment(DEVCOL_NO, AlignHCenter);
devicesListView->setColumnAlignment(DEVCOL_IN, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_TICKIN, AlignCenter);
+ devicesListView->setColumnAlignment(DEVCOL_MRTIN, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_MMCIN, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_MTCIN, AlignCenter);
//devicesListView->setColumnAlignment(DEVCOL_MTCTYPE, AlignCenter);
//devicesListView->setColumnAlignment(DEVCOL_RID, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_RCLK, AlignCenter);
+ devicesListView->setColumnAlignment(DEVCOL_RMRT, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_RMMC, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_RMTC, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_RREWSTART, AlignCenter);
//devicesListView->setColumnAlignment(DEVCOL_TID, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_TCLK, AlignCenter);
+ devicesListView->setColumnAlignment(DEVCOL_TMRT, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_TMMC, AlignCenter);
devicesListView->setColumnAlignment(DEVCOL_TMTC, AlignCenter);
//devicesListView->setColumnAlignment(DEVCOL_TREWSTART, AlignCenter);
devicesListView->header()->setResizeEnabled(false, DEVCOL_NO);
devicesListView->header()->setResizeEnabled(false, DEVCOL_IN);
devicesListView->header()->setResizeEnabled(false, DEVCOL_TICKIN);
+ devicesListView->header()->setResizeEnabled(false, DEVCOL_MRTIN);
+ devicesListView->header()->setResizeEnabled(false, DEVCOL_MMCIN);
devicesListView->header()->setResizeEnabled(false, DEVCOL_MTCIN);
devicesListView->header()->setResizeEnabled(false, DEVCOL_RCLK);
+ devicesListView->header()->setResizeEnabled(false, DEVCOL_RMRT);
devicesListView->header()->setResizeEnabled(false, DEVCOL_RMMC);
devicesListView->header()->setResizeEnabled(false, DEVCOL_RMTC);
devicesListView->header()->setResizeEnabled(false, DEVCOL_RMTC);
devicesListView->header()->setResizeEnabled(false, DEVCOL_RREWSTART);
devicesListView->header()->setResizeEnabled(false, DEVCOL_TCLK);
+ devicesListView->header()->setResizeEnabled(false, DEVCOL_TMRT);
devicesListView->header()->setResizeEnabled(false, DEVCOL_TMMC);
//devicesListView->header()->setResizeEnabled(false, DEVCOL_TREWSTART);
//devicesListView->setResizeMode(QListView::LastColumn);
@@ -486,6 +515,30 @@ void MidiSyncConfig::heartBeat()
}
}
+ sdet = midiPorts[port].syncInfo().MRTDetect();
+ if(sdet)
+ {
+ if(!lvi->_MRTDet)
+ {
+ // Added by Tim. p3.3.6
+ //printf("MidiSyncConfig::heartBeat setting MRT on icon\n");
+
+ lvi->_MRTDet = true;
+ lvi->setPixmap(DEVCOL_MRTIN, *dotIcon);
+ }
+ }
+ else
+ {
+ if(lvi->_MRTDet)
+ {
+ // Added by Tim. p3.3.6
+ //printf("MidiSyncConfig::heartBeat setting MRT off icon\n");
+
+ lvi->_MRTDet = false;
+ lvi->setPixmap(DEVCOL_MRTIN, *dothIcon);
+ }
+ }
+
int type = midiPorts[port].syncInfo().recMTCtype();
sdet = midiPorts[port].syncInfo().MMCDetect();
bool mtcdet = midiPorts[port].syncInfo().MTCDetect();
@@ -843,6 +896,17 @@ void MidiSyncConfig::updateSyncInfoLV()
lvi->setPixmap(DEVCOL_TICKIN, *dothIcon);
}
+ if(portsi.MRTDetect())
+ {
+ lvi->_MRTDet = true;
+ lvi->setPixmap(DEVCOL_MRTIN, *dotIcon);
+ }
+ else
+ {
+ lvi->_MRTDet = false;
+ lvi->setPixmap(DEVCOL_MRTIN, *dothIcon);
+ }
+
if(portsi.MMCDetect())
{
lvi->_MMCDet = true;
@@ -928,6 +992,7 @@ void MidiSyncConfig::updateSyncInfoLV()
//lvi->setPixmap(DEVCOL_RMTC, si.MTCIn() ? *dotIcon : *dothIcon);
lvi->setText(DEVCOL_RID, QString().setNum(lvi->_idIn) );
lvi->setPixmap(DEVCOL_RCLK, lvi->_recMC ? *dotIcon : *dothIcon);
+ lvi->setPixmap(DEVCOL_RMRT, lvi->_recMRT ? *dotIcon : *dothIcon);
lvi->setPixmap(DEVCOL_RMMC, lvi->_recMMC ? *dotIcon : *dothIcon);
lvi->setPixmap(DEVCOL_RMTC, lvi->_recMTC ? *dotIcon : *dothIcon);
lvi->setPixmap(DEVCOL_RREWSTART, lvi->_recRewOnStart ? *dotIcon : *dothIcon);
@@ -939,6 +1004,7 @@ void MidiSyncConfig::updateSyncInfoLV()
//lvi->setPixmap(DEVCOL_TMTC, si.MTCOut() ? *dotIcon : *dothIcon);
lvi->setText(DEVCOL_TID, QString().setNum(lvi->_idOut) );
lvi->setPixmap(DEVCOL_TCLK, lvi->_sendMC ? *dotIcon : *dothIcon);
+ lvi->setPixmap(DEVCOL_TMRT, lvi->_sendMRT ? *dotIcon : *dothIcon);
lvi->setPixmap(DEVCOL_TMMC, lvi->_sendMMC ? *dotIcon : *dothIcon);
lvi->setPixmap(DEVCOL_TMTC, lvi->_sendMTC ? *dotIcon : *dothIcon);
//lvi->setPixmap(DEVCOL_TREWSTART, lvi->_sendContNotStart ? *dotIcon : *dothIcon);
@@ -1069,6 +1135,11 @@ void MidiSyncConfig::dlvClicked(int /*button*/, QListViewItem* item, const QPoin
lvi->setPixmap(DEVCOL_RCLK, lvi->_recMC ? *dotIcon : *dothIcon);
setDirty();
break;
+ case DEVCOL_RMRT:
+ lvi->_recMRT = (lvi->_recMRT ? false : true);
+ lvi->setPixmap(DEVCOL_RMRT, lvi->_recMRT ? *dotIcon : *dothIcon);
+ setDirty();
+ break;
case DEVCOL_RMMC:
//si.setMMCIn(si.MMCIn() ? false : true);
//lvi->setPixmap(DEVCOL_RMMC, si.MMCIn() ? *dotIcon : *dothIcon);
@@ -1097,6 +1168,11 @@ void MidiSyncConfig::dlvClicked(int /*button*/, QListViewItem* item, const QPoin
lvi->setPixmap(DEVCOL_TCLK, lvi->_sendMC ? *dotIcon : *dothIcon);
setDirty();
break;
+ case DEVCOL_TMRT:
+ lvi->_sendMRT = (lvi->_sendMRT ? false : true);
+ lvi->setPixmap(DEVCOL_TMRT, lvi->_sendMRT ? *dotIcon : *dothIcon);
+ setDirty();
+ break;
case DEVCOL_TMMC:
//si.setMMCOut(si.MMCOut() ? false : true);
//lvi->setPixmap(DEVCOL_TMMC, si.MMCOut() ? *dotIcon : *dothIcon);
diff --git a/muse/muse/widgets/midisyncimpl.h b/muse/muse/widgets/midisyncimpl.h
index 63c041e5..3b08ed7b 100644
--- a/muse/muse/widgets/midisyncimpl.h
+++ b/muse/muse/widgets/midisyncimpl.h
@@ -77,6 +77,7 @@ class MidiSyncLViewItem : public QListViewItem
bool _curDet;
bool _curMTCDet;
bool _tickDet;
+ bool _MRTDet;
bool _MMCDet;
bool _MTCDet;
int _recMTCtype;
@@ -85,9 +86,11 @@ class MidiSyncLViewItem : public QListViewItem
int _idIn;
bool _sendMC;
+ bool _sendMRT;
bool _sendMMC;
bool _sendMTC;
bool _recMC;
+ bool _recMRT;
bool _recMMC;
bool _recMTC;