A Customizable Soundboard App

worksheet on user-generated data, sound recording, and multiple screens

Printable Version

SoundRecorder Component

The SoundRecorder component lets you record sounds input by the user.

Demo: start button, stop button, play button

img02

Multiple Screens

You can define screens in the designer.

Screen Shot 2015-04-20 at 7.40.31 PM.png

You can code the Screen.Initialize block for a screen. If a screen is returned to from another, use:

Screen Shot 2015-04-20 at 7.40.31 PM.png

In Screen.Initialize or Screen.OtherScreenClosed, you can use the startValue block to grab information sent from the other screen (if they sent it).

You can also use TinyDB to share data between screens. Note that there is only one database, even though both screens will have a TinyDB component.

demo: going between screens

SoundBoard App

Consider the following soundboard app that is not customizable:

img04
img01

The app above has fixed data-- it always plays 1.wav,2.wav, and 3.wav.

Suppose we want to make the soundboard customizable-- let the user specify the sounds that should play when each button is clicked. And suppose we want to allow that customization to occur on another screen (sort of like a preferences screen).

  1. Sketch the blocks for how you’d go between screens. You can assume there is a CustomizeSoundsButton in Screen1 and a BackButton in the CustomizeSoundsScreen. For now, don’t worry about the data to be shared.




  1. Suppose the customization screen has three buttons that when clicked, start the recorder so that the user can associate a sound with a button. Sketch the click event for Button1.Click, and any associated event handlers you’ll need (see SoundRecorder blocks above). Remember, your goal is to make it so the recorded sound is set so that on screen 1 it will play.


  2. The “CustomizeSounds” screen and the main screen need to share the soundsList. Sketch the blocks you’ll need for sharing information between screens.

appinventor.org course-in-a-box                                        

This document is licensed under an Attribution-NonCommercial-ShareAlike 3.0 Unported License