, , , , ,

Jazz Champion

Reading Time: 3 minutes

“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!”

Facebook Comments

eMBee ONE turns an Arduino and an Altoids tin into an ’80s-style pocket computer

Forza Horizon 4 erscheint am 09. März für Steam