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

correct note played - but not recognized #22

Open
almagestalpha opened this issue Feb 26, 2018 · 1 comment
Open

correct note played - but not recognized #22

almagestalpha opened this issue Feb 26, 2018 · 1 comment
Labels

Comments

@almagestalpha
Copy link

almagestalpha commented Feb 26, 2018

The problem occurs on every key with a flat, not on the "sharp keys". Here only the notes with a accidental are affected, all the others work just fine.

Config.: Staff: treble, Generator: random, notes:1 hands:1, smoothness: 3, Min: A4, Max C7, column fits random chord: unchecked, key: every key with a flat

@leafo leafo added the bug label Jun 11, 2018
@fregren
Copy link

fregren commented Mar 12, 2019

I get a similar problem in the Ear training.
For me the bug is because the melody is listed using flats, but the keyboard gives sharps and the notes are compared using strings. For example the melody wants "Db" but when I press that on the keyboard it's logged as "C#" which is from a string perspective different.

So perhaps alter MelodyPlaybackExercise.checkForMatch() to not use string comparison, or make sure that all notes are only ever represented in one way. A more elaborate solution might be to store the notes as integer values instead of strings, perhaps the MIDI note value, and then it becomes an integer comparison instead.

https://github.com/leafo/sightreading.training/blob/master/static/js/components/ear_training/melody_playback_exercise.es6#L97

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

No branches or pull requests

3 participants