Writing your own modules

Warning

Experimental feature. Will most likely change in the next stable branch because we need a failsafe way for exercise module to include other files like graphcis etc.

You can write your own exercise modules in Python and place them in the modules/ directory parallell to the lesson-files/ directory containing the lesson file. So the lesson file USERDATA/exercises/user/lesson-files/demofile will search for exercise modules in USERDATA/exercises/user/modules/.

A module below USERDATA can have the same name as one of the standard modules. The module below USERDATA will be used when the lesson file is stored in the lesson-files/ directory parallell to the modules/ directory. But the standard lessonfiles stored in In the section called “Introduction” we showed you just enough to place your lesson file to get started. This sections give you all the details how files and directories are set up.

We will write INSTALLDIR whenever we refer to the directory Solfege is installed in. The exact location differ from operating system to operating system, and can be found by selecting HelpFile locations and then lookup «Solfege installation directory». Example of locations:

Please notice that INSTALLDIR is not necessarily the top directory where all files belonging to Solfege is installed. Different operating system place files differently. For the purpose of this document INSTALLDIR is the directory containing the solfege/ subdirectory containing all the python modules that composes the program and the exercises/ subdirectory that contains all the lesson files.

and in other directories willuse the standard module included with Solfege.