Music Theory

Question types ::: qtype_musictheory
Maintained by Eric BrissonEric Brisson
Question type supporting several exercises for music theory instruction.
Latest release:
507 sites
43 fans
Current versions available: 3
This question type is designed for music theory instruction. It currently supports the following exercises:

  1. Note writing: The respondent is asked to enter a given note on the staff.
  2. Note identification: The response is asked to identify a give note.
  3. Keyboard Input: The respondent is asked to select a given key on the piano keyboard.
  4. Key signature writing: The respondent is asked to enter a given key signature.
  5. Key signature identification: The respondent is asked to identify a given major or minor key signature.
  6. Interval writing: The respondent is asked to enter a given interval above or below a given note.
  7. Interval identification: The respondent is asked to identify the quality and size of a given interval.
  8. Scale writing: The respondent is asked to enter a given scale.
  9. Scale identification: The respondent is asked to identify a given scale.
  10. Chord quality writing: Given a chord root and quality (e.g. 'G major', 'D minor'), the respondent is asked to enter corresponding chord on the staff.
  11. Chord quality identification: The respondent is asked to identify the quality of a given chord (e.g. 'major', 'minor', etc.).
  12. Harmonic function writing: The respondent is asked to enter a given harmonic function in a given key (e.g. 'IV in D minor').
  13. Harmonic function identification: The respondent is asked to identify the harmonic function of a given chord in a given key.
When Javascript is enabled, answers are entered and displayed in an HTML5 graphical user interface, using two separate Javascript components (Music Theory GUI and Keyboard Input) packaged as YUI modules. All the exercises above are fully functional without Javascript, except for 1) Note writing, 2) Note identification and 3) Keyboard Input.

