Was this made for piano players who bite their fingernails ? No, but I sure would like them keys to grow a bit longer.
How do I change the dimensions of AKKeyboardView ? I can change the width by decreasing the StackView.widthAnchor.constraint. But I can’t increase the height by increasing the stackView.heightAnchor.constraint. Is there another way to make the keys longer ?
Here's my code
stackView.axis = .horizontal stackView.distribution = .fillProportionally stackView.alignment = .center stackView.translatesAutoresizingMaskIntoConstraints = false
let keyboardView = AKKeyboardView() keyboardView.delegate = self stackView.addArrangedSubview(keyboardView)
stackView.widthAnchor.constraint(equalToConstant: view.frame.width * 0.85).isActive = true stackView.heightAnchor.constraint(equalToConstant: view.frame.height * 2.0).isActive = true
As you're planning to rewrite the keyboard view, it might be worth mentioning two things I am about to try.
Firstly I am going to try and scroll between octaves as soon as I work through an example of scroll view. Scrolling left and right to lower and upper octaves seems very intuitive from a user's perspective. I have not started on this yet.
Secondly, I am also keen to detune the keyboard. I have already written and tested code to generate a detuned 10+ octave MIDI map with frequencies generated from Scala scl and kbm files and that is what I am trying to hook up at the moment. AKKeyboardView would become a microtonal keyboard capable of playing any of the 4000+ traditional and experimental scales found in the Scala scales archive. If you don't already have a way to do this in AudioKit and would be interested, let me know and I'll try and put it on the GitHub.