Back in the days when I used to use Snap! quite often I asked for project ideas. I dont remember exactly who, but I think it was bh that suggested I make a audio hash system like Shazam. I tried, and tried again but couldn’t, the main issue was that I didnt understand exactly how these systems work. After pushing myself non-stop I feel I am at a point that I can revisit this topic, and I would love to work with everyone that is interested. Currently im working on designing a fully working framework outside of Snap! And then I will work on bringing each bit into Snap! For what I know now is that we need to perform a FFT (Fast Fourier Transform) algorithm on imported songs. If anyone knows if this is possible or how to do this please share!!!
Snap! will do the FFT for you if the sound comes from the microphone. That’s what
does.
What about if it doesn’t. Because we also need to fingerprint the full song.
I dunno. Afaik we don’t have an FFT library, but you can look up the algorithm.
The processing required to do this seems to be quite resource heavy. If I made (which I dont even know how) some library with audio tools would it be able to be implemented. (Similar to how the JS in MQTT works.)
i honestly have no clue how to use that. but this is pretty much my code for doing everything. Hash?
You want to implement audio fingerprinting like a SHAZAM does?
can do crucial part of the algorithm with the FFT blocks pointed out by Jens and Brian (for “live” audio). But there is still more to do.
You’ve already done some ML projects, maybe constallation map created by the fingerprinting can be processed by a pattern matching.
working on that rn!
realistically hashing the 10 sec comparison recording takes quite a long time. hashing is a repetitive system and snap! isnt so good at processing those.
tho i did finish coding the hash system. comparison is just simple but im wondering if its worth completing
1 its incredibly slow, if you have any idea on how to make it way faster, I would love to hear. this code generates hash’s not compares them but comparing is quite simple, if I was able to make this a lot faster, I would recreate the pairing algorithm.
I can’t run your code, to much missing parts…
But
-
(JS) Audio data is resampled @ 11025 rate before processing
-
Chunk can be extracted with single line
-
(JS)
Frame_Peakshandling is limited to elements <10,120>@Spectrum -
Peak detection can be done with hyperblocks
applied to
What missing parts.
Global variables, sounds…
Other then sounds when you import it does it not bring the global variables with it? I believe it should be quite simple to run
the peaks system you have doesnt have the data my peaks has
also some parts of the fingerprint are missing anchor times if you could figure out where thats going wrong i would love it.
EDIT:
also looking at the responses from the html code and i dont know why it doesnt match up with the snap! code.
use a “scripts pic” to import a whole sprite into an image.




