Here is a minimal lesson file:
element progI { label = "I" }
element progIV { label = "IV" }
element progV { label = "V" }
header {
lesson_id = "3f3872c0-ef2e-4132-9fb1-97f75c7b28fd"
module = elembuilder
title = "progression test"
elements = auto
}
question {
music = rvoice("<c' e g> <b d g> <c e g>")
elements = progI, progV, progI
name = "I-V-I"
}
question {
music = rvoice("<c' e g> <c f a> <c e g>")
elements = progI, progIV, progI
name = "I-IV-I"
}
This block defines the elements the user can put together to answer the
question. Each block is named by the string between element
and {. The block defines one variable,
label that is the label the button will get.
label can either be a plain string, or a progressionlabel. Progressionlabel strings are displayed a little larger than the default font, and a simple syntax let you get small subscript and superscript numbers. Try I-(6,4)V(6,4)-I or I-IV(6)-V(6)-I to get an idea how it works.
See also at_question_start.
elementsThis variable defines which elements defines the question.
tonicThe exercise will have a "Play tonic" button if this variable is defined in a question in the lesson file. The variable should contain some music to play to the user so that he knows the tonic of the question. This can be useful in harmonic progressions that does not start on the tonic. This variable is optional. Example:
tonic = chord("c e g")