diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h index fb8fd2449f..4506bd8a4b 100644 --- a/libs/midi++2/midi++/mmc.h +++ b/libs/midi++2/midi++/mmc.h @@ -154,6 +154,13 @@ class MachineControl : public sigc::trackable sigc::signal TrackRecordStatusChange; + /* The second argument specifies the desired track record enabled + status. + */ + + sigc::signal + TrackMuteChange; + /* The second argument points to a byte array containing the locate target value in MMC Standard Time Code format (5 bytes, roughly: hrs/mins/secs/frames/subframes) @@ -196,7 +203,7 @@ class MachineControl : public sigc::trackable byte fixedSpeed; byte lifterDefeat; byte controlDisable; - byte trackMute; + byte trackMute[MMC_NTRACKS]; byte failure; byte selectedTimeCode; byte shortSelectedTimeCode; @@ -256,8 +263,8 @@ class MachineControl : public sigc::trackable int do_locate (byte *, size_t len); int do_step (byte *, size_t len); int do_shuttle (byte *, size_t len); - - void write_track_record_ready (byte *, size_t len); + + void write_track_status (byte *, size_t len, byte reg); }; } // namespace MIDI diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index c16b243a16..2e42bb59fc 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -464,7 +464,11 @@ MachineControl::do_masked_write (byte *msg, size_t len) switch (msg[2]) { case 0x4f: /* Track Record Ready Status */ - write_track_record_ready (&msg[3], len - 3); + write_track_status (&msg[3], len - 3, msg[2]); + break; + + case 0x62: /* track mute */ + write_track_status (&msg[3], len - 3, msg[2]); break; default: @@ -478,8 +482,7 @@ MachineControl::do_masked_write (byte *msg, size_t len) } void -MachineControl::write_track_record_ready (byte *msg, size_t /*len*/) - +MachineControl::write_track_status (byte *msg, size_t /*len*/, byte reg) { size_t n; ssize_t base_track; @@ -549,14 +552,18 @@ MachineControl::write_track_record_ready (byte *msg, size_t /*len*/) bit set. */ - if (msg[2] & (1<