Saturday, January 9, 2010

Progress Senior Project - 1/9/2010

OMG! How can I left my project for so long, it's about 4 days T T. Actually, I didn't completely left it but I still find the information for making GUI for Python. You know, this week i have a lot of event to attend such as facebook, twitter and so on. (Just kidding!) Actually, I went to do the job interview, making the duet violin score for University song (Yeah, all of the violin student can't arrange or harmonize the song,me either. But I'm the one who understand the notation rule. You know what? I spend whole day but we didn't use it O_o) and preparing for exam, I really apologize to myself in this case.

Anyway, what I have found is the good GUI maker, that is pyQT, wxPython and Tkinter. In this time I didn't have the decision yet but at least I know the way to start. (Yeah ^^) The following picture is the example program for both tool which running on my computer(window xp). I didn't take pyQT because I think the left 2 tools is more popular. Actually, to make the comparison, you have to make it in the same function but I still can't make it so this is the example code from the tutorial.

What do you think? Most of comment said wxPython is better, in this time while i wrote this blog, i'd said so... Maybe this one.

  • wxPython
  • Tkinter



Monday, January 4, 2010

Progress Senior Project - 1/5/2010

I worked on OCR part tonight. Today I made the program can recognize the above and under charactor ( ํ and ฺ ). I think it nearly complete, now it just like 75% correctness.

I think tonight I'll study more about Ocrad [http://www.gnu.org/software/ocrad/ocrad.html]



Actually, I want to work on the interface or makefile part but I don't know how to start. If anyone know the method please tell me. _/|\_

Happy New Year


Happy New Year, everyone
Another year, another experience
Hope the good thing happen to you all the year and forever...

Patama Ramchune

Progress Senior Project - 1/3/2010

Actually I done this part before new year, but i'm in mid-term exam, so i write it a bit late.

This time I worked on the OCR part. It just a template matching, not so good but it almost done (I hope). From the picture, I recognize the character and write it to txt file, and then made the midi sound from the file. The blob coloring part is quite good but some extra character such as -ํ or -ฺ is not good, I'll try it tonight.

Last time I met my advisor, he ask us to make the document, so I let my friend manage the layout but I still don't have it O_o OMG........

Wednesday, December 9, 2009

Progress Senior Project - 12/9/2009

Today I just work more for my MIDI part. Now my program can play different patch sound. This Example is the sound of flute and xylophone, it can play simultaneously. This song is combining of 2 different song for show that it can play 2 line in 1 track.

I think, before new year we just waiting for OCR part from my friend. T T


Saturday, December 5, 2009

Progress Senior Project - 12/5/2009

Today I just made my song can play rhythm and melody simultaneously. I use melody as channel 0 and the drum as channel 9

Mary has a little lamp <<<[listen]>>>

I still have some problem about this, because the rest sign (-) need to play the previous note continuously but I can't make it yet.

Laodungdern <<<[listen]>>>


Next, I need the soundbank of Thai flute. My senior friend said he has one, so my next problem is how can I use it properly. If someone know the method, please tell me. I hope I can finish this part within new year... (_/|\_ สาธุ)


Tuesday, December 1, 2009

Progress Senior Project - 12/1/2009

This week, we seperate the work into 2 part. First the OCR thing, I let my friend take care of it and second is MIDI.

Today, I just write program to generate the sound, that's Marry have a little lamp. You know what, I heard that Thomas Edison made the first recording of the human voice in 1877 with this song. I don't know why I selected this song but when I work with the sound or playing music, I always start with this song. By the way, next I'm going to make the song able to have the rest sign (-) and then make the rhythm. Actually, I think I already done this part but my problem is how to use the Thai sound bank. I hope I can finish this part within this weekend. So let see the flow...

Oh! we forgot to tell you that we decided to work with Python because I already learn about image processing by using Python. For making python can work with midi, I use midipython library (link http://www.mxm.dk/products/public/pythonmidi) and for image processing, I use openCV library (link http://opencv.willowgarage.com/wiki/).

As I tell you on the Progress report last month, after we have the music characters then we make sound from it. Midi represent the sound by the number and sequence like
  • midi.note_on(channel=0, note=do)
So to make the sound we have to define the number of note (from ลฺ till ซํ)
  • a3=57 (ลฺ)
  • b3=59 (ทฺ)
  • c3=60 (ด)
  • d3=62 (ร)
  • e3=64 (ม)
  • f3=65 (ฟ)
  • g3=67 (ซ)
  • a4=69 (ล)
  • b4=71 (ท)
  • c4=72 (ดํ)
  • d4=74 (รํ)
  • e4=76 (มํ)
  • f4=77 (ฟํ)
  • g4=79 (ซํ)
Then we make the event for the song and generate into sound.
  • midi.update_time(time)
    midi.note_on(channel, note)
    midi.update_time(time+sequence)
    midi.note_off(channel, note)
Sound easy, isn't it? I think so but the important point of this project is OCR. Now we just work on blob coloring. I hope that we can recognize the character soon.

Now I feel like I have done a little bit farther. ^^ And oh! this is my first MIDI song -> http://www.mediafire.com/?iymjnwzjncz I hope it would be better next time.