Simple first version that sends CC messages.
Fixed rpath so SnoizeMIDI can link in current directory, /Library/Frameworks, or ~/Library/Frameworks
This commit is contained in:
parent
40b6970265
commit
330502e0c3
@ -257,7 +257,8 @@
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "DHSendMIDI/DHSendMIDI-Prefix.pch";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path /Library/Frameworks ~/Library/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/. /Library/Frameworks ~/Library/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
@ -267,7 +268,8 @@
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "DHSendMIDI/DHSendMIDI-Prefix.pch";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path /Library/Frameworks ~/Library/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "@loader_path/. /Library/Frameworks ~/Library/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@ -7,15 +7,33 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <SnoizeMIDI/SnoizeMIDI.h>
|
||||
|
||||
int main(int argc, const char * argv[])
|
||||
{
|
||||
|
||||
@autoreleasepool {
|
||||
|
||||
// insert code here...
|
||||
NSLog(@"Hello, World!");
|
||||
|
||||
@autoreleasepool
|
||||
{
|
||||
if(argc != 3)
|
||||
{
|
||||
fprintf(stderr, "Must have 2 arguments - MIDI CC Controller and Value\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
SMPortOutputStream *os = [[SMPortOutputStream alloc] init];
|
||||
[os setEndpoints:[NSSet setWithArray:[SMDestinationEndpoint destinationEndpoints]]];
|
||||
|
||||
uint8_t byte1 = atoi(argv[1]);
|
||||
uint8_t byte2 = atoi(argv[2]);
|
||||
|
||||
SMVoiceMessage *message = [[SMVoiceMessage alloc] initWithTimeStamp:0 statusByte:SMVoiceMessageStatusControl];
|
||||
[message setTimeStampToNow];
|
||||
[message setDataByte1:byte1];
|
||||
[message setDataByte2:byte2];
|
||||
[message setChannel:1];
|
||||
|
||||
[os takeMIDIMessages:@[message]];
|
||||
|
||||
printf("Sent CC %u %u\n", byte1, byte2);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
2
MIDIApps
2
MIDIApps
@ -1 +1 @@
|
||||
Subproject commit 0ead91fcf79f82b76f2a1c0ca834e2d37a9cf311
|
||||
Subproject commit 0b637221520dba33cdab4e580c94b8bf6d9c89f2
|
||||
Loading…
x
Reference in New Issue
Block a user