Redcode
redcode.nl · Personal blog · on HN since 2010
A Dutch developer blogs about Java programming, including how he built a Shazam-style music recognizer and the patent issues that followed.
What HN saysHN links it for "Creating Shazam in Java" and the follow-up on patent infringement threats; commenters note no lawsuit appears to have followed.
20HN people shared it
13linked it in comments
13stories submitted
560story points
12 years agolast shared
2010people per year2026
Most-shared posts
- 1Creating Shazam in Java9 people · 470 points · first shared 2010 · 42 comments on HN
- 2Creating Shazam in Java - Patent Infringement6 people · 1 points · first shared 2011 · discussion on HN
- 3Patent infrigement (part 2)4 people · 1 points · first shared 2010 · discussion on HN
- 4Why is this Java raytracer slower than the JavaScript version?3 people · 48 points · first shared 2012 · 1 comments on HN
- 5Great Code Is Written Twice1 people · 15 points · first shared 2011 · discussion on HN
- 6Female coders, lighten up1 people · 13 points · first shared 2012 · 15 comments on HN
- 7Dinosaurize your street1 people · 5 points · first shared 2010 · discussion on HN
- 8Tool to turn your iphone location tracking into a map1 people · 3 points · first shared 2011 · discussion on HN
- 9Fact: The Agile movement is a marketing stunt from 3M #arthurfryday1 people · 2 points · first shared 2012 · discussion on HN
- 10Introducing mandelbulb.js: 3D fractals rendered using open source Javascript1 people · 1 points · first shared 2012 · discussion on HN
- 11Devoxx 2011: Shazam-like in Java talk1 people · 1 points · first shared 2012 · discussion on HN
What HN people wrote when they linked it
willvarfar · 2013-05-17
Update: I posted a link to some source code that implements the Shazam algorithm:
https://news.ycombinator.com/item?id=5724442
About the patent lawsuit thing:
As I understand it, Shazam sold their patent to Landmark Digital Services, which are a part of BMI the record label. They kept an exclusive license to make Shazam-like software for phones.
You can imagine BMI wanting it to make money from how a service such as Youtube fingerprints and detects copyright infringement...
And it was this BMI company that were trying to get this blog post explaining the patented algorithm removed from the internet.
One post from the BMI lawyers to Roy in the Netherlands was particularly broad bullying:
> Mr. Van Rijn,
> The two example patent numbers that I sent you are U.S. patents, but each of these patents has also been filed as patent applications in the Netherlands. Also, as I'm sure you are aware, your blogpost may be viewed internationally. As a result, you may contribute to someone infringing our patents in any part of the world.
> While we trust your good intentions, yes, we would like you to refrain from releasing the code at all and to remove the blogpost explaining the algorithm.
> Thank you for your understanding.
> Best regards,
> Darren
> P. Briggs
> Vice President &
> Chief Technical Officer
> Landmark Digital Services, LLC
Roy gave a great talk at Devox about this: http://www.redcode.nl/blog/2012/03/devoxx-2011-talk-freely-available/
I think I heard that…
zio99 · 2012-07-10
I've spent some time pondering over this, so here's my 2 cents:
1. Build your product first.
2. It's expensive. If you still believe your idea is unique[1], hire help.
3. Algorithms are not patentable. Systems and methods are.
See: http://paulgraham.com/softwarepatents.html
If you want to patent an algorithm, you have to frame it as a
computer system executing that algorithm. Then it's mechanical;
phew. The default euphemism for algorithm is "system and method."
Try a patent search for that phrase and see how many results you
get.
4. It's a long process. See PG's footnote:
[3] Applying for a patent is now very slow, but it might actually
be bad if that got fixed. At the moment the time it takes to get a
patent is conveniently just longer than the time it takes a
startup to succeed or fail.
and this: http://paulgraham.com/startupfaq.html
There are two kinds of patent suits:
1. Random people suing you in the hope of getting money.
2. Competitors suing you in order to destroy you.
Until you're successful, you won't have to worry about the first
type. And once you are successful, you'll inevitably have a lot of
them to deal with, valid or not. So fatalism is the right plan for
type 1 suits.
and the classic: http://paulgraham.com/wealth.html
One way to put up barriers to entry is through patents. But
patents may not provide much protection. Competitors commonly find
ways to work around a patent. And if they can't, they may simply
…
henrik_w · 2014-11-20
Related: Creating Shazam in Java http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/
HN discussion: https://news.ycombinator.com/item?id=5723863
More Shazam-related: https://hn.algolia.com/#!/story/forever/0/shazam
androidb · 2013-05-17
It happened 3 years ago and there was nothing posted after 2010 on that issue anymore, so I believe they didn't file a suit in the end.
Here's the links to the infringement story for those that missed it:
http://www.redcode.nl/blog/2010/07/patent-infringement/
http://www.redcode.nl/blog/2010/11/patent-infrigement-part-2/
chinmoy · 2013-05-17
This is an awesome blogpost from 2010 about making Shazam in Java http://www.redcode.nl/blog/2010/06/creating-shazam-in-java Later Shazam threatened the author with a lawsuit.
nitrogen · 2012-07-16
This comment (http://www.redcode.nl/blog/2012/07/java-speed-of-math/#comment-4306) reminded me why I learned Ruby instead of Python: the flow of Python code becomes completely unreadable when whitespace gets mangled.
bmelton · 2011-10-11
This is almost exactly the technology behind Shazam, which has a fairly extensive catalog. Shazam 'listens' to a song when you hit a button and captures microphone data from your phone. It then takes that recorded data and listens for 'key points', which it hashes and uses to compare against its catalog.
If you want to know more about how to implement it on your own, you could use this as a resource: http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/
I assume the biggest drawback to be that Shazam uses a microphone, which is obviously subject to ambient noise. Shazam doesn't actually seem to have much of a problem with this, but I'm guessing a passive listener that sampled the audio output device instead of a noisy ambient microphone would work much more reliably.
chl · 2011-06-23
Given how threat-, or, let's say, notification-happy Landmark was just a while ago [1], does anyone have an idea regarding the patent situation? Is this implementation different enough to be considered (reasonably) "safe"?
[1] http://www.redcode.nl/blog/2010/07/patent-infringement/
zackattack · 2011-06-03
There was a cool HN article a while back on building your own Shazam clone in Java.. I think the author received a C&D..
Found it!
http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/
damncabbage · 2011-05-26
How long until "Landmark Digital Services LLC" come knocking?
http://www.redcode.nl/blog/2010/07/patent-infringement/
fanf2 · 2011-03-18
j-g-faustus · 2010-09-17
Here's a starting point, how to do it with music:
http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/
You chunk a song into small segments and create a sort of "fingerprint" for each piece using Fourier analysis or similar. (So a song segment is represented by a frequency histogram, similar to this: http://www.flickr.com/photos/svartling/4229109164/ )
The fingerprints are stored in a DB.
To match a song fragment, chunk and analyze it in the same way. For each segment, find the closest match in the database. If most of the closest matches belong to the same song, and appear in the same order as in the song fragment you are trying to find, you have a match.
Creating fingerprints from a series of video segments is roughly similar, Fourier can be used for 2D images as well.
Doing it like this, you can reduce the volume of data you need to compare against with several orders of magnitude. Scaling to YouTube volumes is still hard, but that's the sort of scaling a company like Google already has plenty of experience in.
earl · 2011-06-05
NB: Shazam is run by raging assholes who like to threaten people posting code on their site to implement the algo described in the paper [1:4]. Roy's site is still up, but you may introduce quite a lot of stress into your life by messing around with this interesting paper / technique.
In more interesting news, see [5] for a similar implementation in matlab, and [6] for Roy's java implementation.
[1] http://news.ycombinator.com/item?id=1496683
[2] http://www.redcode.nl/blog/2010/07/patent-infringement/
[3] http://www.redcode.nl/blog/2010/11/patent-infrigement-part-2/
[4] http://www.informationweek.com/news/infrastructure/management/22570275…
[5] http://labrosa.ee.columbia.edu/~dpwe/resources/matlab/fingerprint/
[6] http://www.redcode.nl/blog/2010/06/creating-shazam-in-java/