Hi 2010/12/5 Gabriele Lanaro <[email protected]>: > Hi! I want to implement a custom exercise for functional ear training (Issue > 58), I'm actually copying and modifying gradually an existent module > (solfege.exercises.harmonicinterval for example).
Thats a good start. twelvetone.py is also very simple. idbyname.py is a little more complex. > I'm looking for explanation/suggestion on how to implement a custom > exercise, in particular I have these questions: > - how each module in solfege.exercises is loaded into solfege and how to add > my custom module? You must place it in solfege/exercises/ together with solfeges own modules. There is not yet support for a directory for custom exercises in ~/.solfege/. Then you create a lesson file using that module. You don't have to edit solfege/lessonfiles.py to add the name of your module. Just write the module declaration with apostrophe: module = "mycustommodule" Save the lesson file as described here: http://docs.solfege.org:81/3.19/C/extending-solfege.html > - which classes a module must implement and which method/attributes are > required and what are they supposed to do? All exercise modules have two classes, Teacher and Gui, that directly or indirectly inherits from abstract.Teacher and abstract.Gui I don't think there are methods that you are requried to implement, but often Gui.on_start_practise are useful. > - Is there a guideline with best practices/useful hints to implement the > exercises (which module/library I have to use to play a sound etc...)? To play a single tone, using the api in solfege/mpd/track.py m = utils.new_track() m.note(4, 80) soundcard.synth.play_track(m) solfege.mpd.music_to_tracklist can parse some music code inspired by LilyPond code. If you don't need to do stuff with the return Track objects, you can call solfege.utils.play_music directly Just ask when you have problems. I can look at your module if you want to. If we continue to use this email thread until you have a working module, then I'll try to write some documentation out of it. Tom Cato > I'm carefully studying the code but any hint can seriously boost the > development! > - Gabriele > ------------------------------------------------------------------------------ > What happens now with your Lotus Notes apps - do you make another costly > upgrade, or settle for being marooned without product support? Time to move > off Lotus Notes and onto the cloud with Force.com, apps are easier to build, > use, and manage than apps on traditional platforms. Sign up for the Lotus > Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d > _______________________________________________ > Solfege-devel mailing list > To UNSUBSCRIBE, email to [email protected] > with a subject of "unsubscribe", or visit > https://lists.sourceforge.net/lists/listinfo/solfege-devel > > -- Tom Cato Amundsen <[email protected]> http://www.solfege.org/ GNU Solfege - free ear training http://www.gnu.org/software/solfege/ ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Solfege-devel mailing list To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe", or visit https://lists.sourceforge.net/lists/listinfo/solfege-devel
