Repository: libpd/pd-for-ios Branch: master Commit: be1593bf83b6 Files: 150 Total size: 574.4 KB Directory structure: gitextract_v8cb9u9o/ ├── .gitignore ├── .gitmodules ├── DispatcherSample/ │ ├── DispatcherSample/ │ │ ├── DispatcherSample-Info.plist │ │ ├── DispatcherSample-Prefix.pch │ │ ├── DispatcherSampleAppDelegate.h │ │ ├── DispatcherSampleAppDelegate.m │ │ ├── DispatcherSampleViewController.h │ │ ├── DispatcherSampleViewController.m │ │ ├── SampleListener.h │ │ ├── SampleListener.m │ │ ├── en.lproj/ │ │ │ ├── DispatcherSampleViewController.xib │ │ │ ├── InfoPlist.strings │ │ │ └── MainWindow.xib │ │ └── main.m │ ├── DispatcherSample.xcodeproj/ │ │ └── project.pbxproj │ ├── DispatcherSampleTests/ │ │ ├── DispatcherSampleTests-Info.plist │ │ ├── DispatcherSampleTests-Prefix.pch │ │ ├── DispatcherSampleTests.h │ │ ├── DispatcherSampleTests.m │ │ └── en.lproj/ │ │ └── InfoPlist.strings │ └── patch/ │ └── sample.pd ├── LICENSE.txt ├── PdLinkSample/ │ ├── PdLinkSample/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets/ │ │ │ └── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── main.m │ │ └── ping.pd │ └── PdLinkSample.xcodeproj/ │ └── project.pbxproj ├── PdSettings/ │ ├── PdSettings/ │ │ ├── PdSettings-Info.plist │ │ ├── PdSettings-Prefix.pch │ │ ├── PdSettingsAppDelegate.h │ │ ├── PdSettingsAppDelegate.m │ │ ├── PdSettingsViewController.h │ │ ├── PdSettingsViewController.m │ │ ├── RDebug.h │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ ├── PdSettings.xcodeproj/ │ │ └── project.pbxproj │ ├── ReadMe.txt │ └── Resources/ │ ├── testinput.pd │ └── testoutput.pd ├── PdTest01/ │ ├── Classes/ │ │ ├── PdTest01AppDelegate.h │ │ ├── PdTest01AppDelegate.m │ │ ├── PdTest01ViewController.h │ │ └── PdTest01ViewController.m │ ├── PdTest01-Info.plist │ ├── PdTest01.xcodeproj/ │ │ └── project.pbxproj │ ├── PdTest01_Prefix.pch │ ├── ReadMe.txt │ ├── Resources/ │ │ └── test.pd │ └── main.m ├── PdTest02/ │ ├── Classes/ │ │ ├── PdTestAppDelegate.h │ │ ├── PdTestAppDelegate.m │ │ ├── PdTestViewController.h │ │ └── PdTestViewController.m │ ├── LoopWithExtern.pd │ ├── MainWindow.xib │ ├── PdTest02-Info.plist │ ├── PdTest02.xcodeproj/ │ │ └── project.pbxproj │ ├── PdTest02_Prefix.pch │ ├── PdTestViewController.xib │ ├── ReadMe.txt │ ├── Storyboard.storyboard │ └── main.m ├── PolyPatch/ │ ├── Classes/ │ │ ├── PatchTableViewCell.h │ │ ├── PatchTableViewCell.m │ │ ├── PolyPatchAppDelegate.h │ │ ├── PolyPatchAppDelegate.m │ │ ├── PolyPatchViewController.h │ │ └── PolyPatchViewController.m │ ├── PolyPatch-Info.plist │ ├── PolyPatch.xcodeproj/ │ │ └── project.pbxproj │ ├── PolyPatch_Prefix.pch │ ├── RCommon.h │ ├── ReadMe.txt │ ├── Resources/ │ │ ├── synctest.pd │ │ ├── test.pd │ │ └── test2.pd │ └── main.m ├── README.md ├── SlidePad/ │ ├── Classes/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Controllers/ │ │ │ ├── PolyPatchController.h │ │ │ ├── PolyPatchController.m │ │ │ ├── SlidePadViewController.h │ │ │ └── SlidePadViewController.m │ │ └── Views/ │ │ ├── Fingerboard.h │ │ ├── Fingerboard.m │ │ ├── QControl.h │ │ ├── QControl.m │ │ ├── QRadioDial.h │ │ ├── QRadioDial.m │ │ ├── QSlider.h │ │ ├── QSlider.m │ │ ├── TouchDiamond.h │ │ └── TouchDiamond.m │ ├── OtherSources/ │ │ ├── Common.h │ │ ├── Prefix.pch │ │ └── main.m │ ├── ReadMe.txt │ ├── Resources/ │ │ └── Info.plist │ ├── SlidePad.xcodeproj/ │ │ └── project.pbxproj │ └── pd/ │ ├── classicsub-voice.pd │ ├── load-meter.pd │ ├── main.pd │ └── wavetabler-voice.pd ├── SlidePadBasic/ │ ├── Classes/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Controllers/ │ │ │ ├── SlidePadBasicViewController.h │ │ │ └── SlidePadBasicViewController.m │ │ └── Views/ │ │ ├── Fingerboard.h │ │ ├── Fingerboard.m │ │ ├── TouchDiamond.h │ │ └── TouchDiamond.m │ ├── OtherSources/ │ │ ├── Common.h │ │ ├── Prefix.pch │ │ └── main.m │ ├── ReadMe.txt │ ├── Resources/ │ │ └── Info.plist │ ├── SlidePadBasic.xcodeproj/ │ │ └── project.pbxproj │ └── pd/ │ ├── load-meter.pd │ └── wavetabler.pd ├── WaveTables/ │ ├── Classes/ │ │ ├── PdArray.h │ │ ├── PdArray.m │ │ ├── RootViewController.h │ │ ├── RootViewController.m │ │ ├── WaveTableView.h │ │ ├── WaveTableView.m │ │ ├── WaveTablesAppDelegate.h │ │ └── WaveTablesAppDelegate.m │ ├── OtherSources/ │ │ ├── Common.h │ │ ├── Prefix.pch │ │ └── main.m │ ├── ReadMe.txt │ ├── Resources/ │ │ ├── Info.plist │ │ ├── resynthesis.pd │ │ ├── util/ │ │ │ ├── for.pd │ │ │ └── print-array.pd │ │ └── wavetable.pd │ └── WaveTables.xcodeproj/ │ └── project.pbxproj └── abl_link/ ├── README.md └── ios/ ├── PdLinkAudioUnit.h ├── PdLinkAudioUnit.m ├── abl_link.c └── abl_link.h ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ #### `.gitignore` # Xcode noise */build/* *.mode1v3 *.pbxuser *.perspective *.perspectivev3 *.mode1v3 *.mode2v3 project.xcworkspace xcuserdata # osx noise .DS_Store profile *.o *.pd_darwin *.dylib ================================================ FILE: .gitmodules ================================================ [submodule "libpd"] path = libpd url = git://github.com/libpd/libpd.git ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSample-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.1 LSRequiresIPhoneOS NSMainNibFile MainWindow UISupportedInterfaceOrientations UIInterfaceOrientationPortrait ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSample-Prefix.pch ================================================ // // Prefix header for all source files of the 'DispatcherSample' target in the 'DispatcherSample' project // #import #ifndef __IPHONE_3_0 #warning "This project uses features only available in iPhone SDK 3.0 and later." #endif #ifdef __OBJC__ #import #import #endif ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSampleAppDelegate.h ================================================ // // DispatcherSampleAppDelegate.h // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import #import "PdAudioController.h" #import "PdDispatcher.h" @class DispatcherSampleViewController; @interface DispatcherSampleAppDelegate : NSObject { UIWindow *window; DispatcherSampleViewController *viewController; PdAudioController *audioController; PdDispatcher *dispatcher; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet DispatcherSampleViewController *viewController; @end ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSampleAppDelegate.m ================================================ // // DispatcherSampleAppDelegate.m // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import "DispatcherSampleAppDelegate.h" #import "DispatcherSampleViewController.h" #import "PdBase.h" #import "PdDispatcher.h" @implementation DispatcherSampleAppDelegate @synthesize window; @synthesize viewController; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { window.rootViewController = self.viewController; [window makeKeyAndVisible]; dispatcher = [[PdDispatcher alloc] init]; [PdBase setDelegate:dispatcher]; audioController = [[PdAudioController alloc] init]; [audioController configureAmbientWithSampleRate:48000 numberChannels:2 mixingEnabled:YES]; [audioController print]; [viewController pdSetup]; audioController.active = YES; return YES; } - (void)dealloc { [PdBase setDelegate:nil]; } - (void)applicationWillEnterForeground:(UIApplication *)application { } - (void)applicationDidBecomeActive:(UIApplication *)application { } - (void)applicationWillResignActive:(UIApplication *)application { } - (void)applicationDidEnterBackground:(UIApplication *)application { } - (void)applicationWillTerminate:(UIApplication *)application { } @end ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSampleViewController.h ================================================ // // DispatcherSampleViewController.h // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import #import "PdDispatcher.h" @interface DispatcherSampleViewController : UIViewController { UILabel *fooLabel; UILabel *barLabel; } @property(nonatomic, retain) IBOutlet UILabel *fooLabel; @property(nonatomic, retain) IBOutlet UILabel *barLabel; -(void)pdSetup; @end ================================================ FILE: DispatcherSample/DispatcherSample/DispatcherSampleViewController.m ================================================ // // DispatcherSampleViewController.m // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import "DispatcherSampleAppDelegate.h" #import "DispatcherSampleViewController.h" #import "SampleListener.h" #define APP_DELEGATE ((DispatcherSampleAppDelegate *)[UIApplication sharedApplication].delegate) @implementation DispatcherSampleViewController @synthesize fooLabel; @synthesize barLabel; -(void)pdSetup { PdDispatcher *dispatcher = (PdDispatcher *)[PdBase delegate]; SampleListener *listener = [[SampleListener alloc] initWithLabel:fooLabel]; [dispatcher addListener:listener forSource:@"foo"]; listener = [[SampleListener alloc] initWithLabel:barLabel]; [dispatcher addListener:listener forSource:@"bar"]; listener = [[SampleListener alloc] initWithLabel:nil]; [dispatcher addListener:listener forSource:@"baz"]; [PdBase openFile:@"sample.pd" path:[[NSBundle mainBundle] resourcePath]]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } #pragma mark - View lifecycle // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } @end ================================================ FILE: DispatcherSample/DispatcherSample/SampleListener.h ================================================ // // SampleListener.h // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import #import "PdBase.h" #import "PdDispatcher.h" @interface SampleListener : NSObject { UILabel *label; } - (id)initWithLabel:(UILabel *)label; @end ================================================ FILE: DispatcherSample/DispatcherSample/SampleListener.m ================================================ // // SampleListener.m // DispatcherSample // // Copyright (c) 2011 Peter Brinkmann (peter.brinkmann@gmail.com) // // For information on usage and redistribution, and for a DISCLAIMER OF ALL // WARRANTIES, see the file, "LICENSE.txt," in this distribution. // #import "SampleListener.h" @implementation SampleListener - (id)initWithLabel:(UILabel *)s { self = [super init]; if (self) { label = s; } return self; } - (void)receiveBangFromSource:(NSString *)source { NSLog(@"Listener %@: bang\n", label); } - (void)receiveFloat:(float)val fromSource:(NSString *)source { NSLog(@"Listener %@: float %f\n", label, val); NSString *s = [NSString stringWithFormat:@"%f", val]; [label setText:s]; } - (void)receiveSymbol:(NSString *)s fromSource:(NSString *)source { NSLog(@"Listener %@: symbol %@\n", label, s); } - (void)receiveList:(NSArray *)v fromSource:(NSString *)source { NSLog(@"Listener %@: list %@\n", label, v); } - (void)receiveMessage:(NSString *)message withArguments:(NSArray *)arguments fromSource:(NSString *)source { NSLog(@"Listener %@: message %@, %@\n", label, message, arguments); } @end ================================================ FILE: DispatcherSample/DispatcherSample/en.lproj/DispatcherSampleViewController.xib ================================================ 1056 10K549 1306 1038.36 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin 301 YES IBProxyObject IBUIView IBUILabel YES com.apple.InterfaceBuilder.IBCocoaTouchPlugin YES YES YES IBFilesOwner IBCocoaTouchFramework IBFirstResponder IBCocoaTouchFramework 274 YES 292 {{61, 69}, {168, 32}} NO YES 7 NO IBCocoaTouchFramework fooLabel Helvetica 17 16 1 MCAwIDAAA 1 10 292 {{61, 201}, {168, 32}} NO YES 7 NO IBCocoaTouchFramework barLabel 1 10 {{0, 20}, {320, 460}} 3 MC43NQA 2 NO IBCocoaTouchFramework YES view 7 barLabel 10 fooLabel 11 YES 0 -1 File's Owner -2 6 YES 8 9 YES YES -1.CustomClassName -2.CustomClassName 6.IBEditorWindowLastContentRect 6.IBPluginDependency 8.IBPluginDependency 9.IBPluginDependency YES DispatcherSampleViewController UIResponder {{239, 654}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin YES YES 11 YES DispatcherSampleViewController UIViewController YES YES barLabel fooLabel YES UILabel UILabel YES YES barLabel fooLabel YES barLabel UILabel fooLabel UILabel IBProjectSource ./Classes/DispatcherSampleViewController.h 0 IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 YES 3 301 ================================================ FILE: DispatcherSample/DispatcherSample/en.lproj/InfoPlist.strings ================================================ /* Localized versions of Info.plist keys */ ================================================ FILE: DispatcherSample/DispatcherSample/en.lproj/MainWindow.xib ================================================ 1024 10D571 786 1038.29 460.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin 112 YES YES com.apple.InterfaceBuilder.IBCocoaTouchPlugin YES YES YES YES IBFilesOwner IBCocoaTouchFramework IBFirstResponder IBCocoaTouchFramework IBCocoaTouchFramework DispatcherSampleViewController 1 IBCocoaTouchFramework NO 292 {320, 480} 1 MSAxIDEAA NO NO IBCocoaTouchFramework YES YES delegate 4 viewController 11 window 14 YES 0 -1 File's Owner 3 DispatcherSample App Delegate -2 10 12 YES YES -1.CustomClassName -2.CustomClassName 10.CustomClassName 10.IBEditorWindowLastContentRect 10.IBPluginDependency 12.IBEditorWindowLastContentRect 12.IBPluginDependency 3.CustomClassName 3.IBPluginDependency YES UIApplication UIResponder DispatcherSampleViewController {{234, 376}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin {{525, 346}, {320, 480}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin DispatcherSampleAppDelegate com.apple.InterfaceBuilder.IBCocoaTouchPlugin YES YES YES YES 15 YES UIWindow UIView IBUserSource DispatcherSampleAppDelegate NSObject YES YES viewController window YES DispatcherSampleViewController UIWindow YES YES viewController window YES viewController DispatcherSampleViewController window UIWindow IBProjectSource DispatcherSampleAppDelegate.h DispatcherSampleAppDelegate NSObject IBUserSource DispatcherSampleViewController UIViewController IBProjectSource DispatcherSampleViewController.h YES NSObject IBFrameworkSource Foundation.framework/Headers/NSError.h NSObject IBFrameworkSource Foundation.framework/Headers/NSFileManager.h NSObject IBFrameworkSource Foundation.framework/Headers/NSKeyValueCoding.h NSObject IBFrameworkSource Foundation.framework/Headers/NSKeyValueObserving.h NSObject IBFrameworkSource Foundation.framework/Headers/NSKeyedArchiver.h NSObject IBFrameworkSource Foundation.framework/Headers/NSObject.h NSObject IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h NSObject IBFrameworkSource Foundation.framework/Headers/NSThread.h NSObject IBFrameworkSource Foundation.framework/Headers/NSURL.h NSObject IBFrameworkSource Foundation.framework/Headers/NSURLConnection.h NSObject IBFrameworkSource UIKit.framework/Headers/UIAccessibility.h NSObject IBFrameworkSource UIKit.framework/Headers/UINibLoading.h NSObject IBFrameworkSource UIKit.framework/Headers/UIResponder.h UIApplication UIResponder IBFrameworkSource UIKit.framework/Headers/UIApplication.h UIResponder NSObject UISearchBar UIView IBFrameworkSource UIKit.framework/Headers/UISearchBar.h UISearchDisplayController NSObject IBFrameworkSource UIKit.framework/Headers/UISearchDisplayController.h UIView IBFrameworkSource UIKit.framework/Headers/UITextField.h UIView UIResponder IBFrameworkSource UIKit.framework/Headers/UIView.h UIViewController IBFrameworkSource UIKit.framework/Headers/UINavigationController.h UIViewController IBFrameworkSource UIKit.framework/Headers/UIPopoverController.h UIViewController IBFrameworkSource UIKit.framework/Headers/UISplitViewController.h UIViewController IBFrameworkSource UIKit.framework/Headers/UITabBarController.h UIViewController UIResponder IBFrameworkSource UIKit.framework/Headers/UIViewController.h UIWindow UIView IBFrameworkSource UIKit.framework/Headers/UIWindow.h 0 IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 YES DispatcherSample.xcodeproj 3 112 ================================================ FILE: DispatcherSample/DispatcherSample/main.m ================================================ // // main.m // DispatcherSample // // Created by Peter Brinkmann on 8/28/11. // Updated by Dan Wilcox 2018. // #import #import "DispatcherSampleAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(DispatcherSampleAppDelegate.class)); } } ================================================ FILE: DispatcherSample/DispatcherSample.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 5811EFC21482EB29006867D5 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5811EFBF1482EA65006867D5 /* libpd-ios.a */; }; 5811EFC41482EB2F006867D5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5811EFC31482EB2F006867D5 /* AudioToolbox.framework */; }; 5811EFC61482EB33006867D5 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5811EFC51482EB33006867D5 /* AVFoundation.framework */; }; 581A4B7714114A4E00C6AC68 /* sample.pd in Resources */ = {isa = PBXBuildFile; fileRef = 581A4B7514114A4E00C6AC68 /* sample.pd */; }; 58ABCE3F140ACCEE003C36F3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE3E140ACCEE003C36F3 /* UIKit.framework */; }; 58ABCE41140ACCEE003C36F3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE40140ACCEE003C36F3 /* Foundation.framework */; }; 58ABCE43140ACCEE003C36F3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE42140ACCEE003C36F3 /* CoreGraphics.framework */; }; 58ABCE49140ACCEE003C36F3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58ABCE47140ACCEE003C36F3 /* InfoPlist.strings */; }; 58ABCE4C140ACCEF003C36F3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 58ABCE4B140ACCEF003C36F3 /* main.m */; }; 58ABCE4F140ACCEF003C36F3 /* DispatcherSampleAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 58ABCE4E140ACCEF003C36F3 /* DispatcherSampleAppDelegate.m */; }; 58ABCE52140ACCEF003C36F3 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58ABCE50140ACCEF003C36F3 /* MainWindow.xib */; }; 58ABCE55140ACCEF003C36F3 /* DispatcherSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 58ABCE54140ACCEF003C36F3 /* DispatcherSampleViewController.m */; }; 58ABCE58140ACCEF003C36F3 /* DispatcherSampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 58ABCE56140ACCEF003C36F3 /* DispatcherSampleViewController.xib */; }; 58ABCE5F140ACCEF003C36F3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE3E140ACCEE003C36F3 /* UIKit.framework */; }; 58ABCE60140ACCEF003C36F3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE40140ACCEE003C36F3 /* Foundation.framework */; }; 58ABCE61140ACCEF003C36F3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 58ABCE42140ACCEE003C36F3 /* CoreGraphics.framework */; }; 58ABCE69140ACCEF003C36F3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58ABCE67140ACCEF003C36F3 /* InfoPlist.strings */; }; 58ABCE6C140ACCEF003C36F3 /* DispatcherSampleTests.h in Resources */ = {isa = PBXBuildFile; fileRef = 58ABCE6B140ACCEF003C36F3 /* DispatcherSampleTests.h */; }; 58ABCE6E140ACCEF003C36F3 /* DispatcherSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 58ABCE6D140ACCEF003C36F3 /* DispatcherSampleTests.m */; }; 58ABCE8E140AD038003C36F3 /* SampleListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 58ABCE8D140AD038003C36F3 /* SampleListener.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 11A30E611611509500786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 3063EF1D2107F18C00C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF1F2107F18C00C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; 5811EFBE1482EA65006867D5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 5811EFC01482EB24006867D5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = "libpd-ios"; }; 58ABCE62140ACCEF003C36F3 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 58ABCE31140ACCEE003C36F3 /* Project object */; proxyType = 1; remoteGlobalIDString = 58ABCE39140ACCEE003C36F3; remoteInfo = DispatcherSample; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 5811EFB71482EA65006867D5 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 5811EFC31482EB2F006867D5 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 5811EFC51482EB33006867D5 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 581A4B7514114A4E00C6AC68 /* sample.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sample.pd; sourceTree = ""; }; 58ABCE3A140ACCEE003C36F3 /* DispatcherSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DispatcherSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 58ABCE3E140ACCEE003C36F3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 58ABCE40140ACCEE003C36F3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 58ABCE42140ACCEE003C36F3 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 58ABCE46140ACCEE003C36F3 /* DispatcherSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DispatcherSample-Info.plist"; sourceTree = ""; }; 58ABCE48140ACCEE003C36F3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 58ABCE4A140ACCEE003C36F3 /* DispatcherSample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DispatcherSample-Prefix.pch"; sourceTree = ""; }; 58ABCE4B140ACCEF003C36F3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 58ABCE4D140ACCEF003C36F3 /* DispatcherSampleAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DispatcherSampleAppDelegate.h; sourceTree = ""; }; 58ABCE4E140ACCEF003C36F3 /* DispatcherSampleAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DispatcherSampleAppDelegate.m; sourceTree = ""; }; 58ABCE51140ACCEF003C36F3 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; 58ABCE53140ACCEF003C36F3 /* DispatcherSampleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DispatcherSampleViewController.h; sourceTree = ""; }; 58ABCE54140ACCEF003C36F3 /* DispatcherSampleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DispatcherSampleViewController.m; sourceTree = ""; }; 58ABCE57140ACCEF003C36F3 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DispatcherSampleViewController.xib; sourceTree = ""; }; 58ABCE5E140ACCEF003C36F3 /* DispatcherSampleTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DispatcherSampleTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 58ABCE66140ACCEF003C36F3 /* DispatcherSampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DispatcherSampleTests-Info.plist"; sourceTree = ""; }; 58ABCE68140ACCEF003C36F3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 58ABCE6A140ACCEF003C36F3 /* DispatcherSampleTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DispatcherSampleTests-Prefix.pch"; sourceTree = ""; }; 58ABCE6B140ACCEF003C36F3 /* DispatcherSampleTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DispatcherSampleTests.h; sourceTree = ""; }; 58ABCE6D140ACCEF003C36F3 /* DispatcherSampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DispatcherSampleTests.m; sourceTree = ""; }; 58ABCE8C140AD038003C36F3 /* SampleListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleListener.h; sourceTree = ""; }; 58ABCE8D140AD038003C36F3 /* SampleListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SampleListener.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 58ABCE37140ACCEE003C36F3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 5811EFC61482EB33006867D5 /* AVFoundation.framework in Frameworks */, 5811EFC41482EB2F006867D5 /* AudioToolbox.framework in Frameworks */, 5811EFC21482EB29006867D5 /* libpd-ios.a in Frameworks */, 58ABCE3F140ACCEE003C36F3 /* UIKit.framework in Frameworks */, 58ABCE41140ACCEE003C36F3 /* Foundation.framework in Frameworks */, 58ABCE43140ACCEE003C36F3 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 58ABCE5A140ACCEF003C36F3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 58ABCE5F140ACCEF003C36F3 /* UIKit.framework in Frameworks */, 58ABCE60140ACCEF003C36F3 /* Foundation.framework in Frameworks */, 58ABCE61140ACCEF003C36F3 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 5811EFB81482EA65006867D5 /* Products */ = { isa = PBXGroup; children = ( 5811EFBF1482EA65006867D5 /* libpd-ios.a */, 11A30E621611509500786A6D /* libpd-osx.a */, 3063EF1E2107F18C00C8A4A2 /* libpd-ios-multi.a */, 3063EF202107F18C00C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 581A4B7314114A4E00C6AC68 /* patch */ = { isa = PBXGroup; children = ( 581A4B7514114A4E00C6AC68 /* sample.pd */, ); path = patch; sourceTree = ""; }; 58ABCE2F140ACCEE003C36F3 = { isa = PBXGroup; children = ( 5811EFB71482EA65006867D5 /* libpd.xcodeproj */, 581A4B7314114A4E00C6AC68 /* patch */, 58ABCE44140ACCEE003C36F3 /* DispatcherSample */, 58ABCE64140ACCEF003C36F3 /* DispatcherSampleTests */, 58ABCE3D140ACCEE003C36F3 /* Frameworks */, 58ABCE3B140ACCEE003C36F3 /* Products */, ); sourceTree = ""; }; 58ABCE3B140ACCEE003C36F3 /* Products */ = { isa = PBXGroup; children = ( 58ABCE3A140ACCEE003C36F3 /* DispatcherSample.app */, 58ABCE5E140ACCEF003C36F3 /* DispatcherSampleTests.octest */, ); name = Products; sourceTree = ""; }; 58ABCE3D140ACCEE003C36F3 /* Frameworks */ = { isa = PBXGroup; children = ( 5811EFC51482EB33006867D5 /* AVFoundation.framework */, 5811EFC31482EB2F006867D5 /* AudioToolbox.framework */, 58ABCE3E140ACCEE003C36F3 /* UIKit.framework */, 58ABCE40140ACCEE003C36F3 /* Foundation.framework */, 58ABCE42140ACCEE003C36F3 /* CoreGraphics.framework */, ); name = Frameworks; sourceTree = ""; }; 58ABCE44140ACCEE003C36F3 /* DispatcherSample */ = { isa = PBXGroup; children = ( 58ABCE4D140ACCEF003C36F3 /* DispatcherSampleAppDelegate.h */, 58ABCE4E140ACCEF003C36F3 /* DispatcherSampleAppDelegate.m */, 58ABCE50140ACCEF003C36F3 /* MainWindow.xib */, 58ABCE53140ACCEF003C36F3 /* DispatcherSampleViewController.h */, 58ABCE54140ACCEF003C36F3 /* DispatcherSampleViewController.m */, 58ABCE56140ACCEF003C36F3 /* DispatcherSampleViewController.xib */, 58ABCE45140ACCEE003C36F3 /* Supporting Files */, 58ABCE8C140AD038003C36F3 /* SampleListener.h */, 58ABCE8D140AD038003C36F3 /* SampleListener.m */, ); path = DispatcherSample; sourceTree = ""; }; 58ABCE45140ACCEE003C36F3 /* Supporting Files */ = { isa = PBXGroup; children = ( 58ABCE46140ACCEE003C36F3 /* DispatcherSample-Info.plist */, 58ABCE47140ACCEE003C36F3 /* InfoPlist.strings */, 58ABCE4A140ACCEE003C36F3 /* DispatcherSample-Prefix.pch */, 58ABCE4B140ACCEF003C36F3 /* main.m */, ); name = "Supporting Files"; sourceTree = ""; }; 58ABCE64140ACCEF003C36F3 /* DispatcherSampleTests */ = { isa = PBXGroup; children = ( 58ABCE6B140ACCEF003C36F3 /* DispatcherSampleTests.h */, 58ABCE6D140ACCEF003C36F3 /* DispatcherSampleTests.m */, 58ABCE65140ACCEF003C36F3 /* Supporting Files */, ); path = DispatcherSampleTests; sourceTree = ""; }; 58ABCE65140ACCEF003C36F3 /* Supporting Files */ = { isa = PBXGroup; children = ( 58ABCE66140ACCEF003C36F3 /* DispatcherSampleTests-Info.plist */, 58ABCE67140ACCEF003C36F3 /* InfoPlist.strings */, 58ABCE6A140ACCEF003C36F3 /* DispatcherSampleTests-Prefix.pch */, ); name = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 58ABCE39140ACCEE003C36F3 /* DispatcherSample */ = { isa = PBXNativeTarget; buildConfigurationList = 58ABCE71140ACCEF003C36F3 /* Build configuration list for PBXNativeTarget "DispatcherSample" */; buildPhases = ( 58ABCE36140ACCEE003C36F3 /* Sources */, 58ABCE37140ACCEE003C36F3 /* Frameworks */, 58ABCE38140ACCEE003C36F3 /* Resources */, ); buildRules = ( ); dependencies = ( 5811EFC11482EB24006867D5 /* PBXTargetDependency */, ); name = DispatcherSample; productName = DispatcherSample; productReference = 58ABCE3A140ACCEE003C36F3 /* DispatcherSample.app */; productType = "com.apple.product-type.application"; }; 58ABCE5D140ACCEF003C36F3 /* DispatcherSampleTests */ = { isa = PBXNativeTarget; buildConfigurationList = 58ABCE74140ACCEF003C36F3 /* Build configuration list for PBXNativeTarget "DispatcherSampleTests" */; buildPhases = ( 58ABCE59140ACCEF003C36F3 /* Sources */, 58ABCE5A140ACCEF003C36F3 /* Frameworks */, 58ABCE5B140ACCEF003C36F3 /* Resources */, 58ABCE5C140ACCEF003C36F3 /* ShellScript */, ); buildRules = ( ); dependencies = ( 58ABCE63140ACCEF003C36F3 /* PBXTargetDependency */, ); name = DispatcherSampleTests; productName = DispatcherSampleTests; productReference = 58ABCE5E140ACCEF003C36F3 /* DispatcherSampleTests.octest */; productType = "com.apple.product-type.bundle"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 58ABCE31140ACCEE003C36F3 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; }; buildConfigurationList = 58ABCE34140ACCEE003C36F3 /* Build configuration list for PBXProject "DispatcherSample" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 58ABCE2F140ACCEE003C36F3; productRefGroup = 58ABCE3B140ACCEE003C36F3 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 5811EFB81482EA65006867D5 /* Products */; ProjectRef = 5811EFB71482EA65006867D5 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 58ABCE39140ACCEE003C36F3 /* DispatcherSample */, 58ABCE5D140ACCEF003C36F3 /* DispatcherSampleTests */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 11A30E621611509500786A6D /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 11A30E611611509500786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF1E2107F18C00C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF1D2107F18C00C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF202107F18C00C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF1F2107F18C00C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5811EFBF1482EA65006867D5 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 5811EFBE1482EA65006867D5 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 58ABCE38140ACCEE003C36F3 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 58ABCE49140ACCEE003C36F3 /* InfoPlist.strings in Resources */, 58ABCE52140ACCEF003C36F3 /* MainWindow.xib in Resources */, 58ABCE58140ACCEF003C36F3 /* DispatcherSampleViewController.xib in Resources */, 581A4B7714114A4E00C6AC68 /* sample.pd in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 58ABCE5B140ACCEF003C36F3 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 58ABCE69140ACCEF003C36F3 /* InfoPlist.strings in Resources */, 58ABCE6C140ACCEF003C36F3 /* DispatcherSampleTests.h in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 58ABCE5C140ACCEF003C36F3 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 58ABCE36140ACCEE003C36F3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 58ABCE4C140ACCEF003C36F3 /* main.m in Sources */, 58ABCE4F140ACCEF003C36F3 /* DispatcherSampleAppDelegate.m in Sources */, 58ABCE55140ACCEF003C36F3 /* DispatcherSampleViewController.m in Sources */, 58ABCE8E140AD038003C36F3 /* SampleListener.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 58ABCE59140ACCEF003C36F3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 58ABCE6E140ACCEF003C36F3 /* DispatcherSampleTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 5811EFC11482EB24006867D5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libpd-ios"; targetProxy = 5811EFC01482EB24006867D5 /* PBXContainerItemProxy */; }; 58ABCE63140ACCEF003C36F3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 58ABCE39140ACCEE003C36F3 /* DispatcherSample */; targetProxy = 58ABCE62140ACCEF003C36F3 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 58ABCE47140ACCEE003C36F3 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 58ABCE48140ACCEE003C36F3 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; 58ABCE50140ACCEF003C36F3 /* MainWindow.xib */ = { isa = PBXVariantGroup; children = ( 58ABCE51140ACCEF003C36F3 /* en */, ); name = MainWindow.xib; sourceTree = ""; }; 58ABCE56140ACCEF003C36F3 /* DispatcherSampleViewController.xib */ = { isa = PBXVariantGroup; children = ( 58ABCE57140ACCEF003C36F3 /* en */, ); name = DispatcherSampleViewController.xib; sourceTree = ""; }; 58ABCE67140ACCEF003C36F3 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 58ABCE68140ACCEF003C36F3 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 58ABCE6F140ACCEF003C36F3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 58ABCE70140ACCEF003C36F3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; name = Release; }; 58ABCE72140ACCEF003C36F3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DispatcherSample/DispatcherSample-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ""; "HEADER_SEARCH_PATHS[arch=*]" = ""; INFOPLIST_FILE = "DispatcherSample/DispatcherSample-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.DispatcherSample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../libpd/**"; WRAPPER_EXTENSION = app; }; name = Debug; }; 58ABCE73140ACCEF003C36F3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DispatcherSample/DispatcherSample-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; HEADER_SEARCH_PATHS = ""; "HEADER_SEARCH_PATHS[arch=*]" = ""; INFOPLIST_FILE = "DispatcherSample/DispatcherSample-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)\"", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.DispatcherSample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../libpd/**"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; }; name = Release; }; 58ABCE75140ACCEF003C36F3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DispatcherSample.app/DispatcherSample"; CLANG_ENABLE_OBJC_WEAK = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(DEVELOPER_LIBRARY_DIR)/Frameworks", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DispatcherSampleTests/DispatcherSampleTests-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "DispatcherSampleTests/DispatcherSampleTests-Info.plist"; OTHER_LDFLAGS = ( "-framework", SenTestingKit, ); PRODUCT_BUNDLE_IDENTIFIER = "com.noisepages.nettoyeur.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = octest; }; name = Debug; }; 58ABCE76140ACCEF003C36F3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DispatcherSample.app/DispatcherSample"; CLANG_ENABLE_OBJC_WEAK = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(DEVELOPER_LIBRARY_DIR)/Frameworks", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "DispatcherSampleTests/DispatcherSampleTests-Prefix.pch"; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "DispatcherSampleTests/DispatcherSampleTests-Info.plist"; OTHER_LDFLAGS = ( "-framework", SenTestingKit, ); PRODUCT_BUNDLE_IDENTIFIER = "com.noisepages.nettoyeur.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = octest; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 58ABCE34140ACCEE003C36F3 /* Build configuration list for PBXProject "DispatcherSample" */ = { isa = XCConfigurationList; buildConfigurations = ( 58ABCE6F140ACCEF003C36F3 /* Debug */, 58ABCE70140ACCEF003C36F3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 58ABCE71140ACCEF003C36F3 /* Build configuration list for PBXNativeTarget "DispatcherSample" */ = { isa = XCConfigurationList; buildConfigurations = ( 58ABCE72140ACCEF003C36F3 /* Debug */, 58ABCE73140ACCEF003C36F3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 58ABCE74140ACCEF003C36F3 /* Build configuration list for PBXNativeTarget "DispatcherSampleTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 58ABCE75140ACCEF003C36F3 /* Debug */, 58ABCE76140ACCEF003C36F3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 58ABCE31140ACCEE003C36F3 /* Project object */; } ================================================ FILE: DispatcherSample/DispatcherSampleTests/DispatcherSampleTests-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: DispatcherSample/DispatcherSampleTests/DispatcherSampleTests-Prefix.pch ================================================ // // Prefix header for all source files of the 'DispatcherSampleTests' target in the 'DispatcherSampleTests' project // #ifdef __OBJC__ #import #endif ================================================ FILE: DispatcherSample/DispatcherSampleTests/DispatcherSampleTests.h ================================================ // // DispatcherSampleTests.h // DispatcherSampleTests // // Created by Peter Brinkmann on 8/28/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import @interface DispatcherSampleTests : SenTestCase { @private } @end ================================================ FILE: DispatcherSample/DispatcherSampleTests/DispatcherSampleTests.m ================================================ // // DispatcherSampleTests.m // DispatcherSampleTests // // Created by Peter Brinkmann on 8/28/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import "DispatcherSampleTests.h" @implementation DispatcherSampleTests - (void)setUp { [super setUp]; // Set-up code here. } - (void)tearDown { // Tear-down code here. [super tearDown]; } - (void)testExample { STFail(@"Unit tests are not implemented yet in DispatcherSampleTests"); } @end ================================================ FILE: DispatcherSample/DispatcherSampleTests/en.lproj/InfoPlist.strings ================================================ /* Localized versions of Info.plist keys */ ================================================ FILE: DispatcherSample/patch/sample.pd ================================================ #N canvas 979 1230 450 300 10; #X obj 52 13 loadbang; #X obj 235 55 osc~ 220; #X obj 233 93 dac~; #X obj 34 61 metro 1000; #X obj 117 85 timer; #X obj 52 36 t b b; #X obj 59 84 t b b; #X obj 59 108 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 42 132 route 0 1; #X obj 100 178 f; #X obj 142 178 f; #X floatatom 17 207 16 0 0 0 - - -; #X floatatom 141 207 16 0 0 0 - - -; #X obj 19 236 s bar; #X obj 140 235 s foo; #X obj 289 125 f 0; #X obj 326 126 + 1; #X msg 331 156 \$1 10 -0.123; #X obj 331 183 s baz; #X obj 243 160 print count; #X connect 0 0 5 0; #X connect 1 0 2 0; #X connect 1 0 2 1; #X connect 3 0 6 0; #X connect 4 0 10 1; #X connect 4 0 9 1; #X connect 5 0 3 0; #X connect 5 1 4 0; #X connect 6 0 7 0; #X connect 6 1 4 1; #X connect 6 1 15 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 10 0; #X connect 9 0 11 0; #X connect 10 0 12 0; #X connect 11 0 13 0; #X connect 12 0 14 0; #X connect 15 0 16 0; #X connect 15 0 17 0; #X connect 15 0 19 0; #X connect 16 0 15 1; #X connect 17 0 18 0; ================================================ FILE: LICENSE.txt ================================================ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Google Inc, and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: PdLinkSample/PdLinkSample/AppDelegate.h ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import #import "PdAudioController.h" #include "ABLLink.h" @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) PdAudioController *pd; - (ABLLinkRef)getLinkRef; @end ================================================ FILE: PdLinkSample/PdLinkSample/AppDelegate.m ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import "AppDelegate.h" #import "PdLinkAudioUnit.h" @interface AppDelegate () @end @implementation AppDelegate { PdLinkAudioUnit *pd_au_; PdAudioController *pd_; ABLLinkRef linkRef_; } @synthesize pd = pd_; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. linkRef_ = ABLLinkNew(120); pd_au_ = [[PdLinkAudioUnit alloc] initWithLinkRef:linkRef_]; pd_ = [[PdAudioController alloc] initWithAudioUnit:pd_au_]; PdAudioStatus status = [pd_ configureAmbientWithSampleRate:44100 numberChannels:2 mixingEnabled:YES]; if (status == PdAudioOK) { NSLog(@"Configured PdAudioController instance."); } else { NSLog(@"Failed to configure PdAudioController instance."); } return YES; } - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. pd_.active = NO; } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. pd_.active = YES; } - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. ABLLinkDelete(linkRef_); } - (ABLLinkRef)getLinkRef { return linkRef_; } @end ================================================ FILE: PdLinkSample/PdLinkSample/Assets.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: PdLinkSample/PdLinkSample/Base.lproj/LaunchScreen.storyboard ================================================ ================================================ FILE: PdLinkSample/PdLinkSample/Base.lproj/Main.storyboard ================================================ ================================================ FILE: PdLinkSample/PdLinkSample/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: PdLinkSample/PdLinkSample/ViewController.h ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import @interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UILabel *tempoLabel; @property (weak, nonatomic) IBOutlet UILabel *resolutionLabel; @property (weak, nonatomic) IBOutlet UILabel *quantumLabel; @property (weak, nonatomic) IBOutlet UISlider *tempoSlider; @property (weak, nonatomic) IBOutlet UISlider *resolutionSlider; @property (weak, nonatomic) IBOutlet UISlider *quantumSlider; @end ================================================ FILE: PdLinkSample/PdLinkSample/ViewController.m ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import "ViewController.h" #import "AppDelegate.h" #import "PdAudioUnit.h" #import "PdBase.h" #import "PdFile.h" #import "PdDispatcher.h" #include "ABLLinkSettingsViewController.h" #include "ABLLink.h" @interface ViewController () - (void)updateTempo:(int)tempo; @end @implementation ViewController { PdDispatcher *dispatcher_; PdFile *patch_; UIViewController *linkSettings_; } void sessionTempoCallback(double tempo, void *context) { ViewController *vc = (__bridge ViewController*) context; [vc updateTempo:tempo]; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. dispatcher_ = [[PdDispatcher alloc] init]; [PdBase setDelegate:dispatcher_]; patch_ = [PdFile openFileNamed:@"ping.pd" path:[[NSBundle mainBundle] resourcePath]]; AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; ABLLinkRef linkRef = [appDelegate getLinkRef]; linkSettings_ = [ABLLinkSettingsViewController instance:linkRef]; ABLLinkSetSessionTempoCallback(linkRef, sessionTempoCallback, (__bridge void *)(self)); ABLLinkTimelineRef timeline = ABLLinkCaptureAppTimeline(linkRef); [self updateTempo:ABLLinkGetTempo(timeline)]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (IBAction)tempoChanged:(id)sender { UISlider *slider = (UISlider*) sender; int tempo = slider.value; [self updateTempo:tempo]; [PdBase sendFloat:tempo toReceiver:@"tempo"]; } - (IBAction)resolutionChanged:(id)sender { UISlider *slider = (UISlider*) sender; int res = slider.value; self.resolutionLabel.text = [NSString stringWithFormat:@"Resolution: %d", res]; [PdBase sendFloat:(int)res toReceiver:@"resolution"]; } - (IBAction)quantumChanged:(id)sender { UISlider *slider = (UISlider*) sender; int quantum = slider.value; self.quantumLabel.text = [NSString stringWithFormat:@"Quantum: %d", quantum]; [PdBase sendFloat:quantum toReceiver:@"quantum"]; } -(IBAction)showLinkSettings:(id)sender { UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:linkSettings_]; // this will present a view controller as a popover in iPad and a modal VC on iPhone linkSettings_.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(hideLinkSettings:)]; navController.modalPresentationStyle = UIModalPresentationPopover; UIPopoverPresentationController *popC = navController.popoverPresentationController; popC.permittedArrowDirections = UIPopoverArrowDirectionAny; popC.sourceRect = [sender frame]; // we recommend using a size of 320x400 for the display in a popover linkSettings_.preferredContentSize = CGSizeMake(320.f, 400.f); UIButton *button = (UIButton *)sender; popC.sourceView = button.superview; [self presentViewController:navController animated:YES completion:nil]; } - (void)hideLinkSettings:(id)sender { #pragma unused(sender) [self dismissViewControllerAnimated:YES completion:nil]; } - (void)updateTempo:(int)tempo { self.tempoLabel.text = [NSString stringWithFormat:@"Tempo: %d", tempo]; } @end ================================================ FILE: PdLinkSample/PdLinkSample/main.m ================================================ // // main.m // PdLinkSample // // Created by Peter Brinkmann on 10/17/16. // Copyright © 2016 Peter Brinkmann. All rights reserved. // #import #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(AppDelegate.class)); } } ================================================ FILE: PdLinkSample/PdLinkSample/ping.pd ================================================ #N canvas 612 242 343 426 10; #X obj 94 307 osc~ 440; #X obj 73 331 *~; #X obj 73 375 dac~; #X obj 29 289 vline~; #X msg 29 268 1 \, 0 250; #X obj 250 197 f; #X obj 214 226 f; #X obj 214 248 print phase; #X obj 73 353 *~ 0.25; #X obj 250 219 print beat; #X msg 56 64 tempo \$1; #X msg 119 64 resolution \$1; #X msg 216 64 reset 0 \$1; #X floatatom 56 45 5 0 0 2 tempo tempo -, f 5; #X floatatom 119 46 5 0 0 2 resolution resolution -, f 5; #X floatatom 216 46 5 0 0 2 quantum quantum -, f 5; #X obj 135 284 f 440; #X obj 123 112 abl_link~ 1 0 4 140; #X obj 94 284 f 880; #X obj 119 150 t b f b b; #X obj 103 211 select 0; #X obj 103 234 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 148 233 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 112 258 print downbeat; #X obj 234 134 print tempo; #X connect 0 0 1 1; #X connect 1 0 8 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 4 0 3 0; #X connect 5 0 9 0; #X connect 6 0 7 0; #X connect 8 0 2 0; #X connect 8 0 2 1; #X connect 10 0 17 0; #X connect 11 0 17 0; #X connect 12 0 17 0; #X connect 13 0 10 0; #X connect 14 0 11 0; #X connect 15 0 12 0; #X connect 16 0 0 0; #X connect 17 0 19 0; #X connect 17 1 6 1; #X connect 17 2 5 1; #X connect 17 3 24 0; #X connect 18 0 0 0; #X connect 19 0 4 0; #X connect 19 1 20 0; #X connect 19 2 6 0; #X connect 19 3 5 0; #X connect 20 0 21 0; #X connect 20 1 22 0; #X connect 21 0 18 0; #X connect 21 0 23 0; #X connect 22 0 16 0; ================================================ FILE: PdLinkSample/PdLinkSample.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 583AB1511DB5A8CF001E5913 /* PdLinkAudioUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = 583AB1501DB5A8CF001E5913 /* PdLinkAudioUnit.m */; }; 583AB1531DB5A905001E5913 /* libABLLink.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 583AB1521DB5A905001E5913 /* libABLLink.a */; }; 583AB1551DB5AA66001E5913 /* ping.pd in Resources */ = {isa = PBXBuildFile; fileRef = 583AB1541DB5AA66001E5913 /* ping.pd */; }; 586152721DB5A55800A5C131 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 586152711DB5A55800A5C131 /* main.m */; }; 586152751DB5A55800A5C131 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 586152741DB5A55800A5C131 /* AppDelegate.m */; }; 586152781DB5A55800A5C131 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 586152771DB5A55800A5C131 /* ViewController.m */; }; 5861527B1DB5A55800A5C131 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 586152791DB5A55800A5C131 /* Main.storyboard */; }; 5861527D1DB5A55800A5C131 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5861527C1DB5A55800A5C131 /* Assets.xcassets */; }; 586152801DB5A55800A5C131 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5861527E1DB5A55800A5C131 /* LaunchScreen.storyboard */; }; 586152921DB5A62800A5C131 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5861528D1DB5A5B500A5C131 /* libpd-ios.a */; }; 586152951DB5A64C00A5C131 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 586152941DB5A64C00A5C131 /* AudioToolbox.framework */; }; 586152971DB5A65200A5C131 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 586152961DB5A65200A5C131 /* AVFoundation.framework */; }; 589A4CEA1DB5DDC3000FC0CC /* Base.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 589A4CE91DB5DDC3000FC0CC /* Base.lproj */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 3063EF7E21091B3100C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF8021091B3100C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; 5861528C1DB5A5B500A5C131 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 5861528E1DB5A5B500A5C131 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 586152901DB5A5F000A5C131 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = "libpd-ios"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 583AB14F1DB5A8CF001E5913 /* PdLinkAudioUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PdLinkAudioUnit.h; path = ../../abl_link/ios/PdLinkAudioUnit.h; sourceTree = ""; }; 583AB1501DB5A8CF001E5913 /* PdLinkAudioUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PdLinkAudioUnit.m; path = ../../abl_link/ios/PdLinkAudioUnit.m; sourceTree = ""; }; 583AB1521DB5A905001E5913 /* libABLLink.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libABLLink.a; path = ../../LinkKit/lib/libABLLink.a; sourceTree = ""; }; 583AB1541DB5AA66001E5913 /* ping.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ping.pd; sourceTree = ""; }; 5861526D1DB5A55800A5C131 /* PdLinkSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PdLinkSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 586152711DB5A55800A5C131 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 586152731DB5A55800A5C131 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 586152741DB5A55800A5C131 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 586152761DB5A55800A5C131 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 586152771DB5A55800A5C131 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 5861527A1DB5A55800A5C131 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 5861527C1DB5A55800A5C131 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 5861527F1DB5A55800A5C131 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 586152811DB5A55800A5C131 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 586152871DB5A5B400A5C131 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 586152941DB5A64C00A5C131 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 586152961DB5A65200A5C131 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 589A4CE91DB5DDC3000FC0CC /* Base.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Base.lproj; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 5861526A1DB5A55800A5C131 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 586152971DB5A65200A5C131 /* AVFoundation.framework in Frameworks */, 586152951DB5A64C00A5C131 /* AudioToolbox.framework in Frameworks */, 586152921DB5A62800A5C131 /* libpd-ios.a in Frameworks */, 583AB1531DB5A905001E5913 /* libABLLink.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 586152641DB5A55800A5C131 = { isa = PBXGroup; children = ( 583AB1521DB5A905001E5913 /* libABLLink.a */, 586152871DB5A5B400A5C131 /* libpd.xcodeproj */, 5861526F1DB5A55800A5C131 /* PdLinkSample */, 5861526E1DB5A55800A5C131 /* Products */, 586152931DB5A64C00A5C131 /* Frameworks */, ); sourceTree = ""; }; 5861526E1DB5A55800A5C131 /* Products */ = { isa = PBXGroup; children = ( 5861526D1DB5A55800A5C131 /* PdLinkSample.app */, ); name = Products; sourceTree = ""; }; 5861526F1DB5A55800A5C131 /* PdLinkSample */ = { isa = PBXGroup; children = ( 589A4CE91DB5DDC3000FC0CC /* Base.lproj */, 583AB1541DB5AA66001E5913 /* ping.pd */, 583AB14F1DB5A8CF001E5913 /* PdLinkAudioUnit.h */, 583AB1501DB5A8CF001E5913 /* PdLinkAudioUnit.m */, 586152731DB5A55800A5C131 /* AppDelegate.h */, 586152741DB5A55800A5C131 /* AppDelegate.m */, 586152761DB5A55800A5C131 /* ViewController.h */, 586152771DB5A55800A5C131 /* ViewController.m */, 586152791DB5A55800A5C131 /* Main.storyboard */, 5861527C1DB5A55800A5C131 /* Assets.xcassets */, 5861527E1DB5A55800A5C131 /* LaunchScreen.storyboard */, 586152811DB5A55800A5C131 /* Info.plist */, 586152701DB5A55800A5C131 /* Supporting Files */, ); path = PdLinkSample; sourceTree = ""; }; 586152701DB5A55800A5C131 /* Supporting Files */ = { isa = PBXGroup; children = ( 586152711DB5A55800A5C131 /* main.m */, ); name = "Supporting Files"; sourceTree = ""; }; 586152881DB5A5B400A5C131 /* Products */ = { isa = PBXGroup; children = ( 5861528D1DB5A5B500A5C131 /* libpd-ios.a */, 5861528F1DB5A5B500A5C131 /* libpd-osx.a */, 3063EF7F21091B3100C8A4A2 /* libpd-ios-multi.a */, 3063EF8121091B3100C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 586152931DB5A64C00A5C131 /* Frameworks */ = { isa = PBXGroup; children = ( 586152961DB5A65200A5C131 /* AVFoundation.framework */, 586152941DB5A64C00A5C131 /* AudioToolbox.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 5861526C1DB5A55800A5C131 /* PdLinkSample */ = { isa = PBXNativeTarget; buildConfigurationList = 586152841DB5A55800A5C131 /* Build configuration list for PBXNativeTarget "PdLinkSample" */; buildPhases = ( 586152691DB5A55800A5C131 /* Sources */, 5861526A1DB5A55800A5C131 /* Frameworks */, 5861526B1DB5A55800A5C131 /* Resources */, ); buildRules = ( ); dependencies = ( 586152911DB5A5F000A5C131 /* PBXTargetDependency */, ); name = PdLinkSample; productName = PdLinkSample; productReference = 5861526D1DB5A55800A5C131 /* PdLinkSample.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 586152651DB5A55800A5C131 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = "Peter Brinkmann"; TargetAttributes = { 5861526C1DB5A55800A5C131 = { CreatedOnToolsVersion = 8.0; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 586152681DB5A55800A5C131 /* Build configuration list for PBXProject "PdLinkSample" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 586152641DB5A55800A5C131; productRefGroup = 5861526E1DB5A55800A5C131 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 586152881DB5A5B400A5C131 /* Products */; ProjectRef = 586152871DB5A5B400A5C131 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 5861526C1DB5A55800A5C131 /* PdLinkSample */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 3063EF7F21091B3100C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF7E21091B3100C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF8121091B3100C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF8021091B3100C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5861528D1DB5A5B500A5C131 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 5861528C1DB5A5B500A5C131 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 5861528F1DB5A5B500A5C131 /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 5861528E1DB5A5B500A5C131 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 5861526B1DB5A55800A5C131 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 586152801DB5A55800A5C131 /* LaunchScreen.storyboard in Resources */, 5861527D1DB5A55800A5C131 /* Assets.xcassets in Resources */, 589A4CEA1DB5DDC3000FC0CC /* Base.lproj in Resources */, 5861527B1DB5A55800A5C131 /* Main.storyboard in Resources */, 583AB1551DB5AA66001E5913 /* ping.pd in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 586152691DB5A55800A5C131 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 583AB1511DB5A8CF001E5913 /* PdLinkAudioUnit.m in Sources */, 586152781DB5A55800A5C131 /* ViewController.m in Sources */, 586152751DB5A55800A5C131 /* AppDelegate.m in Sources */, 586152721DB5A55800A5C131 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 586152911DB5A5F000A5C131 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libpd-ios"; targetProxy = 586152901DB5A5F000A5C131 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 586152791DB5A55800A5C131 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 5861527A1DB5A55800A5C131 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; 5861527E1DB5A55800A5C131 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 5861527F1DB5A55800A5C131 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 586152821DB5A55800A5C131 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 586152831DB5A55800A5C131 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; 586152851DB5A55800A5C131 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = PdLinkSample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-L../../LinkKit/lib", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdLinkSample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "../libpd/** ../../LinkKit/include"; }; name = Debug; }; 586152861DB5A55800A5C131 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = PdLinkSample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "-L../../LinkKit/lib", "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdLinkSample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = "../libpd/** ../../LinkKit/include"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 586152681DB5A55800A5C131 /* Build configuration list for PBXProject "PdLinkSample" */ = { isa = XCConfigurationList; buildConfigurations = ( 586152821DB5A55800A5C131 /* Debug */, 586152831DB5A55800A5C131 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 586152841DB5A55800A5C131 /* Build configuration list for PBXNativeTarget "PdLinkSample" */ = { isa = XCConfigurationList; buildConfigurations = ( 586152851DB5A55800A5C131 /* Debug */, 586152861DB5A55800A5C131 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 586152651DB5A55800A5C131 /* Project object */; } ================================================ FILE: PdSettings/PdSettings/PdSettings-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.1 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UIBackgroundModes audio UIRequiresFullScreen UIStatusBarHidden UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: PdSettings/PdSettings/PdSettings-Prefix.pch ================================================ // // Prefix header for all source files of the 'PdSettings' target in the 'PdSettings' project // #import #ifndef __IPHONE_3_0 #warning "This project uses features only available in iPhone SDK 3.0 and later." #endif #ifdef __OBJC__ #import #import #import "RDebug.h" #endif ================================================ FILE: PdSettings/PdSettings/PdSettingsAppDelegate.h ================================================ // // PdSettingsAppDelegate.h // PdSettings // // Created by Richard Eakin on 18/09/11. // Copyright 2011 Blarg. All rights reserved. // #import @interface PdSettingsAppDelegate : NSObject @property (nonatomic, retain) UIWindow *window; @end ================================================ FILE: PdSettings/PdSettings/PdSettingsAppDelegate.m ================================================ // // PdSettingsAppDelegate.m // PdSettings // // Created by Richard Eakin on 18/09/11. // Copyright 2011 Blarg. All rights reserved. // Updated by Dan Wilcox 2018. // #import "PdSettingsAppDelegate.h" #import "PdSettingsViewController.h" @implementation PdSettingsAppDelegate @synthesize window = window_; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.rootViewController = [[PdSettingsViewController alloc] init]; [self.window makeKeyAndVisible]; return YES; } - (void)dealloc { self.window = nil; } @end ================================================ FILE: PdSettings/PdSettings/PdSettingsViewController.h ================================================ // // PdSettingsViewController.h // PdSettings // // Created by Richard Eakin on 18/09/11. // Copyright 2011 Blarg. All rights reserved. // #import #import "PdBase.h" @interface PdSettingsViewController : UIViewController @end ================================================ FILE: PdSettings/PdSettings/PdSettingsViewController.m ================================================ // // PdSettingsViewController.m // PdSettings // // Created by Richard Eakin on 18/09/11. // Copyright 2011 Blarg. All rights reserved. // Updated by Dan Wilcox 2018. // #import "PdSettingsViewController.h" #import "PdBase.h" #import "PdFile.h" #import "PdAudioController.h" #import static const CGFloat kFramePadding = 12.0; static const CGFloat kButtonFontSize = 12.0; static const CGFloat kLabelHeight = 20.0; static const CGFloat kPickerFirstComponentProportion = 0.33333333; static const CGFloat kPickerOtherComponentsProportion = 0.22222222; typedef enum { SettingsPickerComponentSampleRate, SettingsPickerComponentNumberInputChannels, SettingsPickerComponentNumberOutputChannels, SettingsPickerComponentNumberTicks, SettingsPickerNumberComponents } SettingsPickerComponent; @interface PdSettingsViewController () @property (nonatomic, retain) PdAudioController *audioController; @property (nonatomic, retain) PdFile *patch; @property (nonatomic, retain) NSArray *settingsArray; @property (nonatomic, retain) UIButton *activeButton; @property (nonatomic, retain) UIButton *reloadButton; @property (nonatomic, retain) UIButton *ambientAudioButton; @property (nonatomic, retain) UIButton *allowMixingButton; @property (nonatomic, retain) UIPickerView *settingsPicker; @property (nonatomic, retain) UISegmentedControl *patchSelector; - (void)configureAudio; // this is where PdAudioController's configure method is called and audio properties are actually set - (void)layoutInterface; - (void)layoutLabels; - (void)activeButtonWasTapped:(UIButton *)sender; - (void)reloadButtonWasTapped:(UIButton *)sender; - (void)ambientButtonWasTapped:(UIButton *)sender; - (void)allowMixingButtonWasTapped:(UIButton *)sender; - (void)patchSelectorChanged:(UISegmentedControl *)sender; - (UILabel *)addLabelWithText:(NSString *)text; - (UIButton *)addButtonWithText:(NSString *)text selector:(SEL)selector; - (void)fillSettingsArray; - (void)indicateSettingsChanged; - (void)updatePickerSettings; - (int)pickerValueForComponent:(SettingsPickerComponent)component; - (void)setPickerValue:(int)value component:(SettingsPickerComponent)component animated:(BOOL)animated; @end @implementation PdSettingsViewController @synthesize audioController = audioController_, patch = patch_, settingsArray = settingsArray_, activeButton = activeButton_, reloadButton = reloadButton_, settingsPicker = settingsPicker_, patchSelector = patchSelector_, ambientAudioButton = ambientAudioButton_, allowMixingButton = allowMixingButton_; #pragma mark - Init / Dealloc - (id)init { self = [super init]; if (self) { [PdBase setDelegate:self]; [PdBase subscribe:@"test-value"]; self.audioController = [[PdAudioController alloc] init]; [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:YES mixingEnabled:NO]; // well known settings [self fillSettingsArray]; } return self; } - (void)dealloc { self.audioController = nil; self.patch = nil; self.activeButton = nil; self.reloadButton = nil; self.ambientAudioButton = nil; self.allowMixingButton = nil; self.patchSelector = nil; self.settingsArray = nil; } #pragma mark - View lifecycle - (void)loadView { [super loadView]; self.view.backgroundColor = [UIColor darkGrayColor]; self.activeButton = [self addButtonWithText:@"Inactive" selector:@selector(activeButtonWasTapped:)]; [self.activeButton setTitle:@"Active" forState:UIControlStateSelected]; self.reloadButton = [self addButtonWithText:@"Reload Settings" selector:@selector(reloadButtonWasTapped:)]; self.reloadButton.enabled = NO; self.ambientAudioButton = [self addButtonWithText:@"Ambient Audio" selector:@selector(ambientButtonWasTapped:)]; self.allowMixingButton = [self addButtonWithText:@"Allow Mixing" selector:@selector(allowMixingButtonWasTapped:)]; self.settingsPicker = [[UIPickerView alloc] init]; self.settingsPicker.delegate = self; self.settingsPicker.dataSource = self; self.settingsPicker.showsSelectionIndicator = YES; self.patchSelector = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"testoutput.pd", @"testinput.pd", nil]]; self.patchSelector.tintColor = [UIColor colorWithRed:54.0/255.0 green:56.0/255.0 blue:96.0/255.0 alpha:1.0]; self.patchSelector.selectedSegmentIndex = 0; [self.patchSelector addTarget:self action:@selector(patchSelectorChanged:) forControlEvents:UIControlEventValueChanged]; [self patchSelectorChanged:self.patchSelector]; [self.view addSubview:self.settingsPicker]; [self.view addSubview:self.patchSelector]; } -(BOOL)prefersStatusBarHidden{ return YES; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self updatePickerSettings]; [self.audioController print]; } - (void)viewDidLayoutSubviews { [self layoutInterface]; [self layoutLabels]; } - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { for (UIView *view in self.view.subviews) { if ([view isKindOfClass:[UILabel class]]) { [view removeFromSuperview]; } } } #pragma mark - PdReceiverDelegate - (void)receivePrint:(NSString *)message { RLog(@"%@", message); } #pragma mark - UIPickerViewDataSource - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { return SettingsPickerNumberComponents; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { return [[self.settingsArray objectAtIndex:component] count]; } #pragma mark - UIPickerViewDelegate - (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component { CGFloat totalWidth = self.settingsPicker.frame.size.width - kFramePadding * 2; if (component == SettingsPickerComponentSampleRate) { return floor(totalWidth * kPickerFirstComponentProportion); } return floor(totalWidth * kPickerOtherComponentsProportion); } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { return [[self.settingsArray objectAtIndex:component] objectAtIndex:row]; } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { // if the user selects inputs > 0, make sure to disable the // ambient audio button if (component == SettingsPickerComponentNumberInputChannels && [self pickerValueForComponent:SettingsPickerComponentNumberInputChannels] > 0) { self.ambientAudioButton.selected = NO; } // number of ticks can be changed while the audio unit is running, without it needing to be recreated, so it has a different configure method if (component == SettingsPickerComponentNumberTicks) { int ticks = [self pickerValueForComponent:SettingsPickerComponentNumberTicks]; PdAudioStatus status = [self.audioController configureTicksPerBuffer:ticks]; if (status == PdAudioPropertyChanged) { RLog(@"Could not configure ticksPerBuffer = %d, instead got %d", ticks, self.audioController.ticksPerBuffer); [self setPickerValue:self.audioController.ticksPerBuffer component:SettingsPickerComponentNumberTicks animated:YES]; } } else { [self indicateSettingsChanged]; } } #pragma mark - Private (UI) - (void)layoutInterface { const CGFloat kButtonHeight = 34.0; const CGFloat kPSWidth = 300.0; const CGFloat kActiveButtonWidth = 70.0; const CGFloat kReloadButtonWidth = 120.0; const CGFloat kButtonSpacer = 10.0; const CGFloat kPickerHeight = 162.0; CGSize viewSize = self.view.bounds.size; self.settingsPicker.frame = CGRectMake(0.0, viewSize.height - kPickerHeight, viewSize.width, kPickerHeight); CGFloat psXOffset = (viewSize.width - kPSWidth) * 0.5; CGFloat psYOffset = self.settingsPicker.frame.origin.y - kButtonHeight - 26.0; self.patchSelector.frame = CGRectIntegral(CGRectMake(psXOffset, psYOffset, kPSWidth, kButtonHeight)); CGFloat bYOffset = 0.0; self.activeButton.frame = CGRectMake(kFramePadding, kFramePadding, kActiveButtonWidth, kButtonHeight); CGFloat rButtonXOffset = viewSize.width - kFramePadding - kReloadButtonWidth; self.reloadButton.frame = CGRectMake(rButtonXOffset, kFramePadding, kReloadButtonWidth, kButtonHeight); int currentOrientation = [[UIApplication sharedApplication] statusBarOrientation]; if (UIInterfaceOrientationIsPortrait(currentOrientation)) { self.ambientAudioButton.frame = CGRectMake(self.reloadButton.frame.origin.x, self.reloadButton.frame.origin.y + kButtonHeight + kButtonSpacer + bYOffset, kReloadButtonWidth, kButtonHeight); self.allowMixingButton.frame = CGRectMake(self.reloadButton.frame.origin.x, self.reloadButton.frame.origin.y + 2 * (kButtonHeight + kButtonSpacer + bYOffset), kReloadButtonWidth, kButtonHeight); } else { self.ambientAudioButton.frame = CGRectMake(self.reloadButton.frame.origin.x - self.reloadButton.frame.size.width - kButtonSpacer, self.reloadButton.frame.origin.y + bYOffset, kReloadButtonWidth, kButtonHeight); self.allowMixingButton.frame = CGRectMake(self.reloadButton.frame.origin.x - 2 * (self.reloadButton.frame.size.width + kButtonSpacer), self.reloadButton.frame.origin.y + bYOffset, kReloadButtonWidth, kButtonHeight); } } - (void)layoutLabels { CGSize viewSize = self.view.bounds.size; const CGFloat kPSLabelWidth = 100.0; CGFloat pickerLabelsYOffset = viewSize.height - self.settingsPicker.frame.size.height - kLabelHeight; CGFloat drawingWidth = viewSize.width - kFramePadding * 2; CGFloat xOffset = kFramePadding + 2; UILabel *srLabel = [self addLabelWithText:@"samplerate"]; srLabel.frame = CGRectIntegral(CGRectMake(xOffset, pickerLabelsYOffset, drawingWidth * kPickerFirstComponentProportion, kLabelHeight)); UILabel *insLabel = [self addLabelWithText:@"ins"]; xOffset += kPickerFirstComponentProportion * drawingWidth + 2; insLabel.frame = CGRectIntegral(CGRectMake(xOffset, pickerLabelsYOffset, drawingWidth * kPickerOtherComponentsProportion, kLabelHeight)); UILabel *outsLabel = [self addLabelWithText:@"outs"]; xOffset += kPickerOtherComponentsProportion * drawingWidth; outsLabel.frame = CGRectIntegral(CGRectMake(xOffset, pickerLabelsYOffset, drawingWidth * kPickerOtherComponentsProportion, kLabelHeight)); UILabel *ticksLabel = [self addLabelWithText:@"ticks"]; xOffset += kPickerOtherComponentsProportion * drawingWidth; ticksLabel.frame = CGRectIntegral(CGRectMake(xOffset, pickerLabelsYOffset, drawingWidth * kPickerOtherComponentsProportion, kLabelHeight)); UILabel *psLabel = [self addLabelWithText:@"patch selector"]; psLabel.textAlignment = NSTextAlignmentCenter; CGFloat psLabelYOffset = self.patchSelector.frame.origin.y - kLabelHeight - 2; psLabel.frame = CGRectIntegral(CGRectMake((viewSize.width - kPSLabelWidth) * 0.5, psLabelYOffset, kPSLabelWidth, kLabelHeight)); } - (UILabel *)addLabelWithText:(NSString *)text { UILabel *label = [[UILabel alloc] init]; [self.view addSubview:label]; label.text = text; label.textColor = [UIColor lightGrayColor]; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:14]; return label; } - (UIButton *)addButtonWithText:(NSString *)text selector:(SEL)selector { UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setTitle:text forState:UIControlStateNormal]; [button addTarget:self action:selector forControlEvents:UIControlEventTouchUpInside]; [button setTitleShadowColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; button.titleLabel.shadowOffset = CGSizeMake(0.0, -1.0); button.titleLabel.font = [UIFont boldSystemFontOfSize:kButtonFontSize]; [button setTitleColor:[UIColor colorWithRed:0.75 green:0.75 blue:0.75 alpha:1.0] forState:UIControlStateNormal]; [button setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; [button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected]; UIImage *normalImage = [[UIImage imageNamed:@"button-normal.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:0]; [button setBackgroundImage:normalImage forState:UIControlStateNormal]; UIImage *pressedImage = [[UIImage imageNamed:@"button-pressed.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:0]; [button setBackgroundImage:pressedImage forState:UIControlStateHighlighted]; [button setBackgroundImage:pressedImage forState:UIControlStateSelected]; [self.view addSubview:button]; return button; } #pragma mark - Private (Selectors) - (void)activeButtonWasTapped:(UIButton *)sender { sender.selected = !sender.selected; [self.audioController setActive:sender.selected]; } // configure PdAudioController, then update the picker with the actual settings - (void)reloadButtonWasTapped:(UIButton *)sender { RLog(@"reloading audio configuration"); [self configureAudio]; [self.reloadButton.layer removeAnimationForKey:@"shadow"]; [self.audioController print]; self.reloadButton.enabled = NO; } - (void)ambientButtonWasTapped:(UIButton *)sender { sender.selected = !sender.selected; if (sender.selected) { [self setPickerValue:0 component:SettingsPickerComponentNumberInputChannels animated:YES]; } RLog(@"selected: %d", sender.selected); [self indicateSettingsChanged]; } - (void)allowMixingButtonWasTapped:(UIButton *)sender { sender.selected = !sender.selected; RLog(@"selected: %d", sender.selected); [self indicateSettingsChanged]; } #pragma mark - Private (Audio) - (void)configureAudio { PdAudioStatus status; int sampleRate = [self pickerValueForComponent:SettingsPickerComponentSampleRate]; int numInputs = [self pickerValueForComponent:SettingsPickerComponentNumberInputChannels]; int numOutputs = [self pickerValueForComponent:SettingsPickerComponentNumberOutputChannels]; if (self.ambientAudioButton.selected) { status = [self.audioController configureAmbientWithSampleRate:sampleRate numberChannels:numOutputs mixingEnabled:self.allowMixingButton.selected]; } else { int numChannels = (numInputs > numOutputs) ? numInputs : numOutputs; status = [self.audioController configurePlaybackWithSampleRate:sampleRate numberChannels:numChannels inputEnabled:(numInputs > 0) mixingEnabled:self.allowMixingButton.selected]; } if (status == PdAudioError) { RLog(@"Error configuring PdAudioController"); [self.reloadButton setTitle:@"Error!" forState:UIControlStateNormal]; } else if (status == PdAudioPropertyChanged) { RLog(@"Could not configure with provided properties (samplerate: %d, numInputs: %d, numOutputs: %d)", sampleRate, numInputs, numOutputs); RLog(@"Instead got samplerate: %d, numChannels: %d", self.audioController.sampleRate, self.audioController.numberChannels); [self.reloadButton setTitle:@"Property Changed!" forState:UIControlStateNormal]; } else { [self.reloadButton setTitle:@"Success!" forState:UIControlStateNormal]; } [self updatePickerSettings]; } - (void)patchSelectorChanged:(UISegmentedControl *)sender { NSString *name = [sender titleForSegmentAtIndex:sender.selectedSegmentIndex]; self.patch = [PdFile openFileNamed:name path:[[NSBundle mainBundle] resourcePath]]; if (self.patch) { RLog(@"opened patch: %@", name); } else { RError(@"couldn't open patch: %@", name); } [PdBase sendFloat:95 toReceiver:@"mag"]; } // TODO: test with bogus values - (void)fillSettingsArray { const int kNumTickOptions = 32; NSArray *sampleratesArray = [NSArray arrayWithObjects: @"8000", @"22050", @"24000", @"32000", @"44100", @"48000", nil]; NSArray *inputChannelsArray = [NSArray arrayWithObjects:@"0", @"1", @"2", nil]; NSArray *outputChannelsArray = [NSArray arrayWithObjects:@"0", @"1", @"2", nil]; NSMutableArray *ticksArray = [NSMutableArray arrayWithCapacity:kNumTickOptions]; for (int i = 1; i <= 64; i++) { [ticksArray addObject:[NSString stringWithFormat:@"%d", i]]; } self.settingsArray = [NSArray arrayWithObjects:sampleratesArray, inputChannelsArray, outputChannelsArray, ticksArray, nil]; } - (void)updatePickerSettings { [self setPickerValue:self.audioController.sampleRate component:SettingsPickerComponentSampleRate animated:YES]; [self setPickerValue:(self.audioController.inputEnabled ? self.audioController.numberChannels : 0) component:SettingsPickerComponentNumberInputChannels animated:YES]; [self setPickerValue:self.audioController.numberChannels component:SettingsPickerComponentNumberOutputChannels animated:YES]; [self setPickerValue:self.audioController.ticksPerBuffer component:SettingsPickerComponentNumberTicks animated:YES]; } - (int)pickerValueForComponent:(SettingsPickerComponent)component { int row = (int)[self.settingsPicker selectedRowInComponent:component]; NSString *value = [[self.settingsArray objectAtIndex:component] objectAtIndex:row]; return [value intValue]; } - (void)setPickerValue:(int)value component:(SettingsPickerComponent)component animated:(BOOL)animated { NSString *valueString = [NSString stringWithFormat:@"%d", value]; NSArray *componentArray = [self.settingsArray objectAtIndex:component]; int row = 0; for (NSString *pickerValue in componentArray) { if ([valueString isEqualToString:pickerValue]) { [self.settingsPicker selectRow:row inComponent:component animated:animated]; return; } row++; } // if we made it here, there was a problem RLog(@"* ERROR * could not find a value equal to %d in component %d", value, component); } - (void)indicateSettingsChanged { if (!self.reloadButton.enabled) { self.reloadButton.enabled = YES; [self.reloadButton setTitle:@"Reload Settings" forState:UIControlStateNormal]; self.reloadButton.layer.shadowRadius = 5.0; self.reloadButton.layer.shadowColor = [UIColor cyanColor].CGColor; self.reloadButton.layer.shadowOpacity = 0.0; self.reloadButton.layer.shadowOffset = CGSizeMake(0.0, 0.0); CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"shadowOpacity"]; animation.fromValue = [NSNumber numberWithFloat:0.0]; animation.toValue = [NSNumber numberWithFloat:0.4]; animation.autoreverses = YES; animation.duration = .4; animation.repeatCount = NSIntegerMax; [self.reloadButton.layer addAnimation:animation forKey:@"shadow"]; } } @end ================================================ FILE: PdSettings/PdSettings/RDebug.h ================================================ // // WDebug.h // Wombat // // Created by Richard Eakin on 1/08/11. // Copyright 2011 Richard Eakin. All rights reserved. // ////////////////////////////////////////////////////////////////////// #ifdef R_DEBUG //////////////////// Debug Mode ////////////////////////////////////// #include #include #include #include #include // Returns true if the current process is being debugged (either // running under the debugger or has a debugger attached post facto). // from: Apple's Technical Q&A QA1361 - http://developer.apple.com/library/mac/#qa/qa1361/_index.html static inline bool AmIBeingDebugged(void) { int junk; int mib[4]; struct kinfo_proc info; size_t size; info.kp_proc.p_flag = 0; mib[0] = CTL_KERN; mib[1] = KERN_PROC; mib[2] = KERN_PROC_PID; mib[3] = getpid(); size = sizeof(info); junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); assert(junk == 0); return ( (info.kp_proc.p_flag & P_TRACED) != 0 ); } // RBreak () - method to programmatically break at the line where it was called // from: http://danwright.info/blog/author/dan/page/3/ and http://cocoawithlove.com/2008/03/break-into-debugger.html #if __ppc64__ || __ppc__ #define RBreak() \ do { \ if(AmIBeingDebugged()) \ { \ __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ : : : "memory","r0","r3","r4" ); \ } \ } while (0) #elif __i386__ || __x86_64__ #define RBreak() \ do { \ if(AmIBeingDebugged()) { \ __asm__("int $3\n" : : ); \ } \ } while (0) #elif __arm__ #define RBreak() \ do { \ if (AmIBeingDebugged()) { \ __asm__("mov r0, #20\nmov ip, r0\nsvc 128\nmov r1, #37\nmov ip, r1\nmov r1, #2\nmov r2, #1\n svc 128\n" : : : "memory","ip","r0","r1","r2"); \ } \ } while (0) #else // unknown architecture #define RBreak() \ do { \ if (AmIBeingDebugged()) { \ raise(SIGINT); \ } \ } while (0) #endif // RStrackTrace - print the stacktrace back to the specified depth. if depth == 0, the entire stacktrace is printed #define RStackTrace(depth) \ do { \ printf("%s * CALL STACK *\n", __PRETTY_FUNCTION__); \ int currentDepth = 0; \ for (NSString* stackElement in [NSThread callStackSymbols]) { \ if (!depth || currentDepth++ < depth) { \ printf ("%s\n", [stackElement UTF8String]); \ } else { \ break; \ } \ } \ } while (0) #define RLog(nslog_string, ...) \ do { \ printf("%s\t", __PRETTY_FUNCTION__); \ printf("%s\n", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); \ } while (0) #define RAssert(check_value) \ do { \ if (!(check_value)) { \ printf("%s * ASSERT FAILED *\t", __PRETTY_FUNCTION__); \ printf("'%s'\n", #check_value); \ RBreak(); \ } \ } while (0) #define RAssertM(check_value, nslog_string, ...) \ do { \ if (!(check_value)) { \ printf("%s * ASSERT FAILED *\t", __PRETTY_FUNCTION__); \ printf("%s\n", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); \ RBreak(); \ } \ } while (0) #define RWarnCheck(check_value, nslog_string, ...) \ do { \ if (!(check_value)) { \ { printf("%s * WARNING *\t", __PRETTY_FUNCTION__); \ printf("%s\n", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); \ } \ } while (0) #define RWarning(nslog_string, ...) \ do { \ printf("%s * WARNING *\t", __PRETTY_FUNCTION__); \ printf("%s\n", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); \ } while (0) #define RError(nslog_string, ...) \ do { \ printf("%s * ERROR *\t", __PRETTY_FUNCTION__); \ printf("%s\n", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); \ } while (0) ////////////////////////////////////////////////////////////////////// #else //////////////////// Release Mode //////////////////////////////////// #define RLog(...) #define RAssert(check_value) #define RAssertM(check_value, nslog_string, ...) #define RWarnCheck(check_value, nslog_string, ...) #define RWarning(nslog_string, ...) #define RError(nslog_string, ...) #define RBreak() #define RStackTrace() #endif ================================================ FILE: PdSettings/PdSettings/en.lproj/InfoPlist.strings ================================================ /* Localized versions of Info.plist keys */ ================================================ FILE: PdSettings/PdSettings/main.m ================================================ // // main.m // PdSettings // // Created by Richard Eakin on 18/09/11. // Copyright 2011 Blarg. All rights reserved. // Updated by Dan Wilcox 2018. // #import #import "PdSettingsAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(PdSettingsAppDelegate.class)); } } ================================================ FILE: PdSettings/PdSettings.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 114DD8D714344B5700EA5EA7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 114DD8D614344B5700EA5EA7 /* AVFoundation.framework */; }; 1151DD0414455C3300E1BAA8 /* button-normal.png in Resources */ = {isa = PBXBuildFile; fileRef = 1151DD0214455C3300E1BAA8 /* button-normal.png */; }; 1151DD0514455C3300E1BAA8 /* button-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 1151DD0314455C3300E1BAA8 /* button-pressed.png */; }; 1151DD0814455C9900E1BAA8 /* testinput.pd in Resources */ = {isa = PBXBuildFile; fileRef = 1151DD0614455C9900E1BAA8 /* testinput.pd */; }; 1151DD0914455C9900E1BAA8 /* testoutput.pd in Resources */ = {isa = PBXBuildFile; fileRef = 1151DD0714455C9900E1BAA8 /* testoutput.pd */; }; 1151DD141445975F00E1BAA8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1151DD131445975F00E1BAA8 /* QuartzCore.framework */; }; 11A8BDB41425EC200006B996 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A8BDB31425EC200006B996 /* UIKit.framework */; }; 11A8BDB61425EC200006B996 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A8BDB51425EC200006B996 /* Foundation.framework */; }; 11A8BDB81425EC200006B996 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A8BDB71425EC200006B996 /* CoreGraphics.framework */; }; 11A8BDBE1425EC200006B996 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 11A8BDBC1425EC200006B996 /* InfoPlist.strings */; }; 11A8BDC01425EC200006B996 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 11A8BDBF1425EC200006B996 /* main.m */; }; 11A8BDC41425EC200006B996 /* PdSettingsAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 11A8BDC31425EC200006B996 /* PdSettingsAppDelegate.m */; }; 11A8BDCA1425EC200006B996 /* PdSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 11A8BDC91425EC200006B996 /* PdSettingsViewController.m */; }; 11A8BDE81425F4B10006B996 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A8BDE51425F4930006B996 /* libpd-ios.a */; }; 11A8BDEA1425F4C10006B996 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A8BDE91425F4C10006B996 /* AudioToolbox.framework */; }; 3063EF2B21087CE200C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF2A21087CE200C8A4A2 /* Default-568h@2x.png */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 1176E14115BB6E510061A139 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 11A8BDE41425F4930006B996 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = libpd; }; 11A8BDE61425F4A70006B996 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = libpd; }; 3063EF25210867A500C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF27210867A500C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 114DD8D614344B5700EA5EA7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1151DD0214455C3300E1BAA8 /* button-normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "button-normal.png"; path = "Resources/button-normal.png"; sourceTree = ""; }; 1151DD0314455C3300E1BAA8 /* button-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "button-pressed.png"; path = "Resources/button-pressed.png"; sourceTree = ""; }; 1151DD0614455C9900E1BAA8 /* testinput.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testinput.pd; path = Resources/testinput.pd; sourceTree = ""; }; 1151DD0714455C9900E1BAA8 /* testoutput.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testoutput.pd; path = Resources/testoutput.pd; sourceTree = ""; }; 1151DD131445975F00E1BAA8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 11A8BDAF1425EC200006B996 /* PdSettings.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PdSettings.app; sourceTree = BUILT_PRODUCTS_DIR; }; 11A8BDB31425EC200006B996 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 11A8BDB51425EC200006B996 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 11A8BDB71425EC200006B996 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 11A8BDBB1425EC200006B996 /* PdSettings-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PdSettings-Info.plist"; sourceTree = ""; }; 11A8BDBD1425EC200006B996 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 11A8BDBF1425EC200006B996 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 11A8BDC11425EC200006B996 /* PdSettings-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PdSettings-Prefix.pch"; sourceTree = ""; }; 11A8BDC21425EC200006B996 /* PdSettingsAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PdSettingsAppDelegate.h; sourceTree = ""; }; 11A8BDC31425EC200006B996 /* PdSettingsAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PdSettingsAppDelegate.m; sourceTree = ""; }; 11A8BDC81425EC200006B996 /* PdSettingsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PdSettingsViewController.h; sourceTree = ""; }; 11A8BDC91425EC200006B996 /* PdSettingsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PdSettingsViewController.m; sourceTree = ""; }; 11A8BDDC1425ED810006B996 /* RDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RDebug.h; sourceTree = ""; }; 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 11A8BDE91425F4C10006B996 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 3063EF2A21087CE200C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 11A8BDAC1425EC200006B996 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1151DD141445975F00E1BAA8 /* QuartzCore.framework in Frameworks */, 114DD8D714344B5700EA5EA7 /* AVFoundation.framework in Frameworks */, 11A8BDEA1425F4C10006B996 /* AudioToolbox.framework in Frameworks */, 11A8BDE81425F4B10006B996 /* libpd-ios.a in Frameworks */, 11A8BDB41425EC200006B996 /* UIKit.framework in Frameworks */, 11A8BDB61425EC200006B996 /* Foundation.framework in Frameworks */, 11A8BDB81425EC200006B996 /* CoreGraphics.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 1151DCFE1445468100E1BAA8 /* Images */ = { isa = PBXGroup; children = ( 1151DD0214455C3300E1BAA8 /* button-normal.png */, 1151DD0314455C3300E1BAA8 /* button-pressed.png */, ); name = Images; sourceTree = ""; }; 11A8BDA41425EC200006B996 = { isa = PBXGroup; children = ( 3063EF2A21087CE200C8A4A2 /* Default-568h@2x.png */, 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */, 11A8BDB91425EC200006B996 /* Source */, 11A8BDEB1425F7660006B996 /* Pd Patches */, 1151DCFE1445468100E1BAA8 /* Images */, 11A8BDB21425EC200006B996 /* Frameworks */, 11A8BDB01425EC200006B996 /* Products */, ); sourceTree = ""; }; 11A8BDB01425EC200006B996 /* Products */ = { isa = PBXGroup; children = ( 11A8BDAF1425EC200006B996 /* PdSettings.app */, ); name = Products; sourceTree = ""; }; 11A8BDB21425EC200006B996 /* Frameworks */ = { isa = PBXGroup; children = ( 114DD8D614344B5700EA5EA7 /* AVFoundation.framework */, 11A8BDE91425F4C10006B996 /* AudioToolbox.framework */, 11A8BDB31425EC200006B996 /* UIKit.framework */, 11A8BDB51425EC200006B996 /* Foundation.framework */, 1151DD131445975F00E1BAA8 /* QuartzCore.framework */, 11A8BDB71425EC200006B996 /* CoreGraphics.framework */, ); name = Frameworks; sourceTree = ""; }; 11A8BDB91425EC200006B996 /* Source */ = { isa = PBXGroup; children = ( 11A8BDDC1425ED810006B996 /* RDebug.h */, 11A8BDC21425EC200006B996 /* PdSettingsAppDelegate.h */, 11A8BDC31425EC200006B996 /* PdSettingsAppDelegate.m */, 11A8BDC81425EC200006B996 /* PdSettingsViewController.h */, 11A8BDC91425EC200006B996 /* PdSettingsViewController.m */, 11A8BDBA1425EC200006B996 /* Supporting Files */, ); name = Source; path = PdSettings; sourceTree = ""; }; 11A8BDBA1425EC200006B996 /* Supporting Files */ = { isa = PBXGroup; children = ( 11A8BDBB1425EC200006B996 /* PdSettings-Info.plist */, 11A8BDBC1425EC200006B996 /* InfoPlist.strings */, 11A8BDBF1425EC200006B996 /* main.m */, 11A8BDC11425EC200006B996 /* PdSettings-Prefix.pch */, ); name = "Supporting Files"; sourceTree = ""; }; 11A8BDDE1425F4920006B996 /* Products */ = { isa = PBXGroup; children = ( 11A8BDE51425F4930006B996 /* libpd-ios.a */, 1176E14215BB6E510061A139 /* libpd-osx.a */, 3063EF26210867A500C8A4A2 /* libpd-ios-multi.a */, 3063EF28210867A500C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 11A8BDEB1425F7660006B996 /* Pd Patches */ = { isa = PBXGroup; children = ( 1151DD0614455C9900E1BAA8 /* testinput.pd */, 1151DD0714455C9900E1BAA8 /* testoutput.pd */, ); name = "Pd Patches"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 11A8BDAE1425EC200006B996 /* PdSettings */ = { isa = PBXNativeTarget; buildConfigurationList = 11A8BDD01425EC200006B996 /* Build configuration list for PBXNativeTarget "PdSettings" */; buildPhases = ( 11A8BDAB1425EC200006B996 /* Sources */, 11A8BDAC1425EC200006B996 /* Frameworks */, 11A8BDAD1425EC200006B996 /* Resources */, ); buildRules = ( ); dependencies = ( 11A8BDE71425F4A70006B996 /* PBXTargetDependency */, ); name = PdSettings; productName = PdSettings; productReference = 11A8BDAF1425EC200006B996 /* PdSettings.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 11A8BDA61425EC200006B996 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = Blarg; }; buildConfigurationList = 11A8BDA91425EC200006B996 /* Build configuration list for PBXProject "PdSettings" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, ); mainGroup = 11A8BDA41425EC200006B996; productRefGroup = 11A8BDB01425EC200006B996 /* Products */; projectDirPath = ""; projectReferences = ( { ProductGroup = 11A8BDDE1425F4920006B996 /* Products */; ProjectRef = 11A8BDDD1425F4920006B996 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 11A8BDAE1425EC200006B996 /* PdSettings */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 1176E14215BB6E510061A139 /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 1176E14115BB6E510061A139 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 11A8BDE51425F4930006B996 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 11A8BDE41425F4930006B996 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF26210867A500C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF25210867A500C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF28210867A500C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF27210867A500C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 11A8BDAD1425EC200006B996 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 11A8BDBE1425EC200006B996 /* InfoPlist.strings in Resources */, 1151DD0414455C3300E1BAA8 /* button-normal.png in Resources */, 1151DD0514455C3300E1BAA8 /* button-pressed.png in Resources */, 1151DD0814455C9900E1BAA8 /* testinput.pd in Resources */, 1151DD0914455C9900E1BAA8 /* testoutput.pd in Resources */, 3063EF2B21087CE200C8A4A2 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 11A8BDAB1425EC200006B996 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 11A8BDC01425EC200006B996 /* main.m in Sources */, 11A8BDC41425EC200006B996 /* PdSettingsAppDelegate.m in Sources */, 11A8BDCA1425EC200006B996 /* PdSettingsViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 11A8BDE71425F4A70006B996 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = libpd; targetProxy = 11A8BDE61425F4A70006B996 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 11A8BDBC1425EC200006B996 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 11A8BDBD1425EC200006B996 /* en */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 11A8BDCE1425EC200006B996 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DR_DEBUG=1"; OTHER_LDFLAGS = "-ObjC"; SDKROOT = iphoneos; USER_HEADER_SEARCH_PATHS = ../libpd/objc; }; name = Debug; }; 11A8BDCF1425EC200006B996 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; OTHER_LDFLAGS = "-ObjC"; SDKROOT = iphoneos; USER_HEADER_SEARCH_PATHS = ../libpd/objc; VALIDATE_PRODUCT = YES; }; name = Release; }; 11A8BDD11425EC200006B996 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "PdSettings/PdSettings-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "PdSettings/PdSettings-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdSettings; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Debug; }; 11A8BDD21425EC200006B996 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_WEAK = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "PdSettings/PdSettings-Prefix.pch"; GCC_THUMB_SUPPORT = NO; GCC_VERSION = ""; INFOPLIST_FILE = "PdSettings/PdSettings-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdSettings; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 11A8BDA91425EC200006B996 /* Build configuration list for PBXProject "PdSettings" */ = { isa = XCConfigurationList; buildConfigurations = ( 11A8BDCE1425EC200006B996 /* Debug */, 11A8BDCF1425EC200006B996 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 11A8BDD01425EC200006B996 /* Build configuration list for PBXNativeTarget "PdSettings" */ = { isa = XCConfigurationList; buildConfigurations = ( 11A8BDD11425EC200006B996 /* Debug */, 11A8BDD21425EC200006B996 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 11A8BDA61425EC200006B996 /* Project object */; } ================================================ FILE: PdSettings/ReadMe.txt ================================================ PdSettings iOS app (part of pd-for-ios, example apps for libpd in iOS) Nov 21, 2011 This sample app demonstrates the various audio settings and how to change them at runtime. There are two classes in use. PdAudioUnit, a class built around an AudioUnit, is the core of the audio processing. It asks PdBase to process the audio. PdAudioController is a high level (convenience, if you will) class, which tries to govern PdAudioUnit and the app's Audio Session at the same time, deciding whether the settings are OK, need adjustment, or if there is an unrecoverable error. ------ Notes on using PdAudioController in your project ------------------- In order to use PdAudioController, you need to add the AVAudioSession framework to your project's "Link Binary With Libraries" section under "Build Phases". You can also then interact with the shared instance of the AVAudioSession (there is only one per app) to get or set specific properties. ------ Notes on configuring PdAudioController ----------------------------- Many of the settings won't be in effect until you reconfigure the Audio Session / Audio Unit, tap on the 'Reload Settings' button in order to update the audio components, while others are settable on the fly (an important one is the ticksPerBuffer size). As such, there are multiple configure methods that each return a PdAudioStatus code, each documented with it's purpose at a high level in PdAudioController.h. ------ Notes on background audio: ----------------------------------------- In order for the audio callbacks to continue producing audio in the background, you need to add an array entry to your app's info.plist file called "UIBackgroundModes" and set one of it's values to "audio" (Xcode 4 automatically show's the human readable name for this, "Required background modes" for the key and "App plays audio" for the value within the created array). The PdSettings example app will always give provide mixing enabled, but this is setable in PdAudioController's configure method. ------ License ------------------------------------------------------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Richard Eakin and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: PdSettings/Resources/testinput.pd ================================================ #N canvas 584 171 580 466 10; #X obj 153 70 adc~; #X obj 140 217 *~; #X obj 179 217 *~; #X obj 85 374 dac~; #X obj 225 153 osc~; #X obj 291 142 sig~; #X obj 291 122 dbtorms; #X obj 225 182 *~; #X obj 225 128 +~ 1000; #X obj 225 102 *~ 50; #X obj 225 71 osc~ 1; #X floatatom 291 102 5 0 0 0 - - -; #X obj 288 70 r mag; #X obj -93 255 delwrite~ blarg0 500; #X obj 36 256 delwrite~ blarg1 500; #X obj -107 103 delread~ blarg0 500; #X obj 16 103 delread~ blarg1 500; #X obj 85 346 +~; #X obj 125 347 +~; #X obj 16 124 *~ 0.35; #X obj -107 125 *~ 0.35; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 1 0 17 1; #X connect 1 0 13 0; #X connect 2 0 18 1; #X connect 2 0 14 0; #X connect 4 0 7 0; #X connect 5 0 7 1; #X connect 6 0 5 0; #X connect 7 0 1 1; #X connect 7 0 2 1; #X connect 8 0 4 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 11 0 6 0; #X connect 12 0 11 0; #X connect 15 0 20 0; #X connect 16 0 19 0; #X connect 17 0 3 0; #X connect 18 0 3 1; #X connect 19 0 14 0; #X connect 19 0 18 0; #X connect 20 0 13 0; #X connect 20 0 17 0; ================================================ FILE: PdSettings/Resources/testoutput.pd ================================================ #N canvas 544 67 475 289 10; #X obj 94 31 osc~ 440; #X obj 104 131 dac~; #X obj 104 102 *~; #X obj 157 78 sig~; #X obj 157 58 dbtorms; #X obj 157 31 r mag; #X obj 279 207 s test-value; #X obj 280 122 metro 1000; #X obj 280 96 loadbang; #X obj 279 156 f 0; #X obj 311 157 + 1; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 6 0; #X connect 9 0 10 0; #X connect 10 0 9 1; ================================================ FILE: PdTest01/Classes/PdTest01AppDelegate.h ================================================ // // PdTest01AppDelegate.h // PdTest01 // // Created by Richard Lawler on 10/3/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface PdTest01AppDelegate : NSObject @property (nonatomic, retain) UIWindow *window; @end ================================================ FILE: PdTest01/Classes/PdTest01AppDelegate.m ================================================ // // PdTest01AppDelegate.m // PdTest01 // // Created by Richard Lawler on 10/3/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdTest01AppDelegate.h" #import "PdTest01ViewController.h" #import "PdAudioController.h" #import "PdBase.h" @interface PdTest01AppDelegate() @property (nonatomic, retain) PdAudioController *audioController; @end @implementation PdTest01AppDelegate @synthesize window; @synthesize audioController = audioController_; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.audioController = [[PdAudioController alloc] init]; [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:YES mixingEnabled:NO]; [PdBase openFile:@"test.pd" path:[[NSBundle mainBundle] resourcePath]]; [self.audioController setActive:YES]; [self.audioController print]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.rootViewController = [[PdTest01ViewController alloc] init]; [self.window makeKeyAndVisible]; return YES; } - (void)dealloc { self.audioController = nil; self.window = nil; } @end ================================================ FILE: PdTest01/Classes/PdTest01ViewController.h ================================================ // // PdTest01ViewController.h // PdTest01 // // Created by Richard Lawler on 10/3/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface PdTest01ViewController : UIViewController { } @end ================================================ FILE: PdTest01/Classes/PdTest01ViewController.m ================================================ // // PdTest01ViewController.m // PdTest01 // // Created by Richard Lawler on 10/3/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdTest01ViewController.h" @implementation PdTest01ViewController - (void)viewDidLoad { self.view.backgroundColor = [UIColor blueColor]; } @end ================================================ FILE: PdTest01/PdTest01-Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.1 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: PdTest01/PdTest01.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 1152A402147E9D6C00DCD675 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A401147E9D6C00DCD675 /* AVFoundation.framework */; }; 1D3623260D0F684500981E51 /* PdTest01AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* PdTest01AppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 28D7ACF80DDB3853001CB0EB /* PdTest01ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* PdTest01ViewController.m */; }; 3063EF36210888BE00C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF35210888BE00C8A4A2 /* Default-568h@2x.png */; }; 30ADB08A1E5412FD00CB0E41 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 30ADB0871E5412E700CB0E41 /* libpd-ios.a */; }; DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C300D125D15FC008B6389 /* Foundation.framework */; }; DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3011125D160B008B6389 /* UIKit.framework */; }; DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3015125D1614008B6389 /* CoreGraphics.framework */; }; DC35155112676B75004825FB /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC35155012676B75004825FB /* ReadMe.txt */; }; DC609326125BBEED00F8509D /* test.pd in Resources */ = {isa = PBXBuildFile; fileRef = DC609325125BBEED00F8509D /* test.pd */; }; DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */; }; DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD724CE125D1A1E000A4BDE /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 3063EF31210888AF00C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF33210888AF00C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; 30ADB0861E5412E700CB0E41 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 30ADB0881E5412E700CB0E41 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 1152A401147E9D6C00DCD675 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* PdTest01AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTest01AppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* PdTest01AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdTest01AppDelegate.m; sourceTree = ""; }; 1D6058910D05DD3D006BFB54 /* PdTest01.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PdTest01.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28D7ACF60DDB3853001CB0EB /* PdTest01ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTest01ViewController.h; sourceTree = ""; }; 28D7ACF70DDB3853001CB0EB /* PdTest01ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdTest01ViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 3063EF35210888BE00C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* PdTest01_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTest01_Prefix.pch; sourceTree = ""; }; 8D1107310486CEB800E47090 /* PdTest01-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "PdTest01-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; DC0C300D125D15FC008B6389 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DC0C3011125D160B008B6389 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DC0C3015125D1614008B6389 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DC35155012676B75004825FB /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; DC609325125BBEED00F8509D /* test.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test.pd; path = Resources/test.pd; sourceTree = ""; }; DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; DCD724CE125D1A1E000A4BDE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 30ADB08A1E5412FD00CB0E41 /* libpd-ios.a in Frameworks */, 1152A402147E9D6C00DCD675 /* AVFoundation.framework in Frameworks */, DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */, DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */, DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */, DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */, DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 1D3623240D0F684500981E51 /* PdTest01AppDelegate.h */, 1D3623250D0F684500981E51 /* PdTest01AppDelegate.m */, 28D7ACF60DDB3853001CB0EB /* PdTest01ViewController.h */, 28D7ACF70DDB3853001CB0EB /* PdTest01ViewController.m */, ); path = Classes; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* PdTest01.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 3063EF35210888BE00C8A4A2 /* Default-568h@2x.png */, DC35155012676B75004825FB /* ReadMe.txt */, 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 32CA4F630368D1EE00C91783 /* PdTest01_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( DC609325125BBEED00F8509D /* test.pd */, 8D1107310486CEB800E47090 /* PdTest01-Info.plist */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */, DC0C300D125D15FC008B6389 /* Foundation.framework */, DC0C3011125D160B008B6389 /* UIKit.framework */, DC0C3015125D1614008B6389 /* CoreGraphics.framework */, DCD724CE125D1A1E000A4BDE /* Foundation.framework */, 1152A401147E9D6C00DCD675 /* AVFoundation.framework */, ); name = Frameworks; sourceTree = ""; }; 30ADB0821E5412E700CB0E41 /* Products */ = { isa = PBXGroup; children = ( 30ADB0871E5412E700CB0E41 /* libpd-ios.a */, 30ADB0891E5412E700CB0E41 /* libpd-osx.a */, 3063EF32210888AF00C8A4A2 /* libpd-ios-multi.a */, 3063EF34210888AF00C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* PdTest01 */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PdTest01" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = PdTest01; productName = PdTest01; productReference = 1D6058910D05DD3D006BFB54 /* PdTest01.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PdTest01" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 30ADB0821E5412E700CB0E41 /* Products */; ProjectRef = 30ADB0811E5412E700CB0E41 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* PdTest01 */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 3063EF32210888AF00C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF31210888AF00C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF34210888AF00C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF33210888AF00C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 30ADB0871E5412E700CB0E41 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 30ADB0861E5412E700CB0E41 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 30ADB0891E5412E700CB0E41 /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 30ADB0881E5412E700CB0E41 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( DC609326125BBEED00F8509D /* test.pd in Resources */, DC35155112676B75004825FB /* ReadMe.txt in Resources */, 3063EF36210888BE00C8A4A2 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* PdTest01AppDelegate.m in Sources */, 28D7ACF80DDB3853001CB0EB /* PdTest01ViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PdTest01_Prefix.pch; HEADER_SEARCH_PATHS = "../libpd/**"; INFOPLIST_FILE = "PdTest01-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdTest01; PRODUCT_NAME = PdTest01; SDKROOT = iphoneos; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PdTest01_Prefix.pch; HEADER_SEARCH_PATHS = "../libpd/**"; INFOPLIST_FILE = "PdTest01-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdTest01; PRODUCT_NAME = PdTest01; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; GCC_WARN_MISSING_PARENTHESES = NO; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DPD", "-DUSEAPI_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; GCC_WARN_MISSING_PARENTHESES = NO; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = ( "-DPD", "-DUSEAPI_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PdTest01" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PdTest01" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: PdTest01/PdTest01_Prefix.pch ================================================ // // Prefix header for all source files of the 'PdTest01' target in the 'PdTest01' project // #ifdef __OBJC__ #import #import #endif ================================================ FILE: PdTest01/ReadMe.txt ================================================ This is a simple sample Universal iPad/iPhone app using Libpd to load and run a PD patch file. The Libpd source and documentation is available at https://github.com/libpd/libpd *** Note: These docs are out of date, from an early version of libpd's obj-c layer. Please visit the following wiki for updated info: https://github.com/libpd/pd-for-ios/wiki/ios The iOS sample project is currently set up to use the latest iOS SDK. But this feature only works automatically with iOS SDK 4.2 and later. The project settings use “Latest iOS” as the “Base SDK” and iOS 3.0 as its “iOS Deployment Target”. That means the app will run on any device with iOS 3.0 or later. (These can be changed in the project’s GetInfo panels.) If you are having problems with XCode recognizing the project’s base SDK, you can manually select the SDK in the project’s and build target’s GetInfo panels. Libpd is currently directly compiled into the app project. (See the libpd folder) It may make more sense to compile Libpd as a static library. Then link that into the app project. One thing that is very important to get Libpd to compile is setting the correct compiler DEFINES. These can be done in the project build "Other C Flags" setting. -DPD -DUSEAPI_DUMMY -DHAVE_LIBDL -DHAVE_UNISTD_H ALternatively you could just add #define's to the project precompiled header file. e.g. PdTest01_Prefix.pch The PdAudio and PdBase classes provide the Objective C glue to Libpd. PdAudio initializes the iOS Audio Session. A PdAudio object needs to created by your app. e.g. pdAudio = [[PdAudio alloc] initWithSampleRate:44100.0 andTicksPerBuffer:64 andNumberOfInputChannels:2 andNumberOfOutputChannels:2]; PdBase provides an interface to Libpd through + class methods. These methods are analogous the Libpd Java API http://gitorious.org/Pdlib/pages/Libpd PdBase shouldn't be explicitly instantiated as an object. Just make sure you add the class to your app project by adding the source files. Then call the class methods like C functions. e.g. [PdBase openPatch: documentsPatchFilePath]; [PdBase computeAudio:YES]; You then you also need to play [pdAudio play]; Tested systems: - iPad (iOS 4.2.1) - iPhone 3GS (iOS 4.0) - iPod touch 2nd gen (iOS 4.1) - not working - iPod touch 1st gen (iOS 3.0) - audio problems - iPhone EDGE (iOS 3.0) - audio problmes. Known problems: - Audio playback problems with iOS SDK Simulator - Audio playback problems with iPod touch 1st gen, iPhone EDGE, iPhone 3G. - No audio playback on iPod touch 2nd gen. Note: this sample app uses the CoreAudio PlayAndRecord Audio Session type. Currently Libpd doesn't work properly with older iDevices with armv6 CPUs when using the PlayAndRecord Audio Session type. The PdTest02 app demonstrates an output-only application of Libpd that works on most older iDevices. i.e. PdTest02 does not use the microphone input. --------------- License ------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: PdTest01/Resources/test.pd ================================================ #N canvas 156 309 250 287 10; #X obj 78 116 dac~; #X obj 157 81 *~ 1; #X obj 158 37 *~ 0.2; #X obj 14 83 *~ 1; #X obj 15 20 osc~ 440; #X obj 15 39 *~ 0.2; #X obj 158 18 osc~ 660; #X obj 90 19 adc~ 1; #X obj 89 65 *~ 1; #X obj 35 63 r left; #X obj 110 44 r mic; #X obj 178 60 r right; #X obj 87 152 loadbang; #X obj 87 174 metro 1000; #X obj 87 195 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 87 239 realtime; #X obj 87 262 print PD_RUNS; #X obj 87 216 sel 0; #X obj 132 217 sel 1; #X connect 1 0 0 1; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X connect 7 0 8 0; #X connect 8 0 0 0; #X connect 8 0 0 1; #X connect 9 0 3 1; #X connect 10 0 8 1; #X connect 11 0 1 1; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 17 0; #X connect 14 0 18 0; #X connect 15 0 16 0; #X connect 17 0 15 0; #X connect 18 0 15 1; ================================================ FILE: PdTest01/main.m ================================================ // // main.m // PdTest01 // // Created by Richard Lawler on 10/3/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdTest01AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([PdTest01AppDelegate class])); } } ================================================ FILE: PdTest02/Classes/PdTestAppDelegate.h ================================================ // // PdTestAppDelegate.h // PdTest02 // // Created by Richard Lawler on 11/22/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdBase.h" // note AppDelegate supports PdReceiverDelegate protocol @interface PdTestAppDelegate : NSObject @property (nonatomic, strong) UIWindow *window; - (void)setAudioActive:(BOOL)active; @end ================================================ FILE: PdTest02/Classes/PdTestAppDelegate.m ================================================ // // PdTestAppDelegate.m // PdTest02 // // Created by Richard Lawler on 11/22/10. // Updated by Dan Wilcox 2018. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdTestAppDelegate.h" #import "PdTestViewController.h" #import "PdAudioController.h" @interface PdTestAppDelegate() @property (nonatomic, strong) PdAudioController *audioController; - (void) openAndRunTestPatch; @end @implementation PdTestAppDelegate #pragma mark - #pragma mark Application lifecycle extern void lrshift_tilde_setup(void); - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // load our audio controller self.audioController = [[PdAudioController alloc] init]; [self.audioController configureAmbientWithSampleRate:44100 numberChannels:2 mixingEnabled:YES]; // set AppDelegate as PdRecieverDelegate to recieve messages from Libpd [PdBase setDelegate:self]; // initialize extern lrshift~ - note this extern must be statically linked with the app; // externs can not be loaded dynamically on iOS lrshift_tilde_setup(); [self openAndRunTestPatch]; [self.audioController print]; return YES; } - (void)openAndRunTestPatch { // open patch located in app bundle void *x = [PdBase openFile:@"LoopWithExtern.pd" path:[[NSBundle mainBundle] bundlePath]]; [self.audioController setActive:YES]; } // receivePrint delegate method to receive "print" messages from Libpd // for simplicity we are just sending print messages to the debugging console - (void)receivePrint:(NSString *)message { NSLog(@"(pd) %@", message); } - (void)setAudioActive:(BOOL)active { [self.audioController setActive:active]; } @end ================================================ FILE: PdTest02/Classes/PdTestViewController.h ================================================ // // PdTestViewController.h // PdTest02 // // Created by Richard Lawler on 11/22/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface PdTestViewController : UIViewController { IBOutlet UISwitch *outputLeftToggle; IBOutlet UISwitch *outputRightToggle; IBOutlet UISwitch *playToggle; } @property (nonatomic, retain) IBOutlet UISwitch *outputLeftToggle; @property (nonatomic, retain) IBOutlet UISwitch *outputRightToggle; @property (nonatomic, retain) IBOutlet UISwitch *playToggle; - (IBAction) outputLeftChanged; - (IBAction) outputRightChanged; - (IBAction) playStateChanged; @end ================================================ FILE: PdTest02/Classes/PdTestViewController.m ================================================ // // PdTestViewController.m // PdTest02 // // Created by Richard Lawler on 11/22/10. // Updated by Dan Wilcox 2018. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdTestViewController.h" #import "PdTestAppDelegate.h" #import "PdBase.h" @implementation PdTestViewController // outlets @synthesize outputLeftToggle; @synthesize outputRightToggle; @synthesize playToggle; - (void) viewWillAppear:(BOOL)animated { [self playStateChanged]; } - (IBAction)outputLeftChanged { [PdBase sendFloat:(outputLeftToggle.on ? 1. : 0.) toReceiver: @"left" ]; } - (IBAction)outputRightChanged { [PdBase sendFloat:(outputRightToggle.on ? 1. : 0.) toReceiver: @"right" ]; } - (IBAction)playStateChanged { PdTestAppDelegate *appDelegate = (PdTestAppDelegate *) [[UIApplication sharedApplication] delegate]; BOOL active = playToggle.on; [appDelegate setAudioActive:active]; } @end ================================================ FILE: PdTest02/LoopWithExtern.pd ================================================ #N canvas 805 300 665 638 10; #X obj 113 82 loadbang; #X obj 87 512 lrshift~ -1; #X obj 316 506 lrshift~ 2; #X obj 195 568 dac~; #X obj 99 477 *~ 1; #X obj 99 430 *~ 0.2; #X obj 185 445 r left; #X obj 313 468 *~ 1; #X obj 282 429 *~ 0.2; #X obj 393 441 r right; #X obj 114 183 soundfiler; #X msg 115 215 bang; #X obj 252 296 t b; #X obj 115 254 tabplay~ sampleArray; #X msg 113 147 read -resize Banjo_B3.wav sampleArray; #X obj 340 229 table sampleArray; #X obj -35 257 print patch loaded; #X obj 137 488 print left output toggled; #X obj 388 480 print right output toggled; #X connect 0 0 14 0; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 6 0 4 1; #X connect 6 0 17 0; #X connect 7 0 2 0; #X connect 8 0 7 0; #X connect 9 0 7 1; #X connect 9 0 18 0; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 11 0 16 0; #X connect 12 0 13 0; #X connect 13 0 5 0; #X connect 13 0 8 0; #X connect 13 1 12 0; #X connect 14 0 10 0; ================================================ FILE: PdTest02/MainWindow.xib ================================================ ================================================ FILE: PdTest02/PdTest02-Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.1 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UIMainStoryboardFile Storyboard UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown ================================================ FILE: PdTest02/PdTest02.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 1152A477147F6A0D00DCD675 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A476147F6A0D00DCD675 /* AVFoundation.framework */; }; 1152A478147F6C6600DCD675 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A465147F667400DCD675 /* libpd-ios.a */; }; 1D3623260D0F684500981E51 /* PdTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* PdTestAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 28D7ACF80DDB3853001CB0EB /* PdTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* PdTestViewController.m */; }; 3063EF4021088A4B00C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF3F21088A4B00C8A4A2 /* Default-568h@2x.png */; }; 3063EF4421088DA600C8A4A2 /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF4321088DA600C8A4A2 /* Storyboard.storyboard */; }; DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C300D125D15FC008B6389 /* Foundation.framework */; }; DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3011125D160B008B6389 /* UIKit.framework */; }; DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3015125D1614008B6389 /* CoreGraphics.framework */; }; DC3B19C21294789B001C3597 /* Banjo_B3.wav in Resources */ = {isa = PBXBuildFile; fileRef = DC3B19C11294789B001C3597 /* Banjo_B3.wav */; }; DC70C562129B16FB006CC055 /* LoopWithExtern.pd in Resources */ = {isa = PBXBuildFile; fileRef = DC70C561129B16FB006CC055 /* LoopWithExtern.pd */; }; DC70C5FC129B28F8006CC055 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC70C5FB129B28F8006CC055 /* ReadMe.txt */; }; DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */; }; DCD6ACC6128B38B100C61BBE /* lrshift~.c in Sources */ = {isa = PBXBuildFile; fileRef = DCD6ACC5128B38B100C61BBE /* lrshift~.c */; }; DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD724CE125D1A1E000A4BDE /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 1152A464147F667400DCD675 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 1152A474147F6A0800DCD675 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = "libpd-ios"; }; 11A30E551611507F00786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 3063EF3B21088A4800C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF3D21088A4800C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 1152A45D147F667300DCD675 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 1152A476147F6A0D00DCD675 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1D3623240D0F684500981E51 /* PdTestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTestAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* PdTestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdTestAppDelegate.m; sourceTree = ""; }; 1D6058910D05DD3D006BFB54 /* PdTest02.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PdTest02.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28D7ACF60DDB3853001CB0EB /* PdTestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTestViewController.h; sourceTree = ""; }; 28D7ACF70DDB3853001CB0EB /* PdTestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdTestViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 3063EF3F21088A4B00C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 3063EF4321088DA600C8A4A2 /* Storyboard.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Storyboard.storyboard; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* PdTest02_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdTest02_Prefix.pch; sourceTree = ""; }; 8D1107310486CEB800E47090 /* PdTest02-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "PdTest02-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; DC0C300D125D15FC008B6389 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DC0C3011125D160B008B6389 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DC0C3015125D1614008B6389 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DC3B19C11294789B001C3597 /* Banjo_B3.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = Banjo_B3.wav; sourceTree = SOURCE_ROOT; }; DC70C561129B16FB006CC055 /* LoopWithExtern.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LoopWithExtern.pd; sourceTree = ""; }; DC70C5FB129B28F8006CC055 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; DCD6ACC5128B38B100C61BBE /* lrshift~.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "lrshift~.c"; path = "../libpd/pure-data/extra/lrshift~/lrshift~.c"; sourceTree = ""; }; DCD724CE125D1A1E000A4BDE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1152A478147F6C6600DCD675 /* libpd-ios.a in Frameworks */, 1152A477147F6A0D00DCD675 /* AVFoundation.framework in Frameworks */, DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */, DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */, DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */, DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */, DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 1D3623240D0F684500981E51 /* PdTestAppDelegate.h */, 1D3623250D0F684500981E51 /* PdTestAppDelegate.m */, 28D7ACF60DDB3853001CB0EB /* PdTestViewController.h */, 28D7ACF70DDB3853001CB0EB /* PdTestViewController.m */, ); path = Classes; sourceTree = ""; }; 1152A45E147F667300DCD675 /* Products */ = { isa = PBXGroup; children = ( 1152A465147F667400DCD675 /* libpd-ios.a */, 11A30E561611507F00786A6D /* libpd-osx.a */, 3063EF3C21088A4800C8A4A2 /* libpd-ios-multi.a */, 3063EF3E21088A4800C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* PdTest02.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( DC70C5FB129B28F8006CC055 /* ReadMe.txt */, 1152A45D147F667300DCD675 /* libpd.xcodeproj */, DCD6ACBC128B37E500C61BBE /* libpd extra externals */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 32CA4F630368D1EE00C91783 /* PdTest02_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 3063EF3F21088A4B00C8A4A2 /* Default-568h@2x.png */, 3063EF4321088DA600C8A4A2 /* Storyboard.storyboard */, DC70C561129B16FB006CC055 /* LoopWithExtern.pd */, DC3B19C11294789B001C3597 /* Banjo_B3.wav */, 8D1107310486CEB800E47090 /* PdTest02-Info.plist */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1152A476147F6A0D00DCD675 /* AVFoundation.framework */, DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */, DC0C300D125D15FC008B6389 /* Foundation.framework */, DC0C3011125D160B008B6389 /* UIKit.framework */, DC0C3015125D1614008B6389 /* CoreGraphics.framework */, DCD724CE125D1A1E000A4BDE /* Foundation.framework */, ); name = Frameworks; sourceTree = ""; }; DCD6ACBC128B37E500C61BBE /* libpd extra externals */ = { isa = PBXGroup; children = ( DCD6ACC5128B38B100C61BBE /* lrshift~.c */, ); name = "libpd extra externals"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* PdTest02 */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PdTest02" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( 1152A475147F6A0800DCD675 /* PBXTargetDependency */, ); name = PdTest02; productName = PdTest01; productReference = 1D6058910D05DD3D006BFB54 /* PdTest02.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PdTest02" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 1152A45E147F667300DCD675 /* Products */; ProjectRef = 1152A45D147F667300DCD675 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* PdTest02 */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 1152A465147F667400DCD675 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 1152A464147F667400DCD675 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 11A30E561611507F00786A6D /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 11A30E551611507F00786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF3C21088A4800C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF3B21088A4800C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF3E21088A4800C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF3D21088A4800C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( DC3B19C21294789B001C3597 /* Banjo_B3.wav in Resources */, DC70C562129B16FB006CC055 /* LoopWithExtern.pd in Resources */, DC70C5FC129B28F8006CC055 /* ReadMe.txt in Resources */, 3063EF4421088DA600C8A4A2 /* Storyboard.storyboard in Resources */, 3063EF4021088A4B00C8A4A2 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* PdTestAppDelegate.m in Sources */, 28D7ACF80DDB3853001CB0EB /* PdTestViewController.m in Sources */, DCD6ACC6128B38B100C61BBE /* lrshift~.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 1152A475147F6A0800DCD675 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libpd-ios"; targetProxy = 1152A474147F6A0800DCD675 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PdTest02_Prefix.pch; INFOPLIST_FILE = "PdTest02-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdTest02; PRODUCT_NAME = PdTest02; SDKROOT = iphoneos; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PdTest02_Prefix.pch; INFOPLIST_FILE = "PdTest02-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PdTest02; PRODUCT_NAME = PdTest02; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ( "../libpd/pure-data/src", ../libpd/objc, ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ( "../libpd/pure-data/src", ../libpd/objc, ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PdTest02" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PdTest02" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: PdTest02/PdTest02_Prefix.pch ================================================ // // Prefix header for all source files of the 'PdTest02' target in the 'PdTest02' project // // PdTest02 // // Created by Richard Lawler on 11/22/10. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef __OBJC__ #import #import #endif ================================================ FILE: PdTest02/PdTestViewController.xib ================================================ ================================================ FILE: PdTest02/ReadMe.txt ================================================ PdTest02 demonstrates the use of Libpd in a Universal iPad/iPhone app. *** Note: These docs are out of date, from an early version of libpd's obj-c layer. Please visit the following wiki for updated info: https://github.com/libpd/pd-for-ios/wiki/ios ------------------------------------------------------ Version 1.0: PdTest02 demonstrates - Loading the Pd patch "LoopWithExtern.pd", note LoopWithExtern.pd loads a sample file "Banjo_B3.wav", - Use of a compiled and linked-in Pd external lrshift~.c, - Use of simple iOS user interface elements to communicate with Libpd, - Sending messages to Pd objects using the PdBase class. Note: PdTest02 loads LoopWithExtern.pd directly from the app bundle. The sample file Banjo_B3.wav must also be located in the app bundle. Be aware that on iOS the app bundle is read-only. The Libpd source and documentation is available at https://github.com/libpd/libpd The iOS sample project is currently set up to use the latest iOS SDK. But this feature only works automatically with iOS SDK 4.2 and later. The project settings use “Latest iOS” as the “Base SDK” and iOS 3.0 as its “iOS Deployment Target”. That means the app will run on any device with iOS 3.0 or later. (These can be changed in the project’s GetInfo panels.) If you are having problems with XCode recognizing the project’s base SDK, you can manually select the SDK in the project’s and build target’s GetInfo panels. Libpd is currently directly compiled into the app project. (See the libpd folder) It may make more sense to compile Libpd as a static library. Then link that into the app project. One thing that is very important to get Libpd to compile is setting the correct compiler DEFINES. These can be done in the project build "Other C Flags" setting. -DPD -DUSEAPI_DUMMY -DHAVE_LIBDL -DHAVE_UNISTD_H Alternatively you could just add #define's to the project precompiled header file. e.g. PdTest01_Prefix.pch The PdAudio and PdBase classes provide the Objective C glue to Libpd. PdAudio initializes the iOS Audio Session. A PdAudio object needs to created by your app. e.g. pdAudio = [[PdAudio alloc] initWithSampleRate:44100.0 andTicksPerBuffer:64 andNumberOfInputChannels:0 andNumberOfOutputChannels:2 andAudioSessionCategory:kAudioSessionCategory_AmbientSound]; PdBase provides an interface to Libpd through + class methods. These methods are analogous the Libpd Java API http://gitorious.org/Pdlib/pages/Libpd PdBase shouldn't be explicitly instantiated as an object. Just make sure you add the class to your app project by adding the source files. Then call the class methods like C functions. e.g. [PdBase openPatch: documentsPatchFilePath]; [PdBase computeAudio:YES]; You then you also need to play [pdAudio play]; ----------------------------------------------- Version 1.1: Uses new PdAudio init method specifying AmbientAudio Audio Session Category to support older iDevices. (Note the use of AmbientAudio will prevent Libpd from recording or using the microphone input, but this sample does not use audio input nor the microphone.) Currently Libpd exhibits problems when using the RecordAndPlay Audio Session type on older iDevices running armv6 processors. PdTestAppDelegate supports PdReceiverDelegate protocol defined in PdBase.h. This allows the AppDelegate to receive messages from Libpd as demonstrated by the -receivePrint method. Compiles with new Libpd s_libpdmidi.c interface. Note: there is not yet support for these MIDI hooks through a delegate protocol as there is for the other hooks through PdReceiverDelegate. ----------------------------------------------- Tested systems: - iPad (iOS 4.2.1) - iPhone 3GS (iOS 4.0) - iPod touch 2nd gen (iOS 4.1) - iPod touch 1st gen (iOS 3.0) - iPhone EDGE (iOS 3.0) ----------------------------------------------- Known problems: - Audio playback problems with iOS SDK Simulator - There are reports of audio playback problems with the iPhone 3G running iOS 4.x --------------- License ------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Banjo_B3.wav by Richard Lawler is licensed under a Creative Commons Attribution 3.0 Unported License. ================================================ FILE: PdTest02/Storyboard.storyboard ================================================ ================================================ FILE: PdTest02/main.m ================================================ // // main.m // PdTest02 // // Created by Richard Lawler on 11/22/10. // Updated by Dan Wilcox 2018. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdTestAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(PdTestAppDelegate.class)); } } ================================================ FILE: PolyPatch/Classes/PatchTableViewCell.h ================================================ // // PatchTableViewCell.h // PolyPatch // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface PatchTableViewCell : UITableViewCell @property (nonatomic, assign) int dollarZero; - (id)initWithDollarZeroArg:(int)dollarZero reuseIdentifier:(NSString *)reuseIdentifier; @end ================================================ FILE: PolyPatch/Classes/PatchTableViewCell.m ================================================ // // PatchTableViewCell.m // PolyPatch // // Created by Richard Eakin on 21/02/11. /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PatchTableViewCell.h" #import "PdBase.h" @interface PatchTableViewCell () @property (nonatomic, retain) UISlider *pitchSlider; - (void)pitchSliderValueChanged:(UISlider *)sender; @end @implementation PatchTableViewCell @synthesize dollarZero = dollarZero_; @synthesize pitchSlider = pitchSlider_; - (id)initWithDollarZeroArg:(int)dollarZero reuseIdentifier:(NSString *)reuseIdentifier { if (self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier]) { self.dollarZero = dollarZero; self.backgroundColor = [UIColor brownColor]; self.selectionStyle = UITableViewCellSelectionStyleNone; self.pitchSlider = [[UISlider alloc] init]; self.pitchSlider.minimumValue = 0; self.pitchSlider.maximumValue = 30; self.pitchSlider.continuous = YES; [self.pitchSlider addTarget:self action:@selector(pitchSliderValueChanged:) forControlEvents:UIControlEventValueChanged]; self.pitchSlider.value = 5; [self pitchSliderValueChanged:self.pitchSlider]; [self addSubview:self.pitchSlider]; } return self; } - (void) layoutSubviews { [super layoutSubviews]; self.pitchSlider.frame = CGRectMake(self.bounds.size.width * 0.6, self.bounds.size.height * 0.3, self.bounds.size.width * 0.3, self.bounds.size.height * 0.5); } // Here we send the pitch value to only the patch specified by the $0 arg associated with this table cell - (void)pitchSliderValueChanged:(UISlider *)sender { [PdBase sendFloat:sender.value toReceiver:[NSString stringWithFormat:@"%d-pitch", self.dollarZero]]; } @end ================================================ FILE: PolyPatch/Classes/PolyPatchAppDelegate.h ================================================ // // PolyPatchAppDelegate.h // PolyPatch // // Created by Richard Eakin on 01/23/11. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdBase.h" @class PolyPatchViewController; @interface PolyPatchAppDelegate : NSObject @property (nonatomic, retain) UIWindow *window; @end ================================================ FILE: PolyPatch/Classes/PolyPatchAppDelegate.m ================================================ // // PolyPatchAppDelegate.m // PolyPatch // // Created by Richard Eakin on 01/23/11. /** * This software is copyrighted by Richard Lawler. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PolyPatchAppDelegate.h" #import "PolyPatchViewController.h" #import "PdAudioController.h" @interface PolyPatchAppDelegate () @property (nonatomic, retain) PdAudioController *audioController; - (void)initAudio; @end @implementation PolyPatchAppDelegate @synthesize window = window_; @synthesize audioController = audioController_; #pragma mark - #pragma mark Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [PdBase setDelegate:self]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.rootViewController = [[PolyPatchViewController alloc] init]; [self.window makeKeyAndVisible]; [self initAudio]; return YES; } - (void)receivePrint:(NSString *)message { NSLog(@"%s %@", __PRETTY_FUNCTION__, message); } #pragma mark - Private - (void)initAudio { self.audioController = [[PdAudioController alloc] init]; PdAudioStatus status = [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:YES mixingEnabled:NO]; if (status == PdAudioError) { NSLog(@"Error in PdAudioController!"); } else if (status == PdAudioPropertyChanged) { NSLog(@"Audio properties changed."); } [self.audioController setActive:YES]; [self.audioController print]; } @end ================================================ FILE: PolyPatch/Classes/PolyPatchViewController.h ================================================ // // PolyPatchViewController.h // PolyPatch // // Created by Richard Eakin on 01/23/11. /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface PolyPatchViewController : UIViewController @end ================================================ FILE: PolyPatch/Classes/PolyPatchViewController.m ================================================ // // PolyPatchViewController.m // PolyPatch // // Created by Richard Eakin on 01/23/11. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PolyPatchViewController.h" #import "PatchTableViewCell.h" #import "PdBase.h" #import "PdFile.h" #import //NSString *const kTestPatchName = @"test.pd"; // each patch will just print out the $0 arg every second NSString *const kTestPatchName = @"test2.pd"; // audio blurbs with pitch control //NSString *const kTestPatchName = @"synctest.pd"; // Patch from Brett Park that was crashing libpd because of sync issues @interface PolyPatchViewController () @property (nonatomic, retain) NSMutableArray *patches; @property (nonatomic, retain) UIButton *openButton; @property (nonatomic, retain) UITableView *tableView; - (void)openButtonPressed:(id)button; - (void)testOpeningMany; @end @implementation PolyPatchViewController @synthesize openButton = openButton_; @synthesize tableView = tableView_; @synthesize patches = patches_; #pragma mark - #pragma mark View Life Cycle // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { [super loadView]; self.view.backgroundColor = [UIColor blackColor]; self.patches = [NSMutableArray array]; UIButton *openButton = [UIButton buttonWithType:UIButtonTypeCustom]; openButton.backgroundColor = [UIColor blueColor]; openButton.autoresizingMask = UIViewAutoresizingFlexibleWidth; openButton.layer.cornerRadius = 5.0; openButton.layer.borderColor = [[UIColor purpleColor] CGColor]; openButton.layer.borderWidth = 1.0; [openButton setTitle:@"Open New" forState:UIControlStateNormal]; [openButton addTarget:self action:@selector(openButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:openButton]; self.openButton = openButton; self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.tableView.editing = YES; self.tableView.dataSource = self; self.tableView.delegate = self; [self.view addSubview:self.tableView]; //[self testOpeningMany]; // uncomment to test syncing issues with synctest.pd } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.openButton.frame = CGRectMake(00.0, 10.0, self.view.bounds.size.width - 0.0, 40.0); self.tableView.backgroundColor = [UIColor colorWithRed:0.2 green:0.7 blue:0.3 alpha:1.0]; self.tableView.frame = CGRectMake(0.0, 55.0, self.view.bounds.size.width, self.view.bounds.size.height - 60.0); } #pragma mark - #pragma mark UITableViewDelegate - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; } - (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath { return NO; } #pragma mark - #pragma mark UITableViewDataSource - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *const kCellID = @"cell"; PdFile *patch = [self.patches objectAtIndex:indexPath.row]; PatchTableViewCell *cell = (PatchTableViewCell *)[tableView dequeueReusableCellWithIdentifier:kCellID]; if (!cell) { cell = [[PatchTableViewCell alloc] initWithDollarZeroArg:[patch dollarZero] reuseIdentifier:kCellID]; } cell.textLabel.text = [NSString stringWithFormat:@"%@ - %d", kTestPatchName, cell.dollarZero]; return cell; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [self.patches count]; } - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { RLog(@"closing patch with dollar zero: %d", [[self.patches objectAtIndex:indexPath.row] dollarZero]); PdFile *patch = [self.patches objectAtIndex:indexPath.row]; [self.patches removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationBottom]; } } #pragma mark - #pragma mark Action Handlers - (void) openButtonPressed:(id)button { RLog(@"opening: %@", kTestPatchName); NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; PdFile *patch = [PdFile openFileNamed:kTestPatchName path:bundlePath]; if (patch) { RLog(@"opened patch with $0 = %d", [patch dollarZero]); [self.patches addObject:patch]; [self.tableView reloadData]; } else { RLog(@"error: couldn't open patch"); } } #pragma mark - #pragma mark Testing // opening many patches on the fly - (void)testOpeningMany { self.patches = [NSMutableArray array]; NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; int numPatches = 20; for (int i = 0; i < numPatches; i++) { PdFile *patch = [PdFile openFileNamed:kTestPatchName path:bundlePath]; if (patch) { RLog(@"opened patch with $0 = %d, iteration %d", [patch dollarZero], i); [self.patches addObject:patch]; } else { RLog(@"error: couldn't open patch, iteration %d", i); } } RLog(@"reloading table"); [self.tableView reloadData]; } @end ================================================ FILE: PolyPatch/PolyPatch-Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UIStatusBarHidden UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: PolyPatch/PolyPatch.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 0E8C8EBB131221E0000B9D7A /* PatchTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E8C8EBA131221E0000B9D7A /* PatchTableViewCell.m */; }; 0E8C8F191312306E000B9D7A /* test2.pd in Resources */ = {isa = PBXBuildFile; fileRef = 0E8C8F181312306E000B9D7A /* test2.pd */; }; 0ED51349132BBE6500970D18 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0ED512FD132BB71700970D18 /* libpd-ios.a */; }; 1152A396147D362B00DCD675 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A395147D362B00DCD675 /* AVFoundation.framework */; }; 11C6079F137D0A6C006D7F8B /* synctest.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11C6079E137D0A6C006D7F8B /* synctest.pd */; }; 1D3623260D0F684500981E51 /* PolyPatchAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* PolyPatchAppDelegate.m */; }; 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 28D7ACF80DDB3853001CB0EB /* PolyPatchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* PolyPatchViewController.m */; }; 3063EF8B21091C8500C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF8A21091C8500C8A4A2 /* Default-568h@2x.png */; }; DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C300D125D15FC008B6389 /* Foundation.framework */; }; DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3011125D160B008B6389 /* UIKit.framework */; }; DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3015125D1614008B6389 /* CoreGraphics.framework */; }; DC35155112676B75004825FB /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = DC35155012676B75004825FB /* ReadMe.txt */; }; DC609326125BBEED00F8509D /* test.pd in Resources */ = {isa = PBXBuildFile; fileRef = DC609325125BBEED00F8509D /* test.pd */; }; DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 0ED512FC132BB71700970D18 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = libpd; }; 0ED51321132BBCAF00970D18 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = libpd; }; 11A30E73161153F800786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 3063EF8621091B7400C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF8821091B7400C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = SOURCE_ROOT; }; 0E334CDB12EEF0BE001C571D /* RCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCommon.h; sourceTree = ""; }; 0E8C8EB9131221E0000B9D7A /* PatchTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PatchTableViewCell.h; sourceTree = ""; }; 0E8C8EBA131221E0000B9D7A /* PatchTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PatchTableViewCell.m; sourceTree = ""; }; 0E8C8F181312306E000B9D7A /* test2.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test2.pd; path = Resources/test2.pd; sourceTree = ""; }; 1152A395147D362B00DCD675 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 11C6079E137D0A6C006D7F8B /* synctest.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = synctest.pd; path = Resources/synctest.pd; sourceTree = ""; }; 1D3623240D0F684500981E51 /* PolyPatchAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyPatchAppDelegate.h; sourceTree = ""; }; 1D3623250D0F684500981E51 /* PolyPatchAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PolyPatchAppDelegate.m; sourceTree = ""; }; 1D6058910D05DD3D006BFB54 /* PolyPatch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PolyPatch.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28D7ACF60DDB3853001CB0EB /* PolyPatchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyPatchViewController.h; sourceTree = ""; }; 28D7ACF70DDB3853001CB0EB /* PolyPatchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PolyPatchViewController.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 3063EF8A21091C8500C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* PolyPatch_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyPatch_Prefix.pch; sourceTree = ""; }; 8D1107310486CEB800E47090 /* PolyPatch-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "PolyPatch-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; DC0C300D125D15FC008B6389 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DC0C3011125D160B008B6389 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DC0C3015125D1614008B6389 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DC35155012676B75004825FB /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = ""; }; DC609325125BBEED00F8509D /* test.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test.pd; path = Resources/test.pd; sourceTree = ""; }; DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1152A396147D362B00DCD675 /* AVFoundation.framework in Frameworks */, DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */, DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */, DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */, DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */, 0ED51349132BBE6500970D18 /* libpd-ios.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( 1D3623240D0F684500981E51 /* PolyPatchAppDelegate.h */, 1D3623250D0F684500981E51 /* PolyPatchAppDelegate.m */, 28D7ACF60DDB3853001CB0EB /* PolyPatchViewController.h */, 28D7ACF70DDB3853001CB0EB /* PolyPatchViewController.m */, 0E8C8EB9131221E0000B9D7A /* PatchTableViewCell.h */, 0E8C8EBA131221E0000B9D7A /* PatchTableViewCell.m */, ); path = Classes; sourceTree = ""; }; 0ED512F9132BB71700970D18 /* Products */ = { isa = PBXGroup; children = ( 0ED512FD132BB71700970D18 /* libpd-ios.a */, 11A30E74161153F800786A6D /* libpd-osx.a */, 3063EF8721091B7400C8A4A2 /* libpd-ios-multi.a */, 3063EF8921091B7400C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* PolyPatch.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 3063EF8A21091C8500C8A4A2 /* Default-568h@2x.png */, 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */, DC35155012676B75004825FB /* ReadMe.txt */, 080E96DDFE201D6D7F000001 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 32CA4F630368D1EE00C91783 /* PolyPatch_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.m */, 0E334CDB12EEF0BE001C571D /* RCommon.h */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 11C6079E137D0A6C006D7F8B /* synctest.pd */, 0E8C8F181312306E000B9D7A /* test2.pd */, DC609325125BBEED00F8509D /* test.pd */, 8D1107310486CEB800E47090 /* PolyPatch-Info.plist */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1152A395147D362B00DCD675 /* AVFoundation.framework */, DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */, DC0C300D125D15FC008B6389 /* Foundation.framework */, DC0C3011125D160B008B6389 /* UIKit.framework */, DC0C3015125D1614008B6389 /* CoreGraphics.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* PolyPatch */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PolyPatch" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( 0ED51322132BBCAF00970D18 /* PBXTargetDependency */, ); name = PolyPatch; productName = PolyPatch; productReference = 1D6058910D05DD3D006BFB54 /* PolyPatch.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PolyPatch" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 0ED512F9132BB71700970D18 /* Products */; ProjectRef = 0E0EE92E12EC26C6004BA33D /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* PolyPatch */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 0ED512FD132BB71700970D18 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 0ED512FC132BB71700970D18 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 11A30E74161153F800786A6D /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 11A30E73161153F800786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF8721091B7400C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF8621091B7400C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF8921091B7400C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF8821091B7400C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( DC609326125BBEED00F8509D /* test.pd in Resources */, DC35155112676B75004825FB /* ReadMe.txt in Resources */, 0E8C8F191312306E000B9D7A /* test2.pd in Resources */, 3063EF8B21091C8500C8A4A2 /* Default-568h@2x.png in Resources */, 11C6079F137D0A6C006D7F8B /* synctest.pd in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 1D3623260D0F684500981E51 /* PolyPatchAppDelegate.m in Sources */, 28D7ACF80DDB3853001CB0EB /* PolyPatchViewController.m in Sources */, 0E8C8EBB131221E0000B9D7A /* PatchTableViewCell.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 0ED51322132BBCAF00970D18 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = libpd; targetProxy = 0ED51321132BBCAF00970D18 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PolyPatch_Prefix.pch; GCC_THUMB_SUPPORT = NO; HEADER_SEARCH_PATHS = ../libpd/objc; INFOPLIST_FILE = "PolyPatch-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PolyPatch; PRODUCT_NAME = PolyPatch; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = PolyPatch_Prefix.pch; GCC_THUMB_SUPPORT = NO; HEADER_SEARCH_PATHS = ../libpd/objc; INFOPLIST_FILE = "PolyPatch-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.PolyPatch; PRODUCT_NAME = PolyPatch; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DR_DEBUG"; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "PolyPatch" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "PolyPatch" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: PolyPatch/PolyPatch_Prefix.pch ================================================ // // Prefix header for all source files of the 'PolyPatch' target in the 'PolyPatch' project // #ifdef __OBJC__ #import #import #import "RCommon.h" #endif ================================================ FILE: PolyPatch/RCommon.h ================================================ #if defined(R_DEBUG) #define RLog(nslog_string, ...) printf("%s\t", __PRETTY_FUNCTION__); printf("%s", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); printf("\n"); #else #define RLog(nslog_string, ...) #endif ================================================ FILE: PolyPatch/ReadMe.txt ================================================ PolyPatch iOS app This is a sample app that demonstrates opening and maintaining many instances of the same pd patch with the PdFile class. The main view controller (PolyPatchViewController) keeps a mutable array to hold the PdFile objects, which each directly correspond to a cell in the tableview. While the patch is open, each PdFile object contains the '$0' arg known in pd land as a unique identifier - this value is useful for controlling which patches receive a specific message by sending in a form similar to '$0-pitch' (see PatchTableViewCell). When a PdFile object is removed, the patch is automatically closed and pd frees the memory information for that patch. The Libpd source and documentation is available at https://github.com/libpd/libpd --------------- License ------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Richard Eakin and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: PolyPatch/Resources/synctest.pd ================================================ #N canvas 325 128 593 583 10; #X floatatom 48 226 5 0 0 1 notenumber - -; #X obj 48 248 mtof; #X text 190 230 first inlet for pitch (in hertz); #X text 189 299 |; #X text 189 290 |; #X text 189 280 |; #X text 189 271 |; #X text 238 276 control/modulation inputs; #X obj 408 278 bng 15 250 50 0 readme-mod reiuweyuiyttytytyty readme-modulation 17 7 0 14 -261682 -1 -258113; #X text 245 307 v; #X text 245 304 |; #X text 245 294 |; #X text 300 307 v; #X text 300 304 |; #X text 300 294 |; #X text 361 307 v; #X text 361 304 |; #X text 361 294 |; #X floatatom 48 273 5 0 0 1 hertz - -; #X text 189 262 |; #X text 189 252 |; #X text 189 243 |; #X msg 46 204 40; #X obj 46 184 loadbang; #X obj 185 534 dac~; #X obj 190 480 *~; #X msg 47 114 1; #X msg 78 113 0; #X obj 77 92 delay 200; #X obj 48 65 t b b; #X obj 45 41 metro 400; #X obj 45 20 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X obj 46 148 s \$0-note-on-off; #X obj 281 437 r \$0-note-on-off; #X text 189 77 Synth waveforms produce basic waveforms which can be added together and shaped with envelopes \, filters and other effects. ; #X msg 37 475 1; #X msg 68 474 0; #X obj 36 509 s \$0-note-on-off; #X obj 19 442 bang; #X obj 67 439 bang; #X obj 186 15 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 284 16 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 28 386 r \$0-noteOn; #X obj 67 415 r \$0-noteOff; #X obj 27 328 r \$0-midiNote; #X obj 194 53 s \$0-noteOn; #X obj 281 52 s \$0-noteOff; #N canvas 0 22 1105 629 eee-adsr~ 0; #X obj 44 176 f; #X obj 193 619 outlet~; #X obj 246 274 pack 0 0; #X obj 247 253 f; #X obj 178 226 delay; #X obj 264 233 r \$0-sustain; #X obj 205 201 r \$0-attack; #X obj 59 145 r \$0-attack; #X obj 303 253 r \$0-decay; #X obj 178 249 t b b; #X obj 379 320 pack 0 0; #X obj 438 297 r \$0-release; #X msg 169 175 stop; #X obj 376 265 t b b b; #X msg 379 342 \$1 \, 0 \$2; #X obj 83 386 vline~; #X obj 376 295 snapshot~; #X obj 190 554 lop~ 100; #X obj 195 529 line 0 1; #X obj 244 449 r \$0-attack; #X obj 193 487 pack 0 0; #X obj 188 399 r \$0-decay; #X obj 189 422 expr 1000/$f1; #X obj 194 464 f; #X obj 401 120 cnv 15 158 30 empty empty empty 20 12 0 14 -157192 -66577 0; #X obj 402 134 nbx 4 14 1 9999 1 0 \$0-attack \$0-attack-r A. 0 -8 0 10 -262144 -1 -262144 20 256; #X obj 438 134 nbx 4 14 1 9999 1 0 \$0-decay \$0-decay-r D. 0 -8 0 10 -262144 -1 -262144 75 256; #X obj 475 134 nbx 4 14 0.01 1 1 0 \$0-sustain \$0-sustain-r S. 0 -8 0 10 -262144 -1 -262144 0.3 256; #X obj 510 134 nbx 4 14 1 9999 1 0 \$0-release \$0-release-r R. 0 -8 0 10 -262144 -1 -262144 200 256; #X obj 408 24 loadbang; #X obj 408 70 route 1 2 3 4 5; #X obj 124 55 sel 1 0; #X obj 124 5 inlet; #X obj 8 338 t b a; #X msg 284 547 1; #X obj 665 297 r \$0-attack; #X obj 579 320 808_state \$1/attack; #X obj 579 343 s \$0-attack-r; #X obj 676 364 r \$0-sustain; #X obj 582 410 s \$0-sustain-r; #X obj 582 387 808_state \$1/sustain; #X obj 670 444 r \$0-decay; #X obj 587 491 s \$0-decay-r; #X obj 587 466 808_state \$1/decay; #X obj 590 534 808_state \$1/release; #X obj 685 511 r \$0-release; #X obj 590 558 s \$0-release-r; #X msg 410 48 1 20 \, 2 75 \, 3 0.3 \, 4 200; #X obj 337 514 delay; #X obj 368 457 r \$0-release; #X msg 339 547 0; #X obj 309 588 switch~; #X obj 44 93 t b b b b b; #X obj 368 479 + 5; #X msg 257 397 stop; #X msg 43 226 \$2 \, 1 \$1; #X obj 42 205 pack 0 0; #X obj 34 507 snapshot~; #X msg 193 507 50 \, \$1 \$2; #X connect 0 0 56 0; #X connect 2 0 15 0; #X connect 3 0 2 0; #X connect 4 0 9 0; #X connect 5 0 3 1; #X connect 6 0 4 1; #X connect 7 0 0 1; #X connect 8 0 2 1; #X connect 9 0 3 0; #X connect 10 0 14 0; #X connect 11 0 10 1; #X connect 12 0 4 0; #X connect 13 0 16 0; #X connect 13 1 12 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 15 0 17 0; #X connect 16 0 10 0; #X connect 17 0 1 0; #X connect 17 0 57 0; #X connect 18 0 17 1; #X connect 19 0 20 1; #X connect 20 0 58 0; #X connect 21 0 22 0; #X connect 22 0 23 1; #X connect 23 0 20 0; #X connect 29 0 47 0; #X connect 30 0 25 0; #X connect 30 1 26 0; #X connect 30 2 27 0; #X connect 30 3 28 0; #X connect 31 0 52 0; #X connect 31 1 13 0; #X connect 31 1 48 0; #X connect 32 0 31 0; #X connect 33 0 34 0; #X connect 33 1 15 0; #X connect 34 0 51 0; #X connect 35 0 36 1; #X connect 36 0 37 0; #X connect 38 0 40 1; #X connect 40 0 39 0; #X connect 41 0 43 1; #X connect 43 0 42 0; #X connect 44 0 46 0; #X connect 45 0 44 1; #X connect 47 0 30 0; #X connect 48 0 50 0; #X connect 49 0 53 0; #X connect 52 0 0 0; #X connect 52 1 4 0; #X connect 52 2 57 0; #X connect 52 3 23 0; #X connect 52 4 54 0; #X connect 52 4 12 0; #X connect 53 0 48 1; #X connect 54 0 48 0; #X connect 55 0 33 0; #X connect 56 0 55 0; #X connect 57 0 56 1; #X connect 58 0 18 0; #X restore 281 464 pd eee-adsr~; #N canvas 0 22 497 363 syn-cz10 0; #X obj 17 114 outlet~; #X obj 602 207 loadbang; #X obj 126 131 hsl 60 13 0 1 0 0 \$0-a \$0-ra phase -2 -7 0 10 -261278 -1 -355 1770 1; #X obj 126 158 hsl 60 13 0 1 0 0 \$0-c \$0-rc wave1 -2 -7 0 10 -261278 -1 -355 3540 1; #X obj 213 131 hsl 60 13 0 1 0 0 \$0-b \$0-rb index -2 -7 0 10 -261278 -1 -355 0 1; #X obj 213 158 hsl 60 13 0 1 0 0 \$0-d \$0-rd wave2 -2 -7 0 10 -261278 -1 -355 1180 1; #X obj 126 185 hsl 60 13 0 1 0 0 \$0-e \$0-re wavemix -2 -7 0 10 -261278 -1 -355 2944 1; #X obj 213 185 hsl 60 13 0 1 0 0 \$0-f \$0-rf gain -2 -7 0 10 -261278 -1 -355 2944 1; #X obj 106 131 cnv 12 15 13 empty empty 0 1 6 0 12 -33289 -262144 0 ; #X obj 106 158 cnv 12 15 13 empty empty 2 1 6 0 12 -33289 -262144 0 ; #X obj 106 185 cnv 12 15 13 empty empty 4 1 6 0 12 -33289 -262144 0 ; #X obj 193 131 cnv 12 15 13 empty empty 1 1 6 0 12 -33289 -262144 0 ; #X obj 193 158 cnv 12 15 13 empty empty 3 1 6 0 12 -33289 -262144 0 ; #X obj 193 185 cnv 12 15 13 empty empty 5 1 6 0 12 -33289 -262144 0 ; #N canvas 0 22 778 610 rgb 0; #X obj 296 207 * 256; #X obj 344 180 * 256; #X obj 346 201 * 256; #X obj 312 270 +; #X obj 298 228 t b f; #X obj 312 293 +; #X obj 346 223 t b f; #X obj 252 186 int; #X msg 263 68 0; #X obj 252 163 * -1; #X obj 296 162 * -1; #X obj 343 158 * -1; #X obj 103 123 vsl 10 40 1 255 0 0 ertteetyeyterttretretrrtrtrtrtrt hhghghghghghghgggggh empty 0 -8 0 10 -4160 -262144 -1 0 0; #X obj 115 123 vsl 10 40 1 255 0 0 ertteetyeyterttretretrrtrtrtrtrt hhghghghghghghgggggh empty 0 -8 0 10 -4034 -262144 -1 0 0; #X obj 127 123 vsl 10 40 1 255 0 0 ertteetyeyterttretretrrtrtrtrtrt hhghghghghghghgggggh empty 0 -8 0 10 -258113 -262144 -1 0 0; #X obj 252 144 int; #X obj 293 142 int; #X obj 342 138 int; #N canvas 0 22 478 328 list-enumerate 0; #X obj 107 63 t a b; #N canvas 473 338 454 304 count 0; #X obj 131 154 f 0; #X obj 156 153 + 1; #X msg 147 133 0; #X obj 131 183 outlet; #X obj 131 59 inlet; #X obj 131 96 b; #X obj 178 61 inlet; #X obj 178 98 b; #X connect 0 0 1 0; #X connect 0 0 3 0; #X connect 1 0 0 1; #X connect 2 0 0 1; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 186 155 pd count; #X obj 107 113 t a b; #X obj 107 33 inlet; #X obj 107 181 list prepend; #X obj 126 264 outlet; #X obj 184 264 outlet; #N canvas 0 22 537 411 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 110 88 pd drip; #X obj 68 155 list prepend color; #X msg 69 135 \$1 -1 28; #X connect 0 0 7 0; #X connect 0 1 1 1; #X connect 1 0 4 1; #X connect 2 0 9 0; #X connect 2 1 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 7 0 2 0; #X connect 7 1 6 0; #X connect 8 0 4 0; #X connect 9 0 8 0; #X restore 294 389 pd list-enumerate; #X obj 299 419 s \$0-controls; #X msg 306 356 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1 \$1; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 2 0 6 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 5 0 20 0; #X connect 6 0 3 0; #X connect 6 1 5 1; #X connect 7 0 3 0; #X connect 8 0 12 0; #X connect 8 0 13 0; #X connect 8 0 14 0; #X connect 9 0 7 0; #X connect 10 0 0 0; #X connect 11 0 1 0; #X connect 12 0 15 0; #X connect 13 0 16 0; #X connect 14 0 17 0; #X connect 15 0 9 0; #X connect 16 0 10 0; #X connect 17 0 11 0; #X connect 18 0 19 0; #X connect 20 0 18 0; #X coords 0 -1 1 1 40 70 1 100 100; #X restore 156 228 pd rgb; #X obj 658 6 inlet modulation-add; #X obj 786 6 inlet modulation-multiply; #X obj 480 8 r \$0-values; #X msg 286 158 76; #X msg 288 129 50; #X msg 288 187 102; #X obj 659 26 list prepend add; #X obj 787 27 list prepend mul; #X text 110 29 outlet audio~; #X obj 369 13 inlet controls; #X obj 368 47 s \$0-controls; #N canvas 47 74 1068 587 modulate.oOo..oOo..oOo.. 0; #X obj 101 271 +; #X obj 101 250 t b f; #X obj 82 82 route 0 1 2 3 4 5 6 7; #X obj 244 216 route 0 1 2 3 4 5 6 7; #X obj 138 271 +; #X obj 138 250 t b f; #X obj 175 271 +; #X obj 175 250 t b f; #X obj 212 271 +; #X obj 212 250 t b f; #X obj 248 271 +; #X obj 248 250 t b f; #X obj 286 271 +; #X obj 286 250 t b f; #X obj 323 271 +; #X obj 323 250 t b f; #X obj 360 271 +; #X obj 360 250 t b f; #X obj 61 8 inlet; #X obj 99 490 outlet; #X obj 155 486 outlet; #X obj 208 489 outlet; #X obj 264 489 outlet; #X obj 318 486 outlet; #X obj 370 486 outlet; #X obj 425 485 outlet; #X obj 492 484 outlet; #X obj 78 409 clip 0 1; #X obj 132 411 clip 0 1; #X obj 186 412 clip 0 1; #X obj 240 414 clip 0 1; #X obj 294 416 clip 0 1; #X obj 348 418 clip 0 1; #X obj 402 419 clip 0 1; #X obj 456 421 clip 0 1; #X obj 418 177 route add mul; #X obj 117 332 t b f; #X obj 156 335 t b f; #X obj 193 335 t b f; #X obj 230 335 t b f; #X obj 266 335 t b f; #X obj 304 335 t b f; #X obj 341 335 t b f; #X obj 378 335 t b f; #X obj 118 356 * 1; #X obj 156 356 * 1; #X obj 193 356 * 1; #X obj 231 355 * 1; #X obj 266 356 * 1; #X obj 304 356 * 1; #X obj 341 356 * 1; #X obj 378 356 * 1; #X obj 397 275 route 0 1 2 3 4 5 6 7; #X obj 550 262 +; #X obj 550 241 t b f; #X obj 587 262 +; #X obj 587 241 t b f; #X obj 624 262 +; #X obj 624 241 t b f; #X obj 661 262 +; #X obj 661 241 t b f; #X obj 697 262 +; #X obj 697 241 t b f; #X obj 735 262 +; #X obj 735 241 t b f; #X obj 772 262 +; #X obj 772 241 t b f; #X obj 809 262 +; #X obj 809 241 t b f; #X obj 548 481 outlet; #X obj 604 477 outlet; #X obj 657 480 outlet; #X obj 713 480 outlet; #X obj 767 477 outlet; #X obj 819 477 outlet; #X obj 874 476 outlet; #X obj 941 475 outlet; #X obj 527 400 clip 0 1; #X obj 581 402 clip 0 1; #X obj 635 403 clip 0 1; #X obj 689 405 clip 0 1; #X obj 743 407 clip 0 1; #X obj 797 409 clip 0 1; #X obj 851 410 clip 0 1; #X obj 905 412 clip 0 1; #X obj 867 168 route add mul; #X obj 566 323 t b f; #X obj 605 326 t b f; #X obj 642 326 t b f; #X obj 679 326 t b f; #X obj 715 326 t b f; #X obj 753 326 t b f; #X obj 790 326 t b f; #X obj 827 326 t b f; #X obj 567 347 * 1; #X obj 605 347 * 1; #X obj 642 347 * 1; #X obj 680 346 * 1; #X obj 715 347 * 1; #X obj 753 347 * 1; #X obj 790 347 * 1; #X obj 827 347 * 1; #X obj 693 206 route 8 9 10 11 12 13 14 5; #X obj 846 266 route 8 9 10 11 12 13 14 15; #X msg 79 110 \$1 20; #X msg 92 130 \$1 20; #X msg 120 111 \$1 20; #X msg 133 131 \$1 20; #X msg 161 110 \$1 20; #X msg 174 130 \$1 20; #X msg 202 111 \$1 20; #X msg 215 131 \$1 20; #X obj 92 171 line 0 1; #X obj 109 194 line 0 1; #X obj 149 166 line 0 1; #X obj 166 189 line 0 1; #X obj 207 163 line 0 1; #X obj 224 186 line 0 1; #X obj 264 158 line 0 1; #X obj 281 181 line 0 1; #X msg 501 51 \$1 20; #X msg 514 71 \$1 20; #X msg 542 52 \$1 20; #X msg 555 72 \$1 20; #X msg 583 51 \$1 20; #X msg 596 71 \$1 20; #X msg 624 52 \$1 20; #X msg 637 72 \$1 20; #X obj 512 111 line 0 1; #X obj 571 107 line 0 1; #X obj 588 130 line 0 1; #X obj 629 104 line 0 1; #X obj 646 127 line 0 1; #X obj 686 99 line 0 1; #X obj 703 122 line 0 1; #X obj 504 22 route 8 9 10 11 12 13 14 15; #X obj 530 132 line 0 1; #X obj 845 94 list trim; #X obj 849 72 inlet; #X connect 0 0 44 0; #X connect 1 0 0 0; #X connect 1 1 0 1; #X connect 2 0 104 0; #X connect 2 1 105 0; #X connect 2 2 106 0; #X connect 2 3 107 0; #X connect 2 4 108 0; #X connect 2 5 109 0; #X connect 2 6 110 0; #X connect 2 7 111 0; #X connect 3 0 0 0; #X connect 3 1 4 0; #X connect 3 2 6 0; #X connect 3 3 8 0; #X connect 3 4 10 0; #X connect 3 5 12 0; #X connect 3 6 14 0; #X connect 3 7 16 0; #X connect 4 0 45 0; #X connect 5 0 4 0; #X connect 5 1 4 1; #X connect 6 0 46 0; #X connect 7 0 6 0; #X connect 7 1 6 1; #X connect 8 0 47 0; #X connect 9 0 8 0; #X connect 9 1 8 1; #X connect 10 0 48 0; #X connect 11 0 10 0; #X connect 11 1 10 1; #X connect 12 0 49 0; #X connect 13 0 12 0; #X connect 13 1 12 1; #X connect 14 0 50 0; #X connect 15 0 14 0; #X connect 15 1 14 1; #X connect 16 0 51 0; #X connect 17 0 16 0; #X connect 17 1 16 1; #X connect 18 0 2 0; #X connect 18 0 135 0; #X connect 27 0 19 0; #X connect 28 0 20 0; #X connect 29 0 21 0; #X connect 30 0 22 0; #X connect 31 0 23 0; #X connect 32 0 24 0; #X connect 33 0 25 0; #X connect 34 0 26 0; #X connect 35 0 3 0; #X connect 35 1 52 0; #X connect 36 0 44 0; #X connect 36 1 44 1; #X connect 37 0 45 0; #X connect 37 1 45 1; #X connect 38 0 46 0; #X connect 38 1 46 1; #X connect 39 0 47 0; #X connect 39 1 47 1; #X connect 40 0 48 0; #X connect 40 1 48 1; #X connect 41 0 49 0; #X connect 41 1 49 1; #X connect 42 0 50 0; #X connect 42 1 50 1; #X connect 43 0 51 0; #X connect 43 1 51 1; #X connect 44 0 27 0; #X connect 45 0 28 0; #X connect 46 0 29 0; #X connect 47 0 30 0; #X connect 48 0 31 0; #X connect 49 0 32 0; #X connect 50 0 33 0; #X connect 51 0 34 0; #X connect 52 0 36 0; #X connect 52 1 37 0; #X connect 52 2 38 0; #X connect 52 3 39 0; #X connect 52 4 40 0; #X connect 52 5 41 0; #X connect 52 6 42 0; #X connect 52 7 43 0; #X connect 53 0 94 0; #X connect 54 0 53 0; #X connect 54 1 53 1; #X connect 55 0 95 0; #X connect 56 0 55 0; #X connect 56 1 55 1; #X connect 57 0 96 0; #X connect 58 0 57 0; #X connect 58 1 57 1; #X connect 59 0 97 0; #X connect 60 0 59 0; #X connect 60 1 59 1; #X connect 61 0 98 0; #X connect 62 0 61 0; #X connect 62 1 61 1; #X connect 63 0 99 0; #X connect 64 0 63 0; #X connect 64 1 63 1; #X connect 65 0 100 0; #X connect 66 0 65 0; #X connect 66 1 65 1; #X connect 67 0 101 0; #X connect 68 0 67 0; #X connect 68 1 67 1; #X connect 77 0 69 0; #X connect 78 0 70 0; #X connect 79 0 71 0; #X connect 80 0 72 0; #X connect 81 0 73 0; #X connect 82 0 74 0; #X connect 83 0 75 0; #X connect 84 0 76 0; #X connect 85 0 102 0; #X connect 85 1 103 0; #X connect 86 0 94 0; #X connect 86 1 94 1; #X connect 87 0 95 0; #X connect 87 1 95 1; #X connect 88 0 96 0; #X connect 88 1 96 1; #X connect 89 0 97 0; #X connect 89 1 97 1; #X connect 90 0 98 0; #X connect 90 1 98 1; #X connect 91 0 99 0; #X connect 91 1 99 1; #X connect 92 0 100 0; #X connect 92 1 100 1; #X connect 93 0 101 0; #X connect 93 1 101 1; #X connect 94 0 77 0; #X connect 95 0 78 0; #X connect 96 0 79 0; #X connect 97 0 80 0; #X connect 98 0 81 0; #X connect 99 0 82 0; #X connect 100 0 83 0; #X connect 101 0 84 0; #X connect 102 0 53 0; #X connect 102 1 55 0; #X connect 102 2 57 0; #X connect 102 3 59 0; #X connect 102 4 61 0; #X connect 102 5 63 0; #X connect 102 6 65 0; #X connect 102 7 67 0; #X connect 103 0 86 0; #X connect 103 1 87 0; #X connect 103 2 88 0; #X connect 103 3 89 0; #X connect 103 4 90 0; #X connect 103 5 91 0; #X connect 103 6 92 0; #X connect 103 7 93 0; #X connect 104 0 112 0; #X connect 105 0 113 0; #X connect 106 0 114 0; #X connect 107 0 115 0; #X connect 108 0 116 0; #X connect 109 0 117 0; #X connect 110 0 118 0; #X connect 111 0 119 0; #X connect 112 0 1 0; #X connect 113 0 5 0; #X connect 114 0 7 0; #X connect 115 0 9 0; #X connect 116 0 11 0; #X connect 117 0 13 0; #X connect 118 0 15 0; #X connect 119 0 17 0; #X connect 120 0 128 0; #X connect 121 0 136 0; #X connect 122 0 129 0; #X connect 123 0 130 0; #X connect 124 0 131 0; #X connect 125 0 132 0; #X connect 126 0 133 0; #X connect 127 0 134 0; #X connect 128 0 54 0; #X connect 129 0 58 0; #X connect 130 0 60 0; #X connect 131 0 62 0; #X connect 132 0 64 0; #X connect 133 0 66 0; #X connect 134 0 68 0; #X connect 135 0 120 0; #X connect 135 1 121 0; #X connect 135 2 122 0; #X connect 135 3 123 0; #X connect 135 4 124 0; #X connect 135 5 125 0; #X connect 135 6 126 0; #X connect 135 7 127 0; #X connect 136 0 56 0; #X connect 137 0 35 0; #X connect 137 0 85 0; #X connect 138 0 137 0; #X restore 482 68 pd modulate.oOo..oOo..oOo..; #X text 104 14 inlets pitch \, control \, add \, multiply; #X obj 17 29 s \$0-pitch; #X obj 16 6 inlet; #X obj 465 154 s \$0-phase; #X obj 535 153 s \$0-index; #X obj 607 153 s \$0-wave1; #X obj 674 152 s \$0-wave2; #X obj 743 150 s \$0-wavemix; #X obj 823 150 s \$0-gain; #X msg 369 208 phase index wave1 wave2 wavemix gain; #X msg 603 264 0.3 0 0.6 0.2 0.499 0.499; #N canvas 77 22 893 719 cz-1000 0; #X obj 386 136 pow 0.15; #X obj 387 86 line; #X msg 386 66 \$1 50; #X obj 387 44 + 1; #X obj 259 207 wrap~; #X obj 259 184 *~ 4; #X obj 220 538 *~; #X obj 284 483 +~ 0.25; #X obj 284 505 cos~; #X obj 283 463 +~; #X obj 371 300 *~; #X obj 386 211 expr 0.5 / (1 - $f1); #X obj 256 418 *~; #X obj 256 334 *~ -1; #X obj 256 356 +~ 1; #X obj 256 380 *~; #X obj 387 108 / 102; #X obj 371 325 expr~ (1 - $v1) - 1; #X obj 361 373 *~; #X obj 436 401 expr 0.5 / $f1; #X obj 403 279 -~ 1; #X obj 361 393 *~; #X obj 361 416 *~ -1; #X obj 361 437 expr~ 0.5 - $v1; #N canvas 0 22 828 638 waveshaper 0; #X obj 434 111 *~ -1; #X obj 434 136 +~ 1; #X obj 410 197 min~; #X obj 409 225 *~ 2; #X obj 293 310 outlet~; #X obj 300 146 *~ 2; #X obj 300 170 min~ 1; #X obj 402 -146 inlet; #X obj 401 -86 == 1; #X obj 222 -8 *~ 1; #X obj 282 -14 *~ 0; #X obj 337 -14 *~ 0; #X obj 197 -182 inlet~; #X obj 440 -86 == 2; #X obj 362 -88 == 0; #X connect 0 0 1 0; #X connect 1 0 2 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 8 0; #X connect 7 0 13 0; #X connect 7 0 14 0; #X connect 8 0 10 1; #X connect 9 0 4 0; #X connect 10 0 5 0; #X connect 11 0 0 0; #X connect 11 0 2 0; #X connect 12 0 9 0; #X connect 12 0 10 0; #X connect 12 0 11 0; #X connect 13 0 11 1; #X connect 14 0 9 1; #X restore 158 417 pd waveshaper; #N canvas 186 22 841 618 waveshaper 0; #X obj 308 407 outlet~; #X obj 549 -52 inlet; #X obj 267 -41 inlet~; #X obj 549 50 == 4; #N canvas 0 22 667 497 sawtooth 0; #X text 225 81 sawtooth; #X obj 89 113 *~ 1; #X obj 86 2 inlet~; #X obj 240 279 outlet~; #X obj 144 69 inlet; #X obj 86 49 *~ -1; #X obj 152 123 switch~ 0; #X connect 1 0 3 0; #X connect 2 0 5 0; #X connect 4 0 1 1; #X connect 4 0 6 0; #X connect 5 0 1 0; #X restore 57 81 pd sawtooth; #X obj 130 50 == 0; #N canvas 0 22 490 316 square 0; #X obj 86 2 inlet~; #X obj 144 69 inlet; #X text 211 111 square; #X obj 88 113 *~ 0; #X obj 116 239 outlet~; #X obj 136 154 switch~ 0; #X obj 87 42 expr~ $v1>0.5; #X connect 0 0 6 0; #X connect 1 0 3 1; #X connect 1 0 5 0; #X connect 3 0 4 0; #X connect 6 0 3 0; #X restore 161 82 pd square; #X obj 220 50 == 1; #N canvas 0 22 603 438 pulse 0; #X obj 86 2 inlet~; #X obj 209 209 inlet; #X text 205 86 pulse; #X obj 87 59 *~; #X obj 88 81 *~; #X obj 155 252 *~ 0; #X obj 241 331 outlet~; #X obj 195 258 switch~; #X connect 0 0 3 1; #X connect 0 0 3 0; #X connect 1 0 5 1; #X connect 1 0 7 0; #X connect 3 0 4 0; #X connect 3 0 4 1; #X connect 4 0 5 0; #X connect 5 0 6 0; #X restore 269 82 pd pulse; #X obj 344 42 == 2; #N canvas 0 22 611 446 saw-pulse 0; #X obj 86 2 inlet~; #X obj 156 301 outlet~; #X obj 129 157 inlet; #X obj 71 149 cos~; #X obj 71 131 +~ 0.75; #X obj 68 92 *~ 0.5; #X text 127 78 saw-pulse; #X obj 73 188 *~ 0; #X obj 69 112 expr~ if ($v1 > 0.25 \, $v1 \, 0); #X obj 145 200 switch~; #X connect 0 0 5 0; #X connect 2 0 7 1; #X connect 2 0 9 0; #X connect 3 0 7 0; #X connect 4 0 3 0; #X connect 5 0 8 0; #X connect 7 0 1 0; #X connect 8 0 4 0; #X restore 470 79 pd saw-pulse; #X obj 450 39 == 3; #N canvas 0 22 607 442 doublesine 0; #X obj 86 2 inlet~; #X obj 156 301 outlet~; #X obj 209 209 inlet; #X obj 155 252 *~ 0; #X obj 93 89 cos~; #X obj 92 52 expr~ if ($v1 > 0.66666 \, ((1-$v1) * 1.5) - 0.25 \, $v1 * 0.75 + 0.25); #X text 229 116 double sine; #X obj 226 240 switch~; #X connect 0 0 5 0; #X connect 2 0 3 1; #X connect 2 0 7 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X restore 358 84 pd doublesine; #X connect 1 0 5 0; #X connect 1 0 7 0; #X connect 1 0 9 0; #X connect 1 0 3 0; #X connect 1 0 11 0; #X connect 2 0 4 0; #X connect 2 0 6 0; #X connect 2 0 8 0; #X connect 2 0 10 0; #X connect 2 0 12 0; #X connect 3 0 10 1; #X connect 4 0 0 0; #X connect 5 0 4 1; #X connect 6 0 0 0; #X connect 7 0 6 1; #X connect 8 0 0 0; #X connect 9 0 8 1; #X connect 10 0 0 0; #X connect 11 0 12 1; #X connect 12 0 0 0; #X restore 46 416 pd waveshaper; #X obj 387 3 r \$0-ctrl-1; #X obj 547 112 s \$0-ctrl-1; #X obj 282 137 r \$0-ctrl-2; #X obj 406 343 r \$0-z-phase; #X obj 408 162 s \$0-z-phase; #X obj 550 238 s \$0-ctrl-2; #X obj 387 24 / 1.5; #X obj 88 456 *~ 0.5; #X text 656 393 sawtooth; #X text 656 411 square; #X text 657 425 pulse; #X text 658 441 double sine; #X text 656 455 sawpulse; #X obj 554 425 int; #X obj 554 404 * 4.99; #X obj 547 92 * 127; #X obj 547 74 r \$0-phase; #X obj 302 534 r \$0-gain; #N canvas 0 22 466 316 rh_scalelog 0; #X obj 20 155 exp; #X obj 20 107 *; #X obj 20 130 +; #X obj 98 87 log; #X obj 194 84 log; #X obj 123 123 t b f; #X obj 123 145 -; #X obj 20 183 outlet; #X obj 20 19 inlet; #X obj 98 23 inlet; #X obj 194 24 inlet; #X connect 0 0 7 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 2 1; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 6 0; #X connect 5 1 6 1; #X connect 6 0 1 1; #X connect 8 0 1 0; #X connect 9 0 3 0; #X connect 10 0 4 0; #X restore 302 604 pd rh_scalelog; #X msg 349 580 0.1; #X msg 395 580 10; #X obj 222 615 *~; #X obj 554 382 r \$0-wave2; #X obj 550 294 r \$0-wave1; #X obj 551 334 int; #X obj 551 313 * 2.99; #X text 660 303 saw; #X text 660 318 trapezoid; #X text 662 333 triangle; #X obj 550 191 int; #X obj 550 170 * 15.99; #X obj 549 151 r \$0-index; #X obj 134 2 r \$0-pitch; #X obj 222 670 outlet~; #X obj 243 307 r \$0-ctrl-3; #X obj 91 342 r \$0-ctrl-4; #X obj 551 354 s \$0-ctrl-3; #X obj 554 446 s \$0-ctrl-4; #X obj 567 511 r \$0-wavemix; #X obj 657 592 - 1; #X obj 657 614 abs; #X msg 567 536 \$1 50; #X obj 566 556 line; #X obj 655 657 s \$0-w2mix; #X obj 566 656 s \$0-w1mix; #X obj 145 477 r \$0-w1mix; #X obj 555 611 min 0.5; #X obj 656 636 min 0.5; #X obj 257 560 r \$0-w2mix; #X obj 108 502 *~ 0.5; #X obj 220 584 *~ 0.5; #X obj 550 214 + 2; #X obj 225 641 *~ 2; #X obj 406 361 sel 0; #X msg 407 380 0.005; #X obj 349 166 sel 1; #X msg 349 187 0.999; #X obj 151 106 min~ 0.5; #X obj 87 107 max~ 0.5; #X obj 87 132 -~ 0.5; #X obj 87 156 *~ 2; #X obj 151 130 *~ 2; #X obj 127 62 phasor~ -100; #X obj 151 176 *~; #X obj 130 36 * -1; #X obj 166 153 expr~ $v1<1; #X obj 390 252 expr~ $v1>$f2; #X obj 350 554 r \$0-loadbang; #X connect 0 0 30 0; #X connect 0 0 81 0; #X connect 0 0 92 1; #X connect 1 0 16 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 13 0; #X connect 4 0 10 0; #X connect 4 0 92 0; #X connect 5 0 4 0; #X connect 6 0 76 0; #X connect 7 0 8 0; #X connect 8 0 6 1; #X connect 9 0 7 0; #X connect 10 0 17 0; #X connect 11 0 15 1; #X connect 12 0 9 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 12 0; #X connect 16 0 0 0; #X connect 17 0 18 0; #X connect 18 0 21 0; #X connect 19 0 18 1; #X connect 20 0 10 1; #X connect 20 0 21 1; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 23 0 9 0; #X connect 24 0 6 0; #X connect 25 0 33 0; #X connect 26 0 32 0; #X connect 28 0 5 1; #X connect 29 0 79 0; #X connect 32 0 3 0; #X connect 33 0 75 0; #X connect 39 0 63 0; #X connect 40 0 39 0; #X connect 41 0 27 0; #X connect 42 0 41 0; #X connect 43 0 44 0; #X connect 44 0 47 1; #X connect 45 0 44 1; #X connect 46 0 44 2; #X connect 47 0 78 0; #X connect 48 0 40 0; #X connect 49 0 51 0; #X connect 50 0 62 0; #X connect 51 0 50 0; #X connect 55 0 77 0; #X connect 56 0 55 0; #X connect 57 0 56 0; #X connect 58 0 90 0; #X connect 60 0 24 1; #X connect 61 0 25 1; #X connect 64 0 67 0; #X connect 65 0 66 0; #X connect 66 0 73 0; #X connect 67 0 68 0; #X connect 68 0 65 0; #X connect 68 0 72 0; #X connect 71 0 75 1; #X connect 72 0 70 0; #X connect 73 0 69 0; #X connect 74 0 76 1; #X connect 75 0 47 0; #X connect 76 0 47 0; #X connect 77 0 31 0; #X connect 78 0 59 0; #X connect 79 0 80 0; #X connect 79 1 19 0; #X connect 80 0 19 0; #X connect 81 0 82 0; #X connect 81 1 11 0; #X connect 82 0 11 0; #X connect 83 0 87 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 86 0 25 0; #X connect 87 0 89 0; #X connect 87 0 91 0; #X connect 88 0 83 0; #X connect 88 0 84 0; #X connect 89 0 24 0; #X connect 89 0 5 0; #X connect 90 0 88 0; #X connect 91 0 89 1; #X connect 92 0 12 1; #X connect 92 0 20 0; #X connect 93 0 45 0; #X connect 93 0 46 0; #X restore 15 80 pd cz-1000; #N canvas 361 43 833 682 list-functions 0; #N canvas 0 22 462 312 list-enumerate 0; #X obj 107 63 t a b; #N canvas 473 338 454 304 count 0; #X obj 131 154 f 0; #X obj 156 153 + 1; #X msg 147 133 0; #X obj 131 183 outlet; #X obj 131 59 inlet; #X obj 131 96 b; #X obj 178 61 inlet; #X obj 178 98 b; #X connect 0 0 1 0; #X connect 0 0 3 0; #X connect 1 0 0 1; #X connect 2 0 0 1; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 186 155 pd count; #X obj 107 113 t a b; #X obj 107 33 inlet; #X obj 107 181 list prepend; #X obj 107 209 outlet; #X obj 165 209 outlet; #N canvas 0 22 537 411 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 110 88 pd drip; #X obj 76 154 list prepend label; #X connect 0 0 7 0; #X connect 0 1 1 1; #X connect 1 0 4 1; #X connect 2 0 8 0; #X connect 2 1 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 7 0 2 0; #X connect 7 1 6 0; #X connect 8 0 4 0; #X restore 37 184 pd list-enumerate; #X obj 37 230 s \$0-controls; #N canvas 0 22 482 332 list-enumerate 0; #N canvas 473 338 458 308 count 0; #X obj 131 154 f 0; #X obj 156 153 + 1; #X msg 147 133 0; #X obj 131 183 outlet; #X obj 131 59 inlet; #X obj 131 96 b; #X obj 178 61 inlet; #X obj 178 98 b; #X connect 0 0 1 0; #X connect 0 0 3 0; #X connect 1 0 0 1; #X connect 2 0 0 1; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 186 155 pd count; #X obj 107 113 t a b; #X obj 107 33 inlet; #X obj 107 181 list prepend; #X obj 112 253 outlet; #N canvas 0 22 541 415 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 110 88 pd drip; #X obj 107 63 t a b; #X connect 0 0 3 1; #X connect 1 0 3 0; #X connect 1 1 0 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 6 1 0 1; #X restore 149 183 pd list-enumerate; #X obj 190 231 808_state \$1/controls; #N canvas 0 22 498 348 list-enumerate 0; #N canvas 473 338 458 308 count 0; #X obj 131 154 f 0; #X obj 156 153 + 1; #X msg 147 133 0; #X obj 131 183 outlet; #X obj 131 59 inlet; #X obj 131 96 b; #X obj 178 61 inlet; #X obj 178 98 b; #X connect 0 0 1 0; #X connect 0 0 3 0; #X connect 1 0 0 1; #X connect 2 0 0 1; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 186 155 pd count; #X obj 107 113 t a b; #X obj 107 33 inlet; #X obj 107 181 list prepend; #X obj 112 253 outlet; #N canvas 0 22 541 415 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 110 88 pd drip; #X obj 194 215 t a; #X obj 106 209 list prepend; #X obj 107 63 t a b b; #X connect 0 0 3 1; #X connect 1 0 3 0; #X connect 1 1 0 0; #X connect 2 0 8 0; #X connect 3 0 7 0; #X connect 5 0 1 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 7 0 4 0; #X connect 8 0 5 0; #X connect 8 1 0 1; #X connect 8 2 7 1; #X restore 411 149 pd list-enumerate; #X obj 104 251 r \$0-controls; #X obj 272 98 r \$0-values; #N canvas 283 65 551 703 replacelist 0; #X obj 164 224 list; #X obj 327 98 inlet; #X obj 250 98 inlet; #X text 331 72 orig; #X text 256 74 pos; #X text 77 70 list to insert; #X obj 85 94 inlet; #X obj 207 281 list split; #X obj 85 526 list; #X obj 85 598 outlet; #X obj 85 317 list prepend; #X obj 85 120 t a b a b; #X obj 85 430 list prepend 0; #X obj 250 125 t f f; #X obj 207 524 list prepend; #X obj 85 469 route 0 1; #X obj 316 347 f; #X obj 286 282 t a b; #X obj 316 377 > 0; #X obj 122 358 r \$0-init; #X obj 122 377 0; #X obj 300 524 r \$0-init; #X obj 176 317 r \$0-init; #X obj 118 527 r \$0-init; #X obj 159 131 s \$0-init; #X text 47 25 list-replace: Replace the list starting at position POS with a new list \, overwriting the old elements.; #N canvas 0 22 458 308 length 0; #X obj 171 164 + 1; #X obj 92 127 b; #X obj 126 204 f; #X obj 158 138 1; #X obj 142 166 f 1; #X obj 216 168 0; #X obj 136 59 t a b b; #N canvas 0 22 537 411 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 92 104 pd drip; #X obj 137 36 inlet; #X obj 125 238 outlet; #X connect 0 0 4 1; #X connect 1 0 4 0; #X connect 2 0 9 0; #X connect 3 0 4 1; #X connect 4 0 0 0; #X connect 4 0 2 1; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 6 1 3 0; #X connect 6 2 5 0; #X connect 7 0 1 0; #X connect 7 1 2 0; #X connect 8 0 6 0; #X restore 268 216 pd length; #X obj 162 254 list split; #X connect 0 0 27 0; #X connect 1 0 0 1; #X connect 2 0 13 0; #X connect 6 0 11 0; #X connect 7 1 8 1; #X connect 7 1 14 1; #X connect 8 0 9 0; #X connect 10 0 12 0; #X connect 11 0 10 0; #X connect 11 1 0 0; #X connect 11 2 26 0; #X connect 11 3 24 0; #X connect 12 0 15 0; #X connect 13 0 27 1; #X connect 13 1 16 1; #X connect 14 0 9 0; #X connect 15 0 8 0; #X connect 15 1 14 0; #X connect 16 0 18 0; #X connect 17 0 14 1; #X connect 17 0 8 1; #X connect 17 1 16 0; #X connect 18 0 12 1; #X connect 19 0 20 0; #X connect 20 0 12 1; #X connect 21 0 14 1; #X connect 22 0 10 1; #X connect 23 0 8 1; #X connect 26 0 7 1; #X connect 27 0 10 1; #X connect 27 1 7 0; #X connect 27 2 17 0; #X restore 289 199 pd replacelist; #X obj 423 265 t a; #X obj 272 130 swap; #X obj 50 109 inlet; #N canvas 0 22 545 419 drip2 0; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list \, then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X obj 64 206 list split 2; #X connect 0 0 1 0; #X connect 1 0 12 0; #X connect 2 0 0 1; #X connect 8 0 11 0; #X connect 11 0 0 0; #X connect 11 1 1 1; #X connect 12 0 7 0; #X connect 12 1 1 1; #X connect 12 2 2 0; #X connect 12 2 10 0; #X restore 190 285 pd drip2; #X obj 253 24 inlet; #X obj 144 355 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; #X obj 144 381 s \$0-ra; #X obj 156 401 s \$0-rb; #X obj 167 422 s \$0-rc; #X obj 179 442 s \$0-rd; #X obj 194 381 s \$0-re; #X obj 206 401 s \$0-rf; #X obj 217 422 s \$0-rg; #X obj 229 442 s \$0-rh; #X obj 250 383 s \$0-ri; #X obj 262 403 s \$0-rj; #X obj 273 424 s \$0-rk; #X obj 285 444 s \$0-rl; #X obj 299 383 s \$0-rm; #X obj 312 403 s \$0-rn; #X obj 323 424 s \$0-ro; #X obj 335 444 s \$0-rp; #X obj 35 505 r \$0-a; #X msg 35 530 0 \$1; #X obj 78 505 r \$0-b; #X msg 77 529 1 \$1; #X obj 121 505 r \$0-c; #X obj 164 505 r \$0-d; #X msg 121 530 2 \$1; #X msg 163 529 3 \$1; #X obj 208 503 r \$0-e; #X obj 251 503 r \$0-f; #X obj 294 503 r \$0-g; #X obj 337 503 r \$0-h; #X msg 208 528 4 \$1; #X msg 250 526 5 \$1; #X msg 294 527 6 \$1; #X msg 336 527 7 \$1; #X obj 383 503 r \$0-i; #X obj 426 502 r \$0-j; #X obj 468 503 r \$0-k; #X obj 512 503 r \$0-l; #X obj 556 501 r \$0-m; #X obj 599 501 r \$0-o; #X obj 642 501 r \$0-p; #X obj 685 501 r \$0-q; #X msg 383 528 8 \$1; #X msg 425 527 9 \$1; #X msg 469 528 10 \$1; #X msg 511 527 11 \$1; #X msg 556 526 12 \$1; #X msg 598 524 13 \$1; #X msg 641 525 14 \$1; #X msg 684 525 15 \$1; #X obj 683 559 s \$0-values; #X obj 413 202 t a a; #X obj 412 182 list; #X obj 257 47 t a b a; #X obj 294 150 * 2; #X obj 295 170 + 1; #X obj 191 253 t a a; #X connect 0 0 1 0; #X connect 2 0 1 0; #X connect 3 0 68 0; #X connect 4 0 64 1; #X connect 5 0 13 0; #X connect 6 0 9 0; #X connect 7 0 8 0; #X connect 7 0 3 1; #X connect 8 0 7 2; #X connect 9 0 7 0; #X connect 9 1 66 0; #X connect 10 0 0 0; #X connect 11 0 13 0; #X connect 12 0 65 0; #X connect 13 0 14 0; #X connect 13 1 15 0; #X connect 13 2 16 0; #X connect 13 3 17 0; #X connect 13 4 18 0; #X connect 13 5 19 0; #X connect 13 6 20 0; #X connect 13 7 21 0; #X connect 13 8 22 0; #X connect 13 9 23 0; #X connect 13 10 24 0; #X connect 13 11 25 0; #X connect 13 12 26 0; #X connect 13 13 27 0; #X connect 13 14 28 0; #X connect 13 15 29 0; #X connect 30 0 31 0; #X connect 31 0 62 0; #X connect 32 0 33 0; #X connect 33 0 62 0; #X connect 34 0 36 0; #X connect 35 0 37 0; #X connect 36 0 62 0; #X connect 37 0 62 0; #X connect 38 0 42 0; #X connect 39 0 43 0; #X connect 40 0 44 0; #X connect 41 0 45 0; #X connect 42 0 62 0; #X connect 43 0 62 0; #X connect 44 0 62 0; #X connect 45 0 62 0; #X connect 46 0 54 0; #X connect 47 0 55 0; #X connect 48 0 56 0; #X connect 49 0 57 0; #X connect 50 0 58 0; #X connect 51 0 59 0; #X connect 52 0 60 0; #X connect 53 0 61 0; #X connect 54 0 62 0; #X connect 55 0 62 0; #X connect 56 0 62 0; #X connect 57 0 62 0; #X connect 58 0 62 0; #X connect 59 0 62 0; #X connect 60 0 62 0; #X connect 61 0 62 0; #X connect 63 0 7 2; #X connect 63 1 3 1; #X connect 64 0 63 0; #X connect 65 0 2 0; #X connect 65 1 64 0; #X connect 65 2 4 0; #X connect 66 0 67 0; #X connect 67 0 7 1; #X connect 68 0 11 0; #X connect 68 1 7 2; #X restore 488 309 pd list-functions; #X obj 605 230 t b b; #X obj 654 240 s \$0-loadbang; #X connect 1 0 40 0; #X connect 15 0 21 0; #X connect 16 0 22 0; #X connect 17 0 26 0; #X connect 21 0 26 1; #X connect 22 0 26 1; #X connect 24 0 25 0; #X connect 26 0 30 0; #X connect 26 1 31 0; #X connect 26 2 32 0; #X connect 26 3 33 0; #X connect 26 4 34 0; #X connect 26 5 35 0; #X connect 29 0 28 0; #X connect 36 0 39 0; #X connect 37 0 39 1; #X connect 38 0 0 0; #X connect 40 0 37 0; #X connect 40 1 41 0; #X restore 190 344 pd syn-cz10; #X connect 0 0 1 0; #X connect 1 0 18 0; #X connect 18 0 48 0; #X connect 22 0 0 0; #X connect 23 0 22 0; #X connect 25 0 24 0; #X connect 25 0 24 1; #X connect 26 0 32 0; #X connect 27 0 32 0; #X connect 28 0 27 0; #X connect 29 0 26 0; #X connect 29 1 28 0; #X connect 30 0 29 0; #X connect 31 0 30 0; #X connect 33 0 47 0; #X connect 35 0 37 0; #X connect 36 0 37 0; #X connect 38 0 35 0; #X connect 39 0 36 0; #X connect 40 0 45 0; #X connect 41 0 46 0; #X connect 42 0 38 0; #X connect 43 0 39 0; #X connect 44 0 0 0; #X connect 47 0 25 1; #X connect 48 0 25 0; ================================================ FILE: PolyPatch/Resources/test.pd ================================================ #N canvas 579 276 420 312 10; #X obj 87 152 loadbang; #X obj 87 202 print \$0; #X obj 87 174 metro 10000; #X connect 0 0 2 0; #X connect 2 0 1 0; ================================================ FILE: PolyPatch/Resources/test2.pd ================================================ #N canvas 1090 250 499 462 10; #X obj 145 407 dac~; #X obj 279 64 r \$0-pitch; #X obj 49 17 loadbang; #X obj 146 293 line~; #X obj 146 316 cos~; #X msg 147 146 -0.25 \, 0.25 100; #X obj 196 59 loadbang; #X msg 196 82 -0.25; #X obj 146 362 *~; #X floatatom 298 83 0 0 0 0 - - -; #X obj 302 189 osc~ 440; #X obj 146 339 *~ 0.1; #X obj 302 224 *~; #X obj 323 255 *~; #X obj 286 255 *~; #X obj 49 65 metro 2000; #X msg 50 43 1; #X msg 80 44 0; #N canvas 477 131 236 291 hexatonic-scale 0; #X obj 27 14 inlet; #X obj 25 243 outlet; #X obj 26 44 + 40; #X obj 25 221 mtof; #X obj 27 79 t f f; #X obj 25 191 f; #X obj 16 121 mod 12; #X obj 17 145 select 0 2 4 7 9 11; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 3 0 1 0; #X connect 4 0 6 0; #X connect 4 1 5 1; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 5 0; #X connect 7 1 5 0; #X connect 7 2 5 0; #X connect 7 3 5 0; #X connect 7 4 5 0; #X connect 7 5 5 0; #X restore 284 104 pd hexatonic-scale; #N canvas 693 530 450 300 test 0; #X obj 143 161 s \$0-pitch; #X obj 146 46 metro 500; #X obj 146 21 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 145 69 random 30; #X connect 1 0 3 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X restore 272 385 pd test; #X floatatom 114 45 5 0 0 0 - - -; #X connect 1 0 18 0; #X connect 2 0 16 0; #X connect 3 0 4 0; #X connect 4 0 11 0; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 3 0; #X connect 8 0 0 0; #X connect 8 0 0 1; #X connect 9 0 18 0; #X connect 10 0 8 1; #X connect 10 0 12 0; #X connect 10 0 12 1; #X connect 10 0 13 0; #X connect 11 0 8 0; #X connect 12 0 13 1; #X connect 12 0 8 1; #X connect 12 0 14 0; #X connect 12 0 14 1; #X connect 13 0 8 1; #X connect 14 0 8 1; #X connect 15 0 5 0; #X connect 16 0 15 0; #X connect 17 0 15 0; #X connect 18 0 10 0; #X connect 20 0 15 1; ================================================ FILE: PolyPatch/main.m ================================================ // // main.m // PolyPatch // #import #import "PolyPatchAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(PolyPatchAppDelegate.class)); } } ================================================ FILE: README.md ================================================ After cloning the pd-for-ios repository, please make sure to cd into the pd-for-ios folder and say git submodule init git submodule update --init --recursive These two commands install the dependencies from libpd. After the initial setup, say git pull git submodule update --recursive whenever you want to sync with the GitHub repositories. ================================================ FILE: SlidePad/Classes/AppDelegate.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdBase.h" @interface AppDelegate : NSObject { BOOL playing_; } @property (nonatomic, retain) UIWindow *window; @property (nonatomic, getter=isPlaying) BOOL playing; // a globally accesible flag to start or stop audio @end ================================================ FILE: SlidePad/Classes/AppDelegate.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "AppDelegate.h" #import "SlidePadViewController.h" #import "PdAudioController.h" @interface AppDelegate () @property (nonatomic, retain) SlidePadViewController *viewController; @property (nonatomic, retain) PdAudioController *audioController; - (void)setupPd; @end @implementation AppDelegate @synthesize window = window_; @synthesize viewController = viewController_; @synthesize audioController = audioController_; #pragma mark - Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.viewController = [[SlidePadViewController alloc] init]; self.window.rootViewController = self.viewController; [self setupPd]; [self.window addSubview:self.viewController.view]; [self.window makeKeyAndVisible]; return YES; } - (void)setupPd { // Configure a typical audio session with 2 output channels self.audioController = [[PdAudioController alloc] init]; PdAudioStatus status = [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:NO mixingEnabled:NO]; if (status == PdAudioError) { RLog(@"Error! Could not configure PdAudioController"); } else if (status == PdAudioPropertyChanged) { RLog(@"Warning: some of the audio parameters were not accceptable."); } else { RLog(@"Audio Configuration successful."); } // log actually settings [self.audioController print]; // set AppDelegate as PdRecieverDelegate to recieve messages from pd [PdBase setDelegate:self]; // recieve all [send load-meter] messages from pd [PdBase subscribe:@"load-meter"]; // open one instance of the load-meter patch and forget about it [PdBase openFile:@"load-meter.pd" path:[[NSBundle mainBundle] bundlePath]]; } #pragma mark - PdRecieverDelegate // uncomment this to get print statements from pd - (void)receivePrint:(NSString *)message { NSLog(@"Pd Console: %@", message); } // handle subscribed float messages from pd - (void)receiveFloat:(float)received fromSource:(NSString *)source { if ([source isEqualToString:@"load-meter"]) { self.viewController.loadPercentage = (int)received; } } #pragma mark - Accessors - (BOOL)isPlaying { return playing_; } - (void)setPlaying:(BOOL)newState { if( newState == playing_ ) return; playing_ = newState; self.audioController.active = playing_; } #pragma mark - UIApplicationDelegate - (void)applicationWillResignActive:(UIApplication *)application { self.playing = NO; } - (void)applicationDidBecomeActive:(UIApplication *)application { self.playing = YES; } - (void)applicationWillTerminate:(UIApplication *)application { self.playing = NO; } @end ================================================ FILE: SlidePad/Classes/Controllers/PolyPatchController.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import // - controls multiple instances of the same pd patch @interface PolyPatchController : NSObject @property (nonatomic, copy, readonly) NSString *patchName; @property (nonatomic, retain, readonly) NSMutableArray *patches; - (void)closePatches; // close all patches, resets self.patches to an empty array - (void)openPatchesNamed:(NSString *)name path:(NSString *)path instances:(int)numInstances; // opens many instances of the same patch and holds them in self.patches - (int)dollarZeroForInstance:(int)instance; // returns the unique ID ('$0' in pd) for an instance of the patch @end ================================================ FILE: SlidePad/Classes/Controllers/PolyPatchController.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "PolyPatchController.h" #import "PdFile.h" @interface PolyPatchController () @property (nonatomic, copy) NSString *patchName; @property (nonatomic, retain) NSMutableArray *patches; @end @implementation PolyPatchController @synthesize patchName = patchName_; @synthesize patches = patches_; #pragma mark - Init / Dealloc - (id)init { self = [super init]; if (self) { self.patches = [NSMutableArray array]; } return self; } #pragma mark - Open / Close Patches - (void)closePatches { self.patches = [NSMutableArray array]; // they will be closed in PdFile's dealloc } - (void)openPatchesNamed:(NSString *)name path:(NSString *)path instances:(int)numInstances { self.patchName = name; for (int i = 0; i < numInstances; i++) { [self.patches addObject:[PdFile openFileNamed:name path:path]]; } } - (int)dollarZeroForInstance:(int)instance { if (instance >= [self.patches count]) { return -1; } PdFile *patch = [self.patches objectAtIndex:instance]; return [patch dollarZero]; } @end ================================================ FILE: SlidePad/Classes/Controllers/SlidePadViewController.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface SlidePadViewController : UIViewController @property (nonatomic, assign) int loadPercentage; @end ================================================ FILE: SlidePad/Classes/Controllers/SlidePadViewController.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "SlidePadViewController.h" #import "AppDelegate.h" #import "PolyPatchController.h" #import "Fingerboard.h" #import "QSlider.h" #import "QRadioDial.h" #import "PdBase.h" #import "PdFile.h" static const int kSynthNumVoices = 5; static const float kSynthFreqRamptime = 50.0; static NSString *const kSynthFreqRamptimeReceiver = @"synth-freq-ramptime"; #define TOGGLE_OFF_COLOR [UIColor darkGrayColor] #define TOGGLE_ON_COLOR [UIColor colorWithRed:0.0 green:0.5 blue:0.5 alpha:1.0] @interface SlidePadViewController () @property (nonatomic, retain) PolyPatchController *polyPatchController; @property (nonatomic, retain) UIButton *playToggle; @property (nonatomic, retain) UIButton *quantizeToggle; @property (nonatomic, retain) UISegmentedControl *patchSelector; @property (nonatomic, retain) QSlider *freqSlider; @property (nonatomic, retain) UILabel *loadLabel; @property (nonatomic, retain) QRadioDial *transposeDial; @property (nonatomic, retain) Fingerboard *fingerboard; @property (nonatomic, retain) NSArray *patches; // all the base names of synth patches (all contain [throw~]) @property (nonatomic, retain) PdFile *mainPatch; // contains the [catch~] and post effects, global tables - (void)playTogglePressed:(UIButton *)sender; - (void)quantizeTogglePressed:(UIButton *)sender; - (void)sliderChanged:(QSlider *)sender; - (void)patchSelectorChanged:(UISegmentedControl *)sender; - (void)openPatchVoicesWithPatchNamed:(NSString *)patchName; - (UIButton *)newButton; - (UILabel *)newLabel; - (void)formatLoadLabel; @end @implementation SlidePadViewController @synthesize polyPatchController = polyPatchController_; @synthesize playToggle = playToggle_; @synthesize quantizeToggle = quantizeToggle_; @synthesize patchSelector = patchSelector_; @synthesize freqSlider = freqSlider_; @synthesize loadLabel = loadLabel_; @synthesize loadPercentage = loadPercentage_; @synthesize transposeDial = transposeDial_; @synthesize fingerboard = fingerboard_; @synthesize patches = patches_; #pragma mark - View management - (void) loadView { [super loadView]; // open the main patch, which contains a [catch~] and other post-effects self.mainPatch = [PdFile openFileNamed:@"main.pd" path:[[NSBundle mainBundle] bundlePath]]; // this guy will hold the voice patches self.polyPatchController = [[PolyPatchController alloc] init]; // UI Setup: self.view.backgroundColor = [UIColor blackColor]; self.playToggle = [self newButton]; [self.playToggle addTarget:self action:@selector(playTogglePressed:) forControlEvents:UIControlEventTouchUpInside]; [self.playToggle setTitle:@"DSP Off" forState:UIControlStateNormal]; [self.playToggle setTitle:@"DSP On" forState:UIControlStateSelected]; self.quantizeToggle = [self newButton]; [self.quantizeToggle addTarget:self action:@selector(quantizeTogglePressed:) forControlEvents:UIControlEventTouchUpInside]; [self.quantizeToggle setTitle:@"Quantize Off" forState:UIControlStateNormal]; [self.quantizeToggle setTitle:@"Quantize On" forState:UIControlStateSelected]; self.patches = [NSArray arrayWithObjects:@"classicsub-voice.pd", @"wavetabler-voice.pd", nil]; self.patchSelector = [[UISegmentedControl alloc] initWithItems: [NSArray arrayWithObjects:@"Classic Sub", @"Wavetabler", nil]]; self.patchSelector.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin; self.patchSelector.tintColor = [UIColor darkGrayColor]; self.patchSelector.selectedSegmentIndex = 0; [self.patchSelector addTarget:self action:@selector(patchSelectorChanged:) forControlEvents:UIControlEventValueChanged]; self.freqSlider = [[QSlider alloc] init]; self.freqSlider.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleRightMargin; self.freqSlider.minimumValue = 0.0; self.freqSlider.maximumValue = 100.0; [self.freqSlider setValue:50.0]; [self.freqSlider addValueTarget:self action:@selector(sliderChanged:)]; self.loadLabel = [self newLabel]; self.loadLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; [self formatLoadLabel]; self.transposeDial = [[QRadioDial alloc] init]; self.transposeDial.minimumValue = -3.0; self.transposeDial.maximumValue = 3.0; self.transposeDial.numSections = 7; self.transposeDial.value = 0; [self.transposeDial addValueTarget:self action:@selector(transposeChanged:)]; self.fingerboard = [[Fingerboard alloc] init]; self.fingerboard.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; self.fingerboard.numVoices = kSynthNumVoices; self.fingerboard.polyPatchController = self.polyPatchController; // currently need a reference to this to send messages [self.view addSubview:self.patchSelector]; [self.view addSubview:self.freqSlider]; [self.view addSubview:self.loadLabel]; [self.view addSubview:self.playToggle]; [self.view addSubview:self.quantizeToggle]; [self.view addSubview:self.transposeDial]; [self.view addSubview:self.fingerboard]; } - (void)viewWillAppear:(BOOL)animated { [super viewDidAppear:animated]; [self.playToggle sizeToFit]; [self.quantizeToggle sizeToFit]; float vh = CGRectGetHeight(self.view.bounds); float vw = CGRectGetWidth(self.view.bounds); float kSpacer = 10.0; float kWidgetHeight = vh * 0.05; // top 5% of the view, to the left self.playToggle.frame = CGRectMake(kSpacer, kSpacer, self.playToggle.frame.size.width, kWidgetHeight); float quantizeToggleOffset = self.playToggle.frame.origin.x + self.playToggle.frame.size.width + kSpacer; self.quantizeToggle.frame = CGRectMake(quantizeToggleOffset, kSpacer, self.quantizeToggle.frame.size.width, kWidgetHeight); // Patch Selector: top 5% of view, right 1/3 self.patchSelector.frame = CGRectMake(vw * 0.666, kSpacer, vw * 0.333 - kSpacer, kWidgetHeight); // Frequency Slider: next 5%, left half of screen self.freqSlider.frame = CGRectMake(kSpacer, kWidgetHeight + kSpacer * 2.0, vw * 0.5 - kSpacer, kWidgetHeight); // Load Label: below Patch Selector (right side) self.loadLabel.frame = CGRectMake(self.patchSelector.frame.origin.x, self.freqSlider.frame.origin.y, self.patchSelector.frame.size.width, kWidgetHeight); // Transpose Dial: next 5% - the edge of the the top half, perfect circle CGFloat transposeDialHeight = vw * 0.5 - kSpacer * 5 - kWidgetHeight * 2; self.transposeDial.frame = CGRectMake(kSpacer, (kWidgetHeight + kSpacer) * 2 + kSpacer, transposeDialHeight, transposeDialHeight); // bottom half of screen self.fingerboard.frame = CGRectMake(kSpacer, vh * 0.5, vw - kSpacer * 2, vh * 0.5 - kSpacer); // fire initial state after views are loaded and laid out [self patchSelectorChanged:self.patchSelector]; [self playTogglePressed:self.playToggle]; [self sliderChanged:self.freqSlider]; [self transposeChanged:self.transposeDial]; } #pragma mark - Control Events - (void)sliderChanged:(QSlider *)sender { [PdBase sendFloat:sender.value toReceiver:@"vcf-cutoff"]; } - (void)transposeChanged:(QRadioDial *)sender { Fingerboard *fingerboard = self.fingerboard; fingerboard.minPitch = 48 + round(sender.value) * 12; fingerboard.maxPitch = fingerboard.minPitch + fingerboard.numNotes; [fingerboard setNeedsDisplay]; [fingerboard updateAllVoices]; } -(void)playTogglePressed:(UIButton *)sender { AppDelegate *appDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate]; if([sender isSelected]){ sender.backgroundColor = TOGGLE_OFF_COLOR; sender.selected = NO; [self.fingerboard reset]; // kill all voices } else { sender.backgroundColor = TOGGLE_ON_COLOR; sender.selected = YES; } [appDelegate setPlaying:sender.selected]; } - (void)quantizeTogglePressed:(UIButton *)sender { if([sender isSelected]){ sender.backgroundColor = TOGGLE_OFF_COLOR; sender.selected = NO; } else { sender.backgroundColor = TOGGLE_ON_COLOR; sender.selected = YES; } self.fingerboard.quantizePitch = sender.selected; } - (void)patchSelectorChanged:(UISegmentedControl *)sender { if (sender.selectedSegmentIndex > [self.patches count]) { RLog(@"Error: patch selector is too large"); return; } NSString *patchName = [self.patches objectAtIndex:sender.selectedSegmentIndex]; RLog(@"patch selected: %@", patchName); if ([patchName isEqualToString:self.polyPatchController.patchName]) { return; } // make sure all voices are silent before switching [self.fingerboard mute]; // begin opening patches only after the current patches have finished being muted [self performSelector:@selector(openPatchVoicesWithPatchNamed:) withObject:patchName afterDelay:kSynthFreqRamptime / 1000.0]; } #pragma mark - Custom Accessors // whenever loadPercentage is set, update the label - (void)setLoadPercentage:(int)loadPercentage { if (loadPercentage_ != loadPercentage) { loadPercentage_ = loadPercentage; [self formatLoadLabel]; } } #pragma mark - Private Helpers - (void)openPatchVoicesWithPatchNamed:(NSString *)patchName { if (self.polyPatchController.patchName) { [self.polyPatchController closePatches]; } [self.polyPatchController openPatchesNamed:patchName path:[[NSBundle mainBundle] bundlePath] instances:kSynthNumVoices]; [PdBase sendFloat:kSynthFreqRamptime toReceiver:kSynthFreqRamptimeReceiver]; } - (UIButton *)newButton { UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.layer.cornerRadius = 8.0; button.layer.masksToBounds = YES; button.layer.borderWidth = 1.0; button.backgroundColor = TOGGLE_OFF_COLOR; button.showsTouchWhenHighlighted = YES; button.contentEdgeInsets = UIEdgeInsetsMake(0.0, 6.0, 0.0, 6.0); return button; } - (UILabel *)newLabel { UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; label.backgroundColor = [UIColor clearColor]; label.textColor = QCONTROL_DEFAULT_FRAME_COLOR; label.textAlignment = NSTextAlignmentRight; return label; } - (void)formatLoadLabel { self.loadLabel.text = [NSString stringWithFormat:@"cpu load: %d%%", self.loadPercentage]; } @end ================================================ FILE: SlidePad/Classes/Views/Fingerboard.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @class PolyPatchController; @interface Fingerboard : UIView @property (nonatomic, assign) float minPitch; @property (nonatomic, assign) float maxPitch; @property (nonatomic, assign) float numNotes; @property (nonatomic, assign) NSInteger numVoices; @property (nonatomic, assign) BOOL drawNoteLabels; @property (nonatomic, assign) BOOL quantizePitch; @property (nonatomic, retain) UIColor *sharpNoteColor; @property (nonatomic, retain) UIColor *touchColor; @property (nonatomic, assign) PolyPatchController *polyPatchController; // weak reference to the pd patch controller - (void)updateAllVoices; // resends audio params to Pd - (void)mute; // turn off all voices - (void)reset; // last resort reset method @end ================================================ FILE: SlidePad/Classes/Views/Fingerboard.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "PolyPatchController.h" #import "PdBase.h" #import "Fingerboard.h" #import "TouchDiamond.h" #import "PdFile.h" #define RECEIVER_FREQ @"synth-freq" #define RECEIVER_MAG @"synth-mag" #define DEFAULT_SHARP_NOTES_COLOR [UIColor colorWithRed:0.0 green:0.5 blue:0.5 alpha:1.0] #define DEFAULT_OTHER_NOTES_COLOR [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0] static const CGFloat kThresholdForTouchRelease = 0.0; @interface Fingerboard () @property (nonatomic, retain) NSMutableDictionary *touches; @property (nonatomic, retain) NSArray *voiceHighlights; // when quantizePitch == YES, this contains UIView's for highlighting the current touches - (CGFloat)mapXToPitch:(CGFloat)x; // minPitch mapped to x = 0, maxPitch to x = self.frame.size.width - (CGFloat)mapYToMag:(CGFloat)y; // y is flipped so the top of the view (origin) = full magnitude, while bottom = 0 - (void)sendParamsOff; - (void)sendParamsOffForVoice:(int)voice; - (void)sendParamsWithPoint: (CGPoint)point voice:(int)voice; - (BOOL)pointIsWithinBounds:(CGPoint)point; - (void)highlightVoices; - (float)noteWidth; - (NSArray *)highlightsArray; @end @implementation Fingerboard @synthesize touches = touches_; @synthesize minPitch = minPitch_; @synthesize maxPitch = maxPitch_; @synthesize numNotes = numNotes_; @synthesize numVoices = numVoices_; @synthesize drawNoteLabels = drawNoteLabels_; @synthesize quantizePitch = quantizePitch_; @synthesize sharpNoteColor = sharpNoteColor_; @synthesize polyPatchController = polyPatchController_; #pragma mark - Setup - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.multipleTouchEnabled = YES; self.minPitch = 36.0; self.maxPitch = 60.0; self.numVoices = 2; self.numNotes = self.maxPitch - self.minPitch; self.drawNoteLabels = YES; self.clipsToBounds = YES; self.backgroundColor = DEFAULT_OTHER_NOTES_COLOR; self.sharpNoteColor = DEFAULT_SHARP_NOTES_COLOR; self.layer.borderColor = self.sharpNoteColor.CGColor; self.layer.borderWidth = 2.0; self.touches = [NSMutableDictionary dictionary]; } return self; } #pragma mark - Public - (void)updateAllVoices { for (TouchDiamond *diamond in [self.touches allValues]) { [self sendParamsWithPoint:diamond.center voice:(int)diamond.touchIndex]; } } - (void)mute { [self sendParamsOff]; } - (void)reset { for (TouchDiamond *diamond in [self.touches allValues]) { [diamond removeFromSuperview]; } [self.touches removeAllObjects]; [self sendParamsOff]; } #pragma mark - Drawing - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); float nNotes = [self numNotes]; float noteWidth = [self noteWidth]; // ***** create a layer for sharp notes ***** CGRect noteRect = CGRectMake(0.0, 0.0, noteWidth, CGRectGetHeight(self.bounds)); CGLayerRef noteLayer = CGLayerCreateWithContext(context, noteRect.size, NULL); CGContextRef noteContext = CGLayerGetContext(noteLayer); CGContextSetFillColorWithColor(noteContext, self.sharpNoteColor.CGColor); CGContextFillRect(noteContext, noteRect); // ***** create a layer for line notes (C's and F's). ***** CGLayerRef lineLayer = CGLayerCreateWithContext(context, noteRect.size, NULL); CGContextRef lineContext = CGLayerGetContext(lineLayer); CGContextSetStrokeColorWithColor(lineContext, self.sharpNoteColor.CGColor); CGContextBeginPath(lineContext); CGContextMoveToPoint(lineContext, 0.0, 0.0); CGContextAddLineToPoint(lineContext, 0.0, noteRect.size.height); CGContextClosePath(lineContext); CGContextStrokePath(lineContext); // ***** set up text for midi number ***** const float kTextColorGrayLevel = 0.75; UIColor *gray = [UIColor colorWithWhite:kTextColorGrayLevel alpha:1.0]; UIFont *font; if (self.drawNoteLabels) { font = [UIFont fontWithName:@"Helvetica" size:12]; } CGContextSetStrokeColorWithColor(context, gray.CGColor); int nm, ns; CGPoint notePoint = CGPointZero; for (int n = 0; n < nNotes; n++) { ns = n + self.minPitch; nm = ns % 12; if (nm == 1 || nm == 3 || nm == 6 || nm == 8 || nm == 10) { notePoint.x = n * noteWidth; CGContextDrawLayerAtPoint(context, notePoint, noteLayer); } else if (nm == 0 || nm == 5) { notePoint.x = n * noteWidth; CGContextDrawLayerAtPoint(context, notePoint, lineLayer); } if (self.drawNoteLabels) { NSString *noteLabel = [NSString stringWithFormat:@"%d", ns]; [noteLabel drawAtPoint:CGPointMake(n * noteWidth + 3.0, self.bounds.size.height - 16.0) withAttributes:@{NSFontAttributeName:font, NSForegroundColorAttributeName:gray}]; } } } #pragma mark - Touches // create a diamond for every touch down, fire off params for that voice // - store the touch ptr / TouchDiamond pair in an our dictionary so we can update it's position and parameters later on - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch* touch in touches) { CGPoint point = [touch locationInView:self]; TouchDiamond *diamond = [[TouchDiamond alloc] initWithIndex:[self.touches count]]; diamond.center = point; // only add touches up to numVoices amount if ([self.touches count] < self.numVoices) { [self.touches setObject:diamond forKey:[NSValue valueWithPointer:(__bridge const void * _Nullable)(touch)]]; [self addSubview:diamond]; [diamond displayAnimated]; } [self sendParamsWithPoint:point voice:(int)diamond.touchIndex]; } if (self.quantizePitch) { [self highlightVoices]; } } // locate which TouchDiamond needs updating with the touch's memory address as key // - send params based on new position - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch* touch in touches) { CGPoint point = [touch locationInView:self]; if (![self pointIsWithinBounds:point]) { // do nothing, will be turned off in touchesCancelled return; } TouchDiamond *diamond = [self.touches objectForKey:[NSValue valueWithPointer:(__bridge const void * _Nullable)(touch)]]; if (diamond) { diamond.center = point; // it won't always exist if we are in poly and the touch is being ignored } if ([self.touches count] <= self.numVoices) { int dzero = [self.polyPatchController dollarZeroForInstance:(int)diamond.touchIndex]; [self sendParamsWithPoint:point voice:(int)diamond.touchIndex]; } } if (self.quantizePitch) { [self highlightVoices]; } } // locate the TouchDiamond as above, but this time, ramp it off and remove it from our dictionary - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch* touch in touches) { TouchDiamond *diamond = [self.touches objectForKey:[NSValue valueWithPointer:(__bridge const void * _Nullable)(touch)]]; [self sendParamsOffForVoice:(int)diamond.touchIndex]; [diamond removeFromSuperview]; [self.touches removeObjectForKey:[NSValue valueWithPointer:(__bridge const void * _Nullable)(touch)]]; } if (self.quantizePitch) { [self highlightVoices]; } } // forward to touchesEnded - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { [self touchesEnded:touches withEvent:event]; } #pragma mark - Mapping functions - (void)sendParamsWithPoint:(CGPoint)point voice:(int)voice { // pitch is related to the x location in view, scaled within min and max Pitch float pitch = self.minPitch + (self.maxPitch - self.minPitch) * point.x / CGRectGetWidth(self.frame); if (self.quantizePitch) { // round pitch down to the nears integral number, which corresponds to a note in the well-tempered tuning system pitch = floorf(pitch); } // mag is related to the inverted y location in view, so loudest (1.0) is on top float mag = (CGRectGetHeight(self.frame) - point.y) / CGRectGetHeight(self.frame); // create the unique receiver name by prepending the patch's unique ID ('$0' in pd) // for each voice. int dzero = [self.polyPatchController dollarZeroForInstance:voice]; NSString *magReceiver = [NSString stringWithFormat:@"%d-%@", dzero, RECEIVER_MAG]; NSString *pitchReceiver = [NSString stringWithFormat:@"%d-%@", dzero, RECEIVER_FREQ]; [PdBase sendFloat:mag toReceiver:magReceiver]; [PdBase sendFloat:pitch toReceiver:pitchReceiver]; } - (void)sendParamsOffForVoice:(int)voice { int dzero = [self.polyPatchController dollarZeroForInstance:voice]; NSString *magReceiver = [NSString stringWithFormat:@"%d-%@", dzero, RECEIVER_MAG]; [PdBase sendFloat:0 toReceiver:magReceiver]; } - (void)sendParamsOff{ for (PdFile *pd in [self.polyPatchController patches]) { NSString *magReceiver = [NSString stringWithFormat:@"%d-%@", [pd dollarZero], RECEIVER_MAG]; [PdBase sendFloat:0 toReceiver:magReceiver]; } } - (CGFloat)mapXToPitch:(CGFloat)x { float w = CGRectGetWidth(self.frame); float sx = self.minPitch + (self.maxPitch - self.minPitch) * x / w; return sx; } - (CGFloat)mapYToMag:(CGFloat)y { float h = CGRectGetHeight(self.frame); return (h - y) / h; } #pragma mark - Overridden Accessors // only create voiceHighlights if quantizePitch is set to YES - (void)setQuantizePitch:(BOOL)quantizePitch { if (quantizePitch_ != quantizePitch) { quantizePitch_ = quantizePitch; if (quantizePitch) { self.voiceHighlights = [self highlightsArray]; } else { for (UIView *highlight in self.voiceHighlights) { [highlight removeFromSuperview]; } self.voiceHighlights = nil; } } } #pragma mark - Private // for every currently active voice, use one of our views in highlightsArray to display it's current pitch and magnitude // - size remains constaint, but origin and alpah change according to voice.center - (void)highlightVoices { int i = 0; float noteWidth = [self noteWidth]; for (TouchDiamond *voice in [self.touches allValues]) { UIView *highlight = [self.voiceHighlights objectAtIndex:i++]; CGRect highlightFrame = highlight.frame; float touchX = voice.center.x; touchX -= fmod(touchX,noteWidth); highlightFrame.origin.x = touchX; highlightFrame.size.width = noteWidth; highlight.frame = highlightFrame; highlight.alpha = MAX(0.2, 0.67 - voice.center.y / self.frame.size.height); // alpha range: [0.2:0.67] highlight.hidden = NO; } while (i < self.numVoices) { UIView *highlight = [self.voiceHighlights objectAtIndex:i++]; highlight.hidden = YES; } } - (BOOL)pointIsWithinBounds:(CGPoint)point { if (point.x < -kThresholdForTouchRelease || point.x > self.bounds.size.width + kThresholdForTouchRelease || point.y < -kThresholdForTouchRelease || point.y > self.bounds.size.height + kThresholdForTouchRelease) { return NO; } else { return YES; } } - (float)noteWidth { return self.frame.size.width / [self numNotes]; } - (NSArray *)highlightsArray { NSMutableArray *highlights = [NSMutableArray array]; float noteWidth = [self noteWidth]; float noteHeight = self.frame.size.height; for (int i = 0; i < self.numVoices; i++) { UIView *highlight = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, noteWidth, noteHeight)]; highlight.backgroundColor = [UIColor whiteColor]; highlight.hidden = YES; [self insertSubview:highlight atIndex:0]; // note: this is not efficient, since it shuffles the subviews many times - would be better to create a container for these highlights that resides below TouchDiamonds [highlights addObject:highlight]; } return highlights; } @end ================================================ FILE: SlidePad/Classes/Views/QControl.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #define QCONTROL_DEFAULT_FILL_COLOR [UIColor colorWithRed:0.0 green:0.3 blue:0.0 alpha:1.0] #define QCONTROL_DEFAULT_FRAME_COLOR [UIColor colorWithRed:0.0 green:0.7 blue:0.3 alpha:1.0] @interface QControl : UIView @property (nonatomic, retain) UIColor *fillColor; @property (nonatomic, retain) UIColor *frameColor; @property (nonatomic, assign) float minimumValue; @property (nonatomic, assign) float maximumValue; @property (nonatomic, assign) float value; @property (nonatomic, assign) SEL valueAction; @property (nonatomic, assign) id valueTarget; - (void) addValueTarget:(id)target action:(SEL)action; @end ================================================ FILE: SlidePad/Classes/Views/QControl.m ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "QControl.h" @interface QControl () @end @implementation QControl @synthesize valueAction = valueAction_; @synthesize valueTarget = valueTarget_; @synthesize fillColor = fillColor_; @synthesize frameColor = frameColor_; @synthesize minimumValue = minimumValue_; @synthesize maximumValue = maximumValue_; @synthesize value = value_; - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.fillColor = QCONTROL_DEFAULT_FILL_COLOR; self.frameColor = QCONTROL_DEFAULT_FRAME_COLOR; self.backgroundColor = [UIColor clearColor]; self.minimumValue = 0.0; self.maximumValue = 1.0; } return self; } #pragma mark - Public - (void) addValueTarget:(id)target action:(SEL)action { self.valueTarget = target; self.valueAction = action; } #pragma mark - #pragma mark Overridden getters / setters - (void)setValue:(float)f { value_ = f; if (self.valueTarget && [self.valueTarget respondsToSelector:self.valueAction]) { [self.valueTarget performSelectorOnMainThread:self.valueAction withObject:self waitUntilDone:YES]; } [self setNeedsDisplay]; } @end ================================================ FILE: SlidePad/Classes/Views/QRadioDial.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "QControl.h" @interface QRadioDial : QControl @property (nonatomic, assign) int numSections; @end ================================================ FILE: SlidePad/Classes/Views/QRadioDial.m ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "QRadioDial.h" static const CGFloat kEdgeSpacer = 6.0; static const CGFloat kPiOverTwo = 1.5707963267948966; static const CGFloat kTwoPi = 6.283185307179586; @interface QRadioDial () @property (nonatomic, retain) UILabel *valueLabel; @property (nonatomic, assign) NSInteger section; @property (nonatomic, assign) CGFloat outerRadius; @property (nonatomic, assign) CGFloat innerRadius; - (void)mapPointToValue:(CGPoint)point; @end @implementation QRadioDial @synthesize valueLabel = valueLabel_; @synthesize numSections = numSections_; @synthesize section = section_; @synthesize outerRadius = outerRadius_; @synthesize innerRadius = innerRadius_; #pragma mark - Init / Dealloc - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.valueLabel = [[UILabel alloc] init]; self.valueLabel.backgroundColor = [UIColor clearColor]; self.valueLabel.textColor = self.frameColor; self.valueLabel.textAlignment = NSTextAlignmentCenter; self.valueLabel.text = [NSString stringWithFormat:@"0"]; // this is what self.value starts at [self addSubview:self.valueLabel]; self.numSections = 4; self.value = NSIntegerMin; // if value == 0 is initially passed in, we still want it to be considered, so set value_ to something else } return self; } #pragma mark - View Methods - (void)layoutSubviews { [super layoutSubviews]; CGSize viewSize = self.frame.size; self.outerRadius = (viewSize.width < viewSize.height ? viewSize.width / 2.0 : viewSize.height / 2.0); self.innerRadius = self.outerRadius / 3.0; self.valueLabel.frame = CGRectIntegral(CGRectMake((viewSize.width - self.innerRadius) / 2.0, (viewSize.height - self.innerRadius) / 2.0, self.innerRadius, self.innerRadius)); self.valueLabel.font = [UIFont boldSystemFontOfSize:30]; // TODO: size this according to innerRadious size } #pragma mark - Drawing - (void)drawRect:(CGRect)rect { CGRect frame = self.bounds; CGFloat radius = self.outerRadius; CGFloat innerRadius = self.innerRadius; float pos = ((self.value - self.minimumValue) * frame.size.width) / (self.maximumValue - self.minimumValue); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, self.fillColor.CGColor); CGContextSetStrokeColorWithColor(context, self.frameColor.CGColor); CGContextSetLineWidth(context, 2.0); // Draw Inner and Outer circle frames CGContextAddArc(context, radius, radius, innerRadius, 0, kTwoPi, 1); CGContextStrokePath(context); CGContextAddArc(context, radius, radius, radius - 1.0, 0, kTwoPi, 1); CGContextStrokePath(context); // Draw the selected section CGFloat sectionRadians = kTwoPi / self.numSections; CGFloat angleA = self.section * sectionRadians + kPiOverTwo; CGFloat angleB = angleA + sectionRadians; CGContextAddArc(context, radius, radius, radius - kEdgeSpacer, angleA, angleB, 0); // outer arc CGContextAddArc(context, radius, radius, innerRadius + kEdgeSpacer, angleB, angleA, -1); // inner arc CGContextFillPath(context); } #pragma mark - Touches - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint pos = [touch locationInView:self]; [self mapPointToValue:pos]; [self setNeedsDisplay]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint pos = [touch locationInView:self]; [self mapPointToValue:pos]; [self setNeedsDisplay]; } #pragma mark - Mapping // TODO: check if point is within the middle circle, if yes then don't update - (void)mapPointToValue:(CGPoint)point { CGSize viewSize = self.bounds.size; // first convert to a point ranging from 1:1 in x and y, where point = (0,0) is the center // Then I switch y and x, and also flip y, so that the 0 quadrant is mapped to the bottom left. float y = 1.0 - (point.x * 2.0 / viewSize.width); float x = (point.y * 2.0 / viewSize.height) - 1.0; CGFloat sectionRadians = kTwoPi / self.numSections; float theta = atan2(y, x); if (theta < 0) { theta += kTwoPi; } self.section = (int)(theta / sectionRadians); CGFloat valuePerSection = (self.maximumValue - self.minimumValue) / (self.numSections - 1); self.value = valuePerSection * self.section + self.minimumValue; } #pragma mark - Overridden Getters / Setters - (void)setValue:(float)f { if (fabs(self.value - f) > 0.0001) { [super setValue:f]; self.valueLabel.text = [NSString stringWithFormat:@"%d", (int)f]; self.section = (int)(f - self.minimumValue) * (self.numSections - 1) / (self.maximumValue - self.minimumValue); [self.valueLabel setNeedsDisplay]; [self setNeedsDisplay]; if (self.valueTarget && self.valueAction && [self.valueTarget respondsToSelector:self.valueAction]) { [self.valueTarget performSelectorOnMainThread:self.valueAction withObject:self waitUntilDone:YES]; } } } @end ================================================ FILE: SlidePad/Classes/Views/QSlider.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "QControl.h" typedef enum { RQSliderOrientationHorizontal, RQSliderOrientationVertical, } RQSliderOrientation; @interface QSlider : QControl @property (nonatomic, assign) RQSliderOrientation orientation; @end ================================================ FILE: SlidePad/Classes/Views/QSlider.m ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "QSlider.h" static const CGFloat kThresholdForTouchRelease = 50.0; @interface QSlider () - (BOOL)pointIsWithinBounds:(CGPoint)point; - (void)mapPointToValue:(CGPoint)point; - (void)drawRoundedRectFrame:(CGContextRef)context; @end @implementation QSlider @synthesize orientation = orientation_; #pragma mark - Init / Dealloc - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.fillColor = QCONTROL_DEFAULT_FILL_COLOR; self.frameColor = QCONTROL_DEFAULT_FRAME_COLOR; self.orientation = RQSliderOrientationHorizontal; } return self; } - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, self.fillColor.CGColor); CGContextSetStrokeColorWithColor(context, self.frameColor.CGColor); CGRect frame = self.bounds; float pos = ((self.value - self.minimumValue) * frame.size.width) / (self.maximumValue - self.minimumValue); // Draw filled region CGRect fillRect = CGRectMake(1.0, 1.0, pos, frame.size.height - 1.0); CGContextSetLineWidth(context, 1.0); CGContextAddRect(context, fillRect); CGContextFillPath(context); CGContextSetLineWidth(context, 6.0); CGContextSetLineCap(context, kCGLineCapRound); CGContextBeginPath(context); CGContextMoveToPoint(context, pos, frame.origin.y + 4); CGContextAddLineToPoint(context, pos, frame.size.height - 4); CGContextStrokePath(context); CGContextSetLineWidth(context, 2.0); [self drawRoundedRectFrame:context]; } - (void)drawRoundedRectFrame:(CGContextRef)context { CGRect rrect = self.bounds; CGFloat radius = 8.0; CGFloat minx = CGRectGetMinX(rrect), midx = CGRectGetMidX(rrect), maxx = CGRectGetMaxX(rrect); CGFloat miny = CGRectGetMinY(rrect), midy = CGRectGetMidY(rrect), maxy = CGRectGetMaxY(rrect); CGContextMoveToPoint(context, minx, midy); CGContextAddArcToPoint(context, minx, miny, midx, miny, radius); CGContextAddArcToPoint(context, maxx, miny, maxx, midy, radius); CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius); CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius); CGContextClosePath(context); CGContextStrokePath(context); } #pragma mark - Touches - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint pos = [touch locationInView:self]; [self mapPointToValue:pos]; [self setNeedsDisplay]; // TODO: the drawing commands in drawRect don't get erased by this command only } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint pos = [touch locationInView:self]; if ([self pointIsWithinBounds:pos]) { [self mapPointToValue:pos]; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { } #pragma mark - Mapping - (void) mapPointToValue: (CGPoint)point { float length, x, val; if (self.orientation == RQSliderOrientationHorizontal) { if (point.x < 0.0) { val = self.minimumValue; } else if (point.x > self.bounds.size.width) { val = self.maximumValue; } else { val = self.minimumValue + (point.x * (self.maximumValue - self.minimumValue)) / self.bounds.size.width; self.value = val; } } else { if (point.y < 0.0) { val = self.minimumValue; } else if (point.y > self.bounds.size.height) { val = self.maximumValue; } else { val = self.minimumValue + (point.y * (self.maximumValue - self.minimumValue)) / self.bounds.size.height; } } } - (BOOL)pointIsWithinBounds:(CGPoint)point { if (point.x < -kThresholdForTouchRelease || point.x > self.bounds.size.width + kThresholdForTouchRelease || point.y < -kThresholdForTouchRelease || point.y > self.bounds.size.height + kThresholdForTouchRelease) { return NO; } else { return YES; } } @end ================================================ FILE: SlidePad/Classes/Views/TouchDiamond.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import // simple view that draws a diamond to display the current touch. @interface TouchDiamond : UIView @property (nonatomic, assign) NSInteger touchIndex; // identifier for this touch, which allows us to tie it to a voice in the synthesizer - (id)initWithIndex:(NSInteger)touchIndex; - (void)displayAnimated; // diamond grows to full size @end ================================================ FILE: SlidePad/Classes/Views/TouchDiamond.m ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "TouchDiamond.h" #define DIAMOND_WIDTH 40.0 #define DIAMOND_HEIGHT 100.0 @implementation TouchDiamond @synthesize touchIndex = touchIndex_; - (id)initWithIndex:(NSInteger)touchIndex { self = [super init]; if(self) { self.touchIndex = touchIndex; } return self; } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:CGRectMake(0.0, 0.0, DIAMOND_WIDTH * 0.8, DIAMOND_HEIGHT * 0.4)]; if (self) { self.backgroundColor = [UIColor clearColor]; } return self; } - (void)displayAnimated { [UIView animateWithDuration:0.2 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ self.bounds = CGRectMake(0.0, 0.0, DIAMOND_WIDTH, DIAMOND_HEIGHT); } completion:nil]; } - (void)drawRect:(CGRect)rect { CGContextRef c = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(c, 1.0, 0.3, 0.0, 0.5); CGContextSetRGBStrokeColor(c, 1.0, 0.0, 0.0, 0.75); CGContextSetLineWidth(c, 1.0); float midx = CGRectGetMidX(self.bounds); float midy = CGRectGetMidY(self.bounds); float maxx = CGRectGetWidth(self.bounds); float maxy = CGRectGetHeight(self.bounds); CGPoint diamond[8] = { CGPointMake(0.0, midy), CGPointMake(midx, maxy ), CGPointMake(midx, maxy), CGPointMake(maxx, midy), CGPointMake(maxx, midy), CGPointMake(midx, 0.0), CGPointMake(midx, 0.0), CGPointMake(0.0, midy) }; CGContextAddLines(c, diamond, 8); CGContextDrawPath(c, kCGPathFillStroke); } @end ================================================ FILE: SlidePad/OtherSources/Common.h ================================================ // debug macros from: http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ #ifdef R_DEBUG #define RLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #else #define RLog(...) do { } while (0) #endif ================================================ FILE: SlidePad/OtherSources/Prefix.pch ================================================ #ifdef __OBJC__ #import #import #import #import "Common.h" #endif ================================================ FILE: SlidePad/OtherSources/main.m ================================================ #import #import "AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(AppDelegate.class)); } } ================================================ FILE: SlidePad/ReadMe.txt ================================================ SlidePad iOS app (part of pd-for-ios, example apps for libpd in iOS) Nov 21, 2011 This is a polyphonic synthesizer the contains quite a few techniques and tools for building a full-featured, mobile touch synth. There are a few controls: - patch selector: controls the patch used for each 'voice', choose between 'Classic Sub', subtractive synthesis, or 'Wavetabler', additive synthesis via wavetable lookup - pitch quantize - a signal-rate lowpass filter control - octave control ------ License ------------------------------------------------------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Richard Eakin and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: SlidePad/Resources/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: SlidePad/SlidePad.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 0EDD8C21130014F900D99E63 /* PolyPatchController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDD8C20130014F900D99E63 /* PolyPatchController.m */; }; 1106785812BF1F3E00EEF8B0 /* wavetabler-voice.pd in Resources */ = {isa = PBXBuildFile; fileRef = 1106785712BF1F3E00EEF8B0 /* wavetabler-voice.pd */; }; 111ED9881481A48F00C2FA29 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 111ED9871481A48F00C2FA29 /* AVFoundation.framework */; }; 1138CF99139B7A0F00E37D70 /* QControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 1138CF96139B7A0F00E37D70 /* QControl.m */; }; 1138CF9A139B7A0F00E37D70 /* QRadioDial.m in Sources */ = {isa = PBXBuildFile; fileRef = 1138CF98139B7A0F00E37D70 /* QRadioDial.m */; }; 1138CFAA139C820D00E37D70 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1138CFA9139C820D00E37D70 /* QuartzCore.framework */; }; 1178378B12C0EC5B00FC9681 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1178378912C0EC5B00FC9681 /* main.m */; }; 117837CF12C0EE7F00FC9681 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837C612C0EE7F00FC9681 /* AppDelegate.m */; }; 117837D012C0EE7F00FC9681 /* SlidePadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837C912C0EE7F00FC9681 /* SlidePadViewController.m */; }; 117837D112C0EE7F00FC9681 /* Fingerboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837CC12C0EE7F00FC9681 /* Fingerboard.m */; }; 117837D212C0EE7F00FC9681 /* QSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837CE12C0EE7F00FC9681 /* QSlider.m */; }; 11820F6D1613F80000ACDC3E /* load-meter.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11820F6C1613F80000ACDC3E /* load-meter.pd */; }; 11A30EAF1611575A00786A6D /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A30EAA1611571B00786A6D /* libpd-ios.a */; }; 11A44FE112BC9079000B4443 /* classicsub-voice.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11A44FE012BC9079000B4443 /* classicsub-voice.pd */; }; 11C91C2C12C203760022693B /* TouchDiamond.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C91C2B12C203760022693B /* TouchDiamond.m */; }; 11FD016F1617D9E000D54A9C /* main.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11FD016E1617D9E000D54A9C /* main.pd */; }; 3063EF9521091F0000C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF9421091F0000C8A4A2 /* Default-568h@2x.png */; }; DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C300D125D15FC008B6389 /* Foundation.framework */; }; DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3011125D160B008B6389 /* UIKit.framework */; }; DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3015125D1614008B6389 /* CoreGraphics.framework */; }; DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */; }; DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD724CE125D1A1E000A4BDE /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 11A30EA91611571B00786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 11A30EAB1611571B00786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 11A30EAD1611575200786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = "libpd-ios"; }; 3063EF9021091E2500C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF9221091E2500C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0EDD8C1F130014F900D99E63 /* PolyPatchController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolyPatchController.h; sourceTree = ""; }; 0EDD8C20130014F900D99E63 /* PolyPatchController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PolyPatchController.m; sourceTree = ""; }; 0EE529681330D18D009D0B96 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 1106785712BF1F3E00EEF8B0 /* wavetabler-voice.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "wavetabler-voice.pd"; path = "pd/wavetabler-voice.pd"; sourceTree = ""; }; 111ED9871481A48F00C2FA29 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1138CF85139B78B500E37D70 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 1138CF95139B7A0F00E37D70 /* QControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QControl.h; sourceTree = ""; }; 1138CF96139B7A0F00E37D70 /* QControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QControl.m; sourceTree = ""; }; 1138CF97139B7A0F00E37D70 /* QRadioDial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRadioDial.h; sourceTree = ""; }; 1138CF98139B7A0F00E37D70 /* QRadioDial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QRadioDial.m; sourceTree = ""; }; 1138CFA9139C820D00E37D70 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 1178378812C0EC5B00FC9681 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = OtherSources/Common.h; sourceTree = ""; }; 1178378912C0EC5B00FC9681 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OtherSources/main.m; sourceTree = ""; }; 1178378A12C0EC5B00FC9681 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = OtherSources/Prefix.pch; sourceTree = ""; }; 1178378E12C0ECB200FC9681 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; 117837C512C0EE7F00FC9681 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 117837C612C0EE7F00FC9681 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 117837C812C0EE7F00FC9681 /* SlidePadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePadViewController.h; sourceTree = ""; }; 117837C912C0EE7F00FC9681 /* SlidePadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SlidePadViewController.m; sourceTree = ""; }; 117837CB12C0EE7F00FC9681 /* Fingerboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Fingerboard.h; path = Views/Fingerboard.h; sourceTree = ""; }; 117837CC12C0EE7F00FC9681 /* Fingerboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Fingerboard.m; path = Views/Fingerboard.m; sourceTree = ""; }; 117837CD12C0EE7F00FC9681 /* QSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QSlider.h; sourceTree = ""; }; 117837CE12C0EE7F00FC9681 /* QSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QSlider.m; sourceTree = ""; }; 11820F6C1613F80000ACDC3E /* load-meter.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "load-meter.pd"; path = "pd/load-meter.pd"; sourceTree = ""; }; 11A44FE012BC9079000B4443 /* classicsub-voice.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "classicsub-voice.pd"; path = "pd/classicsub-voice.pd"; sourceTree = ""; }; 11C91C2A12C203760022693B /* TouchDiamond.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TouchDiamond.h; path = Views/TouchDiamond.h; sourceTree = ""; }; 11C91C2B12C203760022693B /* TouchDiamond.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TouchDiamond.m; path = Views/TouchDiamond.m; sourceTree = ""; }; 11FD016E1617D9E000D54A9C /* main.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.pd; path = pd/main.pd; sourceTree = ""; }; 1D6058910D05DD3D006BFB54 /* SlidePad.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SlidePad.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9421091F0000C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; DC0C300D125D15FC008B6389 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DC0C3011125D160B008B6389 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DC0C3015125D1614008B6389 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; DCD724CE125D1A1E000A4BDE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 11A30EAF1611575A00786A6D /* libpd-ios.a in Frameworks */, 111ED9881481A48F00C2FA29 /* AVFoundation.framework in Frameworks */, 1138CFAA139C820D00E37D70 /* QuartzCore.framework in Frameworks */, DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */, DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */, DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */, DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */, DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 117837C412C0EE7F00FC9681 /* Classes */ = { isa = PBXGroup; children = ( 117837C512C0EE7F00FC9681 /* AppDelegate.h */, 117837C612C0EE7F00FC9681 /* AppDelegate.m */, 117837C712C0EE7F00FC9681 /* Controllers */, 11DD271E1610028B0054B03D /* Fingerboard */, 117837CA12C0EE7F00FC9681 /* QControls */, ); path = Classes; sourceTree = ""; }; 117837C712C0EE7F00FC9681 /* Controllers */ = { isa = PBXGroup; children = ( 117837C812C0EE7F00FC9681 /* SlidePadViewController.h */, 117837C912C0EE7F00FC9681 /* SlidePadViewController.m */, 0EDD8C1F130014F900D99E63 /* PolyPatchController.h */, 0EDD8C20130014F900D99E63 /* PolyPatchController.m */, ); path = Controllers; sourceTree = ""; }; 117837CA12C0EE7F00FC9681 /* QControls */ = { isa = PBXGroup; children = ( 1138CF95139B7A0F00E37D70 /* QControl.h */, 1138CF96139B7A0F00E37D70 /* QControl.m */, 1138CF97139B7A0F00E37D70 /* QRadioDial.h */, 1138CF98139B7A0F00E37D70 /* QRadioDial.m */, 117837CD12C0EE7F00FC9681 /* QSlider.h */, 117837CE12C0EE7F00FC9681 /* QSlider.m */, ); name = QControls; path = Views; sourceTree = ""; }; 117EAAA312B7754400C00CFC /* pd files */ = { isa = PBXGroup; children = ( 11FD016E1617D9E000D54A9C /* main.pd */, 1106785712BF1F3E00EEF8B0 /* wavetabler-voice.pd */, 11A44FE012BC9079000B4443 /* classicsub-voice.pd */, 11820F6C1613F80000ACDC3E /* load-meter.pd */, ); name = "pd files"; sourceTree = ""; }; 11A30EA51611571B00786A6D /* Products */ = { isa = PBXGroup; children = ( 11A30EAA1611571B00786A6D /* libpd-ios.a */, 11A30EAC1611571B00786A6D /* libpd-osx.a */, 3063EF9121091E2500C8A4A2 /* libpd-ios-multi.a */, 3063EF9321091E2500C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 11DD271E1610028B0054B03D /* Fingerboard */ = { isa = PBXGroup; children = ( 117837CB12C0EE7F00FC9681 /* Fingerboard.h */, 117837CC12C0EE7F00FC9681 /* Fingerboard.m */, 11C91C2A12C203760022693B /* TouchDiamond.h */, 11C91C2B12C203760022693B /* TouchDiamond.m */, ); name = Fingerboard; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* SlidePad.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 3063EF9421091F0000C8A4A2 /* Default-568h@2x.png */, 0EE529681330D18D009D0B96 /* libpd.xcodeproj */, 117837C412C0EE7F00FC9681 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 117EAAA312B7754400C00CFC /* pd files */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 1178378812C0EC5B00FC9681 /* Common.h */, 1178378912C0EC5B00FC9681 /* main.m */, 1178378A12C0EC5B00FC9681 /* Prefix.pch */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 1178378E12C0ECB200FC9681 /* Info.plist */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 111ED9871481A48F00C2FA29 /* AVFoundation.framework */, 1138CFA9139C820D00E37D70 /* QuartzCore.framework */, 1138CF85139B78B500E37D70 /* SystemConfiguration.framework */, DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */, DC0C300D125D15FC008B6389 /* Foundation.framework */, DC0C3011125D160B008B6389 /* UIKit.framework */, DC0C3015125D1614008B6389 /* CoreGraphics.framework */, DCD724CE125D1A1E000A4BDE /* Foundation.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* SlidePad */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SlidePad" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( 11A30EAE1611575200786A6D /* PBXTargetDependency */, ); name = SlidePad; productName = SlidePad01; productReference = 1D6058910D05DD3D006BFB54 /* SlidePad.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = Blarg; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SlidePad" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 11A30EA51611571B00786A6D /* Products */; ProjectRef = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* SlidePad */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 11A30EAA1611571B00786A6D /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 11A30EA91611571B00786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 11A30EAC1611571B00786A6D /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 11A30EAB1611571B00786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9121091E2500C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF9021091E2500C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9321091E2500C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF9221091E2500C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 11A44FE112BC9079000B4443 /* classicsub-voice.pd in Resources */, 1106785812BF1F3E00EEF8B0 /* wavetabler-voice.pd in Resources */, 11820F6D1613F80000ACDC3E /* load-meter.pd in Resources */, 3063EF9521091F0000C8A4A2 /* Default-568h@2x.png in Resources */, 11FD016F1617D9E000D54A9C /* main.pd in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1178378B12C0EC5B00FC9681 /* main.m in Sources */, 117837CF12C0EE7F00FC9681 /* AppDelegate.m in Sources */, 117837D012C0EE7F00FC9681 /* SlidePadViewController.m in Sources */, 117837D112C0EE7F00FC9681 /* Fingerboard.m in Sources */, 117837D212C0EE7F00FC9681 /* QSlider.m in Sources */, 11C91C2C12C203760022693B /* TouchDiamond.m in Sources */, 0EDD8C21130014F900D99E63 /* PolyPatchController.m in Sources */, 1138CF99139B7A0F00E37D70 /* QControl.m in Sources */, 1138CF9A139B7A0F00E37D70 /* QRadioDial.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 11A30EAE1611575200786A6D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libpd-ios"; targetProxy = 11A30EAD1611575200786A6D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = ( "-DR_DEBUG", "-DDEBUG", "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.SlidePad; PRODUCT_NAME = SlidePad; SDKROOT = iphoneos; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.SlidePad; PRODUCT_NAME = SlidePad; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc/; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc/; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SlidePad" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SlidePad" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: SlidePad/pd/classicsub-voice.pd ================================================ #N canvas 762 139 429 483 10; #N canvas 58 40 781 654 16x 0; #X obj 69 345 *~ 0.064; #X obj 69 368 rpole~ 0.93538; #X obj 69 391 *~ 0.00431; #X obj 69 414 cpole~ 0.96559 0.05592; #X obj 69 440 cpole~ 0.96559 -0.05592; #X obj 69 463 *~ 0.125; #X obj 69 486 rzero~ -1; #X obj 69 509 rzero~ -1; #X obj 69 532 rzero~ -1; #X obj 70 97 phasor~; #X obj 69 566 outlet~; #X obj 93 151 wrap~; #X obj 93 127 -~; #X obj 93 175 *~; #X obj 70 204 +~; #X obj 271 156 phasor~; #X obj 294 210 wrap~; #X obj 294 186 -~; #X obj 294 234 *~; #X obj 271 263 +~; #X obj 69 311 +~; #X obj 250 34 r osc-params; #X obj 250 57 unpack 0 0 0 0 0 0; #X obj 272 100 *~; #X obj 272 128 +~; #X msg 341 338 \; osc-params 0.5 -0.5 0.5 0.5 1 0.5; #X obj 341 312 loadbang; #X text 433 33 Problem: I had to remove the block~ 1024 for use with libpd; #X obj 69 29 inlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 1 4 1; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 10 0; #X connect 9 0 12 0; #X connect 9 0 14 0; #X connect 11 0 13 0; #X connect 12 0 11 0; #X connect 13 0 14 1; #X connect 14 0 20 0; #X connect 15 0 17 0; #X connect 15 0 19 0; #X connect 16 0 18 0; #X connect 17 0 16 0; #X connect 18 0 19 1; #X connect 19 0 20 1; #X connect 20 0 0 0; #X connect 21 0 22 0; #X connect 22 0 12 1; #X connect 22 1 13 1; #X connect 22 2 17 1; #X connect 22 3 18 1; #X connect 22 4 23 1; #X connect 22 5 24 1; #X connect 23 0 24 0; #X connect 24 0 15 0; #X connect 26 0 25 0; #X connect 28 0 9 0; #X connect 28 0 23 0; #X restore 66 185 pd 16x; #X obj 130 259 line~; #X obj 130 230 pack 0 40; #X obj 115 289 *~; #X obj 65 92 mtof; #X obj 66 127 pack f 30; #X obj 66 153 line~; #X obj 118 92 r synth-freq-ramptime; #X obj 66 56 r \$0-synth-freq; #X obj 129 186 r \$0-synth-mag; #X text 18 413 https://github.com/libpd/pd-for-ios; #X text 17 436 For information on usage and redistribution \, see the license included with Pure Data.; #N canvas 736 814 450 300 test 0; #X floatatom 22 123 5 0 0 0 - - -; #X floatatom 126 122 5 0 0 0 - - -; #X floatatom 60 206 5 0 0 0 - - -; #X msg 336 30 \; pd dsp 1; #X msg 336 67 \; pd dsp 0; #X msg 126 94 500; #X msg 89 92 0.9; #X obj 55 181 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 0; #X obj 22 34 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 126 151 s vcf-cutoff; #X msg 22 91 40; #X msg 53 91 46; #X msg 229 94 75; #X floatatom 228 121 5 0 0 0 - - -; #X obj 234 154 s synth-freq-ramptime; #X obj 23 152 s \$0-synth-freq; #X obj 54 224 s \$0-synth-mag; #X text 16 268 note: main.pd must be open for this patch to work; #X connect 0 0 15 0; #X connect 1 0 9 0; #X connect 5 0 1 0; #X connect 6 0 7 0; #X connect 7 0 2 0; #X connect 7 0 16 0; #X connect 8 0 10 0; #X connect 8 0 6 0; #X connect 8 0 5 0; #X connect 8 0 12 0; #X connect 10 0 0 0; #X connect 11 0 0 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X restore 339 24 pd test; #X text 19 367 This pd patch has been adapted from pd's own help file 'J08.classicsynth.pd' for use with SlidePad \, an iOS app within the pd-for-ios collection \, powered by libpd.; #X obj 115 322 throw~ slidepad-audio; #X connect 0 0 3 0; #X connect 1 0 3 1; #X connect 2 0 1 0; #X connect 3 0 14 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 0 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 2 0; ================================================ FILE: SlidePad/pd/load-meter.pd ================================================ #N canvas 161 261 299 317 12; #X floatatom 79 255 0 0 0 0 - - -; #X obj 118 168 cputime; #X obj 118 28 loadbang; #X obj 118 112 metro 1000; #X msg 118 56 1; #X floatatom 118 84 0 0 0 0 - - -; #X obj 118 140 t b b; #X obj 118 228 * 0.1; #X obj 118 197 int; #X text 163 84 <-- on/off; #X text 51 284 CPU load in percent; #X obj 118 256 s load-meter; #X connect 1 0 8 0; #X connect 2 0 4 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 1 0; #X connect 6 1 1 1; #X connect 7 0 0 0; #X connect 7 0 11 0; #X connect 8 0 7 0; ================================================ FILE: SlidePad/pd/main.pd ================================================ #N canvas 1476 761 408 358 10; #X obj 239 66 table wavetable 1027; #N canvas 0 22 450 300 load-wavetable 0; #X obj 53 23 loadbang; #X text 168 160 from ocarina.yaml \, frame 84 \, .28s; #X msg 38 107 cosinesum 1024 0 1 0.00504083 0.0565903 0.0108557 0.00585451 0.0040287 0.00134951 0.00192504 0.00140905 \, normalize; #X msg 55 56 cosinesum 1024 0 0.7 0.3 0.5 \, normalize; #X obj 47 244 s wavetable; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 3 0 4 0; #X restore 240 39 pd load-wavetable; #X obj 32 36 catch~ slidepad-audio; #X obj 32 95 dac~; #N canvas 1260 256 281 347 filter 0; #X obj 67 12 inlet~; #X obj 108 229 line~; #X obj 126 119 t b f; #X obj 128 11 r vcf-cutoff; #X obj 69 303 outlet~; #X obj 69 267 vcf~ 3; #X obj 109 151 * 50; #X obj 153 63 loadbang; #X obj 163 89 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 82 41 env~; #X obj 83 68 * 0.5; #X obj 109 205 pack f 50; #X connect 0 0 5 0; #X connect 0 0 9 0; #X connect 1 0 5 1; #X connect 2 0 6 0; #X connect 2 1 6 1; #X connect 3 0 2 0; #X connect 5 0 4 0; #X connect 6 0 11 0; #X connect 7 0 2 0; #X connect 8 0 2 0; #X connect 9 0 10 0; #X connect 10 0 6 0; #X connect 11 0 1 0; #X restore 32 66 pd filter; #X text 12 281 For information on usage and redistribution \, and for a DISCLAIMER OF ALL WARRANTIES \, see the file \, "LICENSE.txt \, " in this distribution.; #X text 15 208 This pd patch was made for SlidePad \, an iOS app within the pd-for-ios collection \, powered by libpd.; #X text 15 239 https://github.com/libpd/pd-for-ios; #X connect 2 0 4 0; #X connect 4 0 3 0; ================================================ FILE: SlidePad/pd/wavetabler-voice.pd ================================================ #N canvas 840 357 432 571 10; #X obj 105 284 line~; #X obj 105 255 pack 0 40; #X obj 57 325 *~; #X obj 58 61 mtof; #X obj 58 96 pack f 30; #X obj 58 122 line~; #X obj 110 61 r synth-freq-ramptime; #X obj 58 25 r \$0-synth-freq; #X obj 105 228 r \$0-synth-mag; #X text 12 491 For information on usage and redistribution \, and for a DISCLAIMER OF ALL WARRANTIES \, see the file \, "LICENSE.txt \, " in this distribution.; #X text 15 418 This pd patch was made for SlidePad \, an iOS app within the pd-for-ios collection \, powered by libpd.; #X text 15 449 https://github.com/libpd/pd-for-ios; #N canvas 1359 811 450 300 test 0; #X floatatom 22 123 5 0 0 0 - - -; #X msg 336 30 \; pd dsp 1; #X msg 336 67 \; pd dsp 0; #X obj 22 34 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 22 91 40; #X msg 53 91 46; #X msg 229 94 75; #X floatatom 228 121 5 0 0 0 - - -; #X obj 228 149 s synth-freq-ramptime; #X obj 23 152 s \$0-synth-freq; #X floatatom 137 206 5 0 0 0 - - -; #X msg 129 92 0.9; #X obj 132 181 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 11430 0; #X obj 23 152 s \$0-synth-freq; #X obj 131 224 s \$0-synth-mag; #X text 21 267 note: main.pd must be open for this patch to work; #X connect 0 0 9 0; #X connect 3 0 4 0; #X connect 3 0 11 0; #X connect 3 0 6 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 11 0 12 0; #X connect 12 0 10 0; #X connect 12 0 14 0; #X restore 290 24 pd test; #X obj 58 176 tabosc4~ wavetable; #X obj 57 358 throw~ slidepad-audio; #X connect 0 0 2 1; #X connect 1 0 0 0; #X connect 2 0 14 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 13 0; #X connect 6 0 4 1; #X connect 7 0 3 0; #X connect 8 0 1 0; #X connect 13 0 2 0; ================================================ FILE: SlidePadBasic/Classes/AppDelegate.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdBase.h" @interface AppDelegate : NSObject { BOOL playing_; } @property (nonatomic, retain) UIWindow *window; @property (nonatomic, getter=isPlaying) BOOL playing; // a globally accesible flag to start or stop audio @end ================================================ FILE: SlidePadBasic/Classes/AppDelegate.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "AppDelegate.h" #import "SlidePadBasicViewController.h" #import "PdAudioController.h" @interface AppDelegate () @property (nonatomic, retain) SlidePadBasicViewController *viewController; @property (nonatomic, retain) PdAudioController *audioController; - (void)setupPd; @end @implementation AppDelegate @synthesize window = window_; @synthesize viewController = viewController_; @synthesize audioController = audioController_; #pragma mark - Application lifecycle - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.viewController = [[SlidePadBasicViewController alloc] init]; self.window.rootViewController = self.viewController; [self setupPd]; [self.window addSubview:self.viewController.view]; [self.window makeKeyAndVisible]; return YES; } - (void)setupPd { // Configure a typical audio session with 2 output channels self.audioController = [[PdAudioController alloc] init]; PdAudioStatus status = [self.audioController configurePlaybackWithSampleRate:44100 numberChannels:2 inputEnabled:NO mixingEnabled:NO]; if (status == PdAudioError) { RLog(@"Error! Could not configure PdAudioController"); } else if (status == PdAudioPropertyChanged) { RLog(@"Warning: some of the audio parameters were not accceptable."); } else { RLog(@"Audio Configuration successful."); } // log actually settings [self.audioController print]; // set AppDelegate as PdRecieverDelegate to recieve messages from pd [PdBase setDelegate:self]; // recieve all [send load-meter] messages from pd [PdBase subscribe:@"load-meter"]; // open one instance of the load-meter patch and forget about it [PdBase openFile:@"load-meter.pd" path:[[NSBundle mainBundle] bundlePath]]; } #pragma mark - PdRecieverDelegate // handle [print] messages from pd - (void)receivePrint:(NSString *)message { NSLog(@"Pd Console: %@", message); } // handle subscribed float messages from pd - (void)receiveFloat:(float)received fromSource:(NSString *)source { if ([source isEqualToString:@"load-meter"]) { self.viewController.loadPercentage = (int)received; } } #pragma mark - Accessors - (BOOL)isPlaying { return playing_; } - (void)setPlaying:(BOOL)newState { if( newState == playing_ ) return; playing_ = newState; self.audioController.active = playing_; } #pragma mark - UIApplicationDelegate - (void)applicationWillResignActive:(UIApplication *)application { self.playing = NO; } - (void)applicationDidBecomeActive:(UIApplication *)application { self.playing = YES; } - (void)applicationWillTerminate:(UIApplication *)application { self.playing = NO; } @end ================================================ FILE: SlidePadBasic/Classes/Controllers/SlidePadBasicViewController.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface SlidePadBasicViewController : UIViewController @property (nonatomic, assign) int loadPercentage; @end ================================================ FILE: SlidePadBasic/Classes/Controllers/SlidePadBasicViewController.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "SlidePadBasicViewController.h" #import "PdBase.h" #import "PdFile.h" #import "AppDelegate.h" #import "Fingerboard.h" #define TOGGLE_OFF_COLOR [UIColor darkGrayColor] #define TOGGLE_ON_COLOR [UIColor colorWithRed:0.0 green:0.5 blue:0.5 alpha:1.0] @interface SlidePadBasicViewController () @property (nonatomic, retain) UIButton *playToggle; @property (nonatomic, retain) UILabel *loadLabel; @property (nonatomic, retain) Fingerboard *fingerboard; @property (nonatomic, retain) PdFile *patch; - (void)loadPatch; - (void)formatLoadLabel; - (void)playTogglePressed:(UIButton *)sender; - (UIButton *)newButton; - (UILabel *)newLabel; @end @implementation SlidePadBasicViewController @synthesize playToggle = playToggle_; @synthesize fingerboard = fingerboard_; @synthesize loadPercentage = loadPercentage_; @synthesize loadLabel = loadLabel_; #pragma mark - View management - (void)loadView { [super loadView]; [self loadPatch]; // UI Setup: self.view.backgroundColor = [UIColor blackColor]; // add a DSP toggle self.playToggle = [self newButton]; [self.playToggle addTarget:self action:@selector(playTogglePressed:) forControlEvents:UIControlEventTouchUpInside]; [self.playToggle setTitle:@"DSP Off" forState:UIControlStateNormal]; [self.playToggle setTitle:@"DSP On" forState:UIControlStateSelected]; // add a label to display cpu load self.loadLabel = [self newLabel]; self.loadLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; [self formatLoadLabel]; // add The Fingerboard - the guy who triggers sound self.fingerboard = [[Fingerboard alloc] init]; self.fingerboard.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin; [self.view addSubview:self.playToggle]; [self.view addSubview:self.loadLabel]; [self.view addSubview:self.fingerboard]; } - (void)viewWillAppear:(BOOL)animated { [super viewDidAppear:animated]; // layout... [self.playToggle sizeToFit]; float vh = CGRectGetHeight(self.view.bounds); float vw = CGRectGetWidth(self.view.bounds); const float kSpacer = 10.0; const float kLoadWidth = 150.0; float widgetHeight = vh * 0.05; // top 5% of the view, to the left self.playToggle.frame = CGRectMake(kSpacer, kSpacer, self.playToggle.frame.size.width, widgetHeight); // top 5% of the view, to the right self.loadLabel.frame = CGRectMake(self.view.frame.size.width - kLoadWidth - kSpacer, kSpacer, kLoadWidth, widgetHeight); // rest of screen self.fingerboard.frame = CGRectMake(kSpacer, widgetHeight + kSpacer * 4.0, vw - kSpacer * 2.0, vh - widgetHeight - kSpacer * 5.0); // load with DSP on: [self playTogglePressed:self.playToggle]; } #pragma mark - Control Events - (void)playTogglePressed:(UIButton *)sender { AppDelegate *appDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate]; if([sender isSelected]){ sender.backgroundColor = TOGGLE_OFF_COLOR; sender.selected = NO; [self.fingerboard reset]; // kill all voices } else { sender.backgroundColor = TOGGLE_ON_COLOR; sender.selected = YES; } [appDelegate setPlaying:sender.selected]; } #pragma mark - Custom Accessors // whenever loadPercentage is set, update the label - (void)setLoadPercentage:(int)loadPercentage { if (loadPercentage_ != loadPercentage) { loadPercentage_ = loadPercentage; [self formatLoadLabel]; } } #pragma mark - Private Helpers - (void)loadPatch { self.patch = [PdFile openFileNamed:@"wavetabler.pd" path:[[NSBundle mainBundle] bundlePath]]; [PdBase sendFloat:50.0 toReceiver:@"synth-freq-ramptime"]; // the amount of time to interpolate from one pitch value to another [PdBase sendFloat:0 toReceiver:@"synth-mag"]; // initialize as no sound } - (void)formatLoadLabel { self.loadLabel.text = [NSString stringWithFormat:@"cpu load: %d%%", self.loadPercentage]; } - (UIButton *)newButton { UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.layer.cornerRadius = 8.0; button.layer.masksToBounds = YES; button.layer.borderWidth = 1.0; button.backgroundColor = TOGGLE_OFF_COLOR; button.showsTouchWhenHighlighted = YES; button.contentEdgeInsets = UIEdgeInsetsMake(0.0, 6.0, 0.0, 6.0); return button; } - (UILabel *)newLabel { UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; label.backgroundColor = [UIColor clearColor]; label.textColor = [UIColor colorWithRed:0.0 green:0.7 blue:0.3 alpha:1.0]; label.textAlignment = NSTextAlignmentRight; return label; } @end ================================================ FILE: SlidePadBasic/Classes/Views/Fingerboard.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface Fingerboard : UIView @property (nonatomic, assign) float minPitch; // minimum frequency in well-tempered tuning @property (nonatomic, assign) float maxPitch; // maximum frequency in well-tempered tuning @property (nonatomic, assign) float numNotes; // number of notes is defaulted to maxPitch - minPitch, but it doesn't have to be @property (nonatomic, assign) BOOL drawNoteLabels; // the little midi numbers at the bottom @property (nonatomic, retain) UIColor *sharpNoteColor; @property (nonatomic, retain) UIColor *touchColor; - (void)mute; // turn off audio - (void)reset; // last resort reset method @end ================================================ FILE: SlidePadBasic/Classes/Views/Fingerboard.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdBase.h" #import "Fingerboard.h" #import "TouchDiamond.h" #import "PdFile.h" #define RECEIVER_FREQ @"synth-freq" #define RECEIVER_MAG @"synth-mag" #define DEFAULT_SHARP_NOTES_COLOR [UIColor colorWithRed:0.0 green:0.5 blue:0.5 alpha:1.0] #define DEFAULT_OTHER_NOTES_COLOR [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0] static const CGFloat kThresholdForTouchRelease = 0.0; @interface Fingerboard () @property (nonatomic, retain) TouchDiamond *monoTouch; - (CGFloat)mapXToPitch:(CGFloat)x; // minPitch mapped to x = 0, maxPitch to x = self.frame.size.width - (CGFloat)mapYToMag:(CGFloat)y; // y is flipped so the top of the view (origin) = full magnitude, while bottom = 0 - (void)sendParamsOff; - (void)sendParamsWithPoint:(CGPoint)point; - (BOOL)pointIsWithinBounds:(CGPoint)point; @end @implementation Fingerboard @synthesize monoTouch = monoTouch_; @synthesize minPitch = minPitch_; @synthesize maxPitch = maxPitch_; @synthesize numNotes = numNotes_; @synthesize drawNoteLabels = drawNoteLabels_; @synthesize sharpNoteColor = sharpNoteColor_; #pragma mark - Setup - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.minPitch = 36.0; self.maxPitch = 60.0; self.numNotes = self.maxPitch - self.minPitch; self.drawNoteLabels = YES; self.clipsToBounds = YES; self.backgroundColor = DEFAULT_OTHER_NOTES_COLOR; self.sharpNoteColor = DEFAULT_SHARP_NOTES_COLOR; self.layer.borderColor = self.sharpNoteColor.CGColor; self.layer.borderWidth = 2.0; } return self; } #pragma mark - Public - (void)mute { [self sendParamsOff]; } - (void)reset { if (self.monoTouch) { [self.monoTouch removeFromSuperview]; self.monoTouch = nil; } [self sendParamsOff]; } #pragma mark - Drawing - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); float nNotes = self.numNotes; float noteWidth = self.frame.size.width / self.numNotes; // ***** create a layer for sharp notes ***** CGRect noteRect = CGRectMake(0.0, 0.0, noteWidth, CGRectGetHeight(self.bounds)); CGLayerRef noteLayer = CGLayerCreateWithContext (context, noteRect.size, NULL); CGContextRef noteContext = CGLayerGetContext (noteLayer); CGContextSetFillColorWithColor(noteContext, self.sharpNoteColor.CGColor); CGContextFillRect(noteContext, noteRect); // ***** create a layer for line notes (C's and F's). ***** CGLayerRef lineLayer = CGLayerCreateWithContext (context, noteRect.size, NULL); CGContextRef lineContext = CGLayerGetContext (lineLayer); CGContextSetStrokeColorWithColor(lineContext, self.sharpNoteColor.CGColor); CGContextBeginPath(lineContext); CGContextMoveToPoint(lineContext, 0.0, 0.0); CGContextAddLineToPoint(lineContext, 0.0, noteRect.size.height); CGContextClosePath(lineContext); CGContextStrokePath(lineContext); // ***** set up text for midi number ***** const float kTextColorGrayLevel = 0.75; UIColor *gray = [UIColor colorWithWhite:kTextColorGrayLevel alpha:1.0]; UIFont *font; if (self.drawNoteLabels) { font = [UIFont fontWithName:@"Helvetica" size:12]; } CGContextSetStrokeColorWithColor(context, gray.CGColor); int nm, ns; CGPoint notePoint = CGPointZero; for (int n = 0; n < nNotes; n++) { ns = n + self.minPitch; nm = ns % 12; if (nm == 1 || nm == 3 || nm == 6 || nm == 8 || nm == 10) { // draw the sharp notes notePoint.x = n * noteWidth; CGContextDrawLayerAtPoint (context, notePoint, noteLayer); } else if (nm == 0 || nm == 5) { // draw the lines in between consecutive 'white' keys notePoint.x = n * noteWidth; CGContextDrawLayerAtPoint (context, notePoint, lineLayer); } if (self.drawNoteLabels) { NSString *noteLabel = [NSString stringWithFormat:@"%d", ns]; [noteLabel drawAtPoint:CGPointMake(n * noteWidth + 3.0, self.bounds.size.height - 16.0) withAttributes:@{NSFontAttributeName:font, NSForegroundColorAttributeName:gray}]; } } } #pragma mark - Touches // create a new TouchDiamond and update pd with params from this point - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if (self.monoTouch) { [self.monoTouch removeFromSuperview]; } CGPoint point = [[touches anyObject] locationInView:self]; self.monoTouch = [[TouchDiamond alloc] init]; self.monoTouch.center = point; [self addSubview:self.monoTouch]; [self.monoTouch displayAnimated]; [self sendParamsWithPoint:point]; } // if the point is within this view's bounds, update it's position and pd - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint point = [[touches anyObject] locationInView:self]; if (![self pointIsWithinBounds:point]) { // could remove the monoTouch here, but I chose not to, // if it moves far enough out of the view the touchesCancelled // will be called return; } self.monoTouch.center = point; [self sendParamsWithPoint:point]; } // remove TouchDiamond and turn off the sound for this voice in pd - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { if (!self.monoTouch) { return; } [self.monoTouch removeFromSuperview]; self.monoTouch = nil; [self sendParamsOff]; } // forward to touchesEnded - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { RLog(@"************ touches cancelled ***************"); [self touchesEnded:touches withEvent:event]; } #pragma mark - Mapping functions - (void)sendParamsWithPoint:(CGPoint)point { // pitch is related to the x location in view, scaled within min and max Pitch float pitch = self.minPitch + (self.maxPitch - self.minPitch) * point.x / CGRectGetWidth(self.frame); // mag is related to the inverted y location in view, so loudest (1.0) is on top float mag = (CGRectGetHeight(self.frame) - point.y) / CGRectGetHeight(self.frame); [PdBase sendFloat:mag toReceiver:RECEIVER_MAG]; [PdBase sendFloat:pitch toReceiver:RECEIVER_FREQ]; } - (void)sendParamsOff{ [PdBase sendFloat:0 toReceiver:RECEIVER_MAG]; } - (CGFloat)mapXToPitch:(CGFloat)x { float w = CGRectGetWidth(self.frame); float sx = self.minPitch + (self.maxPitch - self.minPitch) * x / w; return sx; } - (CGFloat)mapYToMag:(CGFloat)y { float h = CGRectGetHeight(self.frame); return (h - y) / h; } #pragma mark - Private - (BOOL)pointIsWithinBounds:(CGPoint)point { if (point.x < -kThresholdForTouchRelease || point.x > self.bounds.size.width + kThresholdForTouchRelease || point.y < -kThresholdForTouchRelease || point.y > self.bounds.size.height + kThresholdForTouchRelease) { return NO; } else { return YES; } } @end ================================================ FILE: SlidePadBasic/Classes/Views/TouchDiamond.h ================================================ /* Copyright (c) 2012, Richard Eakin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import @interface TouchDiamond : UIView @property (nonatomic, assign) NSInteger touchIndex; // identifier for this touch - (id)initWithIndex:(NSInteger)touchIndex; - (void)displayAnimated; // diamond grows to full size @end ================================================ FILE: SlidePadBasic/Classes/Views/TouchDiamond.m ================================================ /* Copyright (c) 2012, Richard Eakin Updated by Dan Wilcox 2018 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #import "TouchDiamond.h" #define DIAMOND_WIDTH 40.0 #define DIAMOND_HEIGHT 100.0 @implementation TouchDiamond @synthesize touchIndex = touchIndex_; - (id)initWithIndex:(NSInteger)touchIndex { self = [super init]; if(self) { self.touchIndex = touchIndex; } return self; } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:CGRectMake(0.0, 0.0, DIAMOND_WIDTH * 0.8, DIAMOND_HEIGHT * 0.4)]; if (self) { self.backgroundColor = [UIColor clearColor]; } return self; } - (void)displayAnimated { [UIView animateWithDuration:0.2 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ self.bounds = CGRectMake(0.0, 0.0, DIAMOND_WIDTH, DIAMOND_HEIGHT); } completion:nil]; } - (void)drawRect:(CGRect)rect { CGContextRef c = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(c, 1.0, 0.3, 0.0, 0.5); CGContextSetRGBStrokeColor(c, 1.0, 0.0, 0.0, 0.75); CGContextSetLineWidth(c, 1.0); float midx = CGRectGetMidX(self.bounds); float midy = CGRectGetMidY(self.bounds); float maxx = CGRectGetWidth(self.bounds); float maxy = CGRectGetHeight(self.bounds); CGPoint diamond[8] = { CGPointMake(0.0, midy), CGPointMake(midx, maxy ), CGPointMake(midx, maxy), CGPointMake(maxx, midy), CGPointMake(maxx, midy), CGPointMake(midx, 0.0), CGPointMake(midx, 0.0), CGPointMake(0.0, midy) }; CGContextAddLines(c, diamond, 8); CGContextDrawPath(c, kCGPathFillStroke); } @end ================================================ FILE: SlidePadBasic/OtherSources/Common.h ================================================ #ifdef R_DEBUG #define RLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #else #define RLog(...) do { } while (0) #endif ================================================ FILE: SlidePadBasic/OtherSources/Prefix.pch ================================================ #ifdef __OBJC__ #import #import #import #import "Common.h" #endif ================================================ FILE: SlidePadBasic/OtherSources/main.m ================================================ #import #import "AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(AppDelegate.class)); } } ================================================ FILE: SlidePadBasic/ReadMe.txt ================================================ SlidePadBasic iOS app (part of pd-for-ios, example apps for libpd in iOS) Nov 21, 2011 This is a simpler, monophonic version of the SlidePad sample that demonstrates the basics of real-time synthesis with touches. The main interface resembles a midi keyboard layout and you run your finger across it to change the pitch and magnitude. There is also a cpu load label, which exemplifies how to register and recieve data from pd (the patch for calculating the load is taken from pd's 'Load Meter'). ------ License ------------------------------------------------------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Richard Eakin and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: SlidePadBasic/Resources/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.1 LSRequiresIPhoneOS UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: SlidePadBasic/SlidePadBasic.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 1106785812BF1F3E00EEF8B0 /* wavetabler.pd in Resources */ = {isa = PBXBuildFile; fileRef = 1106785712BF1F3E00EEF8B0 /* wavetabler.pd */; }; 111ED9881481A48F00C2FA29 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 111ED9871481A48F00C2FA29 /* AVFoundation.framework */; }; 1138CFAA139C820D00E37D70 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1138CFA9139C820D00E37D70 /* QuartzCore.framework */; }; 1178378B12C0EC5B00FC9681 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1178378912C0EC5B00FC9681 /* main.m */; }; 117837CF12C0EE7F00FC9681 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837C612C0EE7F00FC9681 /* AppDelegate.m */; }; 117837D012C0EE7F00FC9681 /* SlidePadBasicViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837C912C0EE7F00FC9681 /* SlidePadBasicViewController.m */; }; 117837D112C0EE7F00FC9681 /* Fingerboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 117837CC12C0EE7F00FC9681 /* Fingerboard.m */; }; 11820F3816126D9000ACDC3E /* load-meter.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11820F3716126D9000ACDC3E /* load-meter.pd */; }; 11A30EAF1611575A00786A6D /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 11A30EAA1611571B00786A6D /* libpd-ios.a */; }; 11C91C2C12C203760022693B /* TouchDiamond.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C91C2B12C203760022693B /* TouchDiamond.m */; }; 3063EFA0210A02F400C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EF9F210A02F400C8A4A2 /* Default-568h@2x.png */; }; DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C300D125D15FC008B6389 /* Foundation.framework */; }; DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3011125D160B008B6389 /* UIKit.framework */; }; DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC0C3015125D1614008B6389 /* CoreGraphics.framework */; }; DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */; }; DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD724CE125D1A1E000A4BDE /* Foundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 11A30EA91611571B00786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = "libpd-ios"; }; 11A30EAB1611571B00786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 11A30EAD1611575200786A6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = "libpd-ios"; }; 3063EF9B210A02F000C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EF9D210A02F000C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0EE529681330D18D009D0B96 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = ""; }; 1106785712BF1F3E00EEF8B0 /* wavetabler.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = wavetabler.pd; path = pd/wavetabler.pd; sourceTree = ""; }; 111ED9871481A48F00C2FA29 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1138CF85139B78B500E37D70 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 1138CFA9139C820D00E37D70 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 1178378812C0EC5B00FC9681 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Common.h; path = OtherSources/Common.h; sourceTree = ""; }; 1178378912C0EC5B00FC9681 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OtherSources/main.m; sourceTree = ""; }; 1178378A12C0EC5B00FC9681 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = OtherSources/Prefix.pch; sourceTree = ""; }; 1178378E12C0ECB200FC9681 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; 117837C512C0EE7F00FC9681 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 117837C612C0EE7F00FC9681 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 117837C812C0EE7F00FC9681 /* SlidePadBasicViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidePadBasicViewController.h; sourceTree = ""; }; 117837C912C0EE7F00FC9681 /* SlidePadBasicViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SlidePadBasicViewController.m; sourceTree = ""; }; 117837CB12C0EE7F00FC9681 /* Fingerboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Fingerboard.h; path = Views/Fingerboard.h; sourceTree = ""; }; 117837CC12C0EE7F00FC9681 /* Fingerboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Fingerboard.m; path = Views/Fingerboard.m; sourceTree = ""; }; 11820F3716126D9000ACDC3E /* load-meter.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "load-meter.pd"; path = "pd/load-meter.pd"; sourceTree = ""; }; 11C91C2A12C203760022693B /* TouchDiamond.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TouchDiamond.h; path = Views/TouchDiamond.h; sourceTree = ""; }; 11C91C2B12C203760022693B /* TouchDiamond.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TouchDiamond.m; path = Views/TouchDiamond.m; sourceTree = ""; }; 1D6058910D05DD3D006BFB54 /* SlidePadBasic.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SlidePadBasic.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9F210A02F400C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; DC0C300D125D15FC008B6389 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; DC0C3011125D160B008B6389 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; DC0C3015125D1614008B6389 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; DCD724CE125D1A1E000A4BDE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 11A30EAF1611575A00786A6D /* libpd-ios.a in Frameworks */, 111ED9881481A48F00C2FA29 /* AVFoundation.framework in Frameworks */, 1138CFAA139C820D00E37D70 /* QuartzCore.framework in Frameworks */, DCCC7CDF125C3E0F002CF6AC /* AudioToolbox.framework in Frameworks */, DC0C300E125D15FC008B6389 /* Foundation.framework in Frameworks */, DC0C3012125D160B008B6389 /* UIKit.framework in Frameworks */, DC0C3016125D1614008B6389 /* CoreGraphics.framework in Frameworks */, DCD724CF125D1A1E000A4BDE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 117837C412C0EE7F00FC9681 /* Classes */ = { isa = PBXGroup; children = ( 117837C512C0EE7F00FC9681 /* AppDelegate.h */, 117837C612C0EE7F00FC9681 /* AppDelegate.m */, 117837C712C0EE7F00FC9681 /* Controllers */, 11DD271E1610028B0054B03D /* Fingerboard */, ); path = Classes; sourceTree = ""; }; 117837C712C0EE7F00FC9681 /* Controllers */ = { isa = PBXGroup; children = ( 117837C812C0EE7F00FC9681 /* SlidePadBasicViewController.h */, 117837C912C0EE7F00FC9681 /* SlidePadBasicViewController.m */, ); path = Controllers; sourceTree = ""; }; 117EAAA312B7754400C00CFC /* pd files */ = { isa = PBXGroup; children = ( 11820F3716126D9000ACDC3E /* load-meter.pd */, 1106785712BF1F3E00EEF8B0 /* wavetabler.pd */, ); name = "pd files"; sourceTree = ""; }; 11A30EA51611571B00786A6D /* Products */ = { isa = PBXGroup; children = ( 11A30EAA1611571B00786A6D /* libpd-ios.a */, 11A30EAC1611571B00786A6D /* libpd-osx.a */, 3063EF9C210A02F000C8A4A2 /* libpd-ios-multi.a */, 3063EF9E210A02F000C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 11DD271E1610028B0054B03D /* Fingerboard */ = { isa = PBXGroup; children = ( 117837CB12C0EE7F00FC9681 /* Fingerboard.h */, 117837CC12C0EE7F00FC9681 /* Fingerboard.m */, 11C91C2A12C203760022693B /* TouchDiamond.h */, 11C91C2B12C203760022693B /* TouchDiamond.m */, ); name = Fingerboard; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* SlidePadBasic.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 3063EF9F210A02F400C8A4A2 /* Default-568h@2x.png */, 0EE529681330D18D009D0B96 /* libpd.xcodeproj */, 117837C412C0EE7F00FC9681 /* Classes */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, 117EAAA312B7754400C00CFC /* pd files */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( 1178378812C0EC5B00FC9681 /* Common.h */, 1178378912C0EC5B00FC9681 /* main.m */, 1178378A12C0EC5B00FC9681 /* Prefix.pch */, ); name = "Other Sources"; sourceTree = ""; }; 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( 1178378E12C0ECB200FC9681 /* Info.plist */, ); name = Resources; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 111ED9871481A48F00C2FA29 /* AVFoundation.framework */, 1138CFA9139C820D00E37D70 /* QuartzCore.framework */, 1138CF85139B78B500E37D70 /* SystemConfiguration.framework */, DCCC7CDE125C3E0F002CF6AC /* AudioToolbox.framework */, DC0C300D125D15FC008B6389 /* Foundation.framework */, DC0C3011125D160B008B6389 /* UIKit.framework */, DC0C3015125D1614008B6389 /* CoreGraphics.framework */, DCD724CE125D1A1E000A4BDE /* Foundation.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* SlidePadBasic */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SlidePadBasic" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( 11A30EAE1611575200786A6D /* PBXTargetDependency */, ); name = SlidePadBasic; productName = SlidePad01; productReference = 1D6058910D05DD3D006BFB54 /* SlidePadBasic.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = Blarg; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SlidePadBasic" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 11A30EA51611571B00786A6D /* Products */; ProjectRef = 0EE529681330D18D009D0B96 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* SlidePadBasic */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 11A30EAA1611571B00786A6D /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 11A30EA91611571B00786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 11A30EAC1611571B00786A6D /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 11A30EAB1611571B00786A6D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9C210A02F000C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EF9B210A02F000C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EF9E210A02F000C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EF9D210A02F000C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 1106785812BF1F3E00EEF8B0 /* wavetabler.pd in Resources */, 11820F3816126D9000ACDC3E /* load-meter.pd in Resources */, 3063EFA0210A02F400C8A4A2 /* Default-568h@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 1178378B12C0EC5B00FC9681 /* main.m in Sources */, 117837CF12C0EE7F00FC9681 /* AppDelegate.m in Sources */, 117837D012C0EE7F00FC9681 /* SlidePadBasicViewController.m in Sources */, 117837D112C0EE7F00FC9681 /* Fingerboard.m in Sources */, 11C91C2C12C203760022693B /* TouchDiamond.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 11A30EAE1611575200786A6D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "libpd-ios"; targetProxy = 11A30EAD1611575200786A6D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = ( "-DR_DEBUG", "-DDEBUG", "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.SlidePadBasic; PRODUCT_NAME = SlidePadBasic; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.SlidePadBasic; PRODUCT_NAME = SlidePadBasic; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc/; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ../libpd/objc/; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DPD", "-DUSA_API_DUMMY", "-DHAVE_LIBDL", "-DHAVE_UNISTD_H", ); PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD_32_BIT)"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SlidePadBasic" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SlidePadBasic" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: SlidePadBasic/pd/load-meter.pd ================================================ #N canvas 161 261 299 317 12; #X floatatom 79 255 0 0 0 0 - - -; #X obj 118 168 cputime; #X obj 118 28 loadbang; #X obj 118 112 metro 1000; #X msg 118 56 1; #X floatatom 118 84 0 0 0 0 - - -; #X obj 118 140 t b b; #X obj 118 228 * 0.1; #X obj 118 197 int; #X text 163 84 <-- on/off; #X text 51 284 CPU load in percent; #X obj 118 256 s load-meter; #X connect 1 0 8 0; #X connect 2 0 4 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 1 0; #X connect 6 1 1 1; #X connect 7 0 0 0; #X connect 7 0 11 0; #X connect 8 0 7 0; ================================================ FILE: SlidePadBasic/pd/wavetabler.pd ================================================ #N canvas 414 226 652 503 10; #X obj 57 398 dac~; #X obj 105 324 line~; #X obj 105 275 pack 0 40; #X obj 57 365 *~; #X obj 58 61 mtof; #X obj 303 180 loadbang; #X obj 58 96 pack f 30; #X obj 58 122 line~; #X obj 109 61 r synth-freq-ramptime; #X obj 58 176 tabosc4~ \$0-wavetable; #X obj 73 198 table \$0-wavetable 1027; #X obj 303 267 s \$0-wavetable; #X text 232 395 For information on usage and redistribution \, and for a DISCLAIMER OF ALL WARRANTIES \, see the file \, "LICENSE.txt \, " in this distribution.; #X text 233 336 This pd patch was made for SlidePad \, an iOS app within the pd-for-ios collection \, powered by libpd.; #X text 233 367 https://github.com/libpd/pd-for-ios; #X msg 303 207 cosinesum 1024 0 0.7 0.3 0.5 \, normalize; #N canvas 747 506 450 300 test 0; #X floatatom 22 123 5 0 0 0 - - -; #X msg 336 30 \; pd dsp 1; #X msg 336 67 \; pd dsp 0; #X obj 22 34 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 22 11 loadbang; #X msg 22 91 40; #X msg 53 91 46; #X msg 229 94 75; #X floatatom 228 121 5 0 0 0 - - -; #X obj 228 149 s synth-freq-ramptime; #X floatatom 137 206 5 0 0 0 - - -; #X msg 129 92 0.9; #X obj 132 181 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 11430 0; #X obj 22 152 s synth-freq; #X obj 129 224 s synth-mag; #X connect 0 0 13 0; #X connect 3 0 5 0; #X connect 3 0 11 0; #X connect 4 0 3 0; #X connect 4 0 7 0; #X connect 5 0 0 0; #X connect 6 0 0 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 11 0 12 0; #X connect 12 0 10 0; #X connect 12 0 14 0; #X restore 490 24 pd test; #X obj 58 25 r synth-freq; #X obj 105 248 r synth-mag; #X msg 331 239 sinesum 1024 1; #X connect 1 0 3 1; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 3 0 0 1; #X connect 4 0 6 0; #X connect 5 0 15 0; #X connect 6 0 7 0; #X connect 7 0 9 0; #X connect 8 0 6 1; #X connect 9 0 3 0; #X connect 15 0 11 0; #X connect 17 0 4 0; #X connect 18 0 2 0; #X connect 19 0 11 0; ================================================ FILE: WaveTables/Classes/PdArray.h ================================================ // // PdArray.h // libpd // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ /* Description: * PdArray is a class to simplify the array read/write API by encapsulating * a local c float array. One begins by reading the pd array, which mirrors * that array locally and provides methods to write to just the local array, * write to both local and pd's array, and read/write methods for synchronizing * the two arrays. You get or set floats one at a time and boundaries are checked. * * Writing to only the local array may be useful if you want to update many * elements (i.e. in a for loop) and don't want to incur the synchronization * overhead of PdBase's array accessor methods. */ #import @interface PdArray : NSObject { float *array_; NSString *name_; int size_; } @property (nonatomic, copy, readonly) NSString *name; // the name of the array in pd @property (nonatomic, assign, readonly) int size; // size of the pd array // read the entire contents of a pd array given a name, locally storing the array. // sets size of local array = maximum length, offset = 0 + (id)arrayNamed:(NSString *)arrayName; // (re)read the entire contents of a pd array, provided it was already set with +arrayNamed: - (void)read; // write the local array to the pd array - (void)write; // retrieve a float from pd's array at the given index. // returns 0.0 if beyond the boundaries of the array. - (float)floatAtIndex:(int)index; // retrieve a float from the local array at the given index. // returns 0.0 if beyond the boundaries of the array. - (float)localFloatAtIndex:(int)index; // set a single float value in both the local array and pd's array - (void)setFloat:(float)value atIndex:(int)index; // set a single float value only in the local array. returns NO if it could not set because of bad parameters - (BOOL)setLocalFloat:(float)value atIndex:(int)index; @end ================================================ FILE: WaveTables/Classes/PdArray.m ================================================ // // PdArray.m // libpd // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "PdArray.h" #import "PdBase.h" @interface PdArray () @property (nonatomic, copy) NSString *name; @property (nonatomic, assign) float *array; @property (nonatomic, assign) int size; @end @implementation PdArray @synthesize array = array_; @synthesize name = name_; @synthesize size = size_; #pragma mark - #pragma mark - Init / Dealloc + (id)arrayNamed:(NSString *)arrayName { PdArray *pdArray = [[self alloc] init]; if (pdArray) { pdArray.size = [PdBase arraySizeForArrayNamed:arrayName]; if (pdArray.size <= 0) { return nil; } pdArray.array = calloc(pdArray.size, sizeof(float)); pdArray.name = arrayName; [pdArray read]; } return pdArray; } - (void)dealloc { free(self.array); } #pragma mark - #pragma mark Public - (void)read { if (self.array) { [PdBase copyArrayNamed:self.name withOffset:0 toArray:self.array count:self.size]; } } - (void)write { if (self.array) { [PdBase copyArray:self.array toArrayNamed:self.name withOffset:0 count:self.size]; } } - (float)floatAtIndex:(int)index { [self read]; // TODO: only grab the specific float and put it in the local array. but, nothing uses this yet.. return [self localFloatAtIndex:index]; } - (float)localFloatAtIndex:(int)index { if (self.array && index >= 0 && index < self.size) { return self.array[index]; } else { return 0; // in the spirit of pd's tabread } } - (void)setFloat:(float)value atIndex:(int)index { if ([self setLocalFloat:value atIndex:index]) { [PdBase copyArray:(self.array+index) toArrayNamed:self.name withOffset:index count:1]; } } - (BOOL)setLocalFloat:(float)value atIndex:(int)index { if (self.array && index >= 0 && index < self.size) { self.array[index] = value; return YES; } return NO; } @end ================================================ FILE: WaveTables/Classes/RootViewController.h ================================================ // // RootViewController.h // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import #import "PdBase.h" @class PdFile; @class WaveTableView; @interface RootViewController : UIViewController { PdFile *patch_; WaveTableView *waveTableView_; UIToolbar *toolBar_; } @end ================================================ FILE: WaveTables/Classes/RootViewController.m ================================================ // // RootViewController.m // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "RootViewController.h" #import "WaveTableView.h" #import "PdFile.h" #import "PdArray.h" static NSString *const kWavetablePatchName = @"wavetable.pd"; static NSString *const kResynthesisPatchName = @"resynthesis.pd"; static NSString *const kPdArrayName = @"%d-array"; // decimal parameter is the $0 arg @interface RootViewController () @property (nonatomic, retain) PdFile *patch; @property (nonatomic, retain) WaveTableView *waveTableView; @property (nonatomic, retain) UIToolbar *toolBar; - (void)setupWavetable; - (void)setupToolbar; - (void)layoutWavetable; - (void)openPatch:(NSString *)name; - (void)setVolume:(CGFloat)volume; // in db normalized to 100 = 1 rms - (void)printButtonTapped:(UIBarButtonItem *)sender; - (void)resetButtonTapped:(UIBarButtonItem *)sender; - (void)patchSelectorChanged:(UISegmentedControl *)sender; @end @implementation RootViewController @synthesize patch = patch_; @synthesize waveTableView = waveTableView_; @synthesize toolBar = toolBar_; #pragma mark - #pragma mark Init - (void)loadView { [super loadView]; self.view.backgroundColor = [UIColor whiteColor]; [PdBase setDelegate:self]; [self setupToolbar]; // this will also select a patch from the patchSelector, thereby opening the patch } - (void)viewWillAppear:(BOOL)animated { [self layoutWavetable]; } #pragma mark - #pragma mark Rotation - (void)viewDidLayoutSubviews { [self layoutWavetable]; } #pragma mark - #pragma mark PdReceiverDelegate - (void)receivePrint:(NSString *)message { DLog(@"%@", message); } #pragma mark - #pragma mark Private (User Interface) - (void)setupWavetable { if (!self.patch) { DLog(@"Error, no patch loaded."); return; } NSString *arrayName = [NSString stringWithFormat:kPdArrayName, self.patch.dollarZero]; int arraySize = [PdBase arraySizeForArrayNamed:arrayName]; DLog(@"--- array name: %@, size: %d ---", arrayName, arraySize); PdArray *wavetable = [PdArray arrayNamed:arrayName]; if (self.waveTableView) { [self.waveTableView removeFromSuperview]; } self.waveTableView = [[WaveTableView alloc] initWithWavetable:wavetable]; self.waveTableView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth; [self.view addSubview:self.waveTableView]; } - (void)setupToolbar { self.toolBar = [[UIToolbar alloc] init]; self.toolBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.toolBar.barStyle = UIBarStyleBlack; UIBarButtonItem *printButton = [[UIBarButtonItem alloc] initWithTitle:@"Print" style:UIBarButtonItemStylePlain target:self action:@selector(printButtonTapped:)]; UIBarButtonItem *resetButton = [[UIBarButtonItem alloc] initWithTitle:@"Reset" style:UIBarButtonItemStylePlain target:self action:@selector(resetButtonTapped:)]; UIBarButtonItem *spaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; UISegmentedControl *patchControl = [[UISegmentedControl alloc] initWithItems: [NSArray arrayWithObjects:@"Wavetable", @"Resynthesis", nil]]; patchControl.tintColor = [UIColor darkGrayColor]; patchControl.selectedSegmentIndex = 0; [patchControl addTarget:self action:@selector(patchSelectorChanged:) forControlEvents:UIControlEventValueChanged]; [self patchSelectorChanged:patchControl]; UIBarButtonItem *patchControlButtonItem = [[UIBarButtonItem alloc] initWithCustomView:patchControl]; [self.toolBar setItems:[NSArray arrayWithObjects:printButton, resetButton, spaceButton, patchControlButtonItem, nil]]; [self.toolBar sizeToFit]; [self.view addSubview:self.toolBar]; } // this ratio is a nice number that allows the wavetable to be of maximum size on an ipad in // landscape and portrait. // It will just try to fit in the screen with the same ratio, but alot smaller - (void)layoutWavetable { static const CGFloat kRatioWidthToHeight = 1.375; static const CGFloat kPadding = 10; CGSize viewSize = self.view.bounds.size; CGFloat height, width, padding; if (viewSize.width > viewSize.height) { // padding will be around the top and bottom, also need to make room for the toolbar CGFloat toolBarHeight = self.toolBar.frame.size.height; height = viewSize.height - toolBarHeight - 2.0 * kPadding; width = round(height * kRatioWidthToHeight); padding = round((viewSize.width - width) / 2.0); self.waveTableView.frame = CGRectMake(padding, toolBarHeight + kPadding, width, height); } else { // padding will be around left and right width = viewSize.width - 2.0 * kPadding; height = round(width / kRatioWidthToHeight); padding = round((viewSize.height - height) / 2.0); self.waveTableView.frame = CGRectMake(kPadding, padding, width, height); } [self.waveTableView setNeedsDisplay]; } #pragma mark - #pragma mark Private (Utilities) // note: if our patch is already set and we assign a new value here, the old // PdFile will be deallocated, which causes the patch to be closed. - (void)openPatch:(NSString *)name { self.patch = [PdFile openFileNamed:name path:[[NSBundle mainBundle] bundlePath]]; [self setupWavetable]; [self layoutWavetable]; [self setVolume:90]; } - (void)setVolume:(CGFloat)volume { if (volume < 0.0) { volume = 0.0; } else if (volume > 100.0) { volume = 100.0; } [PdBase sendFloat:volume toReceiver:[NSString stringWithFormat:@"%d-volume", self.patch.dollarZero]]; } #pragma mark - #pragma mark Private (Action Handlers) // this will print out the array contents from within the pd patch, // and also print the contents of our PdArray - (void)printButtonTapped:(UIBarButtonItem *)sender { [PdBase sendBangToReceiver:[NSString stringWithFormat:@"%d-print-table", self.patch.dollarZero]]; DLog(@"wavetable elements:"); for (int i = 0; i < self.waveTableView.wavetable.size; i++) { DLog(@"[%d, %f]", i, [self.waveTableView.wavetable floatAtIndex:i]); } } - (void)resetButtonTapped:(UIBarButtonItem *)sender { DLog(@"sending reset message to the patch"); [PdBase sendBangToReceiver:@"reset"]; [self.waveTableView.wavetable read]; // updates the local array [self.waveTableView setNeedsDisplay]; } - (void)patchSelectorChanged:(UISegmentedControl *)sender { NSString *patchName; CGFloat minY, maxY; switch (sender.selectedSegmentIndex) { case 0: patchName = kWavetablePatchName; minY = -1.0; maxY = 1.0; break; case 1: patchName = kResynthesisPatchName; minY = 0.0; maxY = 1.0; break; default: return; } DLog(@"selected patch named: %@", patchName); if ([self.patch.baseName isEqualToString:patchName]) { DLog(@"%@ already open, returning.", patchName); return; } DLog(@"minY = %2.1f, maxY = %2.1f", minY, maxY); [self openPatch:patchName]; self.waveTableView.minY = minY; self.waveTableView.maxY = maxY; } @end ================================================ FILE: WaveTables/Classes/WaveTableView.h ================================================ // // WaveTableView.h // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @class PdArray; @interface WaveTableView : UIView { PdArray *wavetable_; UIColor *borderColor_; UIColor *arrayColor_; CGPoint lastPoint_; BOOL dragging_; CGFloat minY_; CGFloat maxY_; } @property (nonatomic, retain, readonly) PdArray *wavetable; @property (nonatomic, assign) CGFloat minY; // minimum magnitude to draw in the wavetable (default: -1.0) @property (nonatomic, assign) CGFloat maxY; // minimum magnitude to draw in the wavetable (default: 1.0) - (id)initWithWavetable:(PdArray *)pdArray; @end ================================================ FILE: WaveTables/Classes/WaveTableView.m ================================================ // // WaveTableView.m // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "WaveTableView.h" #import "PdArray.h" #import @interface WaveTableView () @property (nonatomic, retain) PdArray *wavetable; @property (nonatomic, retain) UIColor *borderColor; @property (nonatomic, retain) UIColor *arrayColor; @property (nonatomic, assign) CGPoint lastPoint; // the last [x,y] set written to the PdArray *wavetable (used for interpolation) note: x is in magnitude (-1:1) while y is in pixels @property (nonatomic, assign) BOOL dragging; // indicates whether the user is currently dragging a finder across the device - (void)updateTableWithPoint:(CGPoint)point; @end @implementation WaveTableView @synthesize wavetable = wavetable_; @synthesize borderColor = borderColor_; @synthesize arrayColor = arrayColor_; @synthesize lastPoint = lastPoint_; @synthesize dragging = dragging_; @synthesize minY = minY_; @synthesize maxY = maxY_; #pragma mark - #pragma mark Init / Dealloc - (id)initWithWavetable:(PdArray *)pdArray { self = [super initWithFrame:CGRectZero]; if (self) { self.backgroundColor = [UIColor clearColor]; self.borderColor = [UIColor darkGrayColor]; self.layer.borderColor = self.borderColor.CGColor; self.layer.borderWidth = 1.0; self.arrayColor = [UIColor blackColor]; self.wavetable = pdArray; self.lastPoint = CGPointMake(-1.0, 0.0); // set so any new point will not be the same as the last self.minY = -1.0; self.maxY = 1.0; } return self; } #pragma mark - #pragma mark Inline Conversion functions static inline CGFloat convertMagToY(CGFloat mag, CGFloat minY, CGFloat maxY, CGFloat viewHeight) { return (maxY - mag) * viewHeight / (maxY - minY); } static inline CGFloat convertYToMag(CGFloat y, CGFloat minY, CGFloat maxY, CGFloat viewHeight) { return maxY - y * (maxY - minY) / viewHeight; } #pragma mark - #pragma mark Drawing - (void)drawRect:(CGRect)rect { if (self.wavetable) { CGRect bounds = self.bounds; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, [self.arrayColor CGColor]); CGFloat scaleX = bounds.size.width / (self.wavetable.size - 1); // the wavetable spans the entire view, 0 to last index int startIndex = (int)floor(rect.origin.x / scaleX); int endIndex = (int)ceil((rect.origin.x + rect.size.width) / scaleX); CGFloat minY = self.minY; CGFloat maxY = self.maxY; CGFloat y = convertMagToY([self.wavetable localFloatAtIndex:startIndex], minY, maxY, bounds.size.height); CGContextMoveToPoint(context, startIndex * scaleX, y); for (int i = startIndex + 1; i <= endIndex; i++) { y = convertMagToY([self.wavetable localFloatAtIndex:i], minY, maxY, bounds.size.height); CGContextAddLineToPoint(context, i * scaleX, y); } CGContextStrokePath(context); } } #pragma mark - #pragma mark Touches - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { self.dragging = NO; UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self]; [self updateTableWithPoint:point]; } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { self.dragging = YES; UITouch *touch = [touches anyObject]; CGPoint point = [touch locationInView:self]; if([self hitTest:point withEvent:event] == self) { [self updateTableWithPoint:point]; } } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { self.dragging = NO; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { self.dragging = NO; } #pragma mark - #pragma mark Private /* This is where all the calculations are done as for what elements of the * PdArray should be changed as well as what rect should be invalidated * to redraw the new points (we don't want to redraw the unchanged sections). * If the new point has skipped a few indeces and we are in the middle of a * touchesMoved, it will draw a line from the last point recorded to the new one. * When a series of floats are written (in the interpolation), the write to pd * is prolonged until after the for loop and only the local array is updated. */ - (void)updateTableWithPoint:(CGPoint)point { CGSize viewSize = self.bounds.size; CGFloat waveTableToViewXRatio = (float)(self.wavetable.size - 1)/ viewSize.width; CGFloat mag = convertYToMag(point.y, self.minY, self.maxY, viewSize.height); CGFloat redrawPadding = ceil(1.0 / waveTableToViewXRatio) * 2.0; // minimal amount to invalidate a rect that still keeps a continious line int index = (int)round(point.x * waveTableToViewXRatio); int lastIndex = (int)round(self.lastPoint.x * waveTableToViewXRatio); int numPoints = abs(lastIndex - index); CGFloat redrawX; if (self.dragging && numPoints > 1) { //draw a line from lastPoint.x to point.x and feed it to self.wavetable float incr = (self.lastPoint.y - mag) / (float)(lastIndex - index); int currentIndex = lastIndex; float currentMag = self.lastPoint.y; if (index > lastIndex) { // going forward for (int i = 0; i < numPoints; i++) { currentIndex++; currentMag += incr; [self.wavetable setLocalFloat:currentMag atIndex:currentIndex]; } redrawX = (self.lastPoint.x < redrawPadding ? 0.0 : self.lastPoint.x - redrawPadding); } else { for (int i = 0; i < numPoints; i++) { currentIndex--; currentMag -= incr; [self.wavetable setLocalFloat:currentMag atIndex:currentIndex]; } redrawX = (point.x < redrawPadding ? 0.0 : point.x - redrawPadding); } [self.wavetable write]; [self setNeedsDisplayInRect:CGRectMake(redrawX, 0.0, redrawPadding * (numPoints + 1), viewSize.height)]; } else { // no need to interpolate so just draw one point and store the last calculated value [self.wavetable setFloat:mag atIndex:index]; redrawX = (point.x < redrawPadding ? 0.0 : point.x - redrawPadding); [self setNeedsDisplayInRect:CGRectMake(redrawX, 0.0, redrawPadding * 2.0, viewSize.height)]; } self.lastPoint = CGPointMake(point.x, mag); } @end ================================================ FILE: WaveTables/Classes/WaveTablesAppDelegate.h ================================================ // // AppDelegate.h // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import @class RootViewController; @class PdAudioController; @interface WaveTablesAppDelegate : NSObject { UIWindow *window_; RootViewController *viewController_; PdAudioController *audioController_; } @property (nonatomic, retain) UIWindow *window; @property (nonatomic, retain) RootViewController *viewController; @end ================================================ FILE: WaveTables/Classes/WaveTablesAppDelegate.m ================================================ // // AppDelegate.m // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // /** * This software is copyrighted by Richard Eakin. * The following terms (the "Standard Improved BSD License") apply to * all files associated with the software unless explicitly disclaimed * in individual files: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ #import "WaveTablesAppDelegate.h" #import "RootViewController.h" #import "PdAudioController.h" @interface WaveTablesAppDelegate () @property (nonatomic, retain) PdAudioController *audioController; @end @implementation WaveTablesAppDelegate @synthesize window = window_; @synthesize viewController = viewController_; @synthesize audioController = audioController_; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.viewController = [[RootViewController alloc] init]; self.audioController = [[PdAudioController alloc] init]; [self.audioController configureAmbientWithSampleRate:44100 numberChannels:2 mixingEnabled:YES]; [self.audioController setActive:YES]; [self.audioController print]; [self.window setRootViewController:self.viewController]; [self.window makeKeyAndVisible]; return YES; } @end ================================================ FILE: WaveTables/OtherSources/Common.h ================================================ /* * Common.h * SlidePad * * Created by Rich E on 22/12/10. * Copyright 2010 Richard T. Eakin. All rights reserved. * */ // debug macros from: http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ // I modified DLog to use printf instead of NSLog #ifdef DEBUG #define DLog(nslog_string, ...) printf("%s\t", __PRETTY_FUNCTION__); printf("%s", [[NSString stringWithFormat:nslog_string, ##__VA_ARGS__] UTF8String]); printf("\n"); #define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__] #else #define DLog(...) do { } while (0) #ifndef NS_BLOCK_ASSERTIONS #define NS_BLOCK_ASSERTIONS #endif #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #endif #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0) ================================================ FILE: WaveTables/OtherSources/Prefix.pch ================================================ // // Prefix header for all source files of the 'WaveTables' target in the 'WaveTables' project // #ifdef __OBJC__ #import #import #endif #import "Common.h" ================================================ FILE: WaveTables/OtherSources/main.m ================================================ // // main.m // WaveTables // // Created by Rich E on 16/05/11. // Copyright 2011 Richard T. Eakin. All rights reserved. // #import #import "WaveTablesAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass(WaveTablesAppDelegate.class)); } } ================================================ FILE: WaveTables/ReadMe.txt ================================================ WaveTables iOS app author: Rich Eakin (reakinator@gmail.com) Sample app for libpd for iphone/ipad that demonstrates how to interact with arrays in pd. We lookup the array based on its name in pd (in the case of this example, the name is prepended with the $0 arg), and then create and maintain a shadowed array from which we can copy back and forth to. For drawing and manipulating by touch, we mainly write to the local shadowed array, and then update pd's array via PdBase. To manage the local array and stay synchronized with pd's, we use the PdArray class. The example uses two of the example patches included in the pd tutorials: - B01.wavetables.pd (or very close to it): wavetable lookup synthesis - I03.resynthesis.pd (copy & pasted): fourier resynthesis In both examples, you can modify the array by dragging your finger accross the graphical representatio on your iDevice. Hope this gives some people some good ideas for new and neat synthesizers! Note also that helper patches are in a subfolder, which helps you to keep your abstractions organized. If you want to do this in your own projects, It is explained in further detail on the pd-for-ios wiki at: https://github.com/libpd/pd-for-ios/wiki/ios The Libpd source and documentation is available at https://github.com/libpd/libpd Documentation specific to the array api is at: https://github.com/libpd/libpd/wiki/libpd TODO: multi-touch array editing --------------- License ------------ This software is copyrighted by Miller Puckette, Reality Jockey, Peter Brinkmann, Richard Eakin and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: WaveTables/Resources/Info.plist ================================================ CFBundleDevelopmentRegion English CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.1 LSRequiresIPhoneOS UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: WaveTables/Resources/resynthesis.pd ================================================ #N canvas 743 321 580 406 12; #N canvas 265 48 643 640 fft-analysis 0; #X obj 15 164 *~; #X obj 14 99 inlet~; #X obj 15 218 rfft~; #X obj 36 140 tabreceive~ \$0-hann; #X obj 14 353 *~; #X obj 56 353 *~; #X obj 15 8 block~ 512 4; #X text 85 88 The inlet~ now re-uses 3/4 of the previous block \, along with the 128 new samples.; #X text 221 141 window function as before.; #X obj 77 225 *~; #X obj 16 506 *~; #X obj 37 481 tabreceive~ \$0-hann; #X obj 77 283 /~ 768; #X text 98 301 divide by 3N/2 (factor of N because rfft and rifft aren't normalized \, and 3/2 is the gain of overlap-4 reconstruction when Hann window function is applied twice.); #X text 120 216 Just to show we're doing something \, we multiply each channel by a gain controlled by an array in the main window. The control is quartic-scaled for easy editing.; #X obj 78 251 *~; #X text 92 357 Multiply the (complex-valued) spectrum amplitudes by the (real-valued) gain-and-normalization-factor; #X obj 15 399 rifft~; #X text 89 396 Real-valued inverse Fourier transform. This uses only the first N/@ points of its inputs \, supplying the rest by symmerty (so it's OK that rfft~ obly puts out those N/2 points.) There's only one outlet because the output is real-valued.; #X obj 16 566 outlet~; #X text 88 499 Multiply by the Hann window function again \, necessary because the operation we performed might result in a signal that doesn't go smoothly to zero at both ends.; #X text 89 566 This repackages the output into 64-sample chunks for the parent window. Since we're operating with an overlap \, the outlet~ object performs an overlapped sum of the blocks computed in this window. ; #X text 129 8 block~ object specifies vector size of 512 and overlap four. This window now computes blocks of 512 samples at intervals of 128 samples computed on the parent patch.; #X obj 76 196 tabreceive~ \$0-array; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 2 1 5 0; #X connect 3 0 0 1; #X connect 4 0 17 0; #X connect 5 0 17 1; #X connect 9 0 15 0; #X connect 9 0 15 1; #X connect 10 0 19 0; #X connect 11 0 10 1; #X connect 12 0 4 1; #X connect 12 0 5 1; #X connect 15 0 12 0; #X connect 17 0 10 0; #X connect 23 0 9 0; #X connect 23 0 9 1; #X restore 26 289 pd fft-analysis; #N canvas 35 66 592 433 Hann-window 0; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-hann 512 float 0; #X coords 0 1 511 0 200 120 1; #X restore 293 249 graph; #X msg 171 263 0; #X obj 65 312 osc~; #X obj 65 264 samplerate~; #X obj 65 335 *~ -0.5; #X obj 65 358 +~ 0.5; #X obj 57 383 tabwrite~ \$0-hann; #X text 279 241 1; #X text 272 359 0; #X text 288 372 0; #X obj 65 288 / 512; #X obj 57 241 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 336 221 Hann window; #X text 113 310 period 512; #X text 90 215 recalculate Hann; #X text 125 230 window table; #X obj 57 146 loadbang; #X msg 79 179 \; pd dsp 1; #X text 40 27 The Hann window is now recomputed on 'loadbang' to make the file smaller (it doesn't have to be saved with the array.); #X text 474 375 511; #X connect 1 0 2 1; #X connect 2 0 4 0; #X connect 3 0 10 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 10 0 2 0; #X connect 11 0 3 0; #X connect 11 0 1 0; #X connect 11 0 6 0; #X connect 16 0 11 0; #X connect 16 0 17 0; #X restore 192 318 pd Hann-window; #X obj 26 264 noise~; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-array 256 float 2; #X coords 0 1 256 -0.01 512 60 1 0 0; #X restore 22 168 graph; #X msg 192 264 const 0; #X text 138 0 FOURIER RESYNTHESIS; #X text 6 218 0; #X text 6 159 1; #X text 19 228 0; #X text 516 231 22K; #X text 270 261 <- reset gain; #X text 224 148 GAIN; #X text 21 24 Using Fourier resynthesis you can take an incoming sound \, operate on its spectrum \, and hear the result. Here we start with white noise and apply a frequency-dependent gain \, which works as a graphic equalizer. There are N/2 = 256 points \, each spaced SR/512 Hz. apart (although their frequency ranges overlap). Open the "fft-analysis" patch to see the workings.; #X obj 192 293 s \$0-array; #X obj 192 235 r reset; #N canvas 0 22 293 258 output~ 0; #X obj 35 201 dac~; #X obj 35 167 *~; #X obj 88 145 line~; #X obj 88 113 pack 0 30; #X obj 35 117 inlet~; #X obj 88 26 r \$0-volume; #X obj 88 83 dbtorms; #X msg 174 55 80; #X obj 174 26 loadbang; #X connect 1 0 0 0; #X connect 1 0 0 1; #X connect 2 0 1 1; #X connect 3 0 2 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 6 0 3 0; #X connect 7 0 6 0; #X connect 8 0 7 0; #X restore 26 317 pd output~; #X text 368 376 - reakinator@gmail.com; #X text 24 361 This patch has been modified (was 103.resynthesis.pd) to be part of the libpd/pd-for-ios example WaveTables; #X obj 393 316 util/print-array \$1; #X connect 0 0 15 0; #X connect 2 0 0 0; #X connect 4 0 13 0; #X connect 14 0 4 0; ================================================ FILE: WaveTables/Resources/util/for.pd ================================================ #N canvas 756 360 387 277 10; #X obj 53 30 inlet; #X obj 52 102 until; #X obj 79 176 sel \$2; #X obj 103 103 \$1; #X obj 52 141 int; #X obj 53 237 outlet; #X obj 53 55 t b b; #X obj 112 208 + 1; #X text 122 66 \$2 - number of iterations; #X text 122 45 \$1 - starting number; #X text 122 5 simple forward for loop \, incrementing by 1; #X obj 168 134 inlet; #X text 205 136 optional number of iterations; #X connect 0 0 6 0; #X connect 1 0 4 0; #X connect 2 0 1 1; #X connect 2 1 4 1; #X connect 2 1 7 0; #X connect 2 1 5 0; #X connect 3 0 4 1; #X connect 4 0 2 0; #X connect 6 0 1 0; #X connect 6 1 3 0; #X connect 7 0 4 1; #X connect 11 0 2 1; ================================================ FILE: WaveTables/Resources/util/print-array.pd ================================================ #N canvas 1475 169 308 351 10; #X obj 72 136 t f f; #X msg 68 217 \$1 \$2; #X obj 68 195 pack f f; #X obj 72 60 r \$1-print-table; #X obj 100 172 tabread \$1-array; #X obj 59 249 print array-contents; #X obj 72 88 for 0 256; #X connect 0 0 2 0; #X connect 0 1 4 0; #X connect 1 0 5 0; #X connect 2 0 1 0; #X connect 3 0 6 0; #X connect 4 0 2 1; #X connect 6 0 0 0; ================================================ FILE: WaveTables/Resources/wavetable.pd ================================================ #N canvas 604 147 436 280 10; #X obj 31 53 mtof; #X obj 31 82 tabosc4~ \$0-array; #N canvas 0 22 236 256 output~ 0; #X obj 35 171 dac~; #X obj 35 137 *~; #X obj 88 115 line~; #X obj 88 83 pack 0 30; #X obj 35 87 inlet~; #X obj 88 26 r \$0-volume; #X obj 88 53 dbtorms; #X connect 1 0 0 0; #X connect 1 0 0 1; #X connect 2 0 1 1; #X connect 3 0 2 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 6 0 3 0; #X restore 31 107 pd output~; #N canvas 110 439 450 300 init 0; #X obj 85 207 s \$0-table-size; #X obj 85 182 + 3; #X text 114 182 interpolation points; #X msg 37 150 256; #X obj 37 268 s \$0-array; #X msg 37 241 cosinesum \$1 0.2 -0.2 0.2 -0.2 0.2 -0.2 0.2 \, normalize ; #X msg 95 93 60; #X obj 37 66 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 37 31 loadbang; #X obj 97 31 r reset; #X obj 95 117 s \$0-pitch; #X obj 190 114 s \$0-volume; #X msg 190 92 85; #X connect 1 0 0 0; #X connect 3 0 1 0; #X connect 3 0 5 0; #X connect 5 0 4 0; #X connect 6 0 10 0; #X connect 7 0 6 0; #X connect 7 0 12 0; #X connect 7 0 3 0; #X connect 8 0 7 0; #X connect 9 0 7 0; #X connect 12 0 11 0; #X restore 332 87 pd init; #X obj 31 22 r \$0-pitch; #X text 96 178 - reakinator@gmail.com; #X obj 269 22 table \$0-array 259; #X obj 270 53 util/print-array \$0; #X text 28 165 This patch is part of the libpd/pd-for-ios example WaveTables ; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 4 0 0 0; ================================================ FILE: WaveTables/WaveTables.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 111620FF13B0D5E7000971DC /* PdArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 111620FE13B0D5E7000971DC /* PdArray.m */; }; 113A44C5138142F9004C88F9 /* libpd-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 113A44C4138142ED004C88F9 /* libpd-ios.a */; }; 113A450E13814889004C88F9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 113A450D13814889004C88F9 /* AudioToolbox.framework */; }; 113A4576138149DB004C88F9 /* wavetable.pd in Resources */ = {isa = PBXBuildFile; fileRef = 113A4575138149DB004C88F9 /* wavetable.pd */; }; 113A45D61381528E004C88F9 /* WaveTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 113A45D51381528E004C88F9 /* WaveTableView.m */; }; 1152A3CD147E15C400DCD675 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1152A3CC147E15C400DCD675 /* RootViewController.m */; }; 1152A3CF147E172400DCD675 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1152A3CE147E172400DCD675 /* AVFoundation.framework */; }; 1176E15115BB71580061A139 /* util in Resources */ = {isa = PBXBuildFile; fileRef = 1176E15015BB71580061A139 /* util */; }; 11C91B1F12C1AEE00022693B /* WaveTablesAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C91B1B12C1AEE00022693B /* WaveTablesAppDelegate.m */; }; 11C91B2612C1AF010022693B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 11C91B2212C1AF010022693B /* main.m */; }; 11D47E50138BE56500D2FEEE /* resynthesis.pd in Resources */ = {isa = PBXBuildFile; fileRef = 11D47E4F138BE56500D2FEEE /* resynthesis.pd */; }; 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 3063EFAA210A07BF00C8A4A2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3063EFA9210A07BF00C8A4A2 /* Default-568h@2x.png */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 113A44C3138142ED004C88F9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = D2AAC07E0554694100DB518D; remoteInfo = libpd; }; 113A44C613814305004C88F9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; proxyType = 1; remoteGlobalIDString = D2AAC07D0554694100DB518D; remoteInfo = libpd; }; 1176E13015BB6D910061A139 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 119013AB1486450C00086F19; remoteInfo = "libpd-osx"; }; 3063EFA5210A068800C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D36D1FAA200100C67F08; remoteInfo = "libpd-ios-multi"; }; 3063EFA7210A068800C8A4A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; proxyType = 2; remoteGlobalIDString = 30C3D2FA1FAA1FCC00C67F08; remoteInfo = "libpd-osx-multi"; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 111620FD13B0D5E7000971DC /* PdArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdArray.h; sourceTree = ""; }; 111620FE13B0D5E7000971DC /* PdArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdArray.m; sourceTree = ""; }; 113A44BF138142ED004C88F9 /* libpd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libpd.xcodeproj; path = ../libpd/libpd.xcodeproj; sourceTree = SOURCE_ROOT; }; 113A450D13814889004C88F9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 113A4575138149DB004C88F9 /* wavetable.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wavetable.pd; sourceTree = ""; }; 113A45D41381528E004C88F9 /* WaveTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTableView.h; sourceTree = ""; }; 113A45D51381528E004C88F9 /* WaveTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaveTableView.m; sourceTree = ""; }; 1152A3CB147E15C400DCD675 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = Classes/RootViewController.h; sourceTree = SOURCE_ROOT; }; 1152A3CC147E15C400DCD675 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RootViewController.m; path = Classes/RootViewController.m; sourceTree = SOURCE_ROOT; }; 1152A3CE147E172400DCD675 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 1176E15015BB71580061A139 /* util */ = {isa = PBXFileReference; lastKnownFileType = folder; path = util; sourceTree = ""; }; 11C91B1A12C1AEE00022693B /* WaveTablesAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTablesAppDelegate.h; sourceTree = ""; }; 11C91B1B12C1AEE00022693B /* WaveTablesAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaveTablesAppDelegate.m; sourceTree = ""; }; 11C91B2212C1AF010022693B /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 11C91B2312C1AF010022693B /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; 11C91B2512C1AF010022693B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 11C91B2C12C1AF9F0022693B /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = ""; }; 11D47E4F138BE56500D2FEEE /* resynthesis.pd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = resynthesis.pd; sourceTree = ""; }; 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 1D6058910D05DD3D006BFB54 /* WaveTables.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WaveTables.app; sourceTree = BUILT_PRODUCTS_DIR; }; 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 3063EFA9210A07BF00C8A4A2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 1152A3CF147E172400DCD675 /* AVFoundation.framework in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 113A44C5138142F9004C88F9 /* libpd-ios.a in Frameworks */, 113A450E13814889004C88F9 /* AudioToolbox.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 111620FC13B0D5C4000971DC /* Helpers */ = { isa = PBXGroup; children = ( 111620FD13B0D5E7000971DC /* PdArray.h */, 111620FE13B0D5E7000971DC /* PdArray.m */, ); name = Helpers; sourceTree = ""; }; 113A44C0138142ED004C88F9 /* Products */ = { isa = PBXGroup; children = ( 113A44C4138142ED004C88F9 /* libpd-ios.a */, 1176E13115BB6D910061A139 /* libpd-osx.a */, 3063EFA6210A068800C8A4A2 /* libpd-ios-multi.a */, 3063EFA8210A068800C8A4A2 /* libpd-osx-multi.a */, ); name = Products; sourceTree = ""; }; 113A45D013815251004C88F9 /* Views */ = { isa = PBXGroup; children = ( 113A45D41381528E004C88F9 /* WaveTableView.h */, 113A45D51381528E004C88F9 /* WaveTableView.m */, ); name = Views; sourceTree = ""; }; 11C91B1912C1AEE00022693B /* Classes */ = { isa = PBXGroup; children = ( 111620FC13B0D5C4000971DC /* Helpers */, 113A45D013815251004C88F9 /* Views */, 11C91B1C12C1AEE00022693B /* Controllers */, 11C91B1A12C1AEE00022693B /* WaveTablesAppDelegate.h */, 11C91B1B12C1AEE00022693B /* WaveTablesAppDelegate.m */, ); path = Classes; sourceTree = ""; }; 11C91B1C12C1AEE00022693B /* Controllers */ = { isa = PBXGroup; children = ( 1152A3CB147E15C400DCD675 /* RootViewController.h */, 1152A3CC147E15C400DCD675 /* RootViewController.m */, ); path = Controllers; sourceTree = ""; }; 11C91B2112C1AF010022693B /* OtherSources */ = { isa = PBXGroup; children = ( 11C91B2212C1AF010022693B /* main.m */, 11C91B2312C1AF010022693B /* Prefix.pch */, 11C91B2C12C1AF9F0022693B /* Common.h */, ); path = OtherSources; sourceTree = ""; }; 11C91B2412C1AF010022693B /* Resources */ = { isa = PBXGroup; children = ( 1176E15015BB71580061A139 /* util */, 11D47E4F138BE56500D2FEEE /* resynthesis.pd */, 113A4575138149DB004C88F9 /* wavetable.pd */, 11C91B2512C1AF010022693B /* Info.plist */, ); path = Resources; sourceTree = ""; }; 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( 1D6058910D05DD3D006BFB54 /* WaveTables.app */, ); name = Products; sourceTree = ""; }; 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( 3063EFA9210A07BF00C8A4A2 /* Default-568h@2x.png */, 113A44BF138142ED004C88F9 /* libpd.xcodeproj */, 11C91B1912C1AEE00022693B /* Classes */, 11C91B2112C1AF010022693B /* OtherSources */, 11C91B2412C1AF010022693B /* Resources */, 29B97323FDCFA39411CA2CEA /* Frameworks */, 19C28FACFE9D520D11CA2CBB /* Products */, ); name = CustomTemplate; sourceTree = ""; }; 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( 1152A3CE147E172400DCD675 /* AVFoundation.framework */, 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 113A450D13814889004C88F9 /* AudioToolbox.framework */, ); name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* WaveTables */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "WaveTables" */; buildPhases = ( 1D60588D0D05DD3D006BFB54 /* Resources */, 1D60588E0D05DD3D006BFB54 /* Sources */, 1D60588F0D05DD3D006BFB54 /* Frameworks */, ); buildRules = ( ); dependencies = ( 113A44C713814305004C88F9 /* PBXTargetDependency */, ); name = WaveTables; productName = WaveTables; productReference = 1D6058910D05DD3D006BFB54 /* WaveTables.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WaveTables" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( { ProductGroup = 113A44C0138142ED004C88F9 /* Products */; ProjectRef = 113A44BF138142ED004C88F9 /* libpd.xcodeproj */; }, ); projectRoot = ""; targets = ( 1D6058900D05DD3D006BFB54 /* WaveTables */, ); }; /* End PBXProject section */ /* Begin PBXReferenceProxy section */ 113A44C4138142ED004C88F9 /* libpd-ios.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios.a"; remoteRef = 113A44C3138142ED004C88F9 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 1176E13115BB6D910061A139 /* libpd-osx.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx.a"; remoteRef = 1176E13015BB6D910061A139 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EFA6210A068800C8A4A2 /* libpd-ios-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-ios-multi.a"; remoteRef = 3063EFA5210A068800C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 3063EFA8210A068800C8A4A2 /* libpd-osx-multi.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = "libpd-osx-multi.a"; remoteRef = 3063EFA7210A068800C8A4A2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 113A4576138149DB004C88F9 /* wavetable.pd in Resources */, 3063EFAA210A07BF00C8A4A2 /* Default-568h@2x.png in Resources */, 11D47E50138BE56500D2FEEE /* resynthesis.pd in Resources */, 1176E15115BB71580061A139 /* util in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 11C91B1F12C1AEE00022693B /* WaveTablesAppDelegate.m in Sources */, 11C91B2612C1AF010022693B /* main.m in Sources */, 113A45D61381528E004C88F9 /* WaveTableView.m in Sources */, 111620FF13B0D5E7000971DC /* PdArray.m in Sources */, 1152A3CD147E15C400DCD675 /* RootViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 113A44C713814305004C88F9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = libpd; targetProxy = 113A44C613814305004C88F9 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1D6058940D05DD3E006BFB54 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_THUMB_SUPPORT = NO; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.WaveTables; PRODUCT_NAME = WaveTables; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "$(ARCHS_STANDARD)"; }; name = Debug; }; 1D6058950D05DD3E006BFB54 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = OtherSources/Prefix.pch; GCC_THUMB_SUPPORT = NO; INFOPLIST_FILE = Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = cc.libpd.WaveTables; PRODUCT_NAME = WaveTables; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "$(ARCHS_STANDARD)"; }; name = Release; }; C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../libpd/objc; IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = "-DDEBUG"; SDKROOT = iphoneos; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ../libpd/objc; IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "WaveTables" */ = { isa = XCConfigurationList; buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WaveTables" */ = { isa = XCConfigurationList; buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } ================================================ FILE: abl_link/README.md ================================================ # abl_link~ Ableton Link integration for Pd. ## Desktop/Android version The version of abl_link~ for desktop and Android has moved to https://github.com/libpd/abl_link. ## iOS version **This version uses Ableton LinkKit 2.0.0.** To see the iOS version of abl_link~ in action, try PdLinkSample in this repository. ### Getting started * Set up a libpd-based Xcode project as usual. * Add the Link library and headers to your project setup as described here: http://ableton.github.io/linkkit/#getting-started * Add `abl_link/ios` to your header search path. * Add `abl_link/ios/PdLinkAudioUnit.{h,m}` to the sources of your project. * Add the Link preference pane to your user interface (e.g., by cargo-culting the relevant bits of the LinkHut sample project). * Create a Link instance, a PdLinkAudioUnit instance, and a PdAudioController instance: ``` ABLLinkRef linkRef = ABLLinkNew(120); PdLinkAudioUnit pdAudioUnit = [[PdLinkAudioUnit alloc] initWithLinkRef:linkRef]; PdAudioContoller pd = [[PdAudioController alloc] initWithAudioUnit:pdAudioUnit]; ``` * Create a Pd patch using the desktop version of the Link external, `abl_link~`. * Add the patch to your Xcode project. ================================================ FILE: abl_link/ios/PdLinkAudioUnit.h ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import "PdAudioUnit.h" #include "ABLLink.h" @interface PdLinkAudioUnit : PdAudioUnit + (void)initialize; - (id)initWithLinkRef:(ABLLinkRef)linkRef; @end ================================================ FILE: abl_link/ios/PdLinkAudioUnit.m ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #import "PdLinkAudioUnit.h" #import "PdBase.h" #include #include #include "abl_link.c" // Yes, we want to include the .c file here. static int kPdBlockSize; @interface PdLinkAudioUnit () { @private Float64 sampleRate_; int numChannels_; BOOL usesInput_; UInt32 outputLatency_; UInt32 tickTime_; ABLLinkRef linkRef_; } - (void)handleRouteChange:(NSNotification *)notification; @end @implementation PdLinkAudioUnit #pragma mark - Init / Dealloc + (void)initialize { // Make sure to initialize PdBase before we do anything else. kPdBlockSize = [PdBase getBlockSize]; abl_link_tilde_setup(); } - (void)handleRouteChange:(NSNotification *)notification { NSLog(@"Route changed."); // Redoing the configuration will update output latency and related parameters. if ([self configureWithSampleRate:sampleRate_ numberChannels:numChannels_ inputEnabled:usesInput_] != 0) { NSLog(@"Failed to recreate audio unit on audio route change."); } } - (id)initWithLinkRef:(ABLLinkRef)linkRef { self = [super init]; linkRef_ = linkRef; abl_link_set_link_ref(linkRef); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleRouteChange:) name:AVAudioSessionRouteChangeNotification object:[AVAudioSession sharedInstance]]; return self; } #pragma mark - Public Methods - (void)setActive:(BOOL)active { ABLLinkSetActive(linkRef_, active); [super setActive:active]; } - (int)configureWithSampleRate:(Float64)sampleRate numberChannels:(int)numChannels inputEnabled:(BOOL)inputEnabled { sampleRate_ = sampleRate; numChannels_ = numChannels; usesInput_ = inputEnabled; mach_timebase_info_data_t timeInfo; mach_timebase_info(&timeInfo); float secondsToHostTime = (1.0e9 * timeInfo.denom) / (Float64)timeInfo.numer; outputLatency_ = (UInt32)(secondsToHostTime * [AVAudioSession sharedInstance].outputLatency); tickTime_ = (UInt32)(secondsToHostTime * kPdBlockSize / sampleRate); return [super configureWithSampleRate:sampleRate numberChannels:numChannels inputEnabled:inputEnabled]; } #pragma mark - AURenderCallback static const AudioUnitElement kInputElement = 1; static OSStatus AudioRenderCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { PdLinkAudioUnit *pdAudioUnit = (__bridge PdLinkAudioUnit *)inRefCon; Float32 *auBuffer = (Float32 *)ioData->mBuffers[0].mData; if (pdAudioUnit->usesInput_) { AudioUnitRender([pdAudioUnit audioUnit], ioActionFlags, inTimeStamp, kInputElement, inNumberFrames, ioData); } ABLLinkTimelineRef timeline = ABLLinkCaptureAudioTimeline(pdAudioUnit->linkRef_); abl_link_set_timeline(timeline); int ticks = inNumberFrames / kPdBlockSize; UInt64 hostTimeAfterTick = inTimeStamp->mHostTime + pdAudioUnit->outputLatency_; int bufSizePerTick = kPdBlockSize * pdAudioUnit->numChannels_; for (int i = 0; i < ticks; i++) { hostTimeAfterTick += pdAudioUnit->tickTime_; abl_link_set_time(hostTimeAfterTick); [PdBase processFloatWithInputBuffer:auBuffer outputBuffer:auBuffer ticks:1]; auBuffer += bufSizePerTick; } ABLLinkCommitAudioTimeline(pdAudioUnit->linkRef_, timeline); return noErr; } - (AURenderCallback)renderCallback { return AudioRenderCallback; } @end ================================================ FILE: abl_link/ios/abl_link.c ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "abl_link.h" #include "m_pd.h" #include #include #include static ABLLinkRef libpdLinkRef = NULL; static ABLLinkTimelineRef libpd_timeline; static uint64_t libpd_curr_time; void abl_link_set_link_ref(ABLLinkRef ref) { libpdLinkRef = ref; } void abl_link_set_timeline(ABLLinkTimelineRef timeline) { libpd_timeline = timeline; } void abl_link_set_time(uint64_t curr_time) { libpd_curr_time = curr_time; } static t_class *abl_link_tilde_class; typedef struct _abl_link_tilde { t_object obj; t_clock *clock; t_outlet *step_out; t_outlet *phase_out; t_outlet *beat_out; t_outlet *tempo_out; double steps_per_beat; double prev_beat_time; double quantum; double tempo; int reset_flag; } t_abl_link_tilde; static t_int *abl_link_tilde_perform(t_int *w) { t_abl_link_tilde *x = (t_abl_link_tilde *)(w[1]); clock_delay(x->clock, 0); return (w+2); } static void abl_link_tilde_dsp(t_abl_link_tilde *x, t_signal **sp) { dsp_add(abl_link_tilde_perform, 1, x); } static void abl_link_tilde_tick(t_abl_link_tilde *x) { if (x->tempo < 0) { ABLLinkSetTempo(libpd_timeline, -x->tempo, libpd_curr_time); } double prev_tempo = x->tempo; x->tempo = ABLLinkGetTempo(libpd_timeline); if (prev_tempo != x->tempo) { outlet_float(x->tempo_out, x->tempo); } double curr_beat_time; if (x->reset_flag) { ABLLinkRequestBeatAtTime(libpd_timeline, x->prev_beat_time, libpd_curr_time, x->quantum); curr_beat_time = ABLLinkBeatAtTime(libpd_timeline, libpd_curr_time, x->quantum); x->prev_beat_time = curr_beat_time - 1e-6; x->reset_flag = 0; } else { curr_beat_time = ABLLinkBeatAtTime(libpd_timeline, libpd_curr_time, x->quantum); } outlet_float(x->beat_out, curr_beat_time); double curr_phase = fmod(curr_beat_time, x->quantum); outlet_float(x->phase_out, curr_phase); if (curr_beat_time > x->prev_beat_time) { double prev_phase = fmod(x->prev_beat_time, x->quantum); double prev_step = floor(prev_phase * x->steps_per_beat); double curr_step = floor(curr_phase * x->steps_per_beat); if (prev_phase - curr_phase > x->quantum / 2 || prev_step != curr_step) { outlet_float(x->step_out, curr_step); } } x->prev_beat_time = curr_beat_time; } static void abl_link_tilde_enable(t_abl_link_tilde *x, t_floatarg enabled) { post("Warning: The iOS version of abl_link~ does not have a connect method. " "Please connect using the Link GUI component."); } static void abl_link_tilde_set_tempo(t_abl_link_tilde *x, t_floatarg bpm) { x->tempo = -bpm; // Negative values signal tempo changes. } static void abl_link_tilde_set_resolution(t_abl_link_tilde *x, t_floatarg steps_per_beat) { x->steps_per_beat = steps_per_beat; } static void abl_link_tilde_reset(t_abl_link_tilde *x, t_symbol *s, int argc, t_atom *argv) { x->prev_beat_time = 0; x->reset_flag = 1; switch (argc) { default: post("abl_link~ reset: Unexpected number of parameters: %d", argc); case 2: x->quantum = atom_getfloat(argv + 1); case 1: x->prev_beat_time = atom_getfloat(argv); case 0: break; } } static void *abl_link_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_abl_link_tilde *x = (t_abl_link_tilde *)pd_new(abl_link_tilde_class); x->clock = clock_new(x, (t_method)abl_link_tilde_tick); x->step_out = outlet_new(&x->obj, &s_float); x->phase_out = outlet_new(&x->obj, &s_float); x->beat_out = outlet_new(&x->obj, &s_float); x->tempo_out = outlet_new(&x->obj, &s_float); x->steps_per_beat = 1; x->prev_beat_time = 0; x->quantum = 4; x->tempo = 0; x->reset_flag = 1; switch (argc) { default: post("abl_link~: Unexpected number of creation args: %d", argc); case 4: if (ABLLinkIsConnected(libpdLinkRef)) { post("abl_link~: Ignoring tempo parameter because Link is connected."); } else { x->tempo = -atom_getfloat(argv + 3); // Negative values signal tempo changes. } case 3: x->quantum = atom_getfloat(argv + 2); case 2: x->prev_beat_time = atom_getfloat(argv + 1); case 1: x->steps_per_beat = atom_getfloat(argv); case 0: break; } return x; } static void abl_link_tilde_free(t_abl_link_tilde *x) { clock_free(x->clock); } void abl_link_tilde_setup(void) { abl_link_tilde_class = class_new(gensym("abl_link~"), (t_newmethod)abl_link_tilde_new, (t_method)abl_link_tilde_free, sizeof(t_abl_link_tilde), CLASS_DEFAULT, A_GIMME, 0); class_addmethod(abl_link_tilde_class, (t_method)abl_link_tilde_dsp, gensym("dsp"), 0); class_addmethod(abl_link_tilde_class, (t_method)abl_link_tilde_enable, gensym("connect"), A_DEFFLOAT, 0); class_addmethod(abl_link_tilde_class, (t_method)abl_link_tilde_set_tempo, gensym("tempo"), A_DEFFLOAT, 0); class_addmethod(abl_link_tilde_class, (t_method)abl_link_tilde_set_resolution, gensym("resolution"), A_DEFFLOAT, 0); class_addmethod(abl_link_tilde_class, (t_method)abl_link_tilde_reset, gensym("reset"), A_GIMME, 0); } ================================================ FILE: abl_link/ios/abl_link.h ================================================ /* * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #ifndef __ABL_LINK_H__ #define __ABL_LINK_H__ #include "ABLLink.h" void abl_link_tilde_setup(void); void abl_link_set_link_ref(ABLLinkRef ref); void abl_link_set_time(uint64_t curr_time); #endif