The `idproperty` module
Пред. | Глава 4. Extending GNU Solfege | След.

## The `idproperty` module

The `idproperty` module let you create exercises where solfege will play some music and you have to identify different properties of the music.

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" and two buttons representing the inversion. Notice that unused properties, toptone in this example, are hidden.

    header {
        module = idproperty
        flavour = "chord"
        title = "Minor and major chords"
    }
    question {
      name = "Major"
      music = chord("c' e' g'")
      inversion = 0
    }
    question {
      name = "Minor"
      music = chord("es' g' c''")
      inversion = 1
    }

`flavour = "chord"` will add the following definitions to the lesson file header, unless if they are missing:

      new_button_label = _("_New chord")
      lesson_heading = _("Identify the chord")
      qprops = "name", "inversion", "toptone"
      qprop_labels = _("Name"), _("Inversion"), _("Toptone")

`new_button_label` is the label to put on the New button. The default value is `_("New")`.

`lesson_heading` will set the heading to be displayed when you practise. The default value is an empty string, that will hide the heading.

The properties are defined by the `props` variable in the lesson file header, and there should be a variable `prop_labels` that defines the label to use. `props` and `prop_labels` must be lists of equal length.

The exercise will have a Repeat arpeggio button if one or more of the questions can be played arpeggiated. Set the lesson file header variable `have_repeat_arpeggio_button` to `no` to disable hide the button.

If the exercise have a `inversion` property, it will be treated special. If assigned integer values, like in the example, the integer values will be replaced with strings. So `0` is replaced with "root position", `1` with "1. inversion" etc.

Пред. | Наверх | След.
The `identifybpm` module | Начало | The `idtone` module