The idbyname module

The `idbyname` module
Prev | Chapter 3. Extending GNU Solfege | Next

## The `idbyname` module

Here is a minimal lesson file:

    header {
      module = idbyname
      lesson_id = "a400df62-e007-4a1b-9057-cd05397e88a2"
      version = "3.1.4"
      title = "Menuitem title"
    }
    question {
     name = "Major"
     music = chord("c' e' g'")
    }
    question {
     name = "Minor"
     music = chord("c' es' g'")
    }

Optional idbyname header variables

`filldir = vertic`

  Tell the direction the buttons are filled. Default value is `horiz`.

  Modules: `idbyname`.

`fillnum`

  Tell how many buttons there are in each row or column. The default value is 1.

  Modules: `idbyname`.

`labelformat``= progression`

  The default value is `normal`. Set to `progression` for lesson files where the name of the questions is a harmonic progression, written in a undocumented, but not difficult format. Check some existing lesson file to see how it works.

  Modules: `idbyname`

`at_question_start` ``

  This variable changes what happens when the user clicks New. By default, Solfege will play the music when the user clicks New, and only display the music when the question is answered correctly and the `have_music_displayer` variable is set to `yes`. Setting this variable will also set `have_music_displayer` to `yes`.

  `at_question_start = show`

    The exercise will get a Play music button. When the user clicks New the music will be displayed in the music displayer, but no music is played. Click Play music to hear the music.

  `at_question_start = play`

    The exercise will get a Display music button. When the user clicks New the music is played. Click Display music to see the music.

  `at_question_start = show, play`

    When the user clicks New the music is both played and displayed.

  Modules: `idbyname`.

`have_repeat_slowly_button` `= yes`

  Set to `yes` if you want the exercise to have a "Repeat slowly" button.

  Modules: `idbyname`.

Optional question variables

`vmusic`

  This variable holds a representation of the question intended to be displayed. This can be necessary if the music is a .wav or .mp3 file. It will be used when the user clicks Show music or when the question is answered correctly (if we have a musicdisplayer). Added in Solege 2.5.1.

`cuemusic`

  Will be displayed in the music displayer when the user clicks New. Ignored if `at_question_start = play, show` or `at_question_start = show`, because then the content of `music` or `vmusic` is displayed when the user clicks New. (Added in Solfege 2.5.1)

Prev | Up | Next
The `compareintervals` module | Home | The `singanswer` module