Swiftpack.co - garynewby/PianoKeyboard as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by garynewby.
garynewby/PianoKeyboard 1.2.3
Piano keyboard view for iOS, in Swift
⭐️ 126
🕓 11 weeks ago
iOS
.package(url: "https://github.com/garynewby/PianoKeyboard.git", from: "1.2.3")

PianoKeyboard

Build and test

A SwiftUI piano keyboard view for iPhone and iPad.

Easily customisable styles, configurable

  • Number of keys
  • Note names
  • Key metrics
  • Latch, toggle key on/off
  • See 'uikit' branch for older UIKit version

Example app

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

Author

Gary Newby

License

Licensed under the MIT License.

GitHub

link
Stars: 126
Last commit: 11 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics