Question types: Music Theory

Maintained by Eric Brisson Eric Brisson
Question type supporting several exercises for music theory instruction.
240 sites
21 fans
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 Ken Graetz, Scott Schradle and colleagues in Winona State University's TLT and IT departments for their support of my Moodle development efforts through the maintenance of our institution's Moodle server.


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
    Fri, 28 Jul 2017, 9:10 PM
    I just tested and enabled v.1.3.5 for Moodle 3.3. Thanks again for all feedback and AMOS contributions - I appreciate these very much!
  • Picture of stella saran
    Sun, 1 Oct 2017, 5:46 PM
    Any recent update of the plugin, awaiting for it eagerly.
  • Picture of Alan Brown
    Tue, 17 Oct 2017, 2:23 PM
    Thanks Eric - this is good! Any possibility to expand scale writing and identification to include major scale modes? That would make this very useful in a contemporary context.
  • Eric Brisson
    Wed, 18 Oct 2017, 6:40 AM
    Hi Alan,
    Thanks for suggesting it - I have added the idea to my development list ( I don't expect that I will have time to add features before the end of the school year, but I may be able to do some more development work next summer.
    Thanks again!
  • Picture of Clarence Prudhoe
    Fri, 1 Dec 2017, 4:26 AM
    Hi Eric,
    This looks like a very useful plugin. Thanks for developing it.

    Has anyone developed quiz content for this plugin you would be willing to share or trade? I would like to use it but I don't have time to enter the content.
    Please send me a message if you have Music Theory content for this plugin.
    Thanks, Clarence
  • Picture of Coordinación Tic
    Fri, 2 Feb 2018, 10:15 PM

    Good Morning.

    Are you currently supporting or maintaining the pluggin?

    Thank you
  • Eric Brisson
    Sat, 24 Mar 2018, 6:24 AM
    Coordinación Tic: Regarding your question - Yes, I am currently supporting and maintaining this plugin.
  • Picture of sean young
    Sun, 10 Jun 2018, 4:36 AM
    Hi Eric, thanks for this fantastic plugin.

    I'm just wondering whether it would be possible to have a feature where a user inputs a series of given notes, which the plugin checks against a given answer provided when a question is created?

    I'm trying to find a way of creating simple music dictation tasks using Moodle, and wondered how easy it would be to implement within your plugin?

  • Picture of Marco Renoldi
    Tue, 28 Aug 2018, 5:37 PM
    Hi Eric
    the plugin is really good. I wondered if it would be possible to have the solfege syllables (do re mi fa sola la si) instead of the letters.
  • Picture of Marco Renoldi
    Wed, 29 Aug 2018, 3:01 PM
    Eric... nevermind.. I'm translating the plugin into italian
  • Eric Brisson
    Sun, 23 Sep 2018, 12:39 AM
    Hi Sean,

    Thank you for your note! I'm sorry for my very late reply. It might be possible to create an additional exercise for the purpose that you mentioned, but it would be very limited from a rhythmic standpoint (essentially, with the current note input interface, all notes would be whole notes, and there wouldn't be support for rhythm [note values, meter, barlines, etc.]).

    I unfortunately don't anticipate having enough time to devote to implement this feature, although it's an exercise that I have considered adding in the past and that I think would add flexibility for non-standard questions. Adding support for rhythm and meter would be a very significant upgrade to the note input interface, which I definitely don't anticipate having enough time to implement in the next few years. I'm sorry that I can't be of more help with your question at the moment.

  • Eric Brisson
    Sun, 23 Sep 2018, 12:43 AM
    Hi Marco,

    Thank you so much for your translation - I appreciate it very much!

  • Eric Brisson
    Sun, 23 Sep 2018, 1:15 AM
    I just released version 1.3.5 for Moodle 3.5+ [2018092200].

    If you were already using the previous version (1.3.5 for Moodle 3.1+ [2017022100]) in Moodle 3.5, I recommend upgrading to avoid any potential incompatibility during question creation/edit.

    I have made an adjustment to this version that will facilitate upgrades to future Moodle releases by making it less dependent on possible changes to the Moodle question engine.

    Many thanks to all translation contributors!

  • Picture of Jerry Lau
    Sat, 6 Oct 2018, 7:26 AM
    I ran a check for foreign violation keys and your table came up as a violation .. it says

    "Foreign key questionid on table qtype_musictheory points to a non-existent table questions." There is no query presented like the others.

    Running Moodle 3.4.7+ on Redhat 7.1 enterprise 64-bit, php 7.1.8 with MySQL 5.7.21-community

    Any thoughts on how to fix this?

  • Eric Brisson
    Mon, 26 Nov 2018, 7:30 AM
    Hi Jerry,

    I'm sorry for my late reply to your question.

    This error is happening because the xml file used to create the database table for the plugin has an incorrect foreign key reference to a non-existent table "questions" (plural) - the reference should refer to the table "question" instead (singular).

    Since referential integrity isn't currently enforced at the database level in Moodle, this error shouldn't have any effect on the plugin's behavior, but if you still want to fix it on your Moodle instance (to avoid the error in the xmldb editor), you could edit the following line in /question/type/musictheory/db/install.xml ( ):

    On line 31: replace REFTABLE="questions" with REFTABLE="question"

    This fix should allow you to check for foreign key violations in the xmldb editor.

    I am planning to release a new version in the near future (hopefully, over winter break) that will fix this issue, as well as other minor issues. The new version will automatically fix this issue.

    Please let me know if you have any other questions.

1 2 3

Commenting temporarily disabled