Managing classical music collections in iTunes in 2018

Like many, I use iTunes to manage my music library. Unlike most, I don’t stream music^[Partly because we live in a rural setting with slow and unreliable internet access, partly because I don’t trust that artists are getting properly compensated, and partly because I like to organize my music my own way.]. That means I have a large music collection - one that stretches the limits of iTunes’ organizational system. The overwhelming majority of the music in our collection is classical; and this is the source of the difficulty.

The problem

For background on why classical music is so poorly handled, read Robinson Meyer’s piece in The Atlantic “The Tragedy of iTunes and Classical Music”. Several issues make is difficult to organize classical works:

  • iTunes regards all music as “songs”. Of course, some classical works are songs, but most are not.
  • The mp3 metadata standard as originally released was incomplete and completely ignorant of organizational requirements beyond “song” and “album.”
  • And of course, much is driven by Apple’s focus on profits. For every classical enthusiast, there must be 1000 popular music listeners. There’s simply too little return on any investment in tailoring the software to meet the needs of classical music listeners.

Naming and metadata standards

  1. Use Work/movement designation - This considerably improves the organization of multi-movement works in iTunes.
  2. Use opus and number designations - Both should be abbreviated, op. and no. respectively. That’s lower case abbreviation followed by a period and a space. If the work is in a sequence, then No. is part of the title and should be capitalized as in “Piano Trio No. 1 in C minor" The # symbol is never used. A slash / is never used.
  3. If there is a catalogue number, then it should be used. The catalogue number should be the last element in the name of the work, separated from the remainder by a comma and a single space. Köchel numbers and Deutsch should be abbreviated K. and D. respectively. However Bach-Werke-Verzeichnis catalogue numbers should not use periods.
  4. Add metadata in track comments - Since iTunes does not yet have all of the metadata that I need to organize my music, I add additional metadata in the Comments field. Four elements comprise the metadata that I currently use: a) Musical form (symphony, concerto, sonata, etc.), b) Musical period (e.g. baroque, classical, etc.), c) Ensemble - solo, duet, trio, orchestra, etc. d) Highlighted instruments - a comma-delimited list of instruments that are featured. While iTunes provides a genre designation, I simply use “Classical” and apply my own period classification in my free-text metadata.

Organizational approach

Since classical music isn’t really organized by “song” and an album is much less important than the works it contains, I break down the album structure and reorganize it by work. In addition to using the work/movement designation in the track info, I create playlists for individual works and playlists folders for broader categories of works by the same composer.

Organizing works as playlists and folders

The top-level folder is the composer followed by nested folders of category of works (e.g. sonatas, concerti, etc.) then instrument folders under that level. If I have multiple recordings of the same work, the work itself gets its own folder.

What next for iTunes?

The work/movement designation in track info has been transformational; but iTunes still has a long way to go. Please don’t suggest music to me. Don’t show me a bunch of irrelevant album covers on the iTunes Store page; it’s meaningless to me. On mobile devices, find a way of showing the entire track name. Classical track names are often very long. Sometimes on the phone, I can only see “Piano Quartet No. 3 in…” Wait, is that the one in C minor or in G minor? No idea. iTunes still has a long way to go.

Using lynx to bypass ad block detection

Organizing works as playlists and folders

It turns out that command line text web browers like lynx can bypass AdBlock detection.

On macOS, I installed lynx using Homebrew. Then from the Terminal, it’s just lynx your-url. It’s actually quite pleasant to read text without all of the images and fluff.

Quarantining extremist ideas

This is an interesting essay in The Guardian on the idea of quarantining extremist ideas.

A non-trivial proportion of the population regards the media as having a responsibility to represent all idea with equal validity. So the appearance of extremist ideas in the press, even if they are treated negatively, results in more legitimacy than they are due. The authors in this essay make a case for quarantining these extreme ideas, refusing to cover them. Strategic silence, they call it.

A letter to Jerry Brown

Dear Governor Brown,

