projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ignore midi on monitor-section and force strict-i/o
[ardour.git]
/
libs
/
midi++2
/
midi++
/
mmc.h
diff --git
a/libs/midi++2/midi++/mmc.h
b/libs/midi++2/midi++/mmc.h
index 65d91686b36c355c8b0489493429dd7161537bb9..caf1605c290ee522b9c614b96b494be3514c47e6 100644
(file)
--- a/
libs/midi++2/midi++/mmc.h
+++ b/
libs/midi++2/midi++/mmc.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2000 Paul Barton-Davis
+ Copyright (C) 2000 Paul Barton-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
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
@@
-20,22
+20,27
@@
#ifndef __midipp_mmc_h_h__
#define __midipp_mmc_h_h__
#ifndef __midipp_mmc_h_h__
#define __midipp_mmc_h_h__
-#include
<jack/types.h>
-#include "control_protocol/timecode.h"
+#include
"timecode/time.h"
+
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
#include "pbd/signals.h"
#include "pbd/ringbuffer.h"
+
+#include "midi++/libmidi_visibility.h"
#include "midi++/types.h"
#include "midi++/parser.h"
#include "midi++/types.h"
#include "midi++/parser.h"
+namespace ARDOUR {
+ class PortEngine;
+}
+
namespace MIDI {
class Port;
class Parser;
class MachineControlCommand;
namespace MIDI {
class Port;
class Parser;
class MachineControlCommand;
-class Manager;
/** Class to handle incoming and outgoing MIDI machine control messages */
/** Class to handle incoming and outgoing MIDI machine control messages */
-class
MachineControl
+class
LIBMIDIPP_API MachineControl
{
public:
typedef PBD::Signal1<void,MachineControl&> MMCSignal;
{
public:
typedef PBD::Signal1<void,MachineControl&> MMCSignal;
@@
-55,10
+60,10
@@
class MachineControl
cmdChase = 0xB,
cmdCommandErrorReset = 0xC,
cmdMmcReset = 0xD,
cmdChase = 0xB,
cmdCommandErrorReset = 0xC,
cmdMmcReset = 0xD,
-
+
cmdIllegalMackieJogStart = 0x20,
cmdIllegalMackieJogStop = 0x21,
cmdIllegalMackieJogStart = 0x20,
cmdIllegalMackieJogStop = 0x21,
-
+
cmdWrite = 0x40,
cmdMaskedWrite = 0x41,
cmdRead = 0x42,
cmdWrite = 0x40,
cmdMaskedWrite = 0x41,
cmdRead = 0x42,
@@
-88,25
+93,28
@@
class MachineControl
cmdWait = 0x7C,
cmdResume = 0x7F
};
cmdWait = 0x7C,
cmdResume = 0x7F
};
-
- MachineControl (Manager *, jack_client_t *);
+
+ MachineControl ();
+
+ void set_ports (MIDI::Port* input, MIDI::Port* output);
Port* input_port() { return _input_port; }
Port* output_port() { return _output_port; }
Port* input_port() { return _input_port; }
Port* output_port() { return _output_port; }
-
+
void set_receive_device_id (byte id);
void set_send_device_id (byte id);
byte receive_device_id () const { return _receive_device_id; }
byte send_device_id () const { return _send_device_id; }
void enable_send (bool);
void set_receive_device_id (byte id);
void set_send_device_id (byte id);
byte receive_device_id () const { return _receive_device_id; }
byte send_device_id () const { return _send_device_id; }
void enable_send (bool);
- void send (MachineControlCommand const &);
+ bool send_enabled () const { return _enable_send; }
+ void send (MachineControlCommand const &, timestamp_t when);
static bool is_mmc (byte *sysex_buf, size_t len);
/* Signals to connect to if you want to run "callbacks"
when certain MMC commands are received.
*/
static bool is_mmc (byte *sysex_buf, size_t len);
/* Signals to connect to if you want to run "callbacks"
when certain MMC commands are received.
*/
-
+
MMCSignal Stop;
MMCSignal Play;
MMCSignal DeferredPlay;
MMCSignal Stop;
MMCSignal Play;
MMCSignal DeferredPlay;
@@
-144,30
+152,30
@@
class MachineControl
MMCSignal Wait;
MMCSignal Resume;
MMCSignal Wait;
MMCSignal Resume;
-
TimestampedSignal
SPPStart;
-
TimestampedSignal
SPPContinue;
-
TimestampedSignal
SPPStop;
+
PBD::Signal0<void>
SPPStart;
+
PBD::Signal0<void>
SPPContinue;
+
PBD::Signal0<void>
SPPStop;
/* The second argument is the shuttle speed, the third is
true if the direction is "forwards", false for "reverse"
*/
/* The second argument is the shuttle speed, the third is
true if the direction is "forwards", false for "reverse"
*/
-
+
PBD::Signal3<void,MachineControl&,float,bool> Shuttle;
/* The second argument specifies the desired track record enabled
status.
*/
PBD::Signal3<void,MachineControl&,float,bool> Shuttle;
/* The second argument specifies the desired track record enabled
status.
*/
- PBD::Signal3<void,MachineControl &,size_t,bool>
+ PBD::Signal3<void,MachineControl &,size_t,bool>
TrackRecordStatusChange;
TrackRecordStatusChange;
-
+
/* The second argument specifies the desired track record enabled
status.
*/
/* The second argument specifies the desired track record enabled
status.
*/
- PBD::Signal3<void,MachineControl &,size_t,bool>
+ PBD::Signal3<void,MachineControl &,size_t,bool>
TrackMuteChange;
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)
/* 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)
@@
-176,13
+184,13
@@
class MachineControl
PBD::Signal2<void,MachineControl &, const byte *> Locate;
/* The second argument is the number of steps to jump */
PBD::Signal2<void,MachineControl &, const byte *> Locate;
/* The second argument is the number of steps to jump */
-
+
PBD::Signal2<void,MachineControl &, int> Step;
#define MMC_NTRACKS 48
/* note: these are not currently in use */
PBD::Signal2<void,MachineControl &, int> Step;
#define MMC_NTRACKS 48
/* note: these are not currently in use */
-
+
byte updateRate;
byte responseError;
byte commandError;
byte updateRate;
byte responseError;
byte commandError;
@@
-253,7
+261,7
@@
class MachineControl
byte responseSegment;
byte wait;
byte resume;
byte responseSegment;
byte wait;
byte resume;
-
+
private:
byte _receive_device_id;
byte _send_device_id;
private:
byte _receive_device_id;
byte _send_device_id;
@@
-268,24
+276,24
@@
class MachineControl
int do_locate (byte *, size_t len);
int do_step (byte *, size_t len);
int do_shuttle (byte *, size_t len);
int do_locate (byte *, size_t len);
int do_step (byte *, size_t len);
int do_shuttle (byte *, size_t len);
-
+
void write_track_status (byte *, size_t len, byte reg);
void write_track_status (byte *, size_t len, byte reg);
- void spp_start (
Parser&, nframes_t
);
- void spp_continue (
Parser&, nframes_t
);
- void spp_stop (
Parser&, nframes_t
);
+ void spp_start ();
+ void spp_continue ();
+ void spp_stop ();
};
/** Class to describe a MIDI machine control command to be sent.
* In an ideal world we might use a class hierarchy for this, but objects of this type
* have to be allocated off the stack for RT safety.
*/
};
/** Class to describe a MIDI machine control command to be sent.
* In an ideal world we might use a class hierarchy for this, but objects of this type
* have to be allocated off the stack for RT safety.
*/
-class MachineControlCommand
+class
LIBMIDIPP_API
MachineControlCommand
{
public:
MachineControlCommand () : _command (MachineControl::Command (0)) {}
MachineControlCommand (MachineControl::Command);
MachineControlCommand (Timecode::Time);
{
public:
MachineControlCommand () : _command (MachineControl::Command (0)) {}
MachineControlCommand (MachineControl::Command);
MachineControlCommand (Timecode::Time);
-
+
MIDI::byte* fill_buffer (MachineControl *mmc, MIDI::byte *) const;
private:
MIDI::byte* fill_buffer (MachineControl *mmc, MIDI::byte *) const;
private: