Yes. Shazam has a bunch of patents and has sued people before:
https://en.wikipedia.org/wiki/Shazam_(service)#Patent_infrin...
The core algorithm is well known and fun to implement:
https://www.ee.columbia.edu/~dpwe/papers/Wang03-shazam.pdf
A blog had a simple implementation of it and were contacted by Shazam's lawyers: