I'm guessing that if it's up on wikipedia, it's public domain, so this isn't illegal or anything.
To play this you'd need to add a function that enables you to change the duration of the notes, seeing as the very first note (one quarter note) of the song is as long as the next two (two eighth notes) combined. I'm not sure how fast this is supposed to be, but common times are 60 BPM, 90 BPM, and 120 BPM, with the quarter note being one beat. At 60 this would make a quarter note a full second, and an eighth note half a second long, at 120 the quarter note would be half a second and the eighth a quarter second long and at 90 it's right between those values.
There's a very high C in the song, so I'd halve all the frequencies from the popcorn example and add another C and call it Chigh or something like that and make that 1024Hz. Otherwise you'd have to make it 2048Hz, which I'm not sure the buzzer could produce.
Anyway, here's the names of the notes in order: G D Eb | F Eb D | C C Eb | G F Eb | D Eb | F G | Eb C | C [QR] | [ER] F Ab | Chigh Bb Ab | G Eb | G F Eb | D D Eb | F G | Eb C | C [QR]. | isn't a letter, it's a vertical line to keep track of the measures.
If you halve all the frequencies from the popcorn example, the Ab's in this case would be at 830 Hz, judging from this: http://www.phy.mtu.edu/~suits/notefreqs.html.
All the notes that are by themselves are quarter notes, the ones that are tied together at the bottom are eighths. [QR] is supposed to represent a quarter rest: you don't play anything for the duration of a quarter note. [ER] is an eighth rest: don't play anything for the duration of an eighth note.
In the fifth measure (measures are divided bij straight vertical lines) I wrote one D and then an Eb, even though there are two D's in a row. This is because of the little arc over them, which means you play them as one continued note. In the case of 60 BPM this would mean you hould that note for 1,5 seconds. Same with the G in the eleventh measure.
Can sombody who can C++ programat an make music the Tetris melodie or an other melodie on a speaker play. You must after a time change the frequence of the speaker.
Writt it her if you would like to do this. Thank you