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"
lesson_id = "e263d40a-d8ff-4000-a7f2-c02ba087bf72"
}
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
button. The default value is
_("New").
lesson_heading will set the heading to be displayed
when you practise. The default value is an emptry 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 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.