Skip to content

Commit be5b49e

Browse files
committed
small updates
folders containing .als files can be dropped onto the app icon- this is not recursive :: updated the min size on the live oscquery helper window
1 parent ccd31ff commit be5b49e

File tree

4 files changed

+42
-11
lines changed

4 files changed

+42
-11
lines changed

LiveOSCQueryHelper/Base.lproj/MainMenu.xib

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@
691691
<windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
692692
<rect key="contentRect" x="365" y="787" width="308" height="390"/>
693693
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
694+
<value key="minSize" type="size" width="308" height="390"/>
694695
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
695696
<rect key="frame" x="0.0" y="0.0" width="308" height="390"/>
696697
<autoresizingMask key="autoresizingMask"/>
@@ -821,13 +822,13 @@
821822
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
822823
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="ORm-XZ-yL0">
823824
<font key="font" metaFont="system"/>
824-
<mutableString key="title">Live OSCQuery Helper ("LOQH" from now on) creates an OSC query server from an Ableton Live project file. This app also creates an OSC server ("Live OSCQuery Helper"), as well as a virtual MIDI device ("From Live OSCQuery Helper"). Clients can browse the query server's OSC address space, and send OSC messages to the OSC server- these OSC messages are transformed into the appropriate MIDI messages, and published on the virtual MIDI device where Ableton Live can receive them. This allows multiple clients to browse and interact with an Ableton Live project in realtime.
825+
<string key="title">Live OSCQuery Helper ("LOQH" from now on) creates an OSC query server from an Ableton Live project file. This app also creates an OSC server ("Live OSCQuery Helper"), as well as a virtual MIDI device ("From Live OSCQuery Helper"). Clients can browse the query server's OSC address space, and send OSC messages to the OSC server- these OSC messages are transformed into the appropriate MIDI messages, and published on the virtual MIDI device where Ableton Live can receive them. This allows multiple clients to browse and interact with an Ableton Live project in realtime.
825826

826827
HOW TO USE IT:
827828
1)- Tell LOQH what Ableton Live project file to use- this file will be used to populate the OSC query server with the description of another application's OSC address space. LOQH will "watch" the file and if it is updated, the query server will automatically update itself, and then notify all connected clients that it has been updated. LOQH will only create/publish OSC nodes for controls in your project file that have been mapped to MIDI- if a control doesn't have a MIDI mapping, it won't appear on the server!
828829
2)- Configure Ableton Live to receive MIDI data from the virtual device published by this app (named "From Live OSCQuery Helper")- this is how this app communicates with Ableton Live!
829830

830-
If LOQH is running, the OSC query server is running- you can check it with any OSC query client, or a web browser. The query server will stop when the app quits- if there's a problem with the file you load (if it's missing or malformed or corrupt) the query server will keep running, but its address space will be empty.</mutableString>
831+
If LOQH is running, the OSC query server is running- you can check it with any OSC query client, or a web browser. The query server will stop when the app quits- if there's a problem with the file you load (if it's missing or malformed or corrupt) the query server will keep running, but its address space will be empty.</string>
831832
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
832833
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
833834
</textFieldCell>

LiveOSCQueryHelper/Info.plist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
<key>CFBundleTypeRole</key>
2121
<string>Viewer</string>
2222
</dict>
23+
<dict>
24+
<key>CFBundleTypeName</key>
25+
<string>Folder</string>
26+
<key>CFBundleTypeRole</key>
27+
<string>Viewer</string>
28+
<key>LSItemContentTypes</key>
29+
<array>
30+
<string>public.folder</string>
31+
</array>
32+
</dict>
2333
</array>
2434
<key>CFBundleExecutable</key>
2535
<string>$(EXECUTABLE_NAME)</string>

LiveOSCQueryHelper/LiveOSCQueryHelperAppDelegate.m

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,37 @@ - (void)applicationWillTerminate:(NSNotification *)aNotification {
8989
}
9090
[delegates removeAllObjects];
9191
}
92-
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename {
93-
NSLog(@"%s ... %@",__func__,filename);
94-
[self _loadFile:filename];
95-
return YES;
92+
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)inPath {
93+
//NSLog(@"%s ... %@",__func__,inPath);
94+
NSFileManager *fm = [NSFileManager defaultManager];
95+
BOOL isDirectory = NO;
96+
NSError *nsErr = nil;
97+
if ([fm fileExistsAtPath:inPath isDirectory:&isDirectory]) {
98+
if (!isDirectory) {
99+
[self _loadFile:inPath];
100+
return YES;
101+
}
102+
else {
103+
NSArray *filenames = [fm contentsOfDirectoryAtPath:inPath error:&nsErr];
104+
for (NSString *filename in filenames) {
105+
if ([[filename pathExtension] caseInsensitiveCompare:@"als"]==NSOrderedSame) {
106+
NSString *fullPath = [NSString stringWithFormat:@"%@/%@",inPath,filename];
107+
[self _loadFile:fullPath];
108+
return YES;
109+
}
110+
}
111+
}
112+
}
113+
114+
return NO;
96115
}
97116

