Skip to content

Blog

White Whales

White whale (noun): The record you have spent a long time, sometimes years, searching for.

In the record community, each collector has a white whale, one or two records they’ve been searching for yet cannot find. Unlike Captain Ahab, our white whales didn’t take half our leg, though. (I have no idea if other collectible communities use this term, but wouldn’t be surprised.)

Thanks to Discogs, it’s not hard to find your white whale, so I would add ā€œā€¦at a reasonable costā€ to the definition.

I started my record collection almost fifteen years ago, on Record Store Day #2. That was the day I bought a used turntable from Craigslist and the first records I bought as an adult at Down in the Valley. As my collection has grown, I’ve become much more pickier about the albums I buy. And in 2023, I got lucky and found both my white whales, from bands you probably haven’t heard of.

First up is Free Energy’s Stuck on Nothing. The debut album from this alternative power pop band from Philadelphia by way of Minneapolis that featured a few members from the defunct band, Hockey Night. Free Energy was signed to LCD Soundsystem’s record label, DFA, and Stuck On Nothing was produced by LCD Soundsystem’s James Murphy.

Two or three copies were for sale, all around $65 - $75, which was way more than I wanted to pay for the record. But then one popped up for $30, but it had a two inch tear in the jacket. Right after that, another showed up for $40 from a new seller and I jumped on it. Being a new seller, they didn’t have any customer ratings, so I would be taking a chance on not getting scammed, which has been happening more frequently on Discogs.

I took the chance and the record showed up quickly and the jacket was in great shape. The record was filthy - I’ve never seen a record so dusty. A trip through the spin clean and it was good as new.

Whatever happened to Free Energy? They released a second album in 2013 and then broke up. I saw them play on their final tour and it was the last show I saw at the Triple Rock (RIP). One of the members went on to have a Kickstarter campaign to make vegan jerky from eggplant.

My second white whale is the record Under the Blacklight by Rilo Kiley, featuring Jenny Lewis, one of my favorite singers..

The band was active from 1998 to 2011, famously getting their start thanks to Dave Foley of Kids in the Hall. Under the Blacklight would be their major label debut after 3 records as an indie. Released in 2007, it would be their final album.

This time I got lucky. Each Black Friday, Record Store Day does a smaller version of itself with special editions, new releases, and represses released for Black Friday. This year, Rilo Kiley’s Under the Blacklight was repressed with 6000 copies made going to all the local record stores around the country.

But would my record store have it? I’ve skipped the last four or five Record Store Days and Black Fridays. But after missing out on the Dee Gees (the Foo Fighters EP of Bee Gees cover songs) a couple years ago, I wasn’t going to miss a shot at my white whale.

Down in the Valley opens at 9:00 a.m. for Black Friday and tt took most of my will power not to leave after I woke up shortly after 5 a.m. I got there about 7:45 a.m. and I estimate I was 30th in line, which would grow to over a 100 by the time the store opened. About a half hour before the doors would open, an employee was going down the line randomly asking people what they want, and usually give them the bad news that it wouldn’t be available by the time they got in the store.

But not me - when I asked his response was ā€œOh, we have plenty of those!ā€, which helped make the wait go by a little faster. Once in the store at about ten minutes after opening, I picked up my copy of Under the Blacklight (in translucent purple) and also picked up the recent re-issue of Prince’s Diamonds and Pearls.

Now that I’ve acquired two of my most sought after records, it’s time to think about what I might search for next... and that would be 1989’s March by Michael Penn.

In front of my record player lay two albums, on the left Free Energy's Stuck on Nothing and on the right, Rilo Kiley's Under the Blacklight

Introducing SongMatrix

I listen to music. A lot of music. If I’m in my home office I’m usually listening to a record, and if not, the radio. But I’ve always been an album person, not into playlist (or mixtapes to date myself). I’ve found by listening to albums front to back, I don’t always learn the song names.

Just a few weeks ago, I came across the shazamio Python library. I have a Raspberry Pi already sitting on my desk. I also have a couple extra 64x32 RGB Matrices and I recently picked up one of the new Adafruit S3 MatrixPortals, so I have the hardware and software to start a new project.

Enter SongMatrix (GitHub).

SongMatrix records a short audio sample on the Raspberry Pi and then sends it to shazamio to be identified. It then sends a MQTT message to Adafruit IO’s MQTT broker with the song title and artist. The MQTT message is received by the S3 MatrixPortal, which then scrolls the song and artist on separate lines, like so:

