garynewby/pianokeyboard
PianoKeyboard
Example app
<img src="https://github.com/garynewby/PianoKeyboard/raw/master/screen.png" width="800"> <img src="https://github.com/garynewby/PianoKeyboard/raw/master/screen2.png" width="800"> <img src="https://github.com/garynewby/PianoKeyboard/raw/master/screen3.png" width="800">
Installation
Swift Package Manager
https://github.com/garynewby/PianoKeyboard.git
Demo
The Example app demonstrates integrating PianoKeyboard in a SwiftUI project and creating a custom style, and includes a simple AVAudioEngine based sound source.
Delegate Methods
func pianoKeyDown(_ keyNumber: Int) {
// Called when the key corresponding to midi number keyNumber is pressed
}
func pianoKeyUp(_ keyNumber: Int) {
// Called when the key corresponding to midi number keyNumber is released
}Requirements
- Swift 5, SwiftUI
- iOS 15.0+
- macOS 12.0+
Platform notes
- iOS and iPadOS use native multi-touch input.
- macOS uses native AppKit pointer/trackpad input.
License
Licensed under the MIT License.
Package Metadata
Repository: garynewby/pianokeyboard
Default branch: master
README: README.md