98117

99118
#pragma mark -------------------------- UI
100119

101120

102121
- (IBAction) openDocument:(id)sender {
103-
NSLog(@"%s",__func__);
122+
//NSLog(@"%s",__func__);
104123
NSUserDefaults *def = [NSUserDefaults standardUserDefaults];
105124
NSString *importDir = [def objectForKey:@"lastOpenDocumentFolder"];
106125
if (importDir == nil)
@@ -141,7 +160,7 @@ - (IBAction) openDocument:(id)sender {
141160
}
142161

143162
- (IBAction) showHelp:(id)sender {
144-
NSLog(@"%s",__func__);
163+
//NSLog(@"%s",__func__);
145164
if (![NSThread isMainThread]) {
146165
dispatch_async(dispatch_get_main_queue(), ^{
147166
[self showHelp:sender];
@@ -153,7 +172,7 @@ - (IBAction) showHelp:(id)sender {
153172
}];
154173
}
155174
- (IBAction) closeHelp:(id)sender {
156-
NSLog(@"%s",__func__);
175+
//NSLog(@"%s",__func__);
157176
if (![NSThread isMainThread]) {
158177
dispatch_async(dispatch_get_main_queue(), ^{
159178
[self closeHelp:sender];

OSCQueryHelper/Base.lproj/MainMenu.xib

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@
698698
<windowPositionMask key="initialPositionMask" leftStrut="YES" topStrut="YES"/>
699699
<rect key="contentRect" x="731" y="787" width="308" height="390"/>
700700
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
701+
<value key="minSize" type="size" width="308" height="390"/>
701702
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
702703
<rect key="frame" x="0.0" y="0.0" width="308" height="390"/>
703704
<autoresizingMask key="autoresizingMask"/>
@@ -882,7 +883,7 @@
882883
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
883884
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="m6n-mg-3TP">
884885
<font key="font" metaFont="system"/>
885-
<mutableString key="title">OSC Query Helper ("OQH" from now on) creates an OSC query server for other applications that support OSC, but don't support the OSC query protocol. This allows clients that support the query protocol to browse and send data directly to the other app's OSC address space.
886+
<string key="title">OSC Query Helper ("OQH" from now on) creates an OSC query server for other applications that support OSC, but don't support the OSC query protocol. This allows clients that support the query protocol to browse and send data directly to the other app's OSC address space.
886887

887888
HOW TO USE IT:
888889
1)- Tell OQH what file to use- this file will be used to populate the OSC query server with the description of another application's OSC address space. OQH will "watch" the file and if it is updated, the query server will automatically update itself, and then notify all connected clients that it has been updated. For more information about the supported file type(s), see "FILE TYPE".
@@ -892,7 +893,7 @@ If OQH is running, the OSC query server is running- you can check it with any OS
892893

893894
FILE TYPE:
894895

895-
- JSON files can be imported- a sample file demonstrating a wide variety of OSC types is already installed on your machine in "~/Documents/OSCQuery Helper/SampleDocument.json". The JSON files that you import should have a structure similar to the desired output of the OSC query server- for more information, consult the OSC query protocol, defined here (https://github.com/mrRay/OSCQueryProposal). You can include an optional HOST_INFO object in the root level of the JSON file's object if you want to hard-code the connection details of the target app or device (port and, if desired, an IP address other than localhost) as detailed in the query protocol. If you don't include this information, you can just use the UI in the app to specify the target.</mutableString>
896+
- JSON files can be imported- a sample file demonstrating a wide variety of OSC types is already installed on your machine in "~/Documents/OSCQuery Helper/SampleDocument.json". The JSON files that you import should have a structure similar to the desired output of the OSC query server- for more information, consult the OSC query protocol, defined here (https://github.com/mrRay/OSCQueryProposal). You can include an optional HOST_INFO object in the root level of the JSON file's object if you want to hard-code the connection details of the target app or device (port and, if desired, an IP address other than localhost) as detailed in the query protocol. If you don't include this information, you can just use the UI in the app to specify the target.</string>
896897
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
897898
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
898899
</textFieldCell>

0 commit comments

Comments
 (0)