For this activity you are going to create an app that you play like a musical instrument. The app will also be able to record what you play and play it back to you.
Details
Use App Inventor to create a musical instrument app. The app should have the following components:
A Sound component and three sound files. You can use these xylophone sounds or any other sounds you might want to play as an insturment. Upload the sound files in the Media section of the component designer.
Three Button components, one for each sound file, with text for which sound they play.
A Button component with the text "Play".
A Clock component with the TimerEnabled property unchecked.
The app should have blocks that do the following:
When the user clicks on one of the sound buttons it should play the corresponding sound file. Also add a variable that is set to an empty list. When a sound is played in response to a click, the name of the sound file that is played should be added to the end of the list.
When the user clicks the play button, the sounds in the list should be played back in sequence. To do this:
Enable the clock timer when the play button is clicked. When the timer is enabled, it will periodically generate timer events.
Add a Timer event handler. Every time a timer event occurs the app should play the next note in the list. Note, the app will need variable to keep track of the index of the sound that was last played. When the last note in the list is played, the timer should be disabled.