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

permit people to play with a computer keyboard in "arcade" mode #80

Open
allan-simon opened this issue Dec 29, 2014 · 3 comments
Open

Comments

@allan-simon
Copy link
Owner

for people who just want to have a casual game we can do the following, while still preserving some "accuracy" in term of "notes"

  1. use the qwerty row of the keyboard, to map one by note, there's ~12 keys which is enough to go from DO to DO
  2. "compress" the notes so that all the Do are put together etc.
  3. maybe make the keyboard "bigger" to have only 12 keys on it
  4. when checking we dont check which octave it is, only that it's the right note

it may also be possible to create dedicated songs/exercises that stay on one octave

maybe also possible to add keys to switch one octvate up /down
it should be latter possible to permit the "compression" algorithm to compress further so that to use less keys for very beginner

@wobbol
Copy link

wobbol commented Oct 7, 2016

I hope this is useful. I think I covered all the corner cases with this rough algorithm.

compress{keyboard keys){
chop off the note_lines on the outside
if keyboard keys < total_note_lines
  return
note_lines = get_setof_least_notes

if (!find_note(note_lines[0]){// check if there were note_lines with no notes meaning all of them have none.
  while(keyboard keys < total_note_lines || note_lines != 0)
  if there were note_lines with 0 notes then sum the note distance of each line and remove the one with the highest sum
}
if keyboard keys < total_note_lines
  return

assert(every note_line has at least one note)
while(keyboard keys < total_note_lines){
  note_lines = get_set_least_notes
  for(int i = 0; i !=note_lines.len; ++i){
    check if note_lines[i] is edge if true
      merge note_lines[i] notes twards the center
    check nabors of note_lines[i]
    merge note_lines[i] with nabor that has less notes 
  }
  if keyboard keys < total_note_lines
  return
}
perror("could not compress map")
return

@allan-simon
Copy link
Owner Author

ah interesting, thanks for the comment I will try to look more into it this weekend :)

@wobbol
Copy link

wobbol commented Oct 7, 2016

Ill be around if you want help.

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

No branches or pull requests

2 participants