23 Sound - (In progress)

How can we enhance our programs with sound?

Vocabulary

Audio File Formats, Creative Commons, Bit Rate, Event, Trigger, preload(), p5js libraries

Study Questions

  1. What is the purpose of the preload( ) function?
  2. Should every program have sound embedded in them? Explain why or why not?

Activity

  • Watch Video #1 (below)
  • Create a musical keyboard or an instrument of your choice.
  • Use at least 4 different sound files.
  • Create an interface for your instrument in p5js. The sound should be controlled with a keyboard or mouse clicks and there should be feedback on keypresses/clicks.
  • Answer the following questions at the top of your code.
    //Name:  
    
    //What is your instrument?
    
    //What was your inspiration for your instrument?
    
    //If you had infinite time, how would you improve your program? Detail all the features you would add.
    
    
    //Your Code below
    
    • Name your sketch and comment your code.
    • Use camelCase for variable, function names, or where ever appropriate.
    • Use variables for modifiable colors and other elements that the user could set at the top of the program.
    • Use functions for blocks of reusable code.
    • Discuss the answers to study questions.

Resources

  1. Video: 23 Sound
  2. Video: Uploading Media Files
  3. Image: [Sound Instrument Example]
  4. Image: [Sound Instrument Example 2]