A 32x64 Matrix displaying the song Breathing Underwater on the top row and the artist, Metric, on the bottom row

I whipped up a proof of concept for the Python part of recording audio and sending it to shazamioin one Friday evening. The CircuitPython part took me a couple weeks and I’ll share some of the challenges in upcoming blog posts (no promises).

A special thank you to todbot for bootstrapping some asyncio code to get me started. And to anecdata for spending a good chunk of yesterday helping me get around the last issue and getting to done. (Well, it’s never done).

MatrixPortal Album Art Display

A year and a half ago I made some progress on displaying album art on a MatrixPortal and 2 32x64 RGB matrices using CircuitPython. I was never really happy with the results and using two 32x64 matrices instead of one 64x64 matrix was difficult. I moved on and re-created the project using a PyPortal Titano. It worked well: when I chose an album I wanted to listen to SilverSaucer.com, my FastAPI web app would convert the image and send a MQTT message. The PyPortal would listen for the message, and when a new message arrived, download and display the album art along with a Winamp skin that also showed the artist and album name. I should have blogged it and taken a picture!

When Adafruit announced the new S3 MatrixPortal with so much memory - 8MB flash and 2 MB of SRAM, I decided to try again. My hope was that with that much memory, I could download and load the image into memory without having to save it.

I haven't figured out how to do it without saving the image to the MatrixPortal yet, but I was able to repurpose my original code and had it up and running in just a few minutes.

Now came the hard part: adding gamma correction to the image so it looks closer to normal on the MatrixPortal and not washed out. Adafruit has a great Learn Guide for Image Correction for RGB LED Matrices. The guide includes a CPython program that uses Python's PIL / Pillow library to manipulate the image and some logic to apply gamma correction.

I needed to re-create that program, which used command line arguments where you would pass the image name to the program, as one function within my FastAPI app. It took a few days of banging on it (and a few hours lost to a wrong indent(!)), but I got it. The get_discogs_image function downloads the given image and converts it from a 600px image to 320 x 320px (for the PyPortal) and a 64x64 image for the MatrixPortal. The process_image function then takes the 64x64 image and applies gamma correction and saves a new copy (which the MatrixPortal will download and display).

Some albums look a lot better than others. Considering it's a 64x64 image, it's practically pixel art at this point. It's too bad that it's difficult to photograph RGB matrices, but here is a picture showing Divine Fits' album, it being chosen on SilverSaucer.com, and the converted image being displayed on the MatrixPortal.

Divine Fits

The CircuitPython Show Returns

After being on hiatus since December, I'm happy to share that The CircuitPython Show returns this coming Monday, April 10th.

I've got some great guests lined up, including authors, board designers, developers, and more.

Make sure you're subscribed in your favorite podcast app and the new episode will hit your earbuds this Monday!

Thanks for listening.

Favorite Albums of 2022

I shared this on Mastodon, but in an effort to (maybe) blog more, here are some of my favorite albums of 2022. I'm sure I'm forgetting some. In no particular order:

  • Spoon - Lucifer on the Sofa
  • Metric - Formentera
  • Muna - Muna
  • Yeah Yeah Yeahs - Cool it Down
  • Frank Turner - FTHC
  • Taylor Swift - Midnights
  • Chastity Brown - Sing to the Walls
  • Hatchie - Giving the World Away

Spoon gets a special mention - the remix album, Lucifer on the Moon, is just as good as the original.

The CircuitPython Show Year One

As 2022 comes to a close and I look back at the first year of The CircuitPython Show, I just wanted to say thank you.

Thanks to everyone who listened to the podcast, was a guest, or left a review. The support I received was phenomenal - thank you!

After wrapping up season 2 a few weeks ago, the show will return in 2023.

Next CircuitPython Projects Up

I couldn’t resist the recent holiday sales and I bought a few parts for my next two CircuitPython projects.

First up, is re-creating my Pi-Dial project using CircuitPython on a microcontroller instead of a Raspberry Pi and Python. This project controls Zone 2 of my home theater receiver, which is my home office.

Parts used include: * ESP32-S3 microcontroller (because it has WiFI and I already had a couple on hand) * 4 key NeoKey (used to change the inputs, such as CD, Phono, or Tuner and mute) * 1 Rotary encoder (to change the volume) * 1 2ā€ TFT screen

