
Show HN: SameTunes – A Music Compatibility Platform for Spotify - garrepi
https://sametunes.com/
======
garrepi
Hey HN!

I'm one of the developers on the SameTunes team. We've spent the whole summer
working out of a house to build this platform. We're really proud of the work
we've done and hope you all enjoy using it.

With SameTunes you can view interesting statistics about your taste, find your
music compatibility with friends, and discover new music!

Let us know what you think

~~~
svantana
Nice work, it looks really polished! What I would suggest improving is the
single user experience: what I can do without involving friends. Right now I
only see a huge list of strangers in alphabetical order. Picking someone at
random seems pointless. However, if strangers could be sorted by match, that
could be really interesting. That could also serve as a benchmark for my
matchscore with friends.

If this is prohibitively costly in your current setup, I would suggest mapping
each user profile to an embedding vector and find best matches using
approximate nearest neighbors, that scales really well.

~~~
garrepi
I agree 1,000%.

When building out the platform, efficiency was a foremost consideration.
Because of that, each comparison calculation flies.

That's a good implementation suggestion, it reminds me of the adjacency matrix
Twitter uses for mutual friends.

I'm drafting up proposal for your idea now, it serves a really strong
introduction to the platform.

Thanks!

~~~
LolWolf
I think the embedding idea in specific is quite good and there are several
potential approaches! One is, if you let xᵢ be the song vector for user i
(whose kth entry is 1 if user i has song k in their library and 0 otherwise).
Then you can compute the "overlap" by something like xᵢ ⋅ xⱼ (with some
normalization of course!) where ⋅ is the inner product. [0]

A simple approximation of this inner product would be to generate a random
(potentially sparse!) matrix S whose nonzero entries are i.i.d. Gaussian, for
example, and whose number of rows is much smaller than the number of columns
[1], then you can instead store and compute

    
    
        (Sxᵢ) ⋅ (Sxⱼ)
    

which gives you an approximate overlap, whose storage and computation
requirements are much smaller for each user (since Sxᵢ is much smaller in
number of entries than xᵢ).

\-----

[0] Of course, there are many other similar methods! This is a particularly
simple, but often fairly effective one.

[1] More specifically, it goes like O(log(n)/ε²) where ε is the error you wish
to achieve. Often, a fairly large choice of ε actually will suffice. See
[https://en.wikipedia.org/wiki/Johnson–Lindenstrauss_lemma](https://en.wikipedia.org/wiki/Johnson–Lindenstrauss_lemma)

~~~
garrepi
Brilliant.

Through the Spotify API we are given locational and positional data on some
music objects. Your proposal to structure songs as vectors opens up a lot more
flexibility for storing, weighting, and manipulating that data.

The way in which the overlaps are calculated is crucial to our platform,
something like feeding the dot product into a weighting matrix would leverage
this structure really well.

Your proposal is very similar to how comparisons are currently computed on
SameTunes. But, leveraging existing mathematical theorems and restructuring
the algorithm with linear algebra in mind would help a ton with some of the
noise and normalisation issues we've experienced.

I really appreciate you taking the time to draft that out!

~~~
LolWolf
For sure! It’s a cool product (I got two people who messaged me about it this
morning, before I even saw it on hn) and it’s pretty fun. Good luck with it!
:)

------
tunesmith
I guess the point is that it compares your favorites with friends, so you can
listen to what your friends are listening to? My friend link is
[https://smtn.es/4973.99538c0985](https://smtn.es/4973.99538c0985) if anyone
wants to try.

------
javier10e6
Any app that wants my personal info to "connect me" from the get go creeps me
out. Spotify already connects me with others. Although I find spotify UI a bit
obtuse and their music suggestions moronic. I would be more interested on a
mobile platform that connects me with independent artists (aka fresh
music)...like Soundcloud combined with music guaranteed to get it right on
suggestions not because some computer algorithm but because they have
competent curators...Like Calmradio.

~~~
garrepi
That's totally fair. I wish Spotify gave us more granularity in the data we
ask for, I don't think we need the blanket permissions a user has to grant us
(as someone who just deleted their Facebook and soon Google accounts, this is
really important to me).

We've reached out to a lot of local artists here in Atlanta and hope to use
the platform to recommend and share their content to those interested.

Hand curating playlists is also a big feature we've been toying with. That's
where something like Apple Music's hand crafted playlists are usually a lot
stronger than Spotify's computed playlists.

I haven't heard of Calmradio, it's exactly what I've been looking for! I've
resorted to listening to music through a cheap FM radio to try and break out
of the algorithm hell Spotify tends to put me in.

Thanks for sharing!

------
solarkraft
Finally. It's such a simple idea, I've been waiting for a long while. Is there
something like this that takes more profiles into consideration?

~~~
garrepi
That's definitely something we're focusing on more now. Like qnsi mentioned,
last.fm does a pretty good job of that -- I've been a fan since high school.

We, SameTunes, have an advantage when it comes to calculating a user's
affinity for songs, artists and albums. Last.fm ranks your music by tracking
how many times you've played (or "scrobbled") a song, songs by an artist, etc.
SameTunes uses additional data Spotify publishes (like position in a created
playlist, occurrences in your liked music, etc) to build a more well rounded
representation of your music taste in the past and present.

There are definitely features we can, and plan to, add to help better portray
this data to a user.

------
vjindal0112
Spent an hour with friends talking about our music because of this :)

------
yipyapyay
Cool idea, I just tried it out. Any reason you used PHP, and I assume a LAMP
stack, instead of something more modern?

~~~
DandyDev
It's interesting that these kind of false premises come up often on HN. Don't
get me wrong, I don't like PHP either, but nowadays. PHP is just as "modern"
as many other languages in use. And with frameworks like Laravel and Symfony,
it stacks up well against the likes of Ruby on Rails, Django or any NodeJS
based stack. And let's not forget that the majority of websites and webapps
runs on PHP.

~~~
yipyapyay
I think that’s totally fair. I have a personal project that I’m getting
started on and I’m having trouble picking a stack to use. I hear a lot of
conflicting opinions on here. I’ve looked through the documentation for newer
frameworks like React and they seem really easy to get started with.

~~~
garrepi
I'm in no place to recommend technologies to chose (I'm no expert) but the
documentation argument is a good one. There are a lot of articles from the
past few decades introducing different odds and ends with PHP. Additionally,
PHPDocs are great but they're nothing in comparison to the tutorials and
examples provided by things like ReactJS' or Vue's official docs.

