Making GCompris sound more Musical

This project aims at adding a music oriented API to GCompris and thus add more music related games/activities to GCompris.

You can view the complete proposal here

Status

Before Week 1

  • Went through the code for several activities
  • learnt pygoocanvas and various functions involved in it
  • learnt how to create a new activity using createit.sh
  • learnt how to run a new activity using runit.sh
  • collected nursery rhymes, related pictures to be used and music

Week 1

  • started with the coding part for rhyme-activity
  • the first page would consist of the list of rhymes shown using the icons
  • when clicked on the icon it would open the page showing the rhyme, an image and an option the listen to it
  • created a function which handles the request when any a rhyme icon is clicked
  • stored all the rhymes in a local variable
  • Screenshot1

Week 2

  • Using the pygtk i created the textbox setting all the properties and used the pygoocanvas widget to place the text and images at right positions. I modified the code to add more levels to the activity.
  • Used the gcompris sound API to play the rhyme on clicking the play icon
  • Instead of saving the rhymes text as a local variable inside the program I used a property file and used ConfigParser to parse the file and read requested data allowing more levels to be added easily

Screenshot : http://imgur.com/XnJKU

Week 3

  • Rhymes Activity
  • I added more options in the property file for every element on the screen.
  • Tweaked using the gtk to get the best appearance possible for the activity. Corrected the bug while sound was played using 'play_and_interrupt' mode.

    Screenshot : http://imgur.com/3KUj8 Piano Activity

  • For now we can play one octet in the piano-activity using the keys a-k in the keyboard (including minor notes).

    Screenshot : http://imgur.com/t0BLQ

Week 4

  • Piano Activity
  • I added a feature to highlight each key while pressed using the svg_id feature in goocanvas.
  • Next I displayed the playing notes on the screen so that people can learn what they are actually playing.
  • I added a feature to save the played rhymes in a text file.

    Screenshot : http://i.imgur.com/vOrky.png

Week 5

  • Added a toggle button to view the label of the keys in the piano.
  • Added levels to learn various majors and minors in the piano ( which are the basic piano lessons )
  • Created a double octet piano with the existing resources, which can also be enabled using a toggle button.
  • Used the item visibility concept in goocanvas to hide and view whenever necessary.

    Screenshot : http://imgur.com/2gadi

Week 6

  • Added 3 more levels, first to learn the pentatonic scales, Learn to Play the Happy Birthday Tune, Twinkle Twinkle little star tune.
  • Corrected few problems existing in the previous commit while shifting from single octave piano to double octet.
  • Added a button to set the piano size in the freeplay mode.

    Screenshot : http://imgur.com/VYehV

Week 7

  • Save notes button, which will save the notes played as a .gcpiano text file
  • This file can be used to generate a .wav file using Music Synthesiser which will be coming up soon
  • I've added a load file button where you can open the saved file and it starts playing the saved tune automatically
  • Keyboard Portability feature has been achieved using the config button, used a pygtk window and let the users enter the desired key for each note. If redundant/errors the default US keyboard will take course. Sing-Along activity
  • created the sync between playing sound and execution of the code to display the moving ball (according to the note being played which is the main idea ). Still I managed to achieve the delay to run it in sync.
  • The speed of the execution can be changed using one variable which I wish to make it changeable by the user.
  • The notes and lyrics of the particular note being played are mapped to one another and are displayed at the exact time.
  • I've separated the notes and lyrics to a separate file - activity.desktop and retrieved the information using ConfigParser

  • I've added play/pause feature.
  • For now added two levels - two songs - "London Bridge is Falling down, Twinkle Twinkle little star"

Mid-Term evaluations : Success!

Week 8

  • Piano Activity
  • I implemented the 'Music Synthesiser' part, which is actually as a separate activity in my proposal. After discussing with my mentor, I clubbed it with Piano itself, used the pysynth library to convert the '.gcpiano' files into '.wav' format. The '.gcpiano' file contains the notes in text format, it is converted into a tuple list and given as input to 'make_wav' in pysynth library, this will easily do the job of creating the .wav file.
  • Instead of load notes feature I changed them into play feature, where the kids can listen to the tunes that they played from the wav file they saved.
  • Another feature implemented in Piano -- making it completely non hard coded, I had saved the notes array and names of each level inside the program, now everything goes into the activity.desktop files. The number of levels is decided by the content present in the config file activity.desktop.
  • Apart from that, I've added tooltips for each icons, so that it can be discoverable by the users Sing-Along activity
  • I made semantic changes in the desktop file, after long discussion with the mentor, changed each note as note_1 = X which makes it more logical than the previous version.
  • Again this has been made totally non hard coded, everything fetched from activity.desktop and even the levels.

Week 9 & 10

'Code clean up weeks'

  • Implemented the Sing-alone mode for the sing-along activity, kids are allowed to use this code after they practice enough to try singing alone watching the screen without the audio.
  • Preparations for Desktop Summit : I plan to present two main activities I did, the Piano and the Sing-along (like a karaoke player). All my paper work is done, ready to fly out to Berlin :
  • Removed redundant code, made code faster and efficient wherever possible, made it as modular as possible

Week 11 & 12

The Desktop Summit, Berlin!

  • Piano Activity
  • The mouse interface has been completed finally completed! Now the piano can be played on touchscreens too
  • Added documentation Sing-Along activity
  • Added the tempo control buttons, using which you can increase or decrease the speed of the karaoke player.
  • Added mute feature to be used in the sing alone mode.
  • I'm done with most of my code, only documentation remains here and there, and small feature add ons. I plan to continue contributing after GSoC.

    Talk at Desktop Summit : http://goo.gl/fGpxG Blog : http://goo.gl/tYfAi

Code

http://git.gnome.org/browse/gcompris branch : gcomprismusic

Hackergotchi

karthikhackergotchi

Blog

http://yeskarthik.in

Outreach/SummerOfCode/2011/Projects/KarthikSubramanian_GCompris_Musical (last edited 2013-12-03 23:18:14 by WilliamJonMcCann)