open-ear icon indicating copy to clipboard operation
open-ear copied to clipboard

Allow choice of ascending/descending/melodic intervals

Open exscape opened this issue 3 years ago • 2 comments

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.

exscape avatar Nov 30 '21 20:11 exscape

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.

exscape avatar Nov 30 '21 20:11 exscape

Hey! I think the existing infra can support that so implementing it should be relatively easy. Here are a few tips:

  1. 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.
  2. 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)

ShacharHarshuv avatar Nov 30 '21 22:11 ShacharHarshuv