SwiftTuner
SwiftTuner copied to clipboard
Open Source Musical Instrument Tuner
trafficstars
SwiftTuner - App Store Link
This open source Swift Package aims to create a great Tuner experience on visionOS. It uses the AudioKit library to provide real-time tuning information for pitch and deviation.
Features
- Real-time Tuning: SwiftTuner provides real-time tuning information for pitch and deviation.
- Customizable Settings: Users can customize settings such as buffer size and amplitude threshold.
Installation
Swift Package Manager (SPM)
You can use Swift Package Manager to install SwiftTuner in your project. Follow these steps:
- In Xcode, select your project in the project navigator.
- Select the "Swift Packages" tab.
- Click the "+" button and select "Add Package Dependency..."
- Enter the URL of the SwiftTuner repository:
https://github.com/Matt54/SwiftTuner.git - Click "Next" and follow the prompts to complete the installation.
Usage
- Import SwiftTuner into your Swift file:
import SwiftTuner - Create an instance of
TunerConductor:let tuner = TunerConductor() - Start the tuner:
tuner.start() - Use the tuning information provided by the
TunerConductorinstance to adjust your instrument.
Just Tuner Example
import SwiftTuner
let tuner = TunerConductor()
tuner.start()
// Use tuner.data.pitch, tuner.data.noteName, tuner.data.octaveNumber, tuner.data.deviation as needed
Tuner View Example
import SwiftTuner
import SwiftUI
@main
struct SpatialTunerApp: App {
var body: some Scene {
WindowGroup {
TunerRootView(tuner: TunerConductor())
}
.windowResizability(.contentSize)
}
}
Credits
SwiftTuner is developed and maintained by Matt Pfeiffer and owes much thanks to the AudioKit community.
License
SwiftTuner is released under the MIT License. See LICENSE for details.
Contributing
You are welcome to contribute! Feel free to open an issue or pull request.