Difference between revisions of "Music Painting"
(Created page with "{| style="width: 1000px;" |- | ==Outline== 600px|center Play your favorite songs with buzzer. <br> Suitable kits: mCookie102, mCookie202,...") |
|||
Line 46: | Line 46: | ||
==Programming== | ==Programming== | ||
===Required Program Block=== | ===Required Program Block=== | ||
− | *[[ | + | *[["Buzzer on-melody" program block]] |
− | *[[ | + | *[["Delay" program block]] |
===Programming Thought=== | ===Programming Thought=== | ||
Line 60: | Line 60: | ||
'''1. The first piece of music''' | '''1. The first piece of music''' | ||
<br> | <br> | ||
− | Use | + | Use "Buzzer on" melody program block to set the melody, delaying 500ms representing this note lasting for one beat, delaying 500ms representing this note lasting for two beat. |
[[File:mixly-ctrl-musicpaint-code1.jpg|600px|center]] | [[File:mixly-ctrl-musicpaint-code1.jpg|600px|center]] | ||
'''2. The second piece of music.''' | '''2. The second piece of music.''' | ||
<br> | <br> | ||
− | Use | + | Use "Buzzer on" melody program block to set melody, and use delay to select beat. |
[[File:mixly-ctrl-musicpaint-code2.jpg|600px|center]] | [[File:mixly-ctrl-musicpaint-code2.jpg|600px|center]] | ||
'''Test the result''' | '''Test the result''' | ||
Line 70: | Line 70: | ||
After upload, try it to check whether you can hear the song Twinkle Twinkle Little Star as supposed? | After upload, try it to check whether you can hear the song Twinkle Twinkle Little Star as supposed? | ||
<br> | <br> | ||
− | *Q: Why dose the music sound vague, while the program is right, there is no pause between two | + | *Q: Why dose the music sound vague, while the program is right, there is no pause between two notes? |
− | *A: We can add a | + | *A: We can add a "buzzer off" program block to the end of each note. |
<br> | <br> | ||
<br> | <br> | ||
− | Delay 500ms, so that this mote can last for one beat; add | + | Delay 500ms, so that this mote can last for one beat; add "Buzzer off" and "delay" program block to make the note pause for 50ms, separating from the next not. |
[[File:mixly-ctrl-musicpaint-code3.jpg|600px|center]] | [[File:mixly-ctrl-musicpaint-code3.jpg|600px|center]] | ||
Line 96: | Line 96: | ||
**A: Because the buzzer belongs to passive buzzer, only changed voltage signal can make it ring. It is the active buzzer that can ring after added voltage. | **A: Because the buzzer belongs to passive buzzer, only changed voltage signal can make it ring. It is the active buzzer that can ring after added voltage. | ||
*Q: Can the buzzer sing? | *Q: Can the buzzer sing? | ||
− | **A: It can emit do, re, mi, fa, sol, la, si of different frequencies, and can make up music | + | **A: It can emit do, re, mi, fa, sol, la, si of different frequencies, and can make up music. If you want to play music, audio decoder chip and horn are required. |
|} | |} |
Latest revision as of 04:09, 14 October 2016
ContentsOutlinePlay your favorite songs with buzzer.
Module BillModule
Other Equipment
Module Setup
ProgrammingRequired Program BlockProgramming ThoughtAt first, popularize the related knowledge to numbered musical notation-note. Simulate different notes with buzzer, and control the beats with delay program block, to play the song Twinkle Twinkle Little Star. Start to Program1. The first piece of music
2. The second piece of music.
Test the result
Test the result
Technical Specification
Related Cases
FAQ
|