AudioKit / Keyboard

SwiftUI music keyboard
MIT License
137 stars 25 forks source link

Add verticalPiano layout #20

Closed josephktcheung closed 2 years ago

josephktcheung commented 2 years ago

This is to address https://github.com/AudioKit/Keyboard/issues/19

simulator_screenshot_FB987C1D-5671-4EB6-BB16-372AADE45962

josephktcheung commented 2 years ago

Most of logic in https://github.com/AudioKit/Keyboard/blob/bc453c77064fc0d4eb2ba47074dde255549cc5d9/Sources/Keyboard/Layouts/VerticalPiano.swift#L9-L74 is almost identical to those in https://github.com/AudioKit/Keyboard/blob/bc453c77064fc0d4eb2ba47074dde255549cc5d9/Sources/Keyboard/Layouts/Piano.swift#L9-L74. I'm thinking of refactoring them into a struct say PianoModel which host those logic.

01GOD commented 2 years ago

Looks nice. Pondering how it could be cool to add a touchbar keyboard to a macOS app. That thin vertical looks about right if rotated 90 degrees. By the way, recommend having a look at https://github.com/AudioKit/PianoRoll also if want to go full on with combining those.

aure commented 2 years ago

For presentation sake, can the vertical piano be on the right side of the demo?

josephktcheung commented 2 years ago

For presentation sake, can the vertical piano be on the right side of the demo?

Updated snapshot in my first comment

josephktcheung commented 2 years ago

@aure this can be reviewed again thanks.

josephktcheung commented 2 years ago

@aure please merge if okay, thanks

aure commented 2 years ago

merged and tagged 1.3.5

josephktcheung commented 2 years ago

Looks nice. Pondering how it could be cool to add a touchbar keyboard to a macOS app. That thin vertical looks about right if rotated 90 degrees. By the way, recommend having a look at https://github.com/AudioKit/PianoRoll also if want to go full on with combining those.

@01GOD you can take a look at this comment I made in https://github.com/AudioKit/PianoRoll/pull/5#issuecomment-1288125901, where I show a screen recording of combining the 2 libraries.