So I got a little sidetracked when working on a coding project for my Subtraction class, but since the 4-axis mill isn’t working, I may not get a chance to do the project. So I am sharing the code here.
This is a musical visualization using the ml5 library for pitch detection. Implementation was difficult to manage since the example only works through the computer’s built-in microphone. To get the model to work on a musical selection, I had to put the computer’s mic up to the computer’s speaker while the sketch played the song using the p5 sound library. Also, the model’s shard files can’t be uploaded to the p5 Editor so I wasn’t able to upload it there. I used Atom running live-server locally. Either way, it should visualize something.
I was also happy with getting the Math.log() function to try to weight the frequency values differently. I want to look further into that for getting a logarithmic FFT instead of a linear one. I still have a long ways to go, but there’s a video below and the code here.