I already had a prototype working with the NeoKey and rotary encoder using the ESP32-S3. CircuitPython can send serial commands to my Denon receiver and I can do all of the functions I need, including changing the volume, inputs, and muting or unmuting the receiver.

For an enclosure, I’m going to use repurpose the WalkMP3rson project from Adafruit and 3D print a retro Walkman style player. I’ll need to modify it to permanently add the USB-C cable for power as it won’t be battery operated.

The biggest thing I have to learn is displayio. I don’t have any experience using displays in CircuitPython, but I’m excited because the WalkMP3rson project has a bunch of code I’ll be able to re-use.

Work in progress on the breadboard

My second project will be an IoT sensor to detect when I’m running low on water softener salt. I purchased a Time of Flight sensor that can measure the distance and connects to an ESP32-S2 Feather. It will then report back via MQTT the current measurement. I’m already running Home Assistant and I’ll set it up to report the measurement daily to my dashboard. I’ve used MQTT in one other project, but I’ve never integrated with Home Assistant. The biggest challenge so far is finding a 3D printed case that can hold both the Feather and a battery.

Those should keep me busy for a while. At least over holiday break!

Introducing The Bootloader

Having just passed the six month anniversary of The CircuitPython Show, I’ve decided to start a new podcast!

Introducing The Bootloader.

I’m teaming up with Tod Kurt and together we’re going to bring you a few interesting things we found around the web. We’ll each share up to three things, each one for a few minutes, but no more than five. That should keep the show right around a half hour, which is optimal.

The three things can be almost anything. It could be a news item, we could share a project we came across or following, we might highlight a maker and their work, or we could talk about a product we love (or hate). It could be news, it could be something older that’s new to us. Hopefully you’ll find it interesting, too.

You can subscribe to the podcast on all major platforms or via RSS (we'll be on Google Podcasts soon, but just add the RSS to your podcast app), follow us on Twitter, watch us on Youtube, or visit our website.

Give us a listen and watch the trailer here!

Six Months of The CircuitPythonShow

Today marks six months since the first episode of The CircuitPython Show dropped.

(Of course I haven’t blogged much about the show since then…)

I’m not even sure where to start. I think the show has found its groove now. From the feedback I’ve received, people seem to like the shorter interview format rather than the longer interviews the first few episodes featured.

It’s been pretty cool having the opportunity to meet and chat with community members on the show. I hope that comes through in the episodes as the big goal for the show is to highlight those in the community and get to know them in a different way than just their CircuitPython contributions.

In other news, I switched podcast hosts last week and went all in on Zencastr, which I already used for recording. This coming Monday’s episode will be the first episode distributed by them, so cross your fingers.

Thank you to everyone who has listened, told a friend, or guested on the show. I especially appreciate the comments and feedback about the show, keep ā€˜em coming! And don't forget to subscribe in your favorite podcast app...

SilverSaucer completed!

Just like that, I crossed the finish line and SilverSaucer.com is finished. I wasn’t planning on finishing it so quick after my blog post, but on Friday it just clicked and the ā€œOn this dayā€ feature was completed in just a few hours.

I always thought the ā€œOn this Dayā€ feature was a pipe dream. I had no idea how I was going to tie a Discogs release to MusicBrainz and then import that date. But after discovering the discodos app a few weeks ago and working with the database having clicked last week, I was able to finish it up after discovering a key feature: the LIKE operator in SQL and SQLAlchemy.

``` today = pendulum.today(tz="America/Chicago") print("Today: ", today, today.month, today.day)

if today.month < 10: search = "0" + str(today.month) + "-" + str(today.day) else: search = str(today.month) + "-" + str(today.day)

async with db_session.create_async_session() as session: query = ( select(Album) .filter(Album.mb_release_date.like(ā€œ%ā€ + search)) .order_by(Album.mb_release_date) ) print(query)

results = await session.execute(query)
query_results = results.scalars()

The Pendulum library comes to the rescue again as it is still my favorite way to work with datetime objects.

This returns a list of rows from the database where the results are today’s date, not including the year. (There is one bug related to 6/18 I can’t track down where it displays a different result - but not both - when an order_by is added to the query).

I’m pretty happy with how everything has turned out. I’ll probably do a couple more blog posts about the project, including reviewing the project goals.

It feels weird to be done. Not necessarily elation, not relief, just weird.