Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange keybinding, it should start from C rather than E. #23

Open
THMonster opened this issue Feb 14, 2018 · 10 comments
Open

Strange keybinding, it should start from C rather than E. #23

THMonster opened this issue Feb 14, 2018 · 10 comments

Comments

@THMonster
Copy link

No description provided.

@ritiek
Copy link
Owner

ritiek commented Feb 17, 2018

it should start from C rather than E.

I am not sure what you mean by that?

@THMonster
Copy link
Author

THMonster commented Feb 17, 2018

@ritiek In this project, the computer keyboard key 'z'(or 'q') is mapping to tone E, but in music theory, C is the first tone in every 12 tones circle(called Equal Temperament). And piano is a instrument that using Equal Temperament. So the computer keyboard key 'z' and 'q' should mapping to tone C rather then tone E.

@ritiek
Copy link
Owner

ritiek commented Feb 17, 2018

I don't know much about music theory (or even piano), hehe. I just copied how http://www.multiplayerpiano.com/ maps keys without going into anything deeper.

If you really want piano-rs to have such mapping, I'd love a PR! We should probably add these new mapping as an optional argument though.

@THMonster
Copy link
Author

@ritiek In fact, you could simplely refer to VMPK's(a famous cross-platform Virtual MIDI Piano Keyboard) key mapping. And unfortunately, I have no idea about rust, so I can't send a Pull Request.

@rrooij
Copy link

rrooij commented May 21, 2018

What about supporting multiple key mappings with a command line argument? That would be pretty neat!

@ritiek
Copy link
Owner

ritiek commented May 21, 2018

@rrooij Yep, that's what I've been thinking too. I haven't messed anything with this project lately, I'll see what I can do in the coming days though. 😄

@ritiek
Copy link
Owner

ritiek commented May 21, 2018

Or if you want to give it a shot, you're most welcome!

@rrooij
Copy link

rrooij commented May 21, 2018

I wouldn't mind doing it. I don't have a lot of time, so I can't do it if you're in a hurry, but I was searching on something to practice Rust a little bit with and would like to contribute.

@ritiek
Copy link
Owner

ritiek commented May 21, 2018

Sure, take your time! Just so you know, the code quality isn't really great or anything. I myself wrote this while learning Rust. :D

@rrooij
Copy link

rrooij commented May 21, 2018

Cool! I will keep it in mind.

One cool approach I was thinking of is putting the keyboard layouts in a layouts.yml file so the user can define their own layouts if necessary too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants