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.
Advertisement
Get started with Raspberry Pi – everything you need to know to start your journey!
“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

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 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!”
When not editing books and contributing to The MagPi, Phil enjoys playing the piano (badly), astronomy, and watching classic sitcoms.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Get started with Raspberry Pi in Raspberry Pi Official Magazine 161
There’s loads going on in this issue: first of all, how about using a capacitive touch board and Raspberry Pi 5 to turn a quilt into an input device? Nicola King shows you how. If you’re more into sawing and drilling than needlework, Jo Hinchliffe has built an underwater rover out of plastic piping and […]
Read more →
Win one of three DreamHAT+ radars!
That’s right, an actual working radar for your Raspberry Pi. We reviewed it a few months ago and have since been amazed at some of the projects that have used it, like last month’s motion sensor from the movie Aliens. Sound good? Well we have a few to give away, and you can enter below. […]
Read more →
RP2350 Pico W5 review
It’s Raspberry Pi Pico 2, but with a lot more memory
Read more →