text stringlengths 0 1.36k |
|---|
The other interesting thing about your explanation -- I forgot... You're of the origin of Canada, yes? |
**Myles Borins:** \[08:05\] Mm-hm. |
**Alex Sexton:** Yeah, the JavaScript owes... |
**Myles Borins:** It came out... |
**Alex Sexton:** Gives it away. |
**Rachel White:** I feel like Myles is secretly Canadian, because he doesn't -- when I first met him I didn't know, and he kind of was like, a little quiet about being Canadian. |
**Myles Borins:** Am I supposed to introduce myself that way? "Hello, I'm Myles. I like maple syrup and it's called peameal \[laughter\] Thank you. Would you like a poutine and a Caesar? |
**Alex Sexton:** I'd actually flip it around to where you start there and then say your name. |
**Rachel White:** Yeah, that's usually... That's how it goes. Usually we know when you say "JavaScript", so... |
**Myles Borins:** I'm changing my Twitter profile, it says "Canadian Myles" now. |
**Alex Sexton:** How do you pronounce the library that is the most popular for transpiling ES6 into ES5? |
**Myles Borins:** Oh, are you talking about Babel? |
**Alex Sexton:** I am. Did you change the way you pronounce it? |
**Myles Borins:** So I did say it Babel \[beɪbəll\] at first, and then I was corrected by Seb. I then proceeded to send him a whole bunch of photos of the pig Babe, which I'm not sure if he appreciated. \[laughter\] |
**Rachel White:** Wait, is it Babel? \[bæbl\] Because I say Babel, but I've heard a bunch of other people say Babel \[beɪbəll\]. |
**Alex Sexton:** It's mostly Canadians that say Babel. \[beɪbəll\] But Wes Bos does all the tutorials, and so a lot of people come across the term Babel for the first time from Wes, and since he's Canadian, they hear Babel \[beɪbəll\] for the first time and then they repeat it mindlessly, which is now what America is a... |
**Rachel White:** I think that's actually where I heard it, which made me question everything I knew, or thought I knew. |
**Alex Sexton:** Shout out to Wes for making people question everything they thought they knew. Cool. I feel like we didn't get very deep into the audio APIs... Rachel, have you done any Web Audio stuff? |
**Rachel White:** I haven't yet. I actually know nothing about music. I took piano for like two years and that was about it. So I haven't, but I've seen a lot of people do really interesting stuff with the Web Audio API. I've seen Myles do some very cool stuff with spatial audio, which I'm sure he'll talk about a littl... |
**Alex Sexton:** Myles, tell us about the spatial stuff. |
**Myles Borins:** Okay. Do you want like a 5-minute version, a 2-minute version? I can talk about this for hours. |
**Alex Sexton:** I mean, start going and I'll cut you off when whenever everyone's asleep. |
**Myles Borins:** So there's a handful of different ways of doing spatialized audio. The most often used one is what's known as binaural, and that's using what are known as HRTFs (head-related transfer functions). A transfer function is a black box that can take some data, output some data as a pure function of some ma... |
The Web Audio actually has some HRTFs built in. They are not super accurate. In general, you kind of need an HRTF to be tuned specifically for your head and your body. They're called "head-related" because of how our brains play sound in space. |
**Alex Sexton:** \[12:00\] So in order to tune one, do you need one of those microphones that looks like a head, or do you have to put microphones in your ears? How does that work? |
**Myles Borins:** So you can tune it by sitting in an anechoic chamber - which is a room that's designed to have no echoes - putting microphones inside of your ears, or wearing specific kinds of headsets, which will then create a whole bunch of different sounds in the room and measure the filters of your body. So your ... |
**Alex Sexton:** I'll interject some interesting information... I have a project studio at the house. The rooms that you see -- like when people mix in rooms, they have all the sound foam and stuff like that on the walls, and those are to prevent early reflections. Your brain has a hard time discerning between the stra... |
So tuning rooms is really important because you wanna remove all of the early reflections that would cause some of that smearing to happen. People have existed for a really long time, so we actually are better at discerning early reflections off of the ground than we are off of walls or ceilings, which is really intere... |
**Myles Borins:** I wanna expand on that a little bit though, something that's like just a thought experiment that I always found really interesting - sound comes out of a person or a speaker or something, and it reflects off of surfaces; each time it reflects off of a surface, it decays a bit. This is the way that you... |
As the sound bounces around the room and each time it reflects, it decays more. Generally, that decays is happening in an exponential curve. But mathematically, would it ever reach zero, or is sound infinitely decaying and it's just that kind of sub-perceptual levels, and are we constantly surrounded by the infinite so... |
**Alex Sexton:** Yeah... You go half way to the wall an infinite amount of times and you never reach the wall type of thing. I do like the idea of that. It kind of makes you wonder, are we surrounded by this sound, eventually -- like, you know how on a screensaver you wait for it to finally hit the exact corner? (I gue... |
These are all interesting questions that are probably too far outside of the bounds of web audio. \[laughter\] |
**Rachel White:** \[16:13\] So I actually wanna interject for a second, because I've seen a lot of proof of concept demos for what people can do with the Web Audio API, but I don't think that I've ever actually seen it in actual use... I guess mostly because I've only seen artsy demos and stuff, but in terms of practic... |
**Alex Sexton:** I'm not sure I can think of -- I guess there are games (like legit games, not just demos) that I've seen that use the Web Audio API. But as far as just like business product, I don't see a lot of Web Audio API in those. |
**Myles Borins:** I was recently visiting IRCAM, which is a music technology research facility in Paris, and they actually have an entire team that is building interactive installation work and interactive web demos, and it's all built on web technology. One of the examples that I saw that was particularly interesting ... |
**Rachel White:** That's pretty cool. I'm thinking now of like -- what is Spotify written in? Because Spotify is a web app that's like wrapped in something, right? |
**Alex Sexton:** Right. Well, to some degree... But it's a little different; just playing a song is almost to the point of -- like, maybe they used the Web Audio API to do it, but they're not using the Web Audio API for anything other than like play/pause, start/stop. They're not doing compression or sound leveling, or... |
**Rachel White:** So what exactly is the Web Audio API? |
**Myles Borins:** The Web Audio API is an implementation of an audio graph. It gives you nodes that you can use to create sound, and to modify sound. It uses an abstraction that's called unit generators, which is an abstraction... This kind of audio graph unit generator approach is one that you'll see all over the plac... |
You'll have a node for the output, you'll have a node for your microphone, you'll have a node for a delay line, and you can connect the microphone to the delay, to the speakers, and it will do its thing. You can add and remove nodes to the graph, and you use a combination of various unit generators to create different ... |
**Alex Sexton:** \[20:05\] So you can have audio being generated... Can you use the same modifiers from non-generated audio, like audio that's just being sourced from an input, or something like that? (like a guitar) I've seen -- I'm pretty sure it was a Web Audio API, but there was a JSConf EU from a few years back wh... |
**Myles Borins:** Yeah, that would likely be the Web Audio API. You could take an external input and run it through any number of filters. |
**Alex Sexton:** Okay, cool. And you can write your own filters, and build a grunge box, and a delay pedal and all that kind of stuff. |
**Myles Borins:** Mm-hm, and you have primarily two different ways of doing that. You can do that by either using the variety of Nodes that are provided for you in the API, or you can actually write your own unit generators using the ScriptProcessorNode. As far as I know, the ScriptProcessorNode has been deprecated tho... |
**Alex Sexton:** I see. The DSP is all about latency at some point. |
**Myles Borins:** I've done some experiments with early asm.js and cross-compiling the Faust signal processing language to the script processor nodes, and we were actually able to get really intense analog amplifiers with non-linear -- all sorts of really fancy stuff running at near native speeds in the browser. The ma... |
**Alex Sexton:** Right... All the platform delay, not the actual code. That's interesting. The nice part about that though is that it shows that it's possible in the future to fix, it just doesn't seem like it's a priority. |
Mozilla for a long time prioritized a lot of web audio stuff, and I think they have some of the only built-in tooling to be able to kind of modify it... Does that sound correct? Is that what you used? |
**Myles Borins:** I never used those tools, but they did have developer tools specifically around viewing the audio graph, if I remember correctly. |
**Alex Sexton:** Right, yeah. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.