Check out a free preview of the full Testing and Modular Front-End course
The "Jamming with Web Audio" Lesson is part of the full, Testing and Modular Front-End course featured in this preview video. Here's what you'd learn in this lesson:
While adding some feedback, James holds a jamming session letting students play with online Web audio studio.
Transcript from the "Jamming with Web Audio" Lesson
[00:00:00]
>> Wanna hear a cacophony of music in this room? Please don't mute, just keep going. I think maybe that, We can all jam together. [SOUND]
[00:02:01]
[MUSIC]
[00:02:12]
A different trick is if you wanna make notes, really easy to do. Just pick a bunch of numbers, integers between negative 12 to 12, or so. Western music has this thing called 12 tone tonality. So as long you pick a bunch of numbers that are good, you can do this little bit of math where you take, you index something from that array, and then you raise it to the 2, to your number divided by 12.
[00:02:47]
And you multiply that by a base frequency, like 440. And it's gonna be you're pushing keys on the piano, including the black keys, cuz there's 12 of those from 1 to the other [SOUND] so,
[00:03:00]
[MUSIC]
[00:03:06]
Here's a simple version of that.
[00:03:16]
[MUSIC]
[00:03:21]
Can I add some distortions to that?
[00:03:23]
[MUSIC]
[00:04:14]
[SOUND]
[00:04:24]
[MUSIC]
[00:04:34]
Just the same tricks over and over again. The thing is, when you take these waveforms, you can just add them together, and it's your ears can pick out the waveforms from each other. So that's sort of why you can still understand me when I'm talking over this. Music, for example, the same thing applies, but with addition.
[00:04:57]
And if you multiply waveforms, then it mostly will just be quiet. A few other things to know is sine waves are relatively soft.
[00:05:06]
[MUSIC]
[00:05:08]
Square waves are really loud.
[00:05:09]
[MUSIC]
[00:05:12]
Triangle waves are somewhere in between.
[00:05:14]
[MUSIC]
[00:05:18]
Triangle waves have another cool thing going for them though that you can do.
[00:05:21]
[MUSIC]
[00:05:24]
Let's see, get it. Put that down a bit. And then,
[00:05:33]
[MUSIC]
[00:05:39]
You can make ridiculous sounds really quickly.
[00:05:50]
[MUSIC]
[00:05:50]
If your sounds are too obnoxious, you can always multiply them by some other way, and then they sound more subtle.
[00:05:55]
[MUSIC]
[00:06:24]
I don't know, there you go.
>> [APPLAUSE]
[00:06:30]
[MUSIC]
[00:06:42]
>> I spend a lot of time fiddling with this kind of stuff, so. [LAUGH] That's all it takes, I guess.
[00:06:51]
[MUSIC]
[00:06:55]
All right, cool. If you got any questions, I'll just be right here. [LAUGH] Please do play with all of those fun toys, which are now a part of your job, cuz it's the web platform.
>> [LAUGH] [INAUDIBLE]
>> Yeah.
>> [LAUGH]
>> [LAUGH] Do you need me to sign any letters or whatever?
[00:07:14]
I can do that.
>> [INAUDIBLE] This is part of my job.
>> [LAUGH]
>> [INAUDIBLE]
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops