Creating Shazam in Java (2010)
royvanrijn.com
Creating Shazam in Java (2010)
1–10 of 38 posts
Re: Creating Shazam in Java (2010)
#2[0] https://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf
Re: Creating Shazam in Java (2010)
#3[0] https://www.royvanrijn.com/blog/2010/06/creating-shazam-in-j...
[1] https://www.royvanrijn.com/blog/2010/06/music-matching-part-...
Turns out he was contacted and threatened by some patent lawyers from Shazam for writing the above blog posts:
[2] https://www.royvanrijn.com/blog/2010/07/patent-infringement/
[3] https://www.royvanrijn.com/blog/2010/07/patent-publicity/
[4] https://www.royvanrijn.com/blog/2010/11/patent-infrigement-p...
And of course, the original HN post:
[5] https://news.ycombinator.com/item?id=1496683
It seems he eventually just told them to go pound sound (!!). Good for him!
Re: Creating Shazam in Java (2010)
#4I think this old whitepaper[0] is a better description of how Shazam works. [0] https://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf
Re: Creating Shazam in Java (2010)
#5The most useful one to me is the `channels = 1; // mono`; it gives a second way that is often used to describe the value and saved me maybe half a second.
All of the words in the signed comment are useless except "unsigned", but I think that is a clear opposite of `signed = true`. The fact that the setting pertains to data in SOME way is super obvious.
The endian comment adds in the keywords little-endian and order, but if you don't already know what endian means, googling "bigEndian" would already get you useful results.
The `format = getFormat();` comment is the most useless to me because it actually confused me. I thought because there was a comment it couldn't be referring the code above. Additionally, the only additional info it gives me is the word "settings".
Re: Creating Shazam in Java (2010)
#6Re: Creating Shazam in Java (2010)
#7A more interesting story is behind the blog post linked in the article to someone else's implementation (which I also think contains a bit more detail than this one): [0] https://www.royvanrijn.com/blog/2010/06/creating-shazam-in-j... [1] https://www.royvanrijn.com/blog/2010/06/music-matching-part-... Turns out he was contacted and threatened by some patent lawyers from Shazam for writing the above blog posts: [2] ht…
Re: Creating Shazam in Java (2010)
#8A more interesting story is behind the blog post linked in the article to someone else's implementation (which I also think contains a bit more detail than this one): [0] https://www.royvanrijn.com/blog/2010/06/creating-shazam-in-j... [1] https://www.royvanrijn.com/blog/2010/06/music-matching-part-... Turns out he was contacted and threatened by some patent lawyers from Shazam for writing the above blog posts: [2] ht…
This was all making sense until the hashing part. To me it seemed that a slight change in recorded volume would change the magnitude and as a result the hash. Perhaps noramization over the recorded sample would help, but didn't see that. Still, I'm surprised the hash is so simple and still works.
This worked quite well for me. After running a "training-set" of sorts I created a small tool that ran over a quarter-million engineering drawings to get counts of each symbol from the set. (I'm going to hand-wave some implementation complexity here but essentially) If an exact match couldn't be found, the item being searched would show with thumbnails of it's nearest neighbours off to the side, you could select if it was essentially the same as one of those. (Sort of like "is this, this person" in Google Photos and the Apple equivalent)
The next step after this POC was to expand to discover symbols used most next to other symbols to use as contextual menu items in other CAD software to speed up drawing production, since a lot of time was spent placing a symbol, then stopping to text search the item you were placing next.
Unfortunately I was retrenched soon after and didn't get to progress. A couple of years later I took this a dimension further and was prepping for a PHD that would look at this for 3D-objects and models using naively generated voxel representations. Almost by accident I found group at/backed-by DARPA had a patent pending on a similar method. In retrospect I should have just gone all in on a photogrammetry based method since that kind of won out as a superior method - but it was still early days.
The moral of the story is that everything is pattern recognition and simple methods from before this last decade of ML/AI could do some cool stuff too.
Re: Creating Shazam in Java (2010)
#9A more interesting story is behind the blog post linked in the article to someone else's implementation (which I also think contains a bit more detail than this one): [0] https://www.royvanrijn.com/blog/2010/06/creating-shazam-in-j... [1] https://www.royvanrijn.com/blog/2010/06/music-matching-part-... Turns out he was contacted and threatened by some patent lawyers from Shazam for writing the above blog posts: [2] ht…