top of page
Search
Writer's pictureGabriel Priem

Frequency Band Expansion

This weekend I was able to refactor my code so it included greater amounts of detail in terms of frequency information being taken from the given audio source. Up until now, I was working with 512 samples divided into eight frequency bands which were looped through to edit the vertices on the mesh seen in prior videos. Now, I refactored the code to give me eight times the frequency information, a total of 4,096 samples divided into 8 sets of 8 arrays (or 64 arrays in total). The reason for maintaining the sets of 8 instead of going with a plain collection of 64 is to reuse much of the spectrum organization from the prior code as possible.


For example, the first set of eight arrays of frequency bands will represent the first 16 of 4,096 samples, while the eighth array will be the last 2,048 of 4,096 samples, so the higher frequencies, which our ears can perceive in greater detail, are represented accordingly.




The above code is the organization of the aforementioned changes. For the sake of this example, one tile is still in the scene, and an option called 'Band Selection' is listed at the bottom right of the image at the very bottom of the Unity Editor's Inspector column. This band allows the editor to select which band to use from the 8 sets created. For example, 0 is the first set, and only the very lowest frequencies analyzed in the given audio source will warp the mesh in the scene. In the following video, you can see the results of selecting different sets of frequency bands. Keep in mind, buffering will not affect this new code until I hook it up (next steps), hence the video demonstrates sharper changes as seen in much earlier videos.




1 view0 comments

Recent Posts

See All

Final Reflection Post

My piece is going through the last bit of fine-tuning as I prepare the visualizer for a presentation. Today I will be organizing...

Music Composition Pt. III

With this latest edition of the musical adjunct to my music visualizer, I round out the piece with different tones and chords that are...

Music Composition Pt. II

This addition of musical material includes expansion of the ambient themes. I am trying to make it at least slightly interesting to...

Bình luận


Post: Blog2_Post
bottom of page