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.


Tuesday, October 13, 2009

Star map

This is my final project about Advance Database subject.

We are going to do Star Map, which used the spatial database platform. This project will show the star in the selected period. The user selects the date and time. Then the result will show by the probable of the stars that you can see in the selected period. The system will store the star map, group of the star name and the magnitude of each star (the brightness).

I got 14/15 point for this project. (still feel like how can i got such a lot of this score) For the program, I think it was pretty cool but in term of technique I think it wasn't good enough. The picture that I use, it was create from drawing program (yes I draw it by myself to show every day) and the database I have my friend to point all of the star in the map, we have about 300 stars in database. To query, we fixed the star point and query the area that define by selected date instead of move the star into the appear area. And we change the name from Star map into Thailand Star map at midnight because we can show only the map in Thailand and only for midnight of everyday. (At the presentation, we have only the 1st and 16th of each month. We can't do the entire on time)

Another guy who work in the same project as me, it's very very good.... He wrote program to draw the map by calculate each star and his map was very beautiful. How dare I work in the same project as him. His grade was reduce because he always late in the class. (OMG!)

Final

We finish the final exam... fweeeewww

I've already know my grade for 2 subject. (Actually only 1 but I think another one I should get "A" Hehe) I got a B for Advance database and I hope I'd get a A for Academic writing.

At Advance database final examination day, I feel very blur from the guy next to me. He's smoker. Hate him! I almost be the cheater because I took the exam. paper out side the exam. room with me. O_o I very blurred. @ @ next time please make sure that your breath is not smell so bad.

I think, that time should be the Electric Engineering student. Hope no more for next time. Thanks

Monday, September 28, 2009

Project Proposal



We have added some information about the OCR and MIDI theory. We also have the platform of reading Thai music notation too.


[download]Progress report[front page]: http://docs.google.com/fileview?id=0B-Ls4RhAgiHeNmY0YjdiMzUtMGMxOC00NzcyLWFiNWMtNTYwZDNiNWJhZWNi&hl=en




Progress report: http://docs.google.com/fileview?id=0B-Ls4RhAgiHeMThjZDI3NTItNjJmNy00ZTQ3LThkYTItZTE5ZTJmZmQxMWY5&hl=en


////////////////////////////////////////////////////////////////////////////////////////

Thai music notation Platform


2.1 Thai Music Notation Thai music notes can be represented by using symbols to define the voice manners. The 3 basic symbol sets consist of 1. Pitch of the note. 2. Duration of the note. 3. Other special symbols. 1) Pitch Pitch of Thai music is determined by 7 characters of Thai language plus pitch (.) which is placed below the characters to represent low voice, and the a high-point (.) which is placed over the characters to represent high voice as you can see in the table below.


Table 2.1 The notation representation
Low voice
General Thai music voice
High voice
ดฺ (Low Dole)
(Dole)
ดํ (High Dole)
รฺ (Low Re)
(Re)
รํ (High Re)
มฺ (Low Me)
(Me)
มํ (High Me)
ฟฺ (Low Fa)
(Fa)
ฟํ (High Fa)
ซฺ (Low Sol)
(Sol)
ซํ (High Sol)
ลฺ (Low La)
(La)
ลํ (High La)
ทฺ (Low Si)
(Si)
ทํ (High Si)


2) Duration The duration of the Thai note is indicated by measures of the duration. 2.1) Measure Measure performs as beat in international music. It will move forward slow and fast constantly. Every note recording line contains 8 music rooms where the rhythm always will be placed in the end of Thai note in each music rooms.

1
2
3
4
5
6
7
8

2.2) Note arrangement Each music room includes 4 sub-unit beats..
1234
1234
1234
1234
1234
1234
1234
1234



In Thai music notation system, each Thai music note and each symbol –(minus) equal 1 length of rhythm. 


-- equals –ด 
-ด equals รด
--ด equals -รด 
ม-ด equals -มด
-ม-ด equals -มรด 


When the symbol - (minus) is placed on the end of any letter it will extend the sound of the notes 1 sub-unit beat. 


For example: 


ม/---ช/---ล/-ซ-ล/ 

Me---Sol----La---Sol---La 

1234/1234/12/121/ 


Both Thai music note and symbol – (music) can swap their positions follow the melody of the music. Therefore, the symbol arrangement can be in many forms as you can see in an example below.


Case1 : 1 note per room


/---ซ / --- ม / --- ร / ---ด / 


Case2 : 2 notes per room


/ -ล-ล / -ม-ล / -ล-ซ / -ม-ล/ 


Case3 : 3 notes per room


/ -มซม / -ดมร / -มซด / -ลลล /


Case4 : 4 notes per room


/ ซลดร / มรดล / ชลดร / รรรร /