sightreading.training
sightreading.training copied to clipboard
correct note played - but not recognized
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
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