GithubHelp home page GithubHelp logo

pianokeyboard's People

Contributors

chaostong avatar garynewby avatar gregtour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pianokeyboard's Issues

requst: labels for black keys

I see that currently labels for black keys aren't drawn. It'll help greatly if this feature exists.

Aloha!
Great library btw. Thanks!

Feature-Request: Custom Key Labels

I would like to be able to :

  • Display only Key name without Octave (e.g. , "C", "D",... instead of "C4", "D4"
    OR
  • Display "Do", "Re", "Mi",...

I suggest:

pianoView.setKeyLabels(labels: [Int:String])

Where labels is a dictionary of [MidiNote : Label]

Alternatively, labels could be a simple array of a fixed size of 128, to set ALL labels.

Keys get stuck

Sometimes if I play chords or move fast on the keyboard keys get stuck.
I think it has to do with the "touchUpOutside" gesture.

Or in your UIGestureRecognizer implementation you should implement the ".canceled" state.

I'll have a look in your code.

Otherwise, thanks, it's an awesome drop in keyboard.

Latch tweak request

Thanks for adding the latch feature.
can you make it so that in latch mode, the keys become more like toggle buttons? So in latch mode key 'K' is pressed, it stays pressed. But pressing it again should release it.
Thanks!
Also, making the latch variable inspectable will help identify which state the keyboard is in for showing UI etc.
Thanks!

accessibility - allow direct touch to keyboard elements with voiceover

For visually impaired users,
From documentation, it seems that element.accessibilityTraits = .allowsDirectInteraction seems to be the way to go?
setting the property on the keboardView doesn't seem to work. I tried with the imageLayer -- same thing - no go.
This will be a very useful feature from an accessibility perspective.

Sound not play

Hello, I am trying to run your demo but it will not play any sound? My device is in ring mode i cross check all things. what will be the issue ?

How to use in modern ContentView

Sorry for the newbie question, but is it possible to use this component in a swiftui contentview e.g. something like

import SwiftUI
import PianoKeyboard

struct ContentView: View {
    var body: some View {
        VStack {
            PianoKeyboard()
            Text("Hello, world!")
                .padding()
        }
    }
}

In the above I get the error Static method 'buildBlock' requires that 'PianoKeyboard' conform to 'View'?

PianoKeyboardView not showing up

Issue

I added this package via SPM on the Example app, but PianoKeyboardView did not appear. What do I need to do additionally?


ScreenShot

image


Device / OS

iPhone 13 / iOS 16.4.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.