2 #import <Cocoa/Cocoa.h>
3 #import <CoreMIDI/CoreMIDI.h>
4 #import <AudioToolbox/AudioToolbox.h>
5 #import "VVMIDIMessage.h"
10 extern BOOL _VVMIDIFourteenBitCCs;
11 extern double _machTimeToNsFactor;
15 @interface VVMIDINode : NSObject {
16 MIDIEndpointRef endpointRef;
17 NSMutableDictionary *properties;
18 MIDIClientRef clientRef;
20 CAClockRef mtcClockRef;
21 CAClockRef bpmClockRef;
30 int processingSysexIterationCount;
31 NSMutableArray *sysexArray;
35 int twoPieceCCVals[16][64];
38 pthread_mutex_t sendingLock;
41 MIDIPacketList *packetList;
42 MIDIPacket *currentPacket;
43 Byte scratchStruct[4];
46 - (id) initReceiverWithEndpoint:(MIDIEndpointRef)e;
47 - (id) initReceiverWithName:(NSString *)n;
48 - (id) initSenderWithEndpoint:(MIDIEndpointRef)e;
49 - (id) initSenderWithName:(NSString *)n;
53 - (void) loadProperties;
54 - (void) receivedMIDI:(NSArray *)a;
55 - (void) setupChanged;
57 - (void) sendMsg:(VVMIDIMessage *)m;
58 - (void) sendMsgs:(NSArray *)a;
63 - (MIDIEndpointRef) endpointRef;
64 - (NSMutableDictionary *) properties;
65 - (CAClockRef) mtcClockRef;
67 - (NSString *) deviceName;
68 - (NSString *) fullName;
70 - (void) setDelegate:(
id)n;
71 - (BOOL) processingSysex;
72 - (void) setProcessingSysex:(BOOL)n;
73 - (int) processingSysexIterationCount;
74 - (void) setProcessingSysexIterationCount:(
int)n;
75 - (NSMutableArray *) sysexArray;
77 - (void) setEnabled:(BOOL)n;
78 - (void) _getValsForCC:(
int)cc channel:(
int)c toMSB:(
int *)msb LSB:(
int *)lsb;
79 - (void) _setValsForCC:(
int)cc channel:(
int)c fromMSB:(
int)msb LSB:(
int)lsb;
80 - (double) MTCQuarterFrameSMPTEAsDouble;
81 - (double) midiClockBeats;
82 - (double) midiClockBPM;
86 void myMIDIReadProc(
const MIDIPacketList *pktList,
void *readProcRefCon,
void *srcConnRefCon);
87 void myMIDINotificationProc(
const MIDINotification *msg,
void *refCon);
88 void senderReadProc(
const MIDIPacketList *pktList,
void *readProcRefCon,
void *srcConnRefCon);
89 void clockListenerProc(
void *userData, CAClockMessage msg,
const void *param);