 Do you know that it's possible to capture the reverb of a real world space and apply it to any sound you like? It's called convolution reverb or IR which means impulse response reverb and this video I'm going to show you what it is Try to explain how it works and we're gonna have some fun with it. I'm Anfa. I'm an electronic music producer and sound designer But I only use open source software and Linux Let's for starters capture the reverb of this space that I'm in right now, which is forest To do this all I need to do is clap my hands so often it's a good idea to do this multiple times because For example because of all the birds chirping I'll have to do some cleanup and it's good to have multiple takes So I can clean them up denoise them individually and composite them into a nice clean impulse response Let me do it Let's now take these recordings and make some reverbs so now it's two days later and I've got the recording and Unfortunately, not all of it is usable actually very little of it is usable, but I've managed to salvage a few Claps so captures of the space and here they are All right, so now I want to make a clean impulse response from that So I want to make this into a single Clap that will sound as clean as possible because there's some background noise What I'm gonna do first is make sure that they are all synchronized, but I will also Before I do that I will actually normalize all of them So I'm gonna select all my tracks and go effects normalize and I will independently normalize them because I Want the peaks to be at the same level All right now it's going to be much easier to synchronize that I'm going to zoom in and I'm going to synchronize to this one. So the first one. I'm gonna just use the Time-shift tool. I'm going to nudge my second Clap so it aligns with the first one as closely as I can Sorry, we have a peak here and we are dropped here. I think I have to move this by one sample and then these drops Align can see these align perfectly and this follows and it's pretty pretty okay They're gonna be different. I can't clap my hands the same Exactly the same two times, but there should be close Now this third one is going to be is going to be more difficult because it's it's a weird one and Hi I'm not sure if I'll even find a moment that Maybe this this is okay You know what? Let's play them all together and listen Okay, this sounds like a singular clap. So I think well, it will do Now what we could do is denoise them And also fade some parts that are not good. There is some bird bird singing in this recording I think I'm just going to apply fade out Also, we could try maybe noise reduction. So I'm going to go noise reduction get noise profile I have selected a piece of this recording, which is silent and Now I'm going to apply this noise reduction effect. I'm going to preview Okay, yes get rid of the noise, but I think this is pretty okay. All right Now I will process the other two claps Separately and now because you know denoising is always gonna give us a little bit of artifacts But because I'm denoising them separately Okay, that's There's a bird song in there also gonna Apply noise reduction. So get noise profile for this clap So I'm gonna maybe Scroll a little bit scroll the view a little bit. So we just see this one and I'm going to apply noise reduction and see what Okay, that's not good About changing the sensitivity less reduction About zero. Okay, let's do it like that. I'm going to switch it to spectrogram view as well Yeah, I'm going to also fade this out. So effects Fade out Okay, now we're fading out and I'm going to do the same with this So solo this and yeah, maybe here Fade out. Okay. Now the third clap Let's solo it Here Solving mutes everything else by the way temporarily so Can be sure we are only less hearing this this solo track Oh, this one is crazy noisy But we have a clean noise sample in here. So let's try it Let's try and denoise that noise reduction Okay, I'm going to just delete all of this and fade it out in here Now let's listen to our composite clap There is a little bit of a song of a bird song stuck in there, but I think it's pretty okay What I'm going to do now is combine all of them. So I'm going to do First control a to select all and now tracks mix mix and render to new track And here is our mix down. I'm going to do also is Select this thing in the middle and I hit Z to move my selection bounds to the closest zero crossing And I'm going to delete that Now I'm going to normalize the whole thing Once again Okay, I want to delete this part as well. Yeah, let me see if I can do this. All right Yep, that's going to be our impulse response So I'm going to export this and bring it into an impulse response plugin and we can listen to what this will produce All right, so I have loaded a plugin called LSP impulse reverb stereo Which lets me grab my exported IR sample and I'm going to just drag and drop it in here And you can hear how does it sound like And now I can make my voice be processed through that And in order to do this I need to select in here what I want to do So input zero and one source File one source file one File one Okay, now I can mute the wet signal Oh, actually it is. Actually it is muted. Okay. Or is it? Yeah, so that's This is me singing in the woods now The great thing about this plugin particularly is that we can also apply some correction to our IR sample And that is an equalizer So I just enable it on the file one and show it and here it is So I feel like the low frequencies were a little bit under Underrepresented in my hand clap And I could also add a little bit of highs A little bit of highs Okay, now let's move this to the side And we can play with the synthesizer and see what kind of sounds we can create Or how does the reverb apply What we can also do is we can cut the head which is the And this gives us an effect that Also apply fade in So this really leaves only the tail It sounds like a forest Really, but the very important thing is to cut off the head Of the sample And we can even do more of that That will accentuate This little thing Can also reverse this Sample And what this will happen What this will do is create reverse reverb And same things They are being buffered in the memory of the plugin Because the convolution reverb impulses backwards The reverb is also backwards And that is one way to do this effect live Which would be very difficult to do otherwise You can also cut the head to have To have a really short backwards reverb And I can also cut the tail Cut the tail Cut the tail This could create some interesting effects This is doable live Of course we have some latency And you can see that my lips are moving before you can hear the sound If I clap my hands right here It also sounds weird Now we just need to Uncut our head So we can not cut the tail anymore We can cut the head more So you see the initial impulse That is in the first 5 milliseconds It is what gives it the dry characteristics Interesting stuff Now I have one more forest sample that I have created before And I have recorded it in a different forest As you can hear it is a way longer sample And also there is some noise till the end So we can fade it out Right in the plugin And also we can cut the head And apply a little bit of a fade in That is a bit much I am also going to reset this EQ And let's turn it on I can also make it reverse That is a pretty cool effect Okay I am having silly fun right now Alright let's do something a little bit different now There is a plugin called LSP Profiler I am going to load it up Maybe let's use the mono version because it is a little bit simpler And what this plugin expects is first to give it the microphone input from our system So this is the microphone I am using right here The Capture One port And put it output to a system output And this is a speaker right there So let's open this plugin now And this plugin now measures the input levels We can calibrate it So I am going to put on headphones as ear protection Because this may get loud Let's enable the calibration I think that will be enough And now what the plugin will do is It is going to play a sine wave sweep from low frequencies to high And it is going to use that to excite this environment using that speaker Capture the response using this microphone And it is going to produce an IR or impulse response file for us Which we can then use as a reverb to emulate what would happen We played a sound in the location of that speaker right here in this exact room And you were listening to it through this microphone Let's do it Alrighty, so this is the speaker I was talking about before The sound is going to come out of there And it is going to go into this microphone And we will get an impulse response from that So let me... First we need to do the latency measurement, I believe Oh, now we get everything Oh, so the amplitude was too low Alrighty, it has read latency 38 milliseconds We can now press Profile We can choose the duration of the profiling sine sweep The longer it is, the higher quality the impulse response will be But let's go with... Well, how long it can be? 50 seconds Let's go with 11 seconds and see And we have an impulse response Let's check it out, see how it works, how does it sound? Awesome Alright, so I've loaded the impulse response into another plugin called LSP Impulse Responses, Mono Which is like a simpler version of the LSP Impulse Response Reverb And we can listen to the impulse that it has produced Yeah, so the result of this sine sweep in here Pretty much sounds like me clapping my hands somewhere But like flatter And we can also see that it looks pretty uniform Let's see if we can cut the tail and maybe see it zoomed in a little bit Oh yeah Alright, so that's how it looks Now let's see what happens if I process my voice through it So I've connected it to my system input again The same microphone Goes through the LSP Impulse Responses And goes to the output I also need to route it to the recording input So it actually gets captured So now let's do input left And now let's do it all wet Testing Alright, so it pretty much just sounds like me being far away from the microphone But I'm up close Let's switch it up So No wet No wet and all dry So this is how it sounds like This is the real input signal and And this is the processed signal So it just sounds like me being far away from the microphone pretty much Which is pretty cool Because that means it really captured the sound of this reverb Of the space, of this room With this weird sine sweep So Why the sine sweep You see, every system Doesn't matter if it's a physical acoustic system Like a room or a musical instrument Or if it's an electronic system That responds to electric Currents and impulses Every system has an impulse response And the term really came from Electrical electronics And electrical engineering, I believe Or signal processing, which is like a broad spectrum And sound processing is really just a tiny subset of that, I think And the thing is that To produce an impulse response Or rather to measure an impulse response We need to excite a system So when I clap my hands in a room I'm exciting the system because I'm emitting a short pulse of energy Which has a wide spectrum of frequencies There's lower frequencies, there's higher frequencies And they're more or less evenly spaced It's not flat That's why the head clap is not an ideal thing Probably popping a balloon would be a better thing Because one, it's much louder Two, it's way easier to reproduce To make it like repeatable results You just have a bunch of balloons and you pop them And they should pop the same way And third, this frequency response is more flat So what would be the ideal impulse? An ideal impulse to measure a frequency response of an environment would be Infinitely small in time, that means infinitely short Or as short as possible And also would have all the frequencies From the lowest to the highest possible And equal amounts And something like this exists It's called a Dirac impulse And it's what would produce an impulse response file That would change nothing about the input signal Let me show you Here's audacity and I'm going to quickly create a mono track And we're gonna need some silence I'm gonna generate silence One second of silence will be enough Okay, this is one second of silence If we feed this as an impulse response to our plugin We will get silence If we however you do this Which is a single audio sample At a value of one With all other samples being at a value of zero We get a unity impulse response That means it will change nothing about the input signal That means it will change nothing about the input It will produce exactly mathematically the same result And of course to be precise We should also export only this one sample Because if I export these two samples The first one which is zero and the second one which is one We're going to delay the signal by one sample Now what happens if I add a bunch of samples Like what will happen now It's closer to how convolution actually works You see every single pulse we put in here Which is a sample of value one It's going to create another copy of our input signal Only delayed by a given amount So we're going to have like a very short echo We're going to have our original signal And then a copy delayed by two dozen samples And then another copy delayed by two copies Very close together, delayed by how many copies Etc. And we're going to have a reverb characteristic If I put more pulses in here And if I make a pulse which is not a value of one Which is 100% but something smaller like 0.1 This is going to just create a copy of the input signal At this point in time which is going to be 10% of the volume So it's quieter So we really can have a reverb tail If we just put points, these are points are just like reflections of the sound When it's bouncing off of distant wall and it takes some time to travel there Let's do this, let's create a reverb profile Which is nothing but a bunch of reflections That we draw manually in the impulse response file Of course we can also use negative values Why not? It's only going to produce an inverted copy of our original input signal Do you understand what this is doing? It's pretty crazy Alright, yeah, I'm not close enough Let's copy this and just create a bunch of pulses Okay, and we have a 0.25 impulse response Now I'm going to control T to truncate this And what I'm also going to do is I'm going to apply a fade out So that the first pulse samples are louder and then they're going to be quieter and quieter Okay, we can also normalize to make sure that our loudest samples are touching 0 Or sorry, 0 decibels full scale which means they will be at full loudness And yeah, we can also remove this first pulse maybe I'll remove it, it's not so easy because it doesn't snap And I can just delete that And this is our reverb profile Let's save this, load it into the LSP impulse responses And then you listen to what it will do I'm really curious to see Okay, first let's listen to what this sample actually sounds like It sounds like a bunch of nasty clicks because that's what it is But now let's feed the microphone input through this thing and listen to what happens Alright, are you ready? I'm turning off dry, I'm turning on wet One Hello Hey Oh, it's quite loud Hello, person Welcome to this place Can you hear me? Alright, this is actually a cool reverb and we just drawn it ourselves What else can we do? Because Let's check this out on a spectrogram, okay? Maybe we don't have enough resolution Also, let's view it to 20,000 Hertz Alright, and let's view it Maybe let's have a wider, alright, that's too much I guess Alright, so of course the resolution of this measurement is not perfect But you can see that the pulses are are extremely wide-band These are the perfect pulses, they covered a whole frequency spectrum But what would happen if we change that, if we made them imperfect pulses, okay? So let's go back to the waveform view and I'm going to select maybe these pulses And apply a filter curve to them I'm gonna flatten it and now let's say I want low frequencies in here So I'm going to cut off everything higher Do you see what happened? The samples got completely rearranged We don't have a bunch of pulses, we have a long, long wave But let's switch to the spectrogram And you can see that this is exactly what we wanted We have energy only on the low end of the spectrum This is fascinating because this literally demonstrates the duality of sound Which is that it can be expressed in time domain, which is waveforms But it can also be expressed in frequency domain, which is spectrograms And it's pretty amazing that, you know, altering something in the frequency domain Alters it in the time domain For example, I can take my pencil tool and I can draw a different wave And we can now see at the spectrogram and see what happened here I've added a bunch of frequency content Wow! All right! So our impulse response doesn't have to be just boring pulses like this They can be anything Okay, let's try and do something else You see how a low-frequency impulse looks like? Let's do a high-frequency impulse I'm gonna grab maybe these And filter them again Let's go effects, filter curve Let's flatten it and I'm going to now high-pass this So only high frequencies go through Look what happened Can you see this? This is fascinating I'm going to zoom in Do you remember how the low-frequency stuff looked like? It looked like a wave that was very tiny, slowing and growing up And here it's like something in reverse It's like we have the wave, the lowest frequencies being removed So it's like backwards, they are going backwards This is a little rippling in here And this is called a Gibbs effect And I can demonstrate to you maybe in some other place Actually, let's do it here Our impulse response is just gonna be a bit weirder I'm going to select a bunch of samples And I'm going to normalize them Amplify them Value not in the range Okay, let's go negative 9 Alright Okay Let's now select this whole thing And maybe invert it Okay, alright So this is a square wave Let me zoom, reset the zoom This here is a square wave, it's a pulse And in reality, we don't have Like you can think that, oh, it's perfectly steep, right? But in reality, it's not You see we have these samples and the signal has to go through And actually the signal isn't perfectly square It's waving back and forth And we can see this if we actually low-pass this a little bit So let's imagine we're viewing this at a higher frequency sample rate And now I'm just cutting off at 20 kHz Everything can actually hear And you can see that our square wave actually isn't square It has these ripples And this is called the Gibbs effect And this is the artifact that you see on artifact It's not really an artifact, it's just how the wave How the sound looks like in time domain When you remove some frequencies And you had like a vertical thing So the same thing happens with our pulses Only we're removing low frequencies, not high frequencies But again, we have a very similar thing Let's take these ones and do a band-pass So I'm gonna go filter curve, let's flatten it I'm going to put a point here and put a point here And maybe let's do a resonance at 1 kHz All right? You see it all just turned into a 1 kHz tone And we don't really have the... We can't really tell where the pulse is There was a bunch of pulses you can see And they're just gone Maybe I'm gonna use a different filter curve And I'm gonna use a higher frequency So we have a bit more time resolution All right So our pulses are so tiny that they pretty much became invisible All right We have some artifacts like this stuff But it doesn't matter Like we're just messing around anyway Okay, I'm gonna export this And we'll see what does it sound like You wanna listen to how it sounds? Okay, let's hear it Ouch That's a nasty sound All right, let's hear how does it sound as a reverb Interesting Okay, I really like the sound It's weird And you can see we have over-emphasized low frequencies A lot It's very boomy And I think it's because this thing here is very loud The amplitude of this thing is really, really high Let's tone this down by like 20 decibels Also, let's tone this down By 20 decibels as well And let's save this out again All right, this sounds much more high frequency heavy Let's apply this Okay Hello, person Welcome to this place Can you hear how similar these sound? We can hear how similar my clap Like my clap is an imperfect pulse A wide-band pulse of energy and excites it So that it sounds like the sample itself Pretty fine Not perfect We can hear the differences There's like a middle, higher, lower mid-frequency build-up in the clap It's not perfectly uniform as what I said It's not a perfect way to excite an environment But if it's all you have, it's all you have All right, so There's some weird multiplication going on in the math And I think it's nice to understand how this convolution works And you can see we can use that technique to produce some really weird, awkward sounds And we haven't even tried white noise Let's do this Let's do this I'm gonna generate white noise One second of it, please All right, so this is perfectly white noise Now, what do you think would happen if I just use this? Let's just try it White noise, one second Okay All right, let's do this There's one way to find out, right? All righty, so here is our reverb sample Now I'm going to be careful when turning this up because that's crazy loud One, two, three Hello, persons Welcome to this place Welcome to this place Hello I'm going to try and cut the tail so we have a very, very short sample of noise All right Oh, it needs to be under 1,000 milliseconds because the sample All right, so here is one millisecond of white noise Okay This is how one millisecond of white noise as an impulse response sounds like Now let's go to two Two milliseconds of white noise Okay, we have some weird combing going on Three, four It's getting louder and it's getting weirder Hello It's like a, this is like Let me turn this down a bit This is like audio blur This is like a, like, yeah, this is a motion blur This is like motion blur in audio form Now Okay, let's turn this off We can do some other weird things like What if we apply a phaser to this? Whatever, man Just apply it Oh, I'm just going to play the sample Okay, now you know how it sounds It's like white noise pushed for a phaser But what it would really do, but what it would really do, but what it would really do What it will do to our voice Mix it up So it's just a bunch of Part of this effect and part of the normal start Or let's cut the tail All right So what the hell is that? What is this? This is a phaser All right, so you can see that this technique of convolution Can reproduce various effects It can capture, modifying an amplitude of sound in time Also, the amplitude and frequency Per frequency amplitude of sound in time What it can't reproduce is things like pitch shifting It can't excite one frequency based on another frequency It also can't do things like distortion Because that would mean creating frequency content where there was none So you can't capture guitar distortion pedals with impulse response But you can capture reverbs And I've also captured a spring reverb in a guitar cabinet some time ago And I'm going to actually play this to you And what is interesting is that Convolution is used in guitar emulation plugins To apply cabinet responses And here is a cabinet response of a guitar So if you've ever plugged a guitar into an amplifier, you know this sound This is what happens when you plug the cable into your amp And then plug it into the guitar You hear a bunch of these pulses So what I've did is I created this Dirac impulse And I played it through the guitar amplifier And I found the same when the reverb was turned all the way up And this is how it sounds This is the spring reverb of a guitar amplifier You can capture a bunch of things this way And you can do really crazy things with sound Because you can manipulate this however way you want Or you can do something weird Like record a super weird sound And use this as an impulse response and see what happens Let's do that Hello, person Welcome to this place Alright, that's pretty interesting You can hear a lot of echoes And I think it's because when I was squeezing this tissue pack You can hear it creates little tiny cracks and pops And I think every crack and pop is a wideband impulse Which is going to spawn an exact copy Or as exact as it can Of course with modified timing and frequency response But it's going to spawn a copy or an echo I think this is pretty mind blowing And I think impulse responses are pretty underutilized And not many people understand how they work And realize how powerful they are in sound design For example, I'm frequently using a sample of a firework going off A huge firework that I've recorded at a firework show That's great because it was the only firework going off in the neighborhood So I was able to capture this blast without any other noises around It just captured the... What a firework does It's an explosion in the sky What it does, it creates an impulse of energy That excites all the freaking trees in the diameter of 20 kilometers around Or less And the trees respond And the sound is amazing Let me play it to you So here is a firework shot I'm using one of the samples Let me show you what happens when you load this as impulse response And you can see it's stereo So we have left and right Or yeah, left and right I don't know The LSP plugin shows us that it has two channels with differentiating the colors Now, when I talk, it sounds like thunder This is the sound of a huge stage Welcome to the Unforced Sound Festival How you feel on internet? Show us some love This is a mono plugin We can use a stereo one to hear the full stereo effect So as you can hear, this reverb sounds amazing And it gives you this huge stadium or a huge festival feel And I'm using that I'm using this impulse response when I'm making big explosions Trying to give something that hugeness It's a great way to do it I believe these samples are available on FreeSound under CC0 I've uploaded these files so you can download them yourself and play around with them I think this video is long enough I hope you've found it useful and interesting And that you've learned something or two and feel inspired to experiment Just go crazy Put a sound recorder into your washing machine and bang on it Or... I don't know Maybe you could use one of these portable Bluetooth speakers to play back a sine sweep in a different place And then put it into this LSP profiler to capture the impulse response with decent quality Because this has a surprisingly good frequency response It's not perfect by any means You could also play the sine sweep to a good microphone and equalize the sine sweep So that you know how to emphasize some frequencies and the emphasize others to have as flat of a response as possible I want to do this sometime I don't know how to do that yet, but I want to figure it out Because then I could capture things like, you know, a storm drain How does a storm drain sound? I could just put this into the storm drain, put a sound recorder and capture that Get an impulse response And you know, a huge advantage of using the sine sweep over a clap is that You can play a sine through something like this, such a tiny speaker at a much higher volume than you could play an impulse So you're going to get a much better signal to noise ratio And also you'll be able to capture more of the environment, more detail I have yet to figure out how to use a portable Bluetooth speaker to play a sine sweep in an environment and capture that with a sound recorder I want to do this. If you manage to do this, let me know. If you find open source tools that can do something like that, let me know I want to see that Alright, so this is all for today. Thank you for watching I hope you've enjoyed it And learned something. If you have any questions or suggestions for future videos, please leave them in the comments I also would like to say huge thanks to everyone who's supporting me on Patreon and Liberapay Because these people help me dedicate more time to making videos like this And not doing other work And there's one more thing I want to show you, and that is when we were recording the intro for this video We've seen a really amazing tree in the forest And my wife captured some footage of it And here it is. So enjoy I'm gonna go Hey you! What operating system are you running? Arch, Arch just leave me alone