By now you are aware of Nicholas Kirstof’s piece^[Was Kevin Cooper Framed for Murder: https://www.nytimes.com/interactive/2018/05/17/opinion/sunday/kevin-cooper-california-death-row.html] in The New York Times in which he presents abundant evidence that investigators and prosecutors framed Kevin Cooper for the murder of four people in Chino.

Advanced DNA testing could produce potentially exculpatory evidence. Or not. But the truth must be pursued. You have rejected calls to exercise the authority of your office to order such testing. It beggars belief that you would not use that authority wisely in the search for truth, when the evidence was distorted for malicious purposes is so strong.

ESP32, DS18B20, TM1637 integration: Displaying temperature data

In a previous post I wrote about displaying arbitrary data on a TM1637-based 4 digit LED display, highlighting an ESP-IDF component that I extended to display positive and negative floating point numbers. Now we’re going to put that component to use and display actual data from a DS18B20 temperature sensor.

The {% asset_link DS18B20.pdf “DS18B20” %} temperature sensor operates on the Dallas Semiconductor 1-Wire bus. In this application, we aren’t powering the devices using parasitic power. Instead we’re powering the device from an external supply.

Interfacing an ESP32 to an MCP23017 GPIO expander

While the ESP32 sports a number of GPIO pins, not all are broken out on every board, meaning that sometimes a GPIO expander is necessary. This project is a simple design to test interfacing the ESP32 to an MCP23017 via the I2C interface.

MCP23017 I2C addressing

There are so many tutorials on the MCP23017 that I won’t delve in depth into how it works, but I’ll point out a few features of the custom MCP23017 component that I’m developing as part of this demonstration project. If you need to get up-to-speed developing applications using I2C within the ESP-IDF environment, this tutorial from Luca Dentella is excellent and concise.

Using TM1637-based LED displays with ESP32

There are three main types of 4 digit seven segment displays to be found on the market:

  • Bare displays without any driver. These come in a variety of colors and with either decimal points or clock-type display with a colon dividing two sets of two digits.
  • 74HC595-based displays. Usually these displays have two daisy-chained 74HC595 shift registers and rely on the host controller to fill the serial registers and handle the multiplexing. Depending on the processor speed, this ends up being a significant overhead.
  • TM1637-based displays. These displays reduce the burden on the host controller because all of the multiplexing is handled on the interface chip.

Getting ESP32 to talk to TM1637-based displays

This post is about the TM1637 LED displays. The {% asset_link Datasheet_TM1637.pdf TM1637 datasheet %} is terrible, but fortunately there are several libraries for Arduino that provide a little insight into how others have managed to make this work. First things first, the communication protocol for this device is not I2C despite what vendors on Aliexpress frequently claim.

What was the purpose of that tweet?

The thriving New York Times just published a list of questions being posed by Special Counsel Robert S. Mueller, III. What I found particularly interesting was his question about Trump’s intent behind his tweet on May 12, 2017 in which he said: “James Comey better hope that there are no “tapes” of our conversations before he starts leaking to the press!”

The question being posed by Mr. Mueller is insightful because it will require Trump to admit to the office of the Special Counsel that he was deliberately attempting to intimidate a party to a Federal investigation.

Serving sensor data via ESP32

Previously, I wrote about using the ESP32 to read sensor data over I2C from the Si7021 temperature and humidity monitor. Today, I’m going to briefly take you through the process of serving this data via the web.

Basic project setup

Description

The project plan is to connect to WiFi in STA mode, collect temperature and humidity data every 5 seconds from a Si7021 sensor via the I2C bus. We will launch a web server and whenever we have a GET/ request we’ll serve a simple web page that reports the temperature and humidity. If the URL path is /h (e.g. 192.168.1.x/h) then we’ll turn on an LED connected to GPIO 4. If the path is /l (e.g. 192.168.1.x/l) then we’ll turn off the LED. In both latter cases, we’ll also serve the same page showing the temperature and humidity.