Moodle plugins directory: Music Theory | Moodle.org
Music Theory
Question types ::: qtype_musictheory
Maintained by Eric Brisson
Question type supporting several exercises for music theory instruction.
Latest release:
496 sites
103 downloads
43 fans
Current versions available: 3
This question type is designed for music theory instruction. It currently supports the following exercises:
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.
- Note writing: The respondent is asked to enter a given note on the staff.
- Note identification: The response is asked to identify a give note.
- Keyboard Input: The respondent is asked to select a given key on the piano keyboard.
- Key signature writing: The respondent is asked to enter a given key signature.
- Key signature identification: The respondent is asked to identify a given major or minor key signature.
- Interval writing: The respondent is asked to enter a given interval above or below a given note.
- Interval identification: The respondent is asked to identify the quality and size of a given interval.
- Scale writing: The respondent is asked to enter a given scale.
- Scale identification: The respondent is asked to identify a given scale.
- 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.
- Chord quality identification: The respondent is asked to identify the quality of a given chord (e.g. 'major', 'minor', etc.).
- Harmonic function writing: The respondent is asked to enter a given harmonic function in a given key (e.g. 'IV in D minor').
- Harmonic function identification: The respondent is asked to identify the harmonic function of a given chord in a given key.
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.
Contributors
Eric Brisson (Lead maintainer): Question type author
Please login to view contributors details and/or to contact them
This question type should be fully ready for successful submission and use of translations at this point. Many thanks to all contributors!
Eric
duplicate entry 'de-83-notec' for key 'mdl_toolcust_lancomstr_uix'
INSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)
[array (
0 => 'de',
1 => '83',
2 => 'notec',
3 => 'C',
4 => 'C',
5 => 1441469339,
6 => 0,
7 => NULL,
8 => NULL,
)]
Error code: dmlwriteexception
Stack trace:
line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
line 186 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()
line 60 of /admin/tool/customlang/index.php: call to tool_customlang_utils::checkout()
Little (?) problem:
Debug info: Duplicate entry 'nl-575-notec' for key 'mdl_toolcust_lancomstr_uix'
INSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)
[array (
0 => 'nl',
1 => '575',
2 => 'notec',
3 => 'C',
4 => 'C',
5 => 1456748959,
6 => 0,
7 => NULL,
8 => NULL,
)]
Error code: dmlwriteexception
Stack trace:
• line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
• line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
• line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
• line 186 of /admin/tool/customlang/locallib.php: call to mysqli_native_moodle_database->insert_record()
• line 60 of /admin/tool/customlang/index.php: call to tool_customlang_utils::checkout()
Can you give me tips how to solve this problem? Workarround?
The problem would for users who have installed version 1.2 of the plugin, tried to customize a language pack while using version 1.2, and then upgraded to version 1.3.x, and finally try to customize a language pack using version 1.3.x. Users who have never installed version 1.2 or never tried to customize a language pack while using version 1.2 should not run into the issue.
It occurs because version 1.3.x uses 'notec' instead of 'noteC' as a language string - since the resulting database key (nl-575-notec) is case insensitive, it conflicts with the existing key (nl-575-noteC) loaded into the custom language table from version 1.2.
The quickest workaround to it is to run the following SQL statements on your Moodle database (statements below assuming MySQL) - this would delete the duplicate items that cause the error from the table mdl_tool_customlang and you should be able to customize the language pack afterwards:
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteC';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteD';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteE';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteF';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteG';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteA';
delete from mdl_tool_customlang where lang = 'nl' and componentid = '575' and stringid = 'noteB';
I hope that this is helpful for you - please let me know if you have any other questions.
Thanks so much,
Eric
I've tested and it does not enable question creation in Moodle version 3.1
A workaround enabling this question type to work in 3.1:
- Create the questiona in a Moodle 3 instance
- Import into a Moodle 3.1 instance (Questions are automatically added to the question bank)
- Add select questions of this type from the question bank
Best,
Eric
Best,
Eric
Thanks for suggesting it - I have added the idea to my development list (https://github.com/brissone/moodle-qtype_musictheory/issues). 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!
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
Good Morning.
Are you currently supporting or maintaining the pluggin?
Thank you