Created
November 16, 2022 18:18
-
-
Save hogliux/85b5a82a52d7d115514a54756c36d26c to your computer and use it in GitHub Desktop.
Find VST3s inside AUv3 packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray<NSURL*>* findVST3sBundledInsideAUv3s() | |
{ | |
AVAudioUnitComponentManager* manager = [AVAudioUnitComponentManager sharedAudioUnitComponentManager]; | |
NSArray<AVAudioUnitComponent*>* comps = [manager componentsPassingTest:^BOOL(AVAudioUnitComponent *comp, BOOL *stop) { | |
return [comp.allTagNames containsObject:@"VST3Compatible"] && (! [comp.userTagNames containsObject:@"VST3Compatible"]); | |
}]; | |
NSMutableArray<NSURL*>* vst3URLs = [[NSMutableArray<NSURL*> alloc] init]; | |
for (AVAudioUnitComponent* comp in comps) | |
{ | |
NSString* auv3path = /*comp.componentURL.path*/@"/Users/fr810/Library/Developer/Xcode/DerivedData/AUv3Filter-aezphthdytkxezfpsdbywghwyrgj/Build/Products/Release/AUv3Filter.app/Contents/PlugIns/AUv3FilterExtension.appe"; | |
NSString* name = auv3path.lastPathComponent.stringByDeletingPathExtension; | |
NSString* vst3Path = [NSString stringWithFormat:@"%@/Frameworks/%@.vst3", | |
auv3path.stringByDeletingLastPathComponent.stringByDeletingLastPathComponent, | |
name]; | |
[vst3URLs addObject:[NSURL URLWithString:vst3Path]]; | |
} | |
return vst3URLs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment