Since this project uses SwiftUI and macOS-specific frameworks, you'll need to create an Xcode project:
- Open Xcode
- Select "Create a new Xcode project"
- Choose "macOS" → "App"
- Set the following:
- Product Name:
MusicMill - Interface:
SwiftUI - Language:
Swift - Use Core Data:
No - Include Tests:
Yes(optional)
- Product Name:
- Save the project in the
MusicMilldirectory (same level as this file)
After creating the project, add all the source files from the MusicMill/MusicMill/ directory to your Xcode project:
- In Xcode, right-click on the project navigator
- Select "Add Files to MusicMill..."
- Navigate to the
MusicMill/MusicMill/directory - Select all subdirectories (App, Analysis, ML, Performance, Audio, Training)
- Make sure "Create groups" is selected (not "Create folder references")
- Click "Add"
Configure the following in your Xcode project:
- Deployment Target: macOS 13.0 or later
- Swift Language Version: Swift 5.9
The following frameworks are automatically linked:
- AVFoundation
- CreateML
- CoreML
- Accelerate
- Combine
- SwiftUI
No special capabilities are required for basic functionality.
The ModelTrainer.swift file contains a template implementation for MLSoundClassifier. You may need to adjust it based on the actual CreateML API. Refer to:
Before running:
- Ensure you have a music collection directory with audio files organized by style/genre (folders = labels)
- The app will request directory access when you select a music collection
- Build the project (⌘B)
- Run the app (⌘R)
- Navigate to the "Training" tab
- Select your music collection directory
- Click "Analyze Collection" to prepare training data
- Train a model
- Switch to the "Performance" tab to use the live interface
- Ensure all files are added to the Xcode project target
- Check that deployment target is set to macOS 13.0+
- Verify all imports are correct
- Check console for error messages
- Ensure audio files are in supported formats (MP3, AAC, WAV, AIFF)
- Verify directory permissions for music collection access