Writing your own modules
Poprzedni | Rozdział 4. Extending GNU Solfege | Następny

## Writing your own modules

### Ostrzeżenie

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 „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 Help → File locations and then lookup «Solfege installation directory». Example of locations:

- MS Windows - C:\Program files\GNU Solfege\share\solfege

- GNU/Linux - /usr/share/solfege

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.

Poprzedni | Początek rozdziału | Następny
The `twelvetone` module | Spis treści | The `mpd` module