Advanced Audio Visualizer in Blender [Animation Nodes] | English

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's up linda users i'm jonathan and in today's video i'll show you an advanced way of visualizing your music in blender we'll use blender 2.93 and animation notes i put a link to both downloads in the video description the plan is to use a midi file instead of pure audio to drive the animation oh and by the way you can download the project file from my gumroad for free and with all that said let's get started first we need some piano keys again you'll find the full model on my gumroad page but these are actually quite easy to model we can just download a reference image from google and import it into blender with shift a image reference and then select your reference image we want to clear out its rotation with alt and r and now we can go into top view and using cubes in wireframe mode we can just trace the individual keys now we can eyeball the set scale to what feels right and use boolean modifiers on your keys with different cubes as cutters to cut out parts we do not need just like this now it is also important to use bevels because keys aren't this perfectly sharp around the edge and you always want to make sure you have the scale applied and now you can turn down the amount and up the segments and also shade your model smooth you can see that i used some more cutting right here on the edge to create this little detail these keys right here are also just cubes that i placed on top of them and then scaled them down and scaled the bottom vertices right here so they fit correctly and then i was able to just extrude this cube downwards just like this and i had this shape right here you then just need to complete one full octave with 12 keys and you're good to go once you've created your full octave you can just go ahead and duplicate it until you get keys you can see that i needed to duplicate the octave 10 more times but the last octave is just 8 keys long why we need 128 keys is something i'll explain later now what will make our job a lot easier is to rename all your keys from 1 to 128 you can see that i'm displaying the names of every object right now you can do this under viewport display name and by the way if you are in such a situation right here and you want to change a setting of all of your objects you can select all of them change the setting of the active object and then right click it and choose copy to select it this way you can for example easily display all of the names of your objects now again if you do not want to rename these objects manually you can download this model from gumroad okay great now we need to get the midi file ready and apply the animations once understood this process is actually pretty simple i will create the midi file in cubase but you can do this in any daw now let's create a midi track and write down some notes and now you can also see that a midi file can store up to 128 notes and this is why we modded our piano in blender with only 128 keys great so i just write some notes just like this and now i'll set the start and end point correctly and go to file export midi file make sure that you only export one midi track because if this is not the case we might run into trouble later okay great the midi file is exported and now we can worry about animation notes and the actual animations so let's open a new window in blender and go to animation notes of course you'll need to install the addon to get to this point let's create a new node tree and make sure our execution is enabled to read a midi file we need the according node so let's press ctrl and a to directly go into search mode and search for read midi file and now under path just select umidi file great you can see that we have a list output and it puts out the different midi tracks this list should just have one entry because we exported only one track and pressing w and choosing viewer will show us that yes the length is one all of the data in here is not really necessary for us to see so let's delete the viewer node now we can select the node get list element this will allow us to input a list and get the first index which is index 0. if we again apply a viewer node with w you can see that we get our only midi track as an output we now want to evaluate this midi track so we actually get the values for each individual node for example we played a g first meaning that on the first few frames the node g4 should have a value of 1. we can use this information to apply a certain rotation to the g4 key so let's go ahead and search for evaluated midi track and input this node now let's change the mode to all because we want to get all the values for every single node and input our midi track we don't need to change any other values we only need to use the frame node as our time info now we should get a list of every single note from 0 to 127 that will show us if a note is played or not the only thing that is left to do now is to loop through all of the objects and apply rotation when the node is played press w on the evaluate midi track and choose loop through node values this will automatically create a loop sub-program for us that we can use you can see that inside our loop we have three values we can use first one is the index which if we view it is always at 127 because the loop is running so quickly and the iterations which is 128 we also have the according node output so let's rename this value to active key basically what we do is we check the index which is between 0 and 127 and then check if the key is active if so we want to apply rotation okay great to get the according object let's search for the node object by name and now we want to use the index as the object name again we can do this because we renamed the objects to one two three and so forth to use the index value as a name we can use the convert to text node and input the index as data now plug the text into the object by name node but there is one problem we have and this is that i started at 1 when renaming the keys but the index starts at 0. so what we need to do is add in a float math node and add 1. now we cannot just use float as our data input because this will add a decimal point we need to use the float to integer node between both of those now this should work fine to apply the rotation we need to use the object transform's output node this takes an object as an input and now allows us to apply rotation we only need rotation on the x-axis so let's do this right here you can see that if i now change the rotation all of the keys are being rotated so applying the rotation isn't an issue and that's great so now we need to use the active key output as our rotation again the active key can only be 1 or 0 but i personally like rotation of 6 degrees so let's again put in a float math note and multiply this value by 6. now to input this into our rotation i want to use the combined euler node and input the result into the x input also all of these values are in degree so let's check use degree and input this euler output into the rotation input and now you can see that only one key which is g4 is being rotated great let's play the animation and you can see that everything works as expected there's just one thing i forgot to tell you and this is that for the correct rotation you of course want your orientation to be at the very end of the key right here again you can change this for all keys at the same time by selecting everything and under tool select only effect origins and now with the move tool you can move the origins great and yeah that's basically it this is how we can use a midi file to drive a piano animation if you found this tutorial helpful and if you learned something consider liking and subscribing and we'll see each other in the next video next saturday [Music]
Info
Channel: Jonathan Kron
Views: 20,128
Rating: undefined out of 5
Keywords: Jonathan Kron, Blender, Tutorial, Eevee, Blender Tutorial, Blender Beginner, Blender Adudio Visualizer, Audio Visualizer, Blender 2.82, 2.8 eevee, Blender Abstract, Abstract, Blender Guru, Intro To Blender, Intro To Blemder 2.8, audio, visualizer, fast, blender audio visualizer, blender audio visualizer tutorial, blender tutorial, blender eevee tutorial, 2.8, blender 2.8, blender 2.8 tutorial, blender music tutorial, music, blender audio tutorial, classes, education, teaching, learning
Id: 49feT0SlLxg
Channel Id: undefined
Length: 9min 28sec (568 seconds)
Published: Sat Mar 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.