The `chord` module
Précédent | Chapitre 4. Extending GNU Solfege | Suivant

## The `chord` module

Below is a minimal lesson file. It will create an exercise that will play a minor or major chord and the user answers with two buttons labeled "Minor" and "Major"

    header {
        module = chord
        title = "Minor and major chords"
        lesson_id = "e263d40a-d8ff-4000-a7f2-c02ba087bf72"
    }
    question {
      name = "Major"
      music = chord("c' e' g'")
    }
    question {
      name = "Minor"
      music = chord("c' es' g'")
    }

There are two more variables that can be added to the questions. The `inversion` variable tell the inversion of the chord. 0 for root position, 1 for first inversion, etc. And the `toptone` variable tell which chord tone is on the top of the chord. Example:

    question {
      name = "Major"
      inversion = 2
      toptone = 3
      music = chord("g c' e'")
    }

Précédent | Niveau supérieur | Suivant
The `idtone` module | Sommaire | The `dictation` module