Each of the exercises above (except for #3, Keyboard Input) can also be configured so that a specific question is randomly generated upon starting an activity. The randomization can be based on a set of parameters configured when the question is created or edited. For example, it is possible to configure an interval writing question so that it asks for a perfect fifth above a randomly chosen given note. This randomization process, configured during question creation, alleviates the need to create very large question banks, and can be particularly useful for interval and chord/harmonic function questions, given that the number of possible questions for these exercises is very large.

I made a choice to create a framework where the correctness of a given question is automatically computed, without having to enter individual answers during question creation. A framework for adding various grading strategies for each exercise is also in place, and is currently used for the scale writing exercise (currently allowing either an "all-or-nothing" grading strategy, or a "partial grade" approach where each correct note is given partial credit).

This plugin was developed with the hope of creating a music question type that would support a wide range of music theory exercises, using a single graphical user interface that is flexible enough to support such exercises. It is hoped that it will facilitate further development and Moodle server maintenance.

Special thanks to Jay Huber for his very significant contributions to the existing standalone Moodle music question types (Music Key Signature, Music Interval and Music Scale), and for inspiring me to develop this new question type.

Many thanks to colleagues in Winona State University's TLT and IT departments for their support of my Moodle development efforts.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3


Eric Brisson
Eric Brisson (Lead maintainer): Question type author
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Eric Brisson
    गुरु, 24 अक्तू॰ 2019, 8:44 PM
    Hi Juliane,

    Translating the plugin into German is certainly possible. Translated strings can be contributed by Moodle users using AMOS ( - once submitted and approved, the translated strings automatically become available within the plugin itself (for Moodle servers that use one of the German language packs).

    This plugin has already been translated into a few languages (, and it would be wonderful to have a German translation as well!

    I hope that this is helpful - please let me know if you have any other questions.

  • Fernando Gonçalves
    शुक्र, 13 दिस॰ 2019, 7:24 AM
    Hi, I have one question about translating this plugin:

    "Enter a comma-separated list of notes,
    without spaces, using the following syntax:

    [Uppercase letter name][Accidental
    ("n" = natural, "#" = sharp, "b" = flat, "x" = double-sharp, "bb" = double-flat)]4, ...

    Random example: answer=>Cn4,​En4,​G#4"

    Should I translate the random example (Cn4) with pt-br Brazilian note names? Does the plug-in checks for an absolute syntax or is it relative to the current localization (ie, it expects Dón4 instead of Cn4) ?
  • Eric Brisson
    शुक्र, 13 दिस॰ 2019, 8:00 AM
    Hi Fernando,

    The plugin needs an absolute syntax for this portion of the instructions - please use "Cn4,​En4,​G#4" in the translation. Please let me know if you have any other questions, and many thanks for your translations!

  • Fernando Gonçalves
    मंगल, 21 जन॰ 2020, 8:21 PM
    Thanks Eric,

    I have finished the pt-br translation, hope it gets approved soon! Thanks for your work on this plugin.

    Best regards,
    Fernando Rauber
  • Eric Brisson
    मंगल, 21 जन॰ 2020, 9:52 PM
    Hi Fernando,

    Great to hear - again, many thanks for your translations!

  • Fernando Gonçalves
    बुध, 29 जन॰ 2020, 2:36 AM
    A few requests and suggestions:

    1) Construction and identification of modes in different keys
    2) Controlling which keys are used for random roman numeral analysis. I find it upsetting when it randomly generates problems in very difficult keys (ie, Eb minor) instead of the more usual keys I wanna my students to really master. Ideally, I wanna control also which parts of the random test are easier and which ones should be more difficult in regards to keys.
  • Marco Renoldi
    गुरु, 28 मई 2020, 11:02 PM
    Hello Eric.
    I've been using your plugin since 5 years or so and everything worked fine. I also contributed the italian translation. Now we have moved our Moodle to another hosting and installed 3.8
    We have made a backup of the course and restored it to the new Moodle but now the plugin seems not working: I'm getting the following error:
    Failed to load question options from the table qtype_musictheory for questionid 106
    Any idea on how we can solve this?
  • Marco Renoldi
    गुरु, 28 मई 2020, 11:13 PM
    ... and going deeply into the error i get this message as well:
    Eccezione - Class name must be a valid object or a string
  • Eric Brisson
    शुक्र, 29 मई 2020, 2:30 AM
    Hi Marco,

    I will try to help you with figuring out the issue. Looking at existing posts from other plugin users who had this error, the most frequent cause is that the course was imported before the Music Theory plugin was installed on your Moodle 3.8. Could this be the case for you? If it is, it looks like the easiest way to fix it would be to delete the imported course (if this is an option for you), install the music theory plugin (if it wasn't already installed), and re-import the course.

    If this wasn't the problem, please feel free to let me know which Moodle version you used to backup to course and I will try to see if I could re-create the issue.

    I hope this is helpful - thank you!
  • Marco Renoldi
    शुक्र, 29 मई 2020, 10:39 PM
    Hi Eric
    It's exactly my case... Fixed!
    many thanks
  • Rene KR
    सोम, 15 जून 2020, 4:15 PM
    Hi Eric,
    I'd have some questions to your music theory plugin. Would be happy if we could have a quick chat about pentatonic scales, rests,...
    I have sent you a contact request.
  • Marta Rey
    गुरु, 4 मार्च 2021, 12:18 AM
    Hi Eric,

    First of all, I would like to thank you for your effort and for creating this fantastic plugin! It makes our work as teachers much easier! THANK YOU!

    I am building a Moodle site for a Global Music Campus in East Africa, and we were wondering if it would be possible to add some more options to some of the Music Theory Plugin exercises. For example:

    - Regarding Writing intervales, the plugin only contains 2, 3, 4, 5, and 6. Would it be possible to add 7 and 1?
    - Regarding Writing cords: would it be possible to add 7 and the seventh chords as well. C7 Cm7 C∆ and Cø ( 7, m7, ∆ and ø)?
    - Regarding Scale Writing: is it possible to add Ionian, Dorian, Phrygian, Lydian, Mixolydian, Aeolian and Locrian?

    Since I am not a developer, I do not know if I am asking for a lot of work, but if those options could be implemented, it would help us a lot!

    Thanks in advance for your time and effort!
  • Thorsten Butsch
    गुरु, 3 मार्च 2022, 2:57 PM
    Hi Eric,
    thanks for this plugin... Will there be a Version for Moodle 4? Or ist it allready running with Moodle 4?
  • Roy Huiskes
    सोम, 2 जन॰ 2023, 5:30 PM
    Hey Eric,

    Thanks for this plug-in; it's a daily driver at my school. I've made the dutch translations. I would like to get in touch over a possible expansion of this plugin; possibilities for solfege.
  • Rosy Boogaard
    शुक्र, 6 जन॰ 2023, 6:20 PM
    Dear Eric,

    Thanks for this plugin!

    I have a some questions:
    1. At the questions type 'Choard quality writing', it's now possible to give a triads (3 tones) answer, you can place 3 symbols on the stave. What we would love, is that it's also possible to answer with 4 symbols on the stave.

    2. At the questions type 'scale writing', it's now possible to pick de scale types 'major, natural major, harmonic minor and melodic minor'. We would love to have some extra options. (I would have my internal contact person for the exact options). Would this be possible?

1 2 3 4
Please login to post comments