Jazz Champion

By Phil King. Posted

If someone were to give you an old chess machine that didn’t work, what would you do with it? Turning it into a musical game involving chord progressions probably doesn't come to mind, but that's just what jazz fan Leo Neumann has made from a 1978 Chess Champion MK1.

“The inside was completely missing with the exception of a beautiful keypad,” he recalls. While he wasn’t sure what to do with it at first, and it gathered dust for a couple of years, a conversation with a friend about converting trash objects into musical instruments sparked an idea. “It suddenly clicked: I would turn the chess computer into a jazz computer!”

Leo noted a striking resemblance between the notation of chords and chess moves: “For example, E6 E7 means in chess that a pawn moves from square E6 to E7. In jazz it would describe E major chords extended by a sixth or seventh note. Also, I much liked the idea that playing a chess game is akin to playing a duet in a call-and-response type of scenario.”

A little knight music

The inner workings include a Raspberry Pi Zero with WM8960 Audio HAT, speakers, and 176×220 LCD

Leo says the musical game he created is very simple to play, involving pressing the machine’s buttons to choose chords. “You enter a jazz chord, wait two seconds while the computer comes up with a matching chord and then it is your turn again. One can choose chords of any key and it can be major or minor, diminished or augmented, and possibly extended by 7th, 9th, 11th or 13th notes.”

The computer will then seek to come up with a chord that sounds as “cool as possible when played after the given user chord,” he reveals. “It does so by generating 1000 random candidate chords and using a metric to assess how well they fit. The best chord is taken and the computer score is increased by the value according to the metric.”

Once the user has entered their chord, the same metric is used to add points to their score. “The game has no end – one can play as long as desired, since the main point is not to ‘win’ by scoring more points but to just have fun playing jazz music.”

Striking the right chord

It took a couple of attempts to get the 3D-printed base design right and align the LCD under the tinted window

It took Leo around two months to develop the project, including replacing the chess machine’s original seven-segment display with a 176×220 LCD to show longer chord names, and 3D-printing a new base to house a Raspberry Pi Zero, WM8960 Audio HAT, and speakers.

By the far the hardest part of creating the Python software was to design an algorithm that rates how well a new jazz chord follows a given one. After trying several musical theory approaches and finding that they didn’t come up with the desired “jazzy feel”, he opted to play all the common chord combinations and rate them manually – a process that took three days and was a “numbing experience.”

“The ratings form the basis of the metric and I integrated some additional heuristics such that chords do not sound too dissonant, too consonant, too repetitive, nor too simple,” he explains. “I just underestimated how difficult it is to translate human artistic preference into computer code and learned a lot here.”

As well it being a fun game to play, Leo thinks his Jazz Champion could double as a useful aid for composing jazz music, by generating chord sequences. “It is actually easy: one can just repeatedly input the last computer-generated chord to get an entire sequence!”

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.