├── AVAudioUnitSamplerToolbox ├── AVAudioUnitSamplerToolbox.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ │ └── Package.resolved │ │ └── xcuserdata │ │ │ └── nickculbertson.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── nickculbertson.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── AVAudioUnitSamplerToolbox │ ├── AVAudioUnitSamplerToolboxApp.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── knob1.imageset │ │ │ ├── Contents.json │ │ │ └── knob1.png │ ├── Conductor.swift │ ├── ContentView.swift │ ├── Info.plist │ ├── Preview Content │ │ └── Preview Assets.xcassets │ │ │ └── Contents.json │ ├── SwiftUIElements.swift │ ├── ViewConductor+MIDI.swift │ └── ViewConductor.swift ├── AVAudioUnitSamplerToolboxTests │ └── AVAudioUnitSamplerToolboxTests.swift ├── AVAudioUnitSamplerToolboxUITests │ ├── AVAudioUnitSamplerToolboxUITests.swift │ └── AVAudioUnitSamplerToolboxUITestsLaunchTests.swift └── Sounds │ ├── Instrument1.aupreset │ └── saw1.wav ├── LICENSE ├── README.md └── screenshot.png /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5A5A6CC2297EB26A0017A3C7 /* AVAudioUnitSamplerToolboxApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CC1297EB26A0017A3C7 /* AVAudioUnitSamplerToolboxApp.swift */; }; 11 | 5A5A6CC4297EB26A0017A3C7 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CC3297EB26A0017A3C7 /* ContentView.swift */; }; 12 | 5A5A6CC6297EB26B0017A3C7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5A5A6CC5297EB26B0017A3C7 /* Assets.xcassets */; }; 13 | 5A5A6CC9297EB26B0017A3C7 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5A5A6CC8297EB26B0017A3C7 /* Preview Assets.xcassets */; }; 14 | 5A5A6CD3297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CD2297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.swift */; }; 15 | 5A5A6CDD297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CDC297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.swift */; }; 16 | 5A5A6CDF297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CDE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITestsLaunchTests.swift */; }; 17 | 5A5A6CEC297EB2CB0017A3C7 /* Sounds in Resources */ = {isa = PBXBuildFile; fileRef = 5A5A6CEB297EB2CB0017A3C7 /* Sounds */; }; 18 | 5A5A6CEF297EB94B0017A3C7 /* Keyboard in Frameworks */ = {isa = PBXBuildFile; productRef = 5A5A6CEE297EB94B0017A3C7 /* Keyboard */; }; 19 | 5A5A6CF1297EB96A0017A3C7 /* SwiftUIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5A6CF0297EB96A0017A3C7 /* SwiftUIElements.swift */; }; 20 | 5A5A6CF4297ECE4D0017A3C7 /* Controls in Frameworks */ = {isa = PBXBuildFile; productRef = 5A5A6CF3297ECE4D0017A3C7 /* Controls */; }; 21 | 5A5A6CFF297EEB840017A3C7 /* MIDIKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5A5A6CFE297EEB840017A3C7 /* MIDIKit */; }; 22 | 5AA6E552298010EA0031C145 /* ViewConductor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA6E551298010E90031C145 /* ViewConductor.swift */; }; 23 | 5AA6E554298011510031C145 /* ViewConductor+MIDI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA6E553298011510031C145 /* ViewConductor+MIDI.swift */; }; 24 | 5AA6E556298026EE0031C145 /* Conductor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AA6E555298026EE0031C145 /* Conductor.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 5A5A6CCF297EB26B0017A3C7 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 5A5A6CB6297EB26A0017A3C7 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 5A5A6CBD297EB26A0017A3C7; 33 | remoteInfo = AVAudioUnitSamplerToolbox; 34 | }; 35 | 5A5A6CD9297EB26B0017A3C7 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 5A5A6CB6297EB26A0017A3C7 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 5A5A6CBD297EB26A0017A3C7; 40 | remoteInfo = AVAudioUnitSamplerToolbox; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 5A5A6CBE297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AVAudioUnitSamplerToolbox.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 5A5A6CC1297EB26A0017A3C7 /* AVAudioUnitSamplerToolboxApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAudioUnitSamplerToolboxApp.swift; sourceTree = ""; }; 47 | 5A5A6CC3297EB26A0017A3C7 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 48 | 5A5A6CC5297EB26B0017A3C7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 5A5A6CC8297EB26B0017A3C7 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 50 | 5A5A6CCE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVAudioUnitSamplerToolboxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 5A5A6CD2297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAudioUnitSamplerToolboxTests.swift; sourceTree = ""; }; 52 | 5A5A6CD8297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AVAudioUnitSamplerToolboxUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 5A5A6CDC297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAudioUnitSamplerToolboxUITests.swift; sourceTree = ""; }; 54 | 5A5A6CDE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AVAudioUnitSamplerToolboxUITestsLaunchTests.swift; sourceTree = ""; }; 55 | 5A5A6CEB297EB2CB0017A3C7 /* Sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Sounds; sourceTree = ""; }; 56 | 5A5A6CF0297EB96A0017A3C7 /* SwiftUIElements.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftUIElements.swift; sourceTree = ""; }; 57 | 5A5A6CF5297EDAA60017A3C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 58 | 5AA6E551298010E90031C145 /* ViewConductor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewConductor.swift; sourceTree = ""; }; 59 | 5AA6E553298011510031C145 /* ViewConductor+MIDI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewConductor+MIDI.swift"; sourceTree = ""; }; 60 | 5AA6E555298026EE0031C145 /* Conductor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conductor.swift; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 5A5A6CBB297EB26A0017A3C7 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 5A5A6CFF297EEB840017A3C7 /* MIDIKit in Frameworks */, 69 | 5A5A6CF4297ECE4D0017A3C7 /* Controls in Frameworks */, 70 | 5A5A6CEF297EB94B0017A3C7 /* Keyboard in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 5A5A6CCB297EB26B0017A3C7 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 5A5A6CD5297EB26B0017A3C7 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 5A5A6CB5297EB26A0017A3C7 = { 92 | isa = PBXGroup; 93 | children = ( 94 | 5A5A6CEB297EB2CB0017A3C7 /* Sounds */, 95 | 5A5A6CC0297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */, 96 | 5A5A6CD1297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests */, 97 | 5A5A6CDB297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests */, 98 | 5A5A6CBF297EB26A0017A3C7 /* Products */, 99 | ); 100 | sourceTree = ""; 101 | }; 102 | 5A5A6CBF297EB26A0017A3C7 /* Products */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 5A5A6CBE297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox.app */, 106 | 5A5A6CCE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.xctest */, 107 | 5A5A6CD8297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.xctest */, 108 | ); 109 | name = Products; 110 | sourceTree = ""; 111 | }; 112 | 5A5A6CC0297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 5A5A6CF5297EDAA60017A3C7 /* Info.plist */, 116 | 5A5A6CC1297EB26A0017A3C7 /* AVAudioUnitSamplerToolboxApp.swift */, 117 | 5A5A6CC3297EB26A0017A3C7 /* ContentView.swift */, 118 | 5AA6E555298026EE0031C145 /* Conductor.swift */, 119 | 5AA6E551298010E90031C145 /* ViewConductor.swift */, 120 | 5AA6E553298011510031C145 /* ViewConductor+MIDI.swift */, 121 | 5A5A6CF0297EB96A0017A3C7 /* SwiftUIElements.swift */, 122 | 5A5A6CC5297EB26B0017A3C7 /* Assets.xcassets */, 123 | 5A5A6CC7297EB26B0017A3C7 /* Preview Content */, 124 | ); 125 | path = AVAudioUnitSamplerToolbox; 126 | sourceTree = ""; 127 | }; 128 | 5A5A6CC7297EB26B0017A3C7 /* Preview Content */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 5A5A6CC8297EB26B0017A3C7 /* Preview Assets.xcassets */, 132 | ); 133 | path = "Preview Content"; 134 | sourceTree = ""; 135 | }; 136 | 5A5A6CD1297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 5A5A6CD2297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.swift */, 140 | ); 141 | path = AVAudioUnitSamplerToolboxTests; 142 | sourceTree = ""; 143 | }; 144 | 5A5A6CDB297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 5A5A6CDC297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.swift */, 148 | 5A5A6CDE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITestsLaunchTests.swift */, 149 | ); 150 | path = AVAudioUnitSamplerToolboxUITests; 151 | sourceTree = ""; 152 | }; 153 | /* End PBXGroup section */ 154 | 155 | /* Begin PBXNativeTarget section */ 156 | 5A5A6CBD297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 5A5A6CE2297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolbox" */; 159 | buildPhases = ( 160 | 5A5A6CBA297EB26A0017A3C7 /* Sources */, 161 | 5A5A6CBB297EB26A0017A3C7 /* Frameworks */, 162 | 5A5A6CBC297EB26A0017A3C7 /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = AVAudioUnitSamplerToolbox; 169 | packageProductDependencies = ( 170 | 5A5A6CEE297EB94B0017A3C7 /* Keyboard */, 171 | 5A5A6CF3297ECE4D0017A3C7 /* Controls */, 172 | 5A5A6CFE297EEB840017A3C7 /* MIDIKit */, 173 | ); 174 | productName = AVAudioUnitSamplerToolbox; 175 | productReference = 5A5A6CBE297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox.app */; 176 | productType = "com.apple.product-type.application"; 177 | }; 178 | 5A5A6CCD297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = 5A5A6CE5297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolboxTests" */; 181 | buildPhases = ( 182 | 5A5A6CCA297EB26B0017A3C7 /* Sources */, 183 | 5A5A6CCB297EB26B0017A3C7 /* Frameworks */, 184 | 5A5A6CCC297EB26B0017A3C7 /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | 5A5A6CD0297EB26B0017A3C7 /* PBXTargetDependency */, 190 | ); 191 | name = AVAudioUnitSamplerToolboxTests; 192 | productName = AVAudioUnitSamplerToolboxTests; 193 | productReference = 5A5A6CCE297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.xctest */; 194 | productType = "com.apple.product-type.bundle.unit-test"; 195 | }; 196 | 5A5A6CD7297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests */ = { 197 | isa = PBXNativeTarget; 198 | buildConfigurationList = 5A5A6CE8297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolboxUITests" */; 199 | buildPhases = ( 200 | 5A5A6CD4297EB26B0017A3C7 /* Sources */, 201 | 5A5A6CD5297EB26B0017A3C7 /* Frameworks */, 202 | 5A5A6CD6297EB26B0017A3C7 /* Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | 5A5A6CDA297EB26B0017A3C7 /* PBXTargetDependency */, 208 | ); 209 | name = AVAudioUnitSamplerToolboxUITests; 210 | productName = AVAudioUnitSamplerToolboxUITests; 211 | productReference = 5A5A6CD8297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.xctest */; 212 | productType = "com.apple.product-type.bundle.ui-testing"; 213 | }; 214 | /* End PBXNativeTarget section */ 215 | 216 | /* Begin PBXProject section */ 217 | 5A5A6CB6297EB26A0017A3C7 /* Project object */ = { 218 | isa = PBXProject; 219 | attributes = { 220 | BuildIndependentTargetsInParallel = 1; 221 | LastSwiftUpdateCheck = 1410; 222 | LastUpgradeCheck = 1410; 223 | TargetAttributes = { 224 | 5A5A6CBD297EB26A0017A3C7 = { 225 | CreatedOnToolsVersion = 14.1; 226 | }; 227 | 5A5A6CCD297EB26B0017A3C7 = { 228 | CreatedOnToolsVersion = 14.1; 229 | TestTargetID = 5A5A6CBD297EB26A0017A3C7; 230 | }; 231 | 5A5A6CD7297EB26B0017A3C7 = { 232 | CreatedOnToolsVersion = 14.1; 233 | TestTargetID = 5A5A6CBD297EB26A0017A3C7; 234 | }; 235 | }; 236 | }; 237 | buildConfigurationList = 5A5A6CB9297EB26A0017A3C7 /* Build configuration list for PBXProject "AVAudioUnitSamplerToolbox" */; 238 | compatibilityVersion = "Xcode 14.0"; 239 | developmentRegion = en; 240 | hasScannedForEncodings = 0; 241 | knownRegions = ( 242 | en, 243 | Base, 244 | ); 245 | mainGroup = 5A5A6CB5297EB26A0017A3C7; 246 | packageReferences = ( 247 | 5A5A6CED297EB94B0017A3C7 /* XCRemoteSwiftPackageReference "Keyboard" */, 248 | 5A5A6CF2297ECE4D0017A3C7 /* XCRemoteSwiftPackageReference "Controls" */, 249 | 5A5A6CFD297EEB840017A3C7 /* XCRemoteSwiftPackageReference "MIDIKit" */, 250 | ); 251 | productRefGroup = 5A5A6CBF297EB26A0017A3C7 /* Products */; 252 | projectDirPath = ""; 253 | projectRoot = ""; 254 | targets = ( 255 | 5A5A6CBD297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */, 256 | 5A5A6CCD297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests */, 257 | 5A5A6CD7297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests */, 258 | ); 259 | }; 260 | /* End PBXProject section */ 261 | 262 | /* Begin PBXResourcesBuildPhase section */ 263 | 5A5A6CBC297EB26A0017A3C7 /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 5A5A6CEC297EB2CB0017A3C7 /* Sounds in Resources */, 268 | 5A5A6CC9297EB26B0017A3C7 /* Preview Assets.xcassets in Resources */, 269 | 5A5A6CC6297EB26B0017A3C7 /* Assets.xcassets in Resources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | 5A5A6CCC297EB26B0017A3C7 /* Resources */ = { 274 | isa = PBXResourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 5A5A6CD6297EB26B0017A3C7 /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXResourcesBuildPhase section */ 288 | 289 | /* Begin PBXSourcesBuildPhase section */ 290 | 5A5A6CBA297EB26A0017A3C7 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 5AA6E556298026EE0031C145 /* Conductor.swift in Sources */, 295 | 5A5A6CC4297EB26A0017A3C7 /* ContentView.swift in Sources */, 296 | 5AA6E554298011510031C145 /* ViewConductor+MIDI.swift in Sources */, 297 | 5A5A6CC2297EB26A0017A3C7 /* AVAudioUnitSamplerToolboxApp.swift in Sources */, 298 | 5A5A6CF1297EB96A0017A3C7 /* SwiftUIElements.swift in Sources */, 299 | 5AA6E552298010EA0031C145 /* ViewConductor.swift in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | 5A5A6CCA297EB26B0017A3C7 /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | 5A5A6CD3297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxTests.swift in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | 5A5A6CD4297EB26B0017A3C7 /* Sources */ = { 312 | isa = PBXSourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | 5A5A6CDD297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITests.swift in Sources */, 316 | 5A5A6CDF297EB26B0017A3C7 /* AVAudioUnitSamplerToolboxUITestsLaunchTests.swift in Sources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | /* End PBXSourcesBuildPhase section */ 321 | 322 | /* Begin PBXTargetDependency section */ 323 | 5A5A6CD0297EB26B0017A3C7 /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | target = 5A5A6CBD297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */; 326 | targetProxy = 5A5A6CCF297EB26B0017A3C7 /* PBXContainerItemProxy */; 327 | }; 328 | 5A5A6CDA297EB26B0017A3C7 /* PBXTargetDependency */ = { 329 | isa = PBXTargetDependency; 330 | target = 5A5A6CBD297EB26A0017A3C7 /* AVAudioUnitSamplerToolbox */; 331 | targetProxy = 5A5A6CD9297EB26B0017A3C7 /* PBXContainerItemProxy */; 332 | }; 333 | /* End PBXTargetDependency section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | 5A5A6CE0297EB26B0017A3C7 /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_ENABLE_OBJC_WEAK = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 351 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 352 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 362 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 363 | CLANG_WARN_STRICT_PROTOTYPES = YES; 364 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 365 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 366 | CLANG_WARN_UNREACHABLE_CODE = YES; 367 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = dwarf; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | ENABLE_TESTABILITY = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu11; 373 | GCC_DYNAMIC_NO_PIC = NO; 374 | GCC_NO_COMMON_BLOCKS = YES; 375 | GCC_OPTIMIZATION_LEVEL = 0; 376 | GCC_PREPROCESSOR_DEFINITIONS = ( 377 | "DEBUG=1", 378 | "$(inherited)", 379 | ); 380 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 381 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 382 | GCC_WARN_UNDECLARED_SELECTOR = YES; 383 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 384 | GCC_WARN_UNUSED_FUNCTION = YES; 385 | GCC_WARN_UNUSED_VARIABLE = YES; 386 | IPHONEOS_DEPLOYMENT_TARGET = 16.1; 387 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 388 | MTL_FAST_MATH = YES; 389 | ONLY_ACTIVE_ARCH = YES; 390 | SDKROOT = iphoneos; 391 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 392 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 393 | }; 394 | name = Debug; 395 | }; 396 | 5A5A6CE1297EB26B0017A3C7 /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ALWAYS_SEARCH_USER_PATHS = NO; 400 | CLANG_ANALYZER_NONNULL = YES; 401 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 402 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 403 | CLANG_ENABLE_MODULES = YES; 404 | CLANG_ENABLE_OBJC_ARC = YES; 405 | CLANG_ENABLE_OBJC_WEAK = YES; 406 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 407 | CLANG_WARN_BOOL_CONVERSION = YES; 408 | CLANG_WARN_COMMA = YES; 409 | CLANG_WARN_CONSTANT_CONVERSION = YES; 410 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 412 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INFINITE_RECURSION = YES; 416 | CLANG_WARN_INT_CONVERSION = YES; 417 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 419 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 420 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 421 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 423 | CLANG_WARN_STRICT_PROTOTYPES = YES; 424 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 425 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 426 | CLANG_WARN_UNREACHABLE_CODE = YES; 427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 428 | COPY_PHASE_STRIP = NO; 429 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 430 | ENABLE_NS_ASSERTIONS = NO; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | GCC_C_LANGUAGE_STANDARD = gnu11; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 435 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 436 | GCC_WARN_UNDECLARED_SELECTOR = YES; 437 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 438 | GCC_WARN_UNUSED_FUNCTION = YES; 439 | GCC_WARN_UNUSED_VARIABLE = YES; 440 | IPHONEOS_DEPLOYMENT_TARGET = 16.1; 441 | MTL_ENABLE_DEBUG_INFO = NO; 442 | MTL_FAST_MATH = YES; 443 | SDKROOT = iphoneos; 444 | SWIFT_COMPILATION_MODE = wholemodule; 445 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 446 | VALIDATE_PRODUCT = YES; 447 | }; 448 | name = Release; 449 | }; 450 | 5A5A6CE3297EB26B0017A3C7 /* Debug */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 454 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 455 | CODE_SIGN_STYLE = Automatic; 456 | CURRENT_PROJECT_VERSION = 1; 457 | DEVELOPMENT_ASSET_PATHS = "\"AVAudioUnitSamplerToolbox/Preview Content\""; 458 | DEVELOPMENT_TEAM = R6J85WRCEG; 459 | ENABLE_PREVIEWS = YES; 460 | GENERATE_INFOPLIST_FILE = YES; 461 | INFOPLIST_FILE = AVAudioUnitSamplerToolbox/Info.plist; 462 | INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "The app uses Bluetooth to connect to Bluetooth MIDI keyboards."; 463 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 464 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 465 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 466 | INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; 467 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; 468 | INFOPLIST_KEY_UIUserInterfaceStyle = Dark; 469 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 470 | LD_RUNPATH_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "@executable_path/Frameworks", 473 | ); 474 | MARKETING_VERSION = 1.0; 475 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolbox; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | SWIFT_EMIT_LOC_STRINGS = YES; 478 | SWIFT_VERSION = 5.0; 479 | TARGETED_DEVICE_FAMILY = "1,2"; 480 | }; 481 | name = Debug; 482 | }; 483 | 5A5A6CE4297EB26B0017A3C7 /* Release */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 488 | CODE_SIGN_STYLE = Automatic; 489 | CURRENT_PROJECT_VERSION = 1; 490 | DEVELOPMENT_ASSET_PATHS = "\"AVAudioUnitSamplerToolbox/Preview Content\""; 491 | DEVELOPMENT_TEAM = R6J85WRCEG; 492 | ENABLE_PREVIEWS = YES; 493 | GENERATE_INFOPLIST_FILE = YES; 494 | INFOPLIST_FILE = AVAudioUnitSamplerToolbox/Info.plist; 495 | INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "The app uses Bluetooth to connect to Bluetooth MIDI keyboards."; 496 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 497 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 498 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 499 | INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; 500 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; 501 | INFOPLIST_KEY_UIUserInterfaceStyle = Dark; 502 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 503 | LD_RUNPATH_SEARCH_PATHS = ( 504 | "$(inherited)", 505 | "@executable_path/Frameworks", 506 | ); 507 | MARKETING_VERSION = 1.0; 508 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolbox; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | SWIFT_EMIT_LOC_STRINGS = YES; 511 | SWIFT_VERSION = 5.0; 512 | TARGETED_DEVICE_FAMILY = "1,2"; 513 | }; 514 | name = Release; 515 | }; 516 | 5A5A6CE6297EB26B0017A3C7 /* Debug */ = { 517 | isa = XCBuildConfiguration; 518 | buildSettings = { 519 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 520 | BUNDLE_LOADER = "$(TEST_HOST)"; 521 | CODE_SIGN_STYLE = Automatic; 522 | CURRENT_PROJECT_VERSION = 1; 523 | DEVELOPMENT_TEAM = R6J85WRCEG; 524 | GENERATE_INFOPLIST_FILE = YES; 525 | IPHONEOS_DEPLOYMENT_TARGET = 16.1; 526 | MARKETING_VERSION = 1.0; 527 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolboxTests; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | SWIFT_EMIT_LOC_STRINGS = NO; 530 | SWIFT_VERSION = 5.0; 531 | TARGETED_DEVICE_FAMILY = "1,2"; 532 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVAudioUnitSamplerToolbox.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AVAudioUnitSamplerToolbox"; 533 | }; 534 | name = Debug; 535 | }; 536 | 5A5A6CE7297EB26B0017A3C7 /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | buildSettings = { 539 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 540 | BUNDLE_LOADER = "$(TEST_HOST)"; 541 | CODE_SIGN_STYLE = Automatic; 542 | CURRENT_PROJECT_VERSION = 1; 543 | DEVELOPMENT_TEAM = R6J85WRCEG; 544 | GENERATE_INFOPLIST_FILE = YES; 545 | IPHONEOS_DEPLOYMENT_TARGET = 16.1; 546 | MARKETING_VERSION = 1.0; 547 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolboxTests; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | SWIFT_EMIT_LOC_STRINGS = NO; 550 | SWIFT_VERSION = 5.0; 551 | TARGETED_DEVICE_FAMILY = "1,2"; 552 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AVAudioUnitSamplerToolbox.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AVAudioUnitSamplerToolbox"; 553 | }; 554 | name = Release; 555 | }; 556 | 5A5A6CE9297EB26B0017A3C7 /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 560 | CODE_SIGN_STYLE = Automatic; 561 | CURRENT_PROJECT_VERSION = 1; 562 | DEVELOPMENT_TEAM = R6J85WRCEG; 563 | GENERATE_INFOPLIST_FILE = YES; 564 | MARKETING_VERSION = 1.0; 565 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolboxUITests; 566 | PRODUCT_NAME = "$(TARGET_NAME)"; 567 | SWIFT_EMIT_LOC_STRINGS = NO; 568 | SWIFT_VERSION = 5.0; 569 | TARGETED_DEVICE_FAMILY = "1,2"; 570 | TEST_TARGET_NAME = AVAudioUnitSamplerToolbox; 571 | }; 572 | name = Debug; 573 | }; 574 | 5A5A6CEA297EB26B0017A3C7 /* Release */ = { 575 | isa = XCBuildConfiguration; 576 | buildSettings = { 577 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 578 | CODE_SIGN_STYLE = Automatic; 579 | CURRENT_PROJECT_VERSION = 1; 580 | DEVELOPMENT_TEAM = R6J85WRCEG; 581 | GENERATE_INFOPLIST_FILE = YES; 582 | MARKETING_VERSION = 1.0; 583 | PRODUCT_BUNDLE_IDENTIFIER = com.MobyPixel.AVAudioUnitSamplerToolboxUITests; 584 | PRODUCT_NAME = "$(TARGET_NAME)"; 585 | SWIFT_EMIT_LOC_STRINGS = NO; 586 | SWIFT_VERSION = 5.0; 587 | TARGETED_DEVICE_FAMILY = "1,2"; 588 | TEST_TARGET_NAME = AVAudioUnitSamplerToolbox; 589 | }; 590 | name = Release; 591 | }; 592 | /* End XCBuildConfiguration section */ 593 | 594 | /* Begin XCConfigurationList section */ 595 | 5A5A6CB9297EB26A0017A3C7 /* Build configuration list for PBXProject "AVAudioUnitSamplerToolbox" */ = { 596 | isa = XCConfigurationList; 597 | buildConfigurations = ( 598 | 5A5A6CE0297EB26B0017A3C7 /* Debug */, 599 | 5A5A6CE1297EB26B0017A3C7 /* Release */, 600 | ); 601 | defaultConfigurationIsVisible = 0; 602 | defaultConfigurationName = Release; 603 | }; 604 | 5A5A6CE2297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolbox" */ = { 605 | isa = XCConfigurationList; 606 | buildConfigurations = ( 607 | 5A5A6CE3297EB26B0017A3C7 /* Debug */, 608 | 5A5A6CE4297EB26B0017A3C7 /* Release */, 609 | ); 610 | defaultConfigurationIsVisible = 0; 611 | defaultConfigurationName = Release; 612 | }; 613 | 5A5A6CE5297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolboxTests" */ = { 614 | isa = XCConfigurationList; 615 | buildConfigurations = ( 616 | 5A5A6CE6297EB26B0017A3C7 /* Debug */, 617 | 5A5A6CE7297EB26B0017A3C7 /* Release */, 618 | ); 619 | defaultConfigurationIsVisible = 0; 620 | defaultConfigurationName = Release; 621 | }; 622 | 5A5A6CE8297EB26B0017A3C7 /* Build configuration list for PBXNativeTarget "AVAudioUnitSamplerToolboxUITests" */ = { 623 | isa = XCConfigurationList; 624 | buildConfigurations = ( 625 | 5A5A6CE9297EB26B0017A3C7 /* Debug */, 626 | 5A5A6CEA297EB26B0017A3C7 /* Release */, 627 | ); 628 | defaultConfigurationIsVisible = 0; 629 | defaultConfigurationName = Release; 630 | }; 631 | /* End XCConfigurationList section */ 632 | 633 | /* Begin XCRemoteSwiftPackageReference section */ 634 | 5A5A6CED297EB94B0017A3C7 /* XCRemoteSwiftPackageReference "Keyboard" */ = { 635 | isa = XCRemoteSwiftPackageReference; 636 | repositoryURL = "https://github.com/AudioKit/Keyboard"; 637 | requirement = { 638 | branch = main; 639 | kind = branch; 640 | }; 641 | }; 642 | 5A5A6CF2297ECE4D0017A3C7 /* XCRemoteSwiftPackageReference "Controls" */ = { 643 | isa = XCRemoteSwiftPackageReference; 644 | repositoryURL = "https://github.com/AudioKit/Controls"; 645 | requirement = { 646 | branch = main; 647 | kind = branch; 648 | }; 649 | }; 650 | 5A5A6CFD297EEB840017A3C7 /* XCRemoteSwiftPackageReference "MIDIKit" */ = { 651 | isa = XCRemoteSwiftPackageReference; 652 | repositoryURL = "https://github.com/orchetect/MIDIKit"; 653 | requirement = { 654 | branch = main; 655 | kind = branch; 656 | }; 657 | }; 658 | /* End XCRemoteSwiftPackageReference section */ 659 | 660 | /* Begin XCSwiftPackageProductDependency section */ 661 | 5A5A6CEE297EB94B0017A3C7 /* Keyboard */ = { 662 | isa = XCSwiftPackageProductDependency; 663 | package = 5A5A6CED297EB94B0017A3C7 /* XCRemoteSwiftPackageReference "Keyboard" */; 664 | productName = Keyboard; 665 | }; 666 | 5A5A6CF3297ECE4D0017A3C7 /* Controls */ = { 667 | isa = XCSwiftPackageProductDependency; 668 | package = 5A5A6CF2297ECE4D0017A3C7 /* XCRemoteSwiftPackageReference "Controls" */; 669 | productName = Controls; 670 | }; 671 | 5A5A6CFE297EEB840017A3C7 /* MIDIKit */ = { 672 | isa = XCSwiftPackageProductDependency; 673 | package = 5A5A6CFD297EEB840017A3C7 /* XCRemoteSwiftPackageReference "MIDIKit" */; 674 | productName = MIDIKit; 675 | }; 676 | /* End XCSwiftPackageProductDependency section */ 677 | }; 678 | rootObject = 5A5A6CB6297EB26A0017A3C7 /* Project object */; 679 | } 680 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "controls", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/AudioKit/Controls", 7 | "state" : { 8 | "branch" : "main", 9 | "revision" : "6861a9380963378115856f0b9b54414a9ec5f1ad" 10 | } 11 | }, 12 | { 13 | "identity" : "keyboard", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/AudioKit/Keyboard", 16 | "state" : { 17 | "branch" : "main", 18 | "revision" : "238ac6cf0f6efddfcd0ab8b41782377e2617d0a7" 19 | } 20 | }, 21 | { 22 | "identity" : "midikit", 23 | "kind" : "remoteSourceControl", 24 | "location" : "https://github.com/orchetect/MIDIKit", 25 | "state" : { 26 | "branch" : "main", 27 | "revision" : "2ec386d13acbbee7581834982d295cb222560cf8" 28 | } 29 | }, 30 | { 31 | "identity" : "timecodekit", 32 | "kind" : "remoteSourceControl", 33 | "location" : "https://github.com/orchetect/TimecodeKit", 34 | "state" : { 35 | "revision" : "a81074199873696ad5e06d2f67a24dd1a9bd7dd2", 36 | "version" : "1.6.5" 37 | } 38 | }, 39 | { 40 | "identity" : "tonic", 41 | "kind" : "remoteSourceControl", 42 | "location" : "https://github.com/AudioKit/Tonic.git", 43 | "state" : { 44 | "revision" : "bd73003b0e6caa90fb1d71b57329b0d609b097ee", 45 | "version" : "1.0.10" 46 | } 47 | } 48 | ], 49 | "version" : 2 50 | } 51 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.xcworkspace/xcuserdata/nickculbertson.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickCulbertson/AVAudioUnitSamplerToolbox/37853d764c6400e4bcc48ca38abc5a020b58f46e/AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/project.xcworkspace/xcuserdata/nickculbertson.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox.xcodeproj/xcuserdata/nickculbertson.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AVAudioUnitSamplerToolbox.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | Controls (Playground) 1.xcscheme 13 | 14 | isShown 15 | 16 | orderHint 17 | 5 18 | 19 | Controls (Playground) 2.xcscheme 20 | 21 | isShown 22 | 23 | orderHint 24 | 6 25 | 26 | Controls (Playground).xcscheme 27 | 28 | isShown 29 | 30 | orderHint 31 | 4 32 | 33 | Keyboard (Playground) 1.xcscheme 34 | 35 | isShown 36 | 37 | orderHint 38 | 2 39 | 40 | Keyboard (Playground) 2.xcscheme 41 | 42 | isShown 43 | 44 | orderHint 45 | 3 46 | 47 | Keyboard (Playground).xcscheme 48 | 49 | isShown 50 | 51 | orderHint 52 | 1 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolboxApp.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import AVFoundation 3 | 4 | @main 5 | struct AVAudioUnitSamplerToolboxApp: App { 6 | init() { 7 | #if os(iOS) 8 | do { 9 | try AVAudioSession.sharedInstance().setCategory(.playback, 10 | options: [.mixWithOthers]) 11 | try AVAudioSession.sharedInstance().setActive(true) 12 | } catch let err { 13 | print(err) 14 | } 15 | #endif 16 | } 17 | var body: some Scene { 18 | WindowGroup { 19 | ContentView() 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/knob1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "knob1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/knob1.imageset/knob1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickCulbertson/AVAudioUnitSamplerToolbox/37853d764c6400e4bcc48ca38abc5a020b58f46e/AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Assets.xcassets/knob1.imageset/knob1.png -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Conductor.swift: -------------------------------------------------------------------------------- 1 | import AVFoundation 2 | class Conductor: ObservableObject { 3 | // Audio Engine 4 | let engine = AVAudioEngine() 5 | 6 | // Sampler Instrument 7 | var instrument = AVAudioUnitSampler() 8 | 9 | // Effects 10 | var reverb = AVAudioUnitReverb() 11 | var delay = AVAudioUnitDelay() 12 | var delayTime: Float = 0.3 { 13 | didSet { 14 | delay.delayTime = TimeInterval(delayTime) 15 | } 16 | } 17 | @Published var lowPassCutoff: AUValue = 127 { 18 | didSet { 19 | instrument.sendController(74, withValue: UInt8(lowPassCutoff), onChannel: 0) 20 | } 21 | } 22 | var limiter = AVAudioUnitEffect(audioComponentDescription: AudioComponentDescription( 23 | componentType:kAudioUnitType_Effect, 24 | componentSubType: kAudioUnitSubType_PeakLimiter, 25 | componentManufacturer: kAudioUnitManufacturer_Apple, 26 | componentFlags: 0, 27 | componentFlagsMask: 0)) 28 | 29 | init() { 30 | // Attach Nodes to the Engine 31 | engine.attach(instrument) 32 | engine.attach(delay) 33 | engine.attach(reverb) 34 | engine.attach(limiter) 35 | 36 | // Connect Nodes to the Engine's output 37 | engine.connect(instrument, to: reverb, format: nil) 38 | engine.connect(reverb, to: delay, format: nil) 39 | engine.connect(delay, to: limiter, format: nil) 40 | engine.connect(limiter, to: engine.mainMixerNode, format: nil) 41 | 42 | // Load AVAudioUnitSampler Instrument 43 | try? instrument.loadInstrument(at: Bundle.main.url(forResource: "Sounds/Instrument1", withExtension: "aupreset")!) 44 | 45 | // Set default values for Nodes 46 | // (the lowPassCutoff is a part of the sampler instrument) 47 | lowPassCutoff = 127 48 | delay.wetDryMix = 20 49 | delay.delayTime = 0.3 50 | reverb.wetDryMix = 50 51 | reverb.loadFactoryPreset(.largeHall) 52 | } 53 | 54 | func start() { 55 | try? engine.start() 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/ContentView.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import AVFoundation 3 | import Keyboard 4 | import Tonic 5 | import Controls 6 | 7 | struct ContentView: View { 8 | @StateObject var viewConductor = ViewConductor() 9 | @State var knob1: Float = 50 10 | @State var knob2: Float = 20 11 | @State var knob3: Float = 0.3 12 | @State var knob4: Float = 127 13 | @State var knob5: Float = 0 14 | @Environment(\.scenePhase) var scenePhase 15 | @State private var showingPopover = false 16 | 17 | func updateKnobs(){ 18 | knob1 = viewConductor.conductor.reverb.wetDryMix 19 | knob2 = viewConductor.conductor.delay.wetDryMix 20 | knob3 = Float(viewConductor.conductor.delay.delayTime) 21 | knob4 = viewConductor.conductor.lowPassCutoff 22 | knob5 = viewConductor.conductor.instrument.overallGain 23 | } 24 | 25 | var body: some View { 26 | ZStack { 27 | RadialGradient(gradient: Gradient(colors: [.pink, .black]), center: .center, startRadius: 2, endRadius: 650).edgesIgnoringSafeArea(.all) 28 | VStack { 29 | HStack { 30 | SwiftUIRack(knob1: $knob1, knob2: $knob2, knob3: $knob3, knob4: $knob4, knob5: $knob5, updateMIDIFilter: viewConductor.updateMIDIFilter(Param:knobNumber:)).padding(20) 31 | } 32 | Spacer() 33 | SwiftUIKeyboard(firstOctave: viewConductor.firstOctave, octaveCount: viewConductor.octaveCount, noteOn: viewConductor.noteOn(pitch:point:), noteOff: viewConductor.noteOff) 34 | } 35 | }.onChange(of: scenePhase) { newPhase in 36 | if newPhase == .active { 37 | if !viewConductor.conductor.engine.isRunning { 38 | try? viewConductor.conductor.instrument.loadInstrument(at: Bundle.main.url(forResource: "Sounds/Instrument1", withExtension: "aupreset")!) 39 | try? viewConductor.conductor.engine.start() 40 | } 41 | } else if newPhase == .background { 42 | viewConductor.conductor.engine.stop() 43 | } 44 | }.onReceive(NotificationCenter.default.publisher(for: AVAudioSession.routeChangeNotification)) { event in 45 | switch event.userInfo![AVAudioSessionRouteChangeReasonKey] as! UInt { 46 | case AVAudioSession.RouteChangeReason.newDeviceAvailable.rawValue: 47 | reloadAudio() 48 | case AVAudioSession.RouteChangeReason.oldDeviceUnavailable.rawValue: 49 | reloadAudio() 50 | default: 51 | break 52 | } 53 | }.onReceive(NotificationCenter.default.publisher(for: AVAudioSession.interruptionNotification)) { event in 54 | guard let info = event.userInfo, 55 | let typeValue = info[AVAudioSessionInterruptionTypeKey] as? UInt, 56 | let type = AVAudioSession.InterruptionType(rawValue: typeValue) else { 57 | return 58 | } 59 | if type == .began { 60 | self.viewConductor.conductor.engine.stop() 61 | } else if type == .ended { 62 | guard let optionsValue = 63 | info[AVAudioSessionInterruptionOptionKey] as? UInt else { 64 | return 65 | } 66 | if AVAudioSession.InterruptionOptions(rawValue: optionsValue).contains(.shouldResume) { 67 | reloadAudio() 68 | } 69 | } 70 | }.onReceive(NotificationCenter.default.publisher(for: .knobUpdate), perform: { obj in 71 | if let userInfo = obj.userInfo, let info = userInfo["info"] as? UInt8, let knobnum = userInfo["knob"] as? Int { 72 | if knobnum == 1 { 73 | knob1 = Float(info) 74 | }else if knobnum == 2 { 75 | knob2 = Float(info) 76 | }else if knobnum == 3 { 77 | knob3 = Float(info) 78 | }else if knobnum == 4 { 79 | knob4 = Float(info) 80 | }else if knobnum == 5 { 81 | knob5 = Float(info) 82 | } 83 | } 84 | }) 85 | .onDisappear() { self.viewConductor.conductor.engine.stop() } 86 | .environmentObject(viewConductor.midiManager) 87 | } 88 | func reloadAudio() { 89 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { 90 | if !viewConductor.conductor.engine.isRunning { 91 | try? viewConductor.conductor.instrument.loadInstrument(at: Bundle.main.url(forResource: "Sounds/Instrument1", withExtension: "aupreset")!) 92 | viewConductor.conductor.start() 93 | } 94 | } 95 | } 96 | } 97 | 98 | struct ContentView_Previews: PreviewProvider { 99 | static var previews: some View { 100 | ContentView() 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIBackgroundModes 6 | 7 | audio 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/SwiftUIElements.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import SwiftUI 3 | import Keyboard 4 | import Tonic 5 | import Controls 6 | import AVFoundation 7 | struct SwiftUIKeyboard: View { 8 | var firstOctave: Int 9 | var octaveCount: Int 10 | var noteOn: (Pitch, CGPoint) -> Void = { _, _ in } 11 | var noteOff: (Pitch)->Void 12 | 13 | var body: some View { 14 | Keyboard(layout: .piano(pitchRange: Pitch(intValue: firstOctave * 12 + 24)...Pitch(intValue: firstOctave * 12 + octaveCount * 12 + 24)), 15 | noteOn: noteOn, noteOff: noteOff){ pitch, isActivated in 16 | SwiftUIKeyboardKey(pitch: pitch, 17 | isActivated: isActivated) 18 | }.cornerRadius(5) 19 | } 20 | } 21 | 22 | struct SwiftUIKeyboardKey: View { 23 | @State var MIDIKeyPressed = [Bool](repeating: false, count: 128) 24 | var pitch : Pitch 25 | var isActivated : Bool 26 | 27 | var body: some View { 28 | VStack{ 29 | KeyboardKey(pitch: pitch, 30 | isActivated: isActivated, 31 | text: "", 32 | whiteKeyColor: .white, 33 | blackKeyColor: .black, 34 | pressedColor: .pink, 35 | flatTop: true, 36 | isActivatedExternally: MIDIKeyPressed[pitch.intValue]) 37 | }.onReceive(NotificationCenter.default.publisher(for: .MIDIKey), perform: { obj in 38 | if let userInfo = obj.userInfo, let info = userInfo["info"] as? UInt8, let val = userInfo["bool"] as? Bool { 39 | self.MIDIKeyPressed[Int(info)] = val 40 | } 41 | }) 42 | } 43 | } 44 | 45 | ///Knobs 46 | struct SwiftUIRack: View { 47 | @State var knob1: Binding 48 | @State var knob2: Binding 49 | @State var knob3: Binding 50 | @State var knob4: Binding 51 | @State var knob5: Binding 52 | var updateMIDIFilter: (AUValue, Int)->Void = { _, _ in } 53 | 54 | var body: some View { 55 | HStack { 56 | Spacer() 57 | SwiftUIKnob(updateMIDI1: updateMIDIFilter, knobNumber: 1 ,value: knob1, range: 0...100, title: "Reverb", places: "0").frame(maxWidth: 120, maxHeight: 120) 58 | Spacer() 59 | SwiftUIKnob(updateMIDI1: updateMIDIFilter, knobNumber: 2 ,value: knob2, range: 0...100, title: "Delay", places: "0").frame(maxWidth: 120, maxHeight: 120) 60 | Spacer() 61 | SwiftUIKnob(updateMIDI1: updateMIDIFilter, knobNumber: 3 ,value: knob3, range: 0...2, title: "Delay Time", places: "2") 62 | .frame(maxWidth: 120, maxHeight: 120) 63 | Spacer() 64 | SwiftUIKnob(updateMIDI1: updateMIDIFilter, knobNumber: 4 ,value: knob4, range: 0...127, title: "Filter", places: "0").frame(maxWidth: 120, maxHeight: 120) 65 | Group{ 66 | Spacer() 67 | SwiftUIKnob(updateMIDI1: updateMIDIFilter, knobNumber: 5 ,value: knob5, range: -12.0...12.0, title: "Volume", places: "2").frame(maxWidth: 120, maxHeight: 120) 68 | Spacer() 69 | } 70 | 71 | }.padding(.bottom,17) 72 | .frame(maxWidth: 800, alignment: .center) 73 | } 74 | } 75 | 76 | public struct SwiftUIKnob: View { 77 | var updateMIDI1: (AUValue, Int)->Void = { _, _ in } 78 | @Binding var value: Float 79 | var range: ClosedRange 80 | var knobNumber = 0 81 | var title: String = "" 82 | @State var displayString: String = "" 83 | var places: String = "0" 84 | @State var isShowingValue = false 85 | var knobPreferredWidth: CGFloat = 100 86 | var knobBgColor = Color(hue: 0.5, saturation: 0.75, brightness: 0.5, opacity: 0.55) 87 | var knobBgCornerRadius: CGFloat = 1 88 | var knobLineCap: CGLineCap = .round 89 | var knobCircleWidth: CGFloat = 1 90 | var knobStrokeWidth: CGFloat = 1 91 | var knobRotationRange: CGFloat = 0.875 92 | var knobTrimMin: CGFloat = 1 93 | var knobTrimMax: CGFloat = 1 94 | var knobDragSensitivity: CGFloat = 0.0075 95 | var isNegative = false 96 | 97 | public init(updateMIDI1: @escaping (AUValue, Int)->Void = { _, _ in }, knobNumber: Int, value: Binding, range: ClosedRange, title: String, places: String) { 98 | self.knobNumber = knobNumber 99 | self._value = value 100 | self.updateMIDI1 = updateMIDI1 101 | self.range = range 102 | self.title = title 103 | self.displayString = title 104 | self.places = places 105 | knobPreferredWidth = 50 106 | knobBgCornerRadius = 3.0 * 0.25 * knobPreferredWidth 107 | knobCircleWidth = 0.7 * knobPreferredWidth 108 | knobStrokeWidth = 2 * knobPreferredWidth / 25 109 | knobTrimMin = (1 - knobRotationRange) / 2.0 110 | knobTrimMax = 1 - knobTrimMin 111 | if range.lowerBound != 0 { 112 | isNegative = true 113 | } 114 | } 115 | @State private var lastLocation: CGPoint = CGPoint(x: 0, y: 0) 116 | var rangeDegrees = 270.0 117 | 118 | public var body: some View { 119 | Control(value:Binding( 120 | get: { value }, 121 | set: { (newValue) in 122 | if !isShowingValue && value != newValue { 123 | isShowingValue = true 124 | } 125 | value = newValue 126 | updateMIDI1(value,knobNumber) 127 | 128 | }), in: range, geometry: .twoDimensionalDrag(xSensitivity: 0.5, ySensitivity: 0.5), 129 | onEnded: { 130 | isShowingValue = false 131 | }) { geo in 132 | // GeometryReader { geometry in 133 | VStack { 134 | Text("\(isShowingValue ? "\(String(format: "%0.\(places)f", value ))" : title)").lineLimit(1) 135 | 136 | Image("knob1") 137 | .resizable() 138 | .scaledToFit() 139 | .aspectRatio(contentMode: .fit) 140 | .rotationEffect(.degrees(320 * (isNegative ? Double((value - range.lowerBound) / (range.upperBound - range.lowerBound)) : Double(value / range.upperBound)) - 160)) 141 | 142 | } 143 | .frame(width: geo.size.width, height: geo.size.height, alignment: .center) 144 | } 145 | .onTapGesture(count: 2) { 146 | if knobNumber == 4 {//Filter 147 | value = 127 148 | }else{ 149 | value = 0 150 | } 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/ViewConductor+MIDI.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import AVFoundation 3 | import Tonic 4 | import MIDIKit 5 | 6 | extension ViewConductor { 7 | // Connect MIDI on init 8 | func MIDIConnect() { 9 | do { 10 | print("Starting MIDI services.") 11 | try midiManager.start() 12 | } catch { 13 | print("Error starting MIDI services:", error.localizedDescription) 14 | } 15 | 16 | do { 17 | try midiManager.addInputConnection( 18 | toOutputs: [], // no need to specify if we're using .allEndpoints 19 | tag: "Listener", 20 | mode: .allEndpoints, // auto-connect to all outputs that may appear 21 | filter: .owned(), // don't allow self-created virtual endpoints 22 | receiver: .events { [weak self] events in 23 | // Note: this handler will be called on a background thread 24 | // so call the next line on main if it may result in UI updates 25 | DispatchQueue.main.async { 26 | events.forEach { self?.received(midiEvent: $0) } 27 | } 28 | } 29 | ) 30 | } catch { 31 | print( 32 | "Error setting up managed MIDI all-listener connection:", 33 | error.localizedDescription 34 | ) 35 | } 36 | } 37 | 38 | // MIDI Events 39 | private func received(midiEvent: MIDIEvent) { 40 | switch midiEvent { 41 | case .noteOn(let payload): 42 | print("Note On:", payload.note, payload.velocity, payload.channel) 43 | conductor.instrument.startNote(payload.note.number.uInt8Value, withVelocity: payload.velocity.midi1Value.uInt8Value, onChannel: 0) 44 | NotificationCenter.default.post(name: .MIDIKey, object: nil, userInfo: ["info": payload.note.number.uInt8Value, "bool": true]) 45 | case .noteOff(let payload): 46 | print("Note Off:", payload.note, payload.velocity, payload.channel) 47 | conductor.instrument.stopNote(payload.note.number.uInt8Value, onChannel: 0) 48 | NotificationCenter.default.post(name: .MIDIKey, object: nil, userInfo: ["info": payload.note.number.uInt8Value, "bool": false]) 49 | case .cc(let payload): 50 | print("CC:", payload.controller, payload.value, payload.channel) 51 | if payload.controller == 74 { 52 | conductor.instrument.sendController(74, withValue: payload.value.midi1Value.uInt8Value, onChannel: 0) 53 | NotificationCenter.default.post(name: .knobUpdate, object: nil, userInfo: ["info": payload.value.midi1Value.uInt8Value, "knob": 4]) 54 | } 55 | case .programChange(let payload): 56 | print("Program Change:", payload.program, payload.channel) 57 | default: 58 | break 59 | } 60 | } 61 | } 62 | 63 | #if os(iOS) 64 | 65 | import CoreAudioKit 66 | 67 | struct BluetoothMIDIView: UIViewControllerRepresentable { 68 | func makeUIViewController(context: Context) -> BTMIDICentralViewController { 69 | BTMIDICentralViewController() 70 | } 71 | 72 | func updateUIViewController( 73 | _ uiViewController: BTMIDICentralViewController, 74 | context: Context 75 | ) { } 76 | 77 | typealias UIViewControllerType = BTMIDICentralViewController 78 | } 79 | 80 | class BTMIDICentralViewController: CABTMIDICentralViewController { 81 | var uiViewController: UIViewController? 82 | 83 | override public func viewDidLayoutSubviews() { 84 | super.viewDidLayoutSubviews() 85 | 86 | navigationItem.rightBarButtonItem = UIBarButtonItem( 87 | barButtonSystemItem: .done, 88 | target: self, 89 | action: #selector(doneAction) 90 | ) 91 | } 92 | 93 | @objc 94 | public func doneAction() { 95 | uiViewController?.dismiss(animated: true, completion: nil) 96 | } 97 | } 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolbox/ViewConductor.swift: -------------------------------------------------------------------------------- 1 | import AVFoundation 2 | import Tonic 3 | import MIDIKit 4 | 5 | class ViewConductor: ObservableObject { 6 | // Audio Engine 7 | var conductor = Conductor() 8 | 9 | // Keyboard options 10 | @Published var firstOctave = 2 11 | @Published var octaveCount = 2 12 | 13 | // MIDI Manager (MIDI methods are in AVAudioUnitSampler+MIDI) 14 | let midiManager = MIDIManager( 15 | clientName: "TestAppMIDIManager", 16 | model: "TestApp", 17 | manufacturer: "MyCompany" 18 | ) 19 | 20 | init() { 21 | // Start the engine 22 | conductor.start() 23 | 24 | // Set up MIDI 25 | MIDIConnect() 26 | } 27 | 28 | //Keyboard Events 29 | func noteOn(pitch: Pitch, point: CGPoint) { 30 | conductor.instrument.startNote(UInt8(pitch.intValue), withVelocity: 127, onChannel: 0) 31 | } 32 | 33 | func noteOff(pitch: Pitch) { 34 | conductor.instrument.stopNote(UInt8(pitch.intValue), onChannel: 0) 35 | } 36 | 37 | func updateMIDIFilter(Param: AUValue, knobNumber: Int){ 38 | if knobNumber == 1 { 39 | conductor.reverb.wetDryMix = Param 40 | } else if knobNumber == 2 { 41 | conductor.delay.wetDryMix = Param 42 | } else if knobNumber == 3 { 43 | conductor.delay.delayTime = TimeInterval(Param) 44 | } else if knobNumber == 4 { 45 | conductor.lowPassCutoff = Param 46 | } else if knobNumber == 5 { 47 | conductor.instrument.overallGain = Param 48 | } 49 | } 50 | } 51 | 52 | extension NSNotification.Name { 53 | static let keyNoteOn = Notification.Name("keyNoteOn") 54 | static let keyNoteOff = Notification.Name("keyNoteOff") 55 | static let knobUpdate = Notification.Name("knobUpdate") 56 | static let MIDIKey = Notification.Name("MIDIKey") 57 | } 58 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolboxTests/AVAudioUnitSamplerToolboxTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import AVAudioUnitSamplerToolbox 3 | 4 | final class AVAudioUnitSamplerToolboxTests: XCTestCase { 5 | 6 | override func setUpWithError() throws { 7 | // Put setup code here. This method is called before the invocation of each test method in the class. 8 | } 9 | 10 | override func tearDownWithError() throws { 11 | // Put teardown code here. This method is called after the invocation of each test method in the class. 12 | } 13 | 14 | func testExample() throws { 15 | // This is an example of a functional test case. 16 | // Use XCTAssert and related functions to verify your tests produce the correct results. 17 | // Any test you write for XCTest can be annotated as throws and async. 18 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. 19 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. 20 | } 21 | 22 | func testPerformanceExample() throws { 23 | // This is an example of a performance test case. 24 | self.measure { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolboxUITests/AVAudioUnitSamplerToolboxUITests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | final class AVAudioUnitSamplerToolboxUITests: XCTestCase { 4 | 5 | override func setUpWithError() throws { 6 | // Put setup code here. This method is called before the invocation of each test method in the class. 7 | 8 | // In UI tests it is usually best to stop immediately when a failure occurs. 9 | continueAfterFailure = false 10 | 11 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 12 | } 13 | 14 | override func tearDownWithError() throws { 15 | // Put teardown code here. This method is called after the invocation of each test method in the class. 16 | } 17 | 18 | func testExample() throws { 19 | // UI tests must launch the application that they test. 20 | let app = XCUIApplication() 21 | app.launch() 22 | 23 | // Use XCTAssert and related functions to verify your tests produce the correct results. 24 | } 25 | 26 | func testLaunchPerformance() throws { 27 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { 28 | // This measures how long it takes to launch your application. 29 | measure(metrics: [XCTApplicationLaunchMetric()]) { 30 | XCUIApplication().launch() 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/AVAudioUnitSamplerToolboxUITests/AVAudioUnitSamplerToolboxUITestsLaunchTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | final class AVAudioUnitSamplerToolboxUITestsLaunchTests: XCTestCase { 4 | 5 | override class var runsForEachTargetApplicationUIConfiguration: Bool { 6 | true 7 | } 8 | 9 | override func setUpWithError() throws { 10 | continueAfterFailure = false 11 | } 12 | 13 | func testLaunch() throws { 14 | let app = XCUIApplication() 15 | app.launch() 16 | 17 | // Insert steps here to perform after app launch but before taking a screenshot, 18 | // such as logging into a test account or navigating somewhere in the app 19 | 20 | let attachment = XCTAttachment(screenshot: app.screenshot()) 21 | attachment.name = "Launch Screen" 22 | attachment.lifetime = .keepAlways 23 | add(attachment) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/Sounds/Instrument1.aupreset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AU version 6 | 1 7 | Instrument 8 | 9 | Layers 10 | 11 | 12 | Amplifier 13 | 14 | ID 15 | 0 16 | enabled 17 | 18 | 19 | Connections 20 | 21 | 22 | ID 23 | 0 24 | control 25 | 0 26 | destination 27 | 816840704 28 | enabled 29 | 30 | inverse 31 | 32 | scale 33 | 12800 34 | source 35 | 300 36 | transform 37 | 1 38 | 39 | 40 | ID 41 | 1 42 | control 43 | 0 44 | destination 45 | 1343225856 46 | enabled 47 | 48 | inverse 49 | 50 | scale 51 | -96 52 | source 53 | 301 54 | transform 55 | 2 56 | 57 | 58 | ID 59 | 2 60 | control 61 | 0 62 | destination 63 | 1343225856 64 | enabled 65 | 66 | inverse 67 | 68 | scale 69 | -96 70 | source 71 | 7 72 | transform 73 | 2 74 | 75 | 76 | ID 77 | 3 78 | control 79 | 0 80 | destination 81 | 1343225856 82 | enabled 83 | 84 | inverse 85 | 86 | scale 87 | -96 88 | source 89 | 11 90 | transform 91 | 2 92 | 93 | 94 | ID 95 | 4 96 | control 97 | 0 98 | destination 99 | 1344274432 100 | enabled 101 | 102 | inverse 103 | 104 | max value 105 | 0.5080000162124634 106 | min value 107 | -0.5080000162124634 108 | source 109 | 10 110 | transform 111 | 1 112 | 113 | 114 | ID 115 | 7 116 | control 117 | 241 118 | destination 119 | 816840704 120 | enabled 121 | 122 | inverse 123 | 124 | max value 125 | 12800 126 | min value 127 | -12800 128 | source 129 | 224 130 | transform 131 | 1 132 | 133 | 134 | ID 135 | 8 136 | control 137 | 0 138 | destination 139 | 816840704 140 | enabled 141 | 142 | inverse 143 | 144 | max value 145 | 100 146 | min value 147 | -100 148 | source 149 | 242 150 | transform 151 | 1 152 | 153 | 154 | ID 155 | 9 156 | control 157 | 0 158 | destination 159 | 1095761920 160 | enabled 161 | 162 | inverse 163 | 164 | max value 165 | 0 166 | min value 167 | -12800 168 | source 169 | 74 170 | transform 171 | 1 172 | 173 | 174 | ID 175 | 6 176 | control 177 | 1 178 | destination 179 | 816840704 180 | enabled 181 | 182 | inverse 183 | 184 | max value 185 | 50 186 | min value 187 | -50 188 | source 189 | 268435456 190 | transform 191 | 1 192 | 193 | 194 | ID 195 | 5 196 | control 197 | 0 198 | destination 199 | 1343225856 200 | enabled 201 | 202 | inverse 203 | 204 | scale 205 | -96 206 | source 207 | 536870912 208 | transform 209 | 1 210 | 211 | 212 | Envelopes 213 | 214 | 215 | ID 216 | 0 217 | Stages 218 | 219 | 220 | curve 221 | 20 222 | stage 223 | 0 224 | time 225 | 0 226 | 227 | 228 | curve 229 | 22 230 | stage 231 | 1 232 | time 233 | 0 234 | 235 | 236 | curve 237 | 20 238 | stage 239 | 2 240 | time 241 | 0 242 | 243 | 244 | curve 245 | 20 246 | stage 247 | 3 248 | time 249 | 0 250 | 251 | 252 | level 253 | 1 254 | stage 255 | 4 256 | 257 | 258 | curve 259 | 20 260 | stage 261 | 5 262 | time 263 | 0 264 | 265 | 266 | curve 267 | 20 268 | stage 269 | 6 270 | time 271 | 0.004999999888241291 272 | 273 | 274 | enabled 275 | 276 | 277 | 278 | Filters 279 | 280 | ID 281 | 0 282 | cutoff 283 | 20000 284 | enabled 285 | 286 | resonance 287 | -3 288 | 289 | ID 290 | 0 291 | LFOs 292 | 293 | 294 | ID 295 | 0 296 | enabled 297 | 298 | 299 | 300 | Oscillator 301 | 302 | ID 303 | 0 304 | enabled 305 | 306 | 307 | Zones 308 | 309 | 310 | ID 311 | 1 312 | enabled 313 | 314 | fine tune 315 | 23 316 | loop enabled 317 | 318 | root key 319 | 65 320 | waveform 321 | 268435458 322 | 323 | 324 | 325 | 326 | name 327 | Default Instrument 328 | 329 | coarse tune 330 | 0 331 | data 332 | AAAAAAAAAAAAAAAEAAADhAAAAAAAAAOFAAAAAAAAA4YAAAAAAAADhwAAAAA= 333 | file-references 334 | 335 | Sample:268435458 336 | /Users/nickculbertson/Documents/AVAudioUnitSamplerToolbox/Sounds/saw1.wav 337 | 338 | fine tune 339 | 0 340 | gain 341 | 0 342 | manufacturer 343 | 1634758764 344 | name 345 | Instrument1 346 | output 347 | 0 348 | pan 349 | 0 350 | subtype 351 | 1935764848 352 | type 353 | 1635085685 354 | version 355 | 0 356 | voice count 357 | 64 358 | 359 | 360 | -------------------------------------------------------------------------------- /AVAudioUnitSamplerToolbox/Sounds/saw1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickCulbertson/AVAudioUnitSamplerToolbox/37853d764c6400e4bcc48ca38abc5a020b58f46e/AVAudioUnitSamplerToolbox/Sounds/saw1.wav -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Nick Culbertson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AVAudioUnitSampler Toolbox 2 | 3 | ![alt tag](https://raw.githubusercontent.com/NickCulbertson/AVAudioUnitSamplerToolbox/master/screenshot.png) 4 | 5 | This is an example implementation of using AVAudioUnitSampler with AVAudioEngine and Apple's built-in effects. The Controls and Keyboard are from [AudioKit](https://github.com/AudioKit) and the MIDI comes from [MIDIKit](https://github.com/orchetect/MIDIKit). It doesn't use any third party libraries for the audio engine. Work in Progress. :D 6 | 7 | ## 8 | 9 | (Click the image to watch How to Make an Instrument App with AVAudioUnitSampler for iOS + AudioKit & MIDIKit) 10 | 11 | [![How to Make an Instrument App with AVAudioUnitSampler for iOS + AudioKit & MIDIKit](https://img.youtube.com/vi/JT-0UDZDAsU/0.jpg)](https://youtu.be/JT-0UDZDAsU "How to Make an Instrument App with AVAudioUnitSampler for iOS + AudioKit & MIDIKit") 12 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickCulbertson/AVAudioUnitSamplerToolbox/37853d764c6400e4bcc48ca38abc5a020b58f46e/screenshot.png --------------------------------------------------------------------------------