Today we are going to work on creating a sketch that will allow us to play music together. For this morning, I want everyone to find three or four sounds and play with all of the techniques that we have learned today… jump, rate, loop
Each person should use at least 3 sound assets in their sketch
Maybe from my list of Ideas for Sound Assets (listed below)
Maybe record your own sound and edit it using AudioMass
Talk to your group to strategize on what sounds may do best together
Think about whether your sound is for Rhythm, Melody, Effects, Background Ambiance
You will probably have 3 sound objects that can be played. For this morning you can just use a button to trigger the sound to play.
Play with the jump and rate functions and see how you can play with the samples so that it goes beyond just playing the sound from the beginning
/*
Music Credits:
Nighthush under a starlit sky by Dirk Dehler
<https://freemusicarchive.org/music/dirk-dehler/single/nighthush-under-a-starlit-sky/>
*/
let mySound; // we need to define the variable in the global context
function preload() {
mySound=loadSound("DirkDehler-NighthusUnderAStarlitSkyHalf.mp3");
}
function setup() {
createCanvas(400, 400);
}
function mousePressed() {
if (mySound.isPlaying()) {
mySound.stop();
} else {
mySound.play();
}
}
function draw() {
background(220);
rect(100,100,200,50);
}