├── .gitignore ├── AIBud.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── AIBud.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── AIBud ├── AIBud.entitlements ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── Main.storyboard ├── Info.plist ├── MLPlayground.playground │ ├── Contents.swift │ └── contents.xcplayground └── ViewController.swift ├── LICENSE ├── Podfile ├── Podfile.lock ├── README.md ├── dataTable.json └── dataTable.txt /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/swift,xcode 3 | 4 | ### Swift ### 5 | # Xcode 6 | # 7 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 8 | 9 | ## Build generated 10 | build/ 11 | DerivedData/ 12 | 13 | ## Various settings 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 22 | xcuserdata/ 23 | 24 | ## Other 25 | *.moved-aside 26 | *.xcuserstate 27 | 28 | ## Obj-C/Swift specific 29 | *.hmap 30 | *.ipa 31 | *.dSYM.zip 32 | *.dSYM 33 | 34 | ## Playgrounds 35 | timeline.xctimeline 36 | playground.xcworkspace 37 | 38 | # Swift Package Manager 39 | # 40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 41 | # Packages/ 42 | .build/ 43 | 44 | # CocoaPods 45 | # 46 | # We recommend against adding the Pods directory to your .gitignore. However 47 | # you should judge for yourself, the pros and cons are mentioned at: 48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 49 | # 50 | Pods/ 51 | 52 | # Carthage 53 | # 54 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 55 | Carthage/Checkouts 56 | 57 | Carthage/Build 58 | 59 | # fastlane 60 | # 61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 62 | # screenshots whenever they are needed. 63 | # For more information about the recommended setup visit: 64 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 65 | 66 | fastlane/report.xml 67 | fastlane/Preview.html 68 | fastlane/screenshots 69 | fastlane/test_output 70 | 71 | 72 | ### Xcode ### 73 | # Xcode 74 | # 75 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 76 | 77 | ## Build generated 78 | 79 | ## Various settings 80 | 81 | ## Other 82 | *.xccheckout 83 | *.xcscmblueprint 84 | 85 | # Docs 86 | docs/ 87 | 88 | # End of https://www.gitignore.io/api/swift,xcode 89 | -------------------------------------------------------------------------------- /AIBud.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B209E9DE210FA8FF00E93510 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B209E9DD210FA8FF00E93510 /* AppDelegate.swift */; }; 11 | B209E9E0210FA8FF00E93510 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B209E9DF210FA8FF00E93510 /* ViewController.swift */; }; 12 | B209E9E2210FA90000E93510 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B209E9E1210FA90000E93510 /* Assets.xcassets */; }; 13 | B209E9E5210FA90000E93510 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B209E9E3210FA90000E93510 /* Main.storyboard */; }; 14 | B209E9ED210FA9BB00E93510 /* Pods_CreateMLStuff.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD9A531CCEFAADA716E4EF13 /* Pods_CreateMLStuff.framework */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 6DF21A06B9B0CDD041D64D75 /* Pods-CreateMLStuff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreateMLStuff.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CreateMLStuff/Pods-CreateMLStuff.debug.xcconfig"; sourceTree = ""; }; 19 | B209E9DA210FA8FF00E93510 /* AIBud.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AIBud.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | B209E9DD210FA8FF00E93510 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | B209E9DF210FA8FF00E93510 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 22 | B209E9E1210FA90000E93510 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 23 | B209E9E4210FA90000E93510 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | B209E9E6210FA90000E93510 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | B209E9E7210FA90000E93510 /* AIBud.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AIBud.entitlements; sourceTree = ""; }; 26 | B2909D35211C293E006D0F11 /* MLPlayground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = MLPlayground.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 27 | DAB0DD3AFF535D20769A31CA /* Pods-CreateMLStuff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CreateMLStuff.release.xcconfig"; path = "Pods/Target Support Files/Pods-CreateMLStuff/Pods-CreateMLStuff.release.xcconfig"; sourceTree = ""; }; 28 | FD9A531CCEFAADA716E4EF13 /* Pods_CreateMLStuff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CreateMLStuff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | B209E9D7210FA8FF00E93510 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | B209E9ED210FA9BB00E93510 /* Pods_CreateMLStuff.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 420B1EBEB2DAFDB81A2EA70D /* Pods */ = { 44 | isa = PBXGroup; 45 | children = ( 46 | 6DF21A06B9B0CDD041D64D75 /* Pods-CreateMLStuff.debug.xcconfig */, 47 | DAB0DD3AFF535D20769A31CA /* Pods-CreateMLStuff.release.xcconfig */, 48 | ); 49 | name = Pods; 50 | sourceTree = ""; 51 | }; 52 | 76C919E707E1035D3C57EEFB /* Frameworks */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | FD9A531CCEFAADA716E4EF13 /* Pods_CreateMLStuff.framework */, 56 | ); 57 | name = Frameworks; 58 | sourceTree = ""; 59 | }; 60 | B209E9D1210FA8FF00E93510 = { 61 | isa = PBXGroup; 62 | children = ( 63 | B209E9DC210FA8FF00E93510 /* AIBud */, 64 | B209E9DB210FA8FF00E93510 /* Products */, 65 | 420B1EBEB2DAFDB81A2EA70D /* Pods */, 66 | 76C919E707E1035D3C57EEFB /* Frameworks */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | B209E9DB210FA8FF00E93510 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | B209E9DA210FA8FF00E93510 /* AIBud.app */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | B209E9DC210FA8FF00E93510 /* AIBud */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | B2909D35211C293E006D0F11 /* MLPlayground.playground */, 82 | B209E9DD210FA8FF00E93510 /* AppDelegate.swift */, 83 | B209E9DF210FA8FF00E93510 /* ViewController.swift */, 84 | B209E9E1210FA90000E93510 /* Assets.xcassets */, 85 | B209E9E3210FA90000E93510 /* Main.storyboard */, 86 | B209E9E6210FA90000E93510 /* Info.plist */, 87 | B209E9E7210FA90000E93510 /* AIBud.entitlements */, 88 | ); 89 | path = AIBud; 90 | sourceTree = ""; 91 | }; 92 | /* End PBXGroup section */ 93 | 94 | /* Begin PBXNativeTarget section */ 95 | B209E9D9210FA8FF00E93510 /* AIBud */ = { 96 | isa = PBXNativeTarget; 97 | buildConfigurationList = B209E9EA210FA90000E93510 /* Build configuration list for PBXNativeTarget "AIBud" */; 98 | buildPhases = ( 99 | 8D9ECB13C87B40280D9F096C /* [CP] Check Pods Manifest.lock */, 100 | B209E9D6210FA8FF00E93510 /* Sources */, 101 | B209E9D7210FA8FF00E93510 /* Frameworks */, 102 | B209E9D8210FA8FF00E93510 /* Resources */, 103 | BA9CB500E30555D0468495F0 /* [CP] Embed Pods Frameworks */, 104 | ); 105 | buildRules = ( 106 | ); 107 | dependencies = ( 108 | ); 109 | name = AIBud; 110 | productName = CreateMLStuff; 111 | productReference = B209E9DA210FA8FF00E93510 /* AIBud.app */; 112 | productType = "com.apple.product-type.application"; 113 | }; 114 | /* End PBXNativeTarget section */ 115 | 116 | /* Begin PBXProject section */ 117 | B209E9D2210FA8FF00E93510 /* Project object */ = { 118 | isa = PBXProject; 119 | attributes = { 120 | LastSwiftUpdateCheck = 1000; 121 | LastUpgradeCheck = 1000; 122 | ORGANIZATIONNAME = cemolcay; 123 | TargetAttributes = { 124 | B209E9D9210FA8FF00E93510 = { 125 | CreatedOnToolsVersion = 10.0; 126 | SystemCapabilities = { 127 | com.apple.Sandbox = { 128 | enabled = 1; 129 | }; 130 | }; 131 | }; 132 | }; 133 | }; 134 | buildConfigurationList = B209E9D5210FA8FF00E93510 /* Build configuration list for PBXProject "AIBud" */; 135 | compatibilityVersion = "Xcode 9.3"; 136 | developmentRegion = en; 137 | hasScannedForEncodings = 0; 138 | knownRegions = ( 139 | en, 140 | Base, 141 | ); 142 | mainGroup = B209E9D1210FA8FF00E93510; 143 | productRefGroup = B209E9DB210FA8FF00E93510 /* Products */; 144 | projectDirPath = ""; 145 | projectRoot = ""; 146 | targets = ( 147 | B209E9D9210FA8FF00E93510 /* AIBud */, 148 | ); 149 | }; 150 | /* End PBXProject section */ 151 | 152 | /* Begin PBXResourcesBuildPhase section */ 153 | B209E9D8210FA8FF00E93510 /* Resources */ = { 154 | isa = PBXResourcesBuildPhase; 155 | buildActionMask = 2147483647; 156 | files = ( 157 | B209E9E2210FA90000E93510 /* Assets.xcassets in Resources */, 158 | B209E9E5210FA90000E93510 /* Main.storyboard in Resources */, 159 | ); 160 | runOnlyForDeploymentPostprocessing = 0; 161 | }; 162 | /* End PBXResourcesBuildPhase section */ 163 | 164 | /* Begin PBXShellScriptBuildPhase section */ 165 | 8D9ECB13C87B40280D9F096C /* [CP] Check Pods Manifest.lock */ = { 166 | isa = PBXShellScriptBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | ); 170 | inputPaths = ( 171 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 172 | "${PODS_ROOT}/Manifest.lock", 173 | ); 174 | name = "[CP] Check Pods Manifest.lock"; 175 | outputPaths = ( 176 | "$(DERIVED_FILE_DIR)/Pods-CreateMLStuff-checkManifestLockResult.txt", 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | shellPath = /bin/sh; 180 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 181 | showEnvVarsInLog = 0; 182 | }; 183 | BA9CB500E30555D0468495F0 /* [CP] Embed Pods Frameworks */ = { 184 | isa = PBXShellScriptBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | inputPaths = ( 189 | "${SRCROOT}/Pods/Target Support Files/Pods-CreateMLStuff/Pods-CreateMLStuff-frameworks.sh", 190 | "${BUILT_PRODUCTS_DIR}/MusicTheorySwift/MusicTheorySwift.framework", 191 | "${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework", 192 | ); 193 | name = "[CP] Embed Pods Frameworks"; 194 | outputPaths = ( 195 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MusicTheorySwift.framework", 196 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework", 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | shellPath = /bin/sh; 200 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CreateMLStuff/Pods-CreateMLStuff-frameworks.sh\"\n"; 201 | showEnvVarsInLog = 0; 202 | }; 203 | /* End PBXShellScriptBuildPhase section */ 204 | 205 | /* Begin PBXSourcesBuildPhase section */ 206 | B209E9D6210FA8FF00E93510 /* Sources */ = { 207 | isa = PBXSourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | B209E9E0210FA8FF00E93510 /* ViewController.swift in Sources */, 211 | B209E9DE210FA8FF00E93510 /* AppDelegate.swift in Sources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXSourcesBuildPhase section */ 216 | 217 | /* Begin PBXVariantGroup section */ 218 | B209E9E3210FA90000E93510 /* Main.storyboard */ = { 219 | isa = PBXVariantGroup; 220 | children = ( 221 | B209E9E4210FA90000E93510 /* Base */, 222 | ); 223 | name = Main.storyboard; 224 | sourceTree = ""; 225 | }; 226 | /* End PBXVariantGroup section */ 227 | 228 | /* Begin XCBuildConfiguration section */ 229 | B209E9E8210FA90000E93510 /* Debug */ = { 230 | isa = XCBuildConfiguration; 231 | buildSettings = { 232 | ALWAYS_SEARCH_USER_PATHS = NO; 233 | CLANG_ANALYZER_NONNULL = YES; 234 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 235 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 236 | CLANG_CXX_LIBRARY = "libc++"; 237 | CLANG_ENABLE_MODULES = YES; 238 | CLANG_ENABLE_OBJC_ARC = YES; 239 | CLANG_ENABLE_OBJC_WEAK = YES; 240 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 241 | CLANG_WARN_BOOL_CONVERSION = YES; 242 | CLANG_WARN_COMMA = YES; 243 | CLANG_WARN_CONSTANT_CONVERSION = YES; 244 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 245 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 246 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 247 | CLANG_WARN_EMPTY_BODY = YES; 248 | CLANG_WARN_ENUM_CONVERSION = YES; 249 | CLANG_WARN_INFINITE_RECURSION = YES; 250 | CLANG_WARN_INT_CONVERSION = YES; 251 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 252 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 253 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 255 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 256 | CLANG_WARN_STRICT_PROTOTYPES = YES; 257 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 258 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | CODE_SIGN_IDENTITY = "Mac Developer"; 262 | COPY_PHASE_STRIP = NO; 263 | DEBUG_INFORMATION_FORMAT = dwarf; 264 | ENABLE_STRICT_OBJC_MSGSEND = YES; 265 | ENABLE_TESTABILITY = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu11; 267 | GCC_DYNAMIC_NO_PIC = NO; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_OPTIMIZATION_LEVEL = 0; 270 | GCC_PREPROCESSOR_DEFINITIONS = ( 271 | "DEBUG=1", 272 | "$(inherited)", 273 | ); 274 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 275 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 276 | GCC_WARN_UNDECLARED_SELECTOR = YES; 277 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 278 | GCC_WARN_UNUSED_FUNCTION = YES; 279 | GCC_WARN_UNUSED_VARIABLE = YES; 280 | MACOSX_DEPLOYMENT_TARGET = 10.14; 281 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 282 | MTL_FAST_MATH = YES; 283 | ONLY_ACTIVE_ARCH = YES; 284 | SDKROOT = macosx; 285 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 286 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 287 | }; 288 | name = Debug; 289 | }; 290 | B209E9E9210FA90000E93510 /* Release */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ALWAYS_SEARCH_USER_PATHS = NO; 294 | CLANG_ANALYZER_NONNULL = YES; 295 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 297 | CLANG_CXX_LIBRARY = "libc++"; 298 | CLANG_ENABLE_MODULES = YES; 299 | CLANG_ENABLE_OBJC_ARC = YES; 300 | CLANG_ENABLE_OBJC_WEAK = YES; 301 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 302 | CLANG_WARN_BOOL_CONVERSION = YES; 303 | CLANG_WARN_COMMA = YES; 304 | CLANG_WARN_CONSTANT_CONVERSION = YES; 305 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 306 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 307 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 308 | CLANG_WARN_EMPTY_BODY = YES; 309 | CLANG_WARN_ENUM_CONVERSION = YES; 310 | CLANG_WARN_INFINITE_RECURSION = YES; 311 | CLANG_WARN_INT_CONVERSION = YES; 312 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 313 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 314 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 316 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 317 | CLANG_WARN_STRICT_PROTOTYPES = YES; 318 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 319 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 320 | CLANG_WARN_UNREACHABLE_CODE = YES; 321 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 322 | CODE_SIGN_IDENTITY = "Mac Developer"; 323 | COPY_PHASE_STRIP = NO; 324 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 325 | ENABLE_NS_ASSERTIONS = NO; 326 | ENABLE_STRICT_OBJC_MSGSEND = YES; 327 | GCC_C_LANGUAGE_STANDARD = gnu11; 328 | GCC_NO_COMMON_BLOCKS = YES; 329 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 330 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 331 | GCC_WARN_UNDECLARED_SELECTOR = YES; 332 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 333 | GCC_WARN_UNUSED_FUNCTION = YES; 334 | GCC_WARN_UNUSED_VARIABLE = YES; 335 | MACOSX_DEPLOYMENT_TARGET = 10.14; 336 | MTL_ENABLE_DEBUG_INFO = NO; 337 | MTL_FAST_MATH = YES; 338 | SDKROOT = macosx; 339 | SWIFT_COMPILATION_MODE = wholemodule; 340 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 341 | }; 342 | name = Release; 343 | }; 344 | B209E9EB210FA90000E93510 /* Debug */ = { 345 | isa = XCBuildConfiguration; 346 | baseConfigurationReference = 6DF21A06B9B0CDD041D64D75 /* Pods-CreateMLStuff.debug.xcconfig */; 347 | buildSettings = { 348 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 349 | CODE_SIGN_ENTITLEMENTS = AIBud/AIBud.entitlements; 350 | CODE_SIGN_IDENTITY = "Mac Developer"; 351 | CODE_SIGN_STYLE = Automatic; 352 | COMBINE_HIDPI_IMAGES = YES; 353 | DEVELOPMENT_TEAM = 77Y3N48SNF; 354 | INFOPLIST_FILE = "$(SRCROOT)/AIBud/Info.plist"; 355 | LD_RUNPATH_SEARCH_PATHS = ( 356 | "$(inherited)", 357 | "@executable_path/../Frameworks", 358 | ); 359 | PRODUCT_BUNDLE_IDENTIFIER = com.cemolcay.aibud; 360 | PRODUCT_NAME = "$(TARGET_NAME)"; 361 | PROVISIONING_PROFILE_SPECIFIER = ""; 362 | SWIFT_VERSION = 4.2; 363 | }; 364 | name = Debug; 365 | }; 366 | B209E9EC210FA90000E93510 /* Release */ = { 367 | isa = XCBuildConfiguration; 368 | baseConfigurationReference = DAB0DD3AFF535D20769A31CA /* Pods-CreateMLStuff.release.xcconfig */; 369 | buildSettings = { 370 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 371 | CODE_SIGN_ENTITLEMENTS = AIBud/AIBud.entitlements; 372 | CODE_SIGN_IDENTITY = "Mac Developer"; 373 | CODE_SIGN_STYLE = Automatic; 374 | COMBINE_HIDPI_IMAGES = YES; 375 | DEVELOPMENT_TEAM = 77Y3N48SNF; 376 | INFOPLIST_FILE = "$(SRCROOT)/AIBud/Info.plist"; 377 | LD_RUNPATH_SEARCH_PATHS = ( 378 | "$(inherited)", 379 | "@executable_path/../Frameworks", 380 | ); 381 | PRODUCT_BUNDLE_IDENTIFIER = com.cemolcay.aibud; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | PROVISIONING_PROFILE_SPECIFIER = ""; 384 | SWIFT_VERSION = 4.2; 385 | }; 386 | name = Release; 387 | }; 388 | /* End XCBuildConfiguration section */ 389 | 390 | /* Begin XCConfigurationList section */ 391 | B209E9D5210FA8FF00E93510 /* Build configuration list for PBXProject "AIBud" */ = { 392 | isa = XCConfigurationList; 393 | buildConfigurations = ( 394 | B209E9E8210FA90000E93510 /* Debug */, 395 | B209E9E9210FA90000E93510 /* Release */, 396 | ); 397 | defaultConfigurationIsVisible = 0; 398 | defaultConfigurationName = Release; 399 | }; 400 | B209E9EA210FA90000E93510 /* Build configuration list for PBXNativeTarget "AIBud" */ = { 401 | isa = XCConfigurationList; 402 | buildConfigurations = ( 403 | B209E9EB210FA90000E93510 /* Debug */, 404 | B209E9EC210FA90000E93510 /* Release */, 405 | ); 406 | defaultConfigurationIsVisible = 0; 407 | defaultConfigurationName = Release; 408 | }; 409 | /* End XCConfigurationList section */ 410 | }; 411 | rootObject = B209E9D2210FA8FF00E93510 /* Project object */; 412 | } 413 | -------------------------------------------------------------------------------- /AIBud.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AIBud.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AIBud.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AIBud.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AIBud/AIBud.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AIBud/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CreateMLStuff 4 | // 5 | // Created by Cem Olcay on 30.07.2018. 6 | // Copyright © 2018 cemolcay. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /AIBud/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /AIBud/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AIBud/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | Default 530 | 531 | 532 | 533 | 534 | 535 | 536 | Left to Right 537 | 538 | 539 | 540 | 541 | 542 | 543 | Right to Left 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | Default 555 | 556 | 557 | 558 | 559 | 560 | 561 | Left to Right 562 | 563 | 564 | 565 | 566 | 567 | 568 | Right to Left 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | -------------------------------------------------------------------------------- /AIBud/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2018 cemolcay. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /AIBud/MLPlayground.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import MusicTheorySwift 3 | import CreateML 4 | import CreateMLUI 5 | import SwiftyJSON 6 | 7 | extension Pitch: MLDataValueConvertible { 8 | public static var dataValueType: MLDataValue.ValueType { 9 | return .int 10 | } 11 | 12 | public init?(from dataValue: MLDataValue) { 13 | switch dataValue { 14 | case .int(let i) where i > 0: 15 | self = Pitch(midiNote: i) 16 | default: 17 | return nil 18 | } 19 | } 20 | 21 | public init() { 22 | self.init(midiNote: 0) 23 | } 24 | 25 | public var dataValue: MLDataValue { 26 | return .int(rawValue) 27 | } 28 | } 29 | 30 | extension Array { 31 | func unique(map: ((Element) -> (T))) -> [Element] { 32 | var set = Set() //the unique list kept in a Set for fast retrieval 33 | var arrayOrdered = [Element]() //keeping the unique list of elements but ordered 34 | for value in self { 35 | if !set.contains(map(value)) { 36 | set.insert(map(value)) 37 | arrayOrdered.append(value) 38 | } 39 | } 40 | return arrayOrdered 41 | } 42 | } 43 | 44 | func generateAllScales() -> [Scale] { 45 | Accidental.shouldUseDoubleFlatAndDoubleSharpNotation = false 46 | let allKeys = (Key.keysWithFlats + Key.keysWithSharps) 47 | .unique(map: { $0.description }) 48 | .sorted(by: { $0.type.rawValue + $0.accidental.rawValue < $1.type.rawValue + $1.accidental.rawValue }) 49 | let allScaleTypes = ScaleType.all 50 | return allKeys 51 | .map({ key in allScaleTypes.map({ type in Scale(type: type, key: key) }) }) 52 | .flatMap({ $0 }) 53 | } 54 | 55 | func generateJSONDataTable() { 56 | let allScales = generateAllScales() 57 | let jsonData: [[String: Any]] = allScales.enumerated().map({[ 58 | "name": "\($0.element.key) \($0.element.type)", 59 | "index": $0.offset, 60 | "key": "\($0.element.key)", 61 | "keys": $0.element.keys.map{ $0.description }, 62 | "pitches": $0.element.pitches(octaves: [Int](-1...8)).map{ $0.rawValue }, 63 | "octave0": $0.element.pitches(octave: 0).map{ $0.rawValue }, 64 | ]}) 65 | let json = JSON(jsonData) 66 | try? json.rawString()?.write( 67 | to: URL(fileURLWithPath: "\(NSHomeDirectory())/Desktop/dataTable.json"), 68 | atomically: true, 69 | encoding: .utf8) 70 | } 71 | 72 | func generateMLDataTable() { 73 | let allScales = generateAllScales() 74 | let dataSource: [String: MLDataValueConvertible] = [ 75 | "name": allScales.map({ "\($0.key) \($0.type)" }), 76 | "key": allScales.map({ "\($0.key)" }), 77 | "pitches": allScales.map({ $0.pitches(octaves: [Int](-1...8)) }), 78 | ] 79 | 80 | let dataTable = try? MLDataTable(dictionary: dataSource) 81 | try? dataTable?.description.write( 82 | to: URL(fileURLWithPath: "\(NSHomeDirectory())/Desktop/dataTable.txt"), 83 | atomically: true, 84 | encoding: .utf8) 85 | } 86 | 87 | func saveModel(testModel: Bool = false) { 88 | guard let dataTable = try? MLDataTable(contentsOf: URL(fileURLWithPath: "\(NSHomeDirectory())/Desktop/dataTable.json")) else { return } 89 | let (trainingData, testData) = dataTable.randomSplit(by: 0.8, seed: 5) 90 | 91 | do { 92 | // Create model 93 | let model = MLRegressor.decisionTree(try MLDecisionTreeRegressor( 94 | trainingData: trainingData, 95 | targetColumn: "index", 96 | featureColumns: ["octave0"])) 97 | 98 | // Metrics 99 | let metrics = model.evaluation(on: testData) 100 | 101 | // Prediction testing 102 | if testModel { 103 | if let cMajorPrediction = predictionData(scaleType: .major, keyType: .c, accidental: .natural) { 104 | try model.predictions(from: cMajorPrediction) 105 | } 106 | if let dSharpMinorPrediction = predictionData(scaleType: .minor, keyType: .d, accidental: .sharp) { 107 | try model.predictions(from: dSharpMinorPrediction) 108 | } 109 | } 110 | 111 | // Write model file 112 | try model.write( 113 | toFile: "\(NSHomeDirectory())/Desktop/model.mlmodel", 114 | metadata: MLModelMetadata( 115 | author: "Cem Olcay", 116 | shortDescription: "Music Theory Scale Predictor", 117 | license: "MIT", 118 | version: "0.0.1", 119 | additional: nil)) 120 | 121 | } catch { 122 | print(error) 123 | } 124 | } 125 | 126 | func predictionData(scaleType: ScaleType, keyType: Key.KeyType, accidental: Accidental) -> MLDataTable? { 127 | let scale = Scale(type: scaleType, key: Key(type: keyType, accidental: accidental)) 128 | let pitches = scale.pitches(octave: 0).map({ $0.rawValue }) 129 | return try? MLDataTable(dictionary: [ 130 | "octave0": pitches 131 | ]) 132 | } 133 | 134 | generateJSONDataTable() 135 | saveModel(testModel: false) 136 | -------------------------------------------------------------------------------- /AIBud/MLPlayground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /AIBud/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CreateMLStuff 4 | // 5 | // Created by Cem Olcay on 30.07.2018. 6 | // Copyright © 2018 cemolcay. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import MusicTheorySwift 11 | 12 | class ViewController: NSViewController { 13 | 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2018, Cem Olcay 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.13' 2 | 3 | target 'AIBud' do 4 | use_frameworks! 5 | pod 'MusicTheorySwift' 6 | pod 'SwiftyJSON' 7 | end 8 | 9 | post_install do |installer| 10 | installer.pods_project.build_configurations.each do |config| 11 | config.build_settings.delete('CODE_SIGNING_ALLOWED') 12 | config.build_settings.delete('CODE_SIGNING_REQUIRED') 13 | end 14 | 15 | installer.pods_project.targets.each do |target| 16 | target.build_configurations.each do |config| 17 | config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR' 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MusicTheorySwift (1.0.0) 3 | - SwiftyJSON (4.1.0) 4 | 5 | DEPENDENCIES: 6 | - MusicTheorySwift 7 | - SwiftyJSON 8 | 9 | SPEC REPOS: 10 | https://github.com/cocoapods/specs.git: 11 | - MusicTheorySwift 12 | - SwiftyJSON 13 | 14 | SPEC CHECKSUMS: 15 | MusicTheorySwift: 2102218ba959c04204f376d02f7719fe5f4cfb98 16 | SwiftyJSON: c29297daf073d2aa016295d5809cdd68045c39b3 17 | 18 | PODFILE CHECKSUM: e0aba7477113c1209e73cc6a64782a6ca0acf4ef 19 | 20 | COCOAPODS: 1.5.3 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AIBud 2 | === 3 | 4 | An experimental project that predicts key & scale you are playing in realtime with ML regressions by reading MIDI data. Training and predicting data sources are generated with [MusicTheory](https://github.com/cemolcay/MusicTheory) library. ML Regression written with [CreateML](https://developer.apple.com/documentation/create_ml) in Xcode playgrounds. 5 | 6 | Requirements 7 | --- 8 | * iOS 12.0+ 9 | * macOS 10.14+ 10 | * Xcode 10.0+ 11 | 12 | Build 13 | --- 14 | ``` 15 | pod install 16 | ``` 17 | -------------------------------------------------------------------------------- /dataTable.txt: -------------------------------------------------------------------------------- 1 | 2 | Columns: 3 | key string 4 | name string 5 | pitches list 6 | Rows: 799 7 | Data: 8 | +----------------+----------------+----------------+ 9 | | key | name | pitches | 10 | +----------------+----------------+----------------+ 11 | | C | C Major | [0,2,4,5,7,9...| 12 | | C | C Minor | [0,2,3,5,7,8...| 13 | | C | C Harmonic M...| [0,2,3,5,7,8...| 14 | | C | C Melodic Mi...| [0,2,3,5,7,9...| 15 | | C | C Pentatonic...| [0,2,4,7,9,1...| 16 | | C | C Pentatonic...| [0,3,5,7,10,...| 17 | | C | C Pentatonic...| [0,3,5,6,7,1...| 18 | | C | C Pentatonic...| [0,2,5,7,10,...| 19 | | C | C Ionian | [0,2,4,5,7,9...| 20 | | C | C Aeolian | [0,2,3,5,7,8...| 21 | +----------------+----------------+----------------+ 22 | [799 rows x 3 columns] 23 | --------------------------------------------------------------------------------