Testing and Modular Front-End

Jamming with Web Audio

Testing and Modular Front-End

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

>> 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]


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.

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,


Here's a simple version of that.


Can I add some distortions to that?




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.

And if you multiply waveforms, then it mostly will just be quiet. A few other things to know is sine waves are relatively soft.


Square waves are really loud.


Triangle waves are somewhere in between.


Triangle waves have another cool thing going for them though that you can do.


Let's see, get it. Put that down a bit. And then,


You can make ridiculous sounds really quickly.


If your sounds are too obnoxious, you can always multiply them by some other way, and then they sound more subtle.


I don't know, there you go.


>> I spend a lot of time fiddling with this kind of stuff, so. [LAUGH] That's all it takes, I guess.


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.
>> Yeah.
>> [LAUGH]
>> [LAUGH] Do you need me to sign any letters or whatever?

I can do that.
>> [INAUDIBLE] This is part of my job.
>> [LAUGH]

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now