Difference between revisions of "Adding a music activity and using gcomprismusic.py module"

From GCompris
Jump to: navigation, search
(Created page with "If you wish to add an activity relating to music to gcompris, consider importing the module gcomprismusic.py This module contains several useful classes of objects that will not …")
 
Line 20: Line 20:
  
 
= How to import the gcomprismusic module =
 
= How to import the gcomprismusic module =
 +
The gcomprismusic.py module is located in the piano_composition-activity. There are certain resources that support the module, and these are permanently located under the resources folder of the piano_composition activity. Thus, you must execute the following instructions to properly import the gcomprismusic module.
 +
<ul>
 +
<li> Create your new activity (see [[Beginner]] if you need help)</li>
 +
<li> open init_path.sh and find the <code> pythonplugindir</code> line. Replace this line with something like:
 +
<pre> pythonplugindir=$path/../piano_composition-activity:$path/../name_of_your_activity-activity
 +
</pre>
 +
</li>

Revision as of 20:44, 13 August 2012

If you wish to add an activity relating to music to gcompris, consider importing the module gcomprismusic.py This module contains several useful classes of objects that will not only make it easier for you to make your activity, but also help GCompris maintain a more uniform music platform.

The following music objects are currently included in the module:

  • Piano Keyboard
  • Music Note
    • Eighth Note
    • Quarter Note
    • Half Note
    • Whole Note
  • Musical Staff
    • Bass Clef
    • Treble Clef

The module was developed in 2012 by Beth Hadley through Google Summer of Code. It can always be improved, added to, and adjusted.

The documentation provided below will help you get started using the module. It provides coding examples, with pictures, that will help you create music objects.

Beth Hadley welcomes comments, ideas, contributions, and questions regarding the gcomprismusic module or GCompris music activities. Send her an email at bethmhadley@gmail.com

How to import the gcomprismusic module

The gcomprismusic.py module is located in the piano_composition-activity. There are certain resources that support the module, and these are permanently located under the resources folder of the piano_composition activity. Thus, you must execute the following instructions to properly import the gcomprismusic module.

  • Create your new activity (see Beginner if you need help)
  • open init_path.sh and find the pythonplugindir line. Replace this line with something like:
     pythonplugindir=$path/../piano_composition-activity:$path/../name_of_your_activity-activity