In this (extra-credit) assignment, you’ll be implementing a basic sound-board application. You will need to both play sounds and display images. Below is a video-recording showing the behavior of a solution to this assignment:
The high-level requirements for this program are as follows:
You can choose whatever theme that you want for this assignment (it doesnt have to be animal-themed). To find sounds for the theme of your choice, just google for sound files. You can also use https://freesound.org/.
If you break the problem down into smaller “chunks” it becomes much more manageable to tackle. I recommend you use the following strategy to complete:
Select a good background image and then set it as the background of your canvas. Make sure the tha image size fits will with the canvas size.
Add a volume slider like the one shows to the side of your canvas. Don’t worry about having it actually adjust the volume yet. Just get the clicking and movement working and displaying.
Choose a appropriate title for your program, and display it at the top. Make sure you choose a font color that doesnt blend in with the background image too much.
Next, place all of the image buttons in the lower portion of the canvas, like you see pictured. Don’t worry about playing the sounds for now.
Now, add in the logic to play a sound with each image click.
We have done button-pressing in several of the past sections and assignments, so refer to those if you can’t remember how to do so!
Each button should play a different sound!
Remember to use the SoundFile
type to load and play the files.
You can refer to the example programs from class or the slides for reference.
Lastly, make the volume controller actually change the volume.
You can use the SoundFile.amp()
function to adjust volume.
Remember: volume is controlled with a number between 0.0 and 1.0, so the position of the volume slider needs to be converted to a float!
All of your programming should be well-formatted and easy for the graders to read and comprehend. You should follow the style guidelines that we have discussed in class. Each program file should have a header comment at the top that has roughly the following format:
//
// Author: Student Name
// Description:
// A short description of what this program does!
//
Each function should have a descriptive block-comment above it, and other helpful comments.
If any part of your scripts are particularly complex, you should put documentation comments above those lines of code.
Name your program netid_sound_board.pde
(where netid
is your UA username).
This assignment is purely for extra credit, and is not required. As you know, assignments are worth 50% of your total class grade. This assignment may be used to earn-back points lost on previous assignments. Doing this assignment can improve your assignments portion of your grade up to 3.5% total.
It is due on 12/6/2017 at 5:00pm (but you may use a late day).
Turn in each of the files described in the spec to the assignment drop-box in D2L before the due date. Make sure to name the file exactly as this document specifies. Make sure to follow all instructions precisely.