Audio reactive visuals | TouchDesigner Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another acrylico tutorial please watch until the end for many tips and tricks you can use on your future projects before we move on I'd like to thank derivative as well as our patrons for their support please subscribe to the channel and turn on the notification to support us into making more tutorials like these for more tutorials and downloadable files check out our patreon and our gumroad there you'll have the chance to purchase toy files talks files HD and 4K renders for 20 off just type a code as a discount code on the checkout I'll leave all the links in the description now on to today's tutorial first I drag and dropped the track I want to use followed by a null then I'll add an audio device out to Output the track and in the parameter window I'll set the device to a virtual device I have then this will only allow me to record my voice and the audio at the same time in different channels so you don't need to do this step then let's right click after the null go to add operator and we'll add an audio Spectrum chop this will calculate and display the frequency spectrum of the input audio then let's right click and create a select and in the parameter window let's set the channel name to channel 1 since we only need the one channel displayed let's right click and we'll attach a trim chop we will use this in case we want to shorten or lengthen the inputs channels in the parameter window let's set both start and end units in fractions then by actually changing these values we can trim or append to the existing Channel now if we check out the info of this job we can see that the length is 48 000 samples per second this is very high and what we actually want is something closer to 60 FPS so to convert it to FPS we're going to attach a resample chop foreign and toggle on the time slice parameter this feature keeps our chop channels smooth even when our overall frame rate goes down or our timeline skips rates now if we open the info we see that the sample rate is where we want it but we have very little samples only 20. you can also recognize this in the graph you can tell that it's very edgy and this is for the lack of samples for the animation we want to do some instancing and we'll be needing around 1000 samples if we were just to stretch this then we'll have more samples but they'll still be edgy so instead let's first change the resample method to new rate new interval since we want a new range of 60 as well as a new longer interval so to set a new interval let's change the unit value to Absolute and the end value to a thousand here let's make sure also that the unit of the N value is set to samples instead of seconds otherwise we'll end up with too many samples again great now we have 60 samples per second and a thousand samples press alt and N while clicking to create a null after the resample and now we're going to convert the whole thing to Tops by adding a chop to top converting the whole thing to Tops will set the size to a thousand and in a mono 32-bit format we need to remember this for later for the sizing of the particles now let's attach a noise after the null foreign go to the output Tab and will only output the noise back to the noise tab toggle off the monogram and then in the common tab let's change the format to a 32-bit format [Music] let's attach another null after the noise and we'll rename this to position color it red and we'll use this later for the instant sync [Music] let's attach another Knoll this time after the chop to top and we'll rename this to size [Music] great now let's create the actual instancing Network and then we'll come back here to tweak the values let's press Tab and create a box swap right click and attach a transform right after we want the size of the boxes to be really small so let's set the uniform scale to 0.001 let's right click after the transform and attach a geometry later we're going to attach the rest of the comps but first I'll split the screen and set the second screen to Geometry viewer then let's right click and make sure that the Adaptive homing is not activated this will keep the animation from being messy once we make it audio reactive great now let's open the geometry parameter window go to instance toggle on the instancing then drag the positional and drop it onto the translate RP then set RG and B for translate x y and z then let's drag and drop the size onto the scale and set the r channel for all three scale parameters okay now maybe the boxes were a little too small so I'll go back to the transform and decrease the uniform scale to 0.01 instead and another thing we notice here is that the boxes are positioned on this side of the coordinate system and I want to position them on the origin the reason why the visuals are positioned like this is because the noise we added goes from zero to one so if we attach a mass after the noise and set the two range -1 to 1 then the boxes will move towards the origin foreign now here we notice that the size of the instances is already reacting to the music whereas the position not yet we notice the boxes are not actually moving so let's see how we can fix this we know that this null down here contains the audio data let's go ahead and attach and analyze chop after it the analyze job will look at all values of the channels and will output a single number result based on a function we choose so for example the average function will output the average of all Channel values great after the analyze let's attach a Speed Shop thank you the Speed Shop takes speed in unit per second and converts it to distance in units over a Time range so it will take a chop rate as an input and it will output a cumulative value this is like calculating the integral in physics where the curve is the incoming Channel values over a Time range and the output is the area underneath to visualize this let's see with the help of a trail chop if we use the speed chop and we send a constant job channel that has a value of 1 then the Speed Shop output will increase by 1 every second if we feed it 10 it will increase by 10 every second and if we feed it 0 the output will not change so positive values will increase the accumulated value whereas negative values will decrease it and the further the value is from zero the faster the accumulated value will grow this property makes the Speed Shop a great operator to use for audio reactive animations hopefully this is understandable let's attach a null after the speed and we'll use this to translate the position data of the noise the noise is already connected to the position let's open the parameter window go to the transform Tab and in the translate Z parameter we'll drag and drop the null as a chop reference great and there we have the audio reactivity as we saw before when the music is low the movement is also slow and when it speeds up we also have more movement this looks really nice and up to now we're still on the default values of the noise parameters we can play around later with these values one thing that bothers me here is that the size of the boxes is so small at the parts where the audio is low what we can do to improve this is set a minimum value of the size and then have the boxes grow from this minimal value we'll do this by adding a mass operator before the size go to the multi-add tab and in here we'll increase the pre-add value this value is going to get added to each pixel of each Channel I'll set this value to 0.3 this will guarantee that we'll be able to see the boxes all throughout the track even when the audio is very slow foreign [Music] if we were to add another mat and increase the multiply instead then this will increase the size of the boxes whenever the kick of the music hits great this already looks very nice so you can decide to skip or change the parameters of the noise to your liking foreign let's create a camera comp a light comp and a render top I'll switch the top viewer and attach a null at the end of the network you know I'll call it BG for background and turn the display on [Music] before the null I'll attach an RGB key to get a black background now for some post processing let's attach a Bloom from the palette in the parameter window here we can change the parameters to give it a different look then let's attach a blur before it's a bloom and you can go back and forth with changing the parameters and try out different versions thank you and if you want to use other colors just add a look up top after the RGB key with a ramp in the second input and select other corners [Music] and this was it for this tutorial a second tutorial based on a similar technique but with more advanced usage is already on our patreon for everyone who is interested otherwise thank you so much for watching until the end I hope you enjoyed watching and learned something useful if you have any suggestions or questions leave them in the comments and I'll see you next week with another tutorial until then have a great time bye bye foreign
Info
Channel: Acrylicode
Views: 37,404
Rating: undefined out of 5
Keywords:
Id: G4wyR-Nxyzo
Channel Id: undefined
Length: 13min 42sec (822 seconds)
Published: Fri Dec 09 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.