Students will create a colorful collage by programming a repeating pattern. Then, they will make the colors in the collage play a sound when the computer mouse touches them.
Topics introduced
Conditionals
Musical Art Starter Project
Musical Art Example Project
If you get stuck, review the Musical Art Solution Sheet.
Introduce coding. Ask students to share what they have heard or may already know about coding [aloud or in the chat].
In computer science, code is specific instructions given to a computer or robot to complete a task or set of tasks.
Recap the last activity and block coding. Students will watch videos and create a "Musical Art" project in Scratch.
Watch Video 1 and Video 2 [see below] and provide the Starter Project link in the chat.
Video 2: Students might struggle with the idea of x and y coordinates. Look for students whose stamped pattern does not cover the whole screen when the code is run, and encourage them to increase their x and y coordinates. To cover the whole stage, they should use -240 and 240.
Give students 5-10 minutes of independent coding time to:
Use the "go to" block to make the sprite go to a specific spot.
Make the sprite go to a random spot.
Make the sprite leave a stamp of itself.
Make the sprite repeat going to a random spot and stamping itself.
Start with a clear screen when the green flag is clicked.
Work through Videos 3-4, allowing time for students to work independently and share after each video.
Video 3: Students need to add a “forever” loop around the "go to mouse pointer" block in order to make the program continue to run.
Students need one "if-then" block for each color they use, and they can duplicate the blocks by right-clicking on the code stack.
Students may have trouble selecting the color. They need to click the color dropper, then click on the color they want to match. This step presents a great opportunity to encourage persistence.
Students may choose Add-ons to enhance their project. [videos below]
Allow student(s) to share their screen and code with the class.
Discuss the activity and facilitate a brief discussion about what students learned and experienced.
Question 1: What was your favorite part of this activity?
Question 2: How did you use "If" statements? [Example answer: I told my sprite to make a noise "if" it touched a certain color. It controlled what happened or did not happen in my program].
Question 3: How did you use a "forever" or "repeat" block? [Example: When the green flag was clicked, I had my "X" sprite follow the mouse pointer forever. Also, I had my other "If statements" run forever to test if different colors were touched by the sprite].
VIDEO 1
Become A Music Maker
VIDEO 2
Fill the Stage with Color
VIDEO 3
Color Me Musical
VIDEO 4
Intro to Add-ons
Change Instrument and Tempo
Change instruments and tempo in your musical art piece when the yellow X sprite touches different colors.
Make it Melodic with a Cord
Make your project play chords, not just individual notes.
Easter Egg Surprise
Add a surprise color to your art piece that plays an unexpected sound when touched.
Sprite Trail
Add a graphic effect that makes the yellow X sprite leave a color-changing trail across the screen.