Vasilis’ nerd blog presents

Picking an LP record at random

We have a collection of LP records here at home. It’s not one of those wall filling record collections (yet), but it is quite large. And it’s growing. I discussed having a record collection with a friend of mine recently. He really has an enormous collection. He said he stopped buying new records (I’m not sure I believe him). Instead of buying new records, he picks records at random and then listens to them. It’s very likely that he hasn’t heard these songs for a long time. This gives him a similar sensation to buying a new record, he said. I kinda like this idea.

I’ve noticed that if you pick a thing at random from a physical row, items at the edges of this row have a lower chance of getting picked. This means that this idea of picking a physical record at random doesn’t work for me. Instead I used the discogs API to create a random LP picker for me. My record picker first checks how many records there are in my collection, then it picks one at random, it does some math to see on what page it can find the details about this record (there are 50 records per page), and then it shows the artist and the title of the record.

At first it simply showed a new title whenever I reloaded the page. This meant that I could cheat: If I didn’t want to listen to this record I could simply refresh the page. And again and again until it shows something I want to listen to. This beats the purpose. The purpose is to be surprised by one random album. So I rebuilt it to only show a new record after a certain amount of time. Ideally this would be after the duration of the record itself, but unfortunately the API doesn’t return this data. I set it to ten minutes for now: the average duration of a 7 inch single + the time to find it and put it on.