open-ear
open-ear copied to clipboard
Allow choice of ascending/descending/melodic intervals
Preferably in a way where the user can select between 1 and 3 of them, so that the questions use a random choice of the selected options, the same way it currently uses ascending or descending randomly.
I'm considering attempting to contribute a bit but I've never used TypeScript and have barely used JavaScript, either, so it would take a bit to get up to speed!
I do tend to learn the basics of new languages quickly though, as I've used a lot of them over the years.
Hey! I think the existing infra can support that so implementing it should be relatively easy. Here are a few tips:
- You need to add a "settings" definition to
IntervalExercise
. That exercise currently doesn't have any settings, so you can look at ChordsInKeyExercise#_getSettingsDescriptor and _getDefaultSettings. Looking at the example should really help you understand how to do that. - The settings object will be available via the _settings property. You just need to rewrite IntervalExercise#getQuestion to take the settings into account.
Should be pretty easy if you have some programming experience, even if you don't know TypeScript. (it's very similar to C# / Java, main difference is that the types are after the method/property name.)
(If you are implementing this, please mark yourself as the assignee for this task)