---
title: "Pchords"
description: "A tool for practising piano chords: it shows a random chord, listens to a MIDI keyboard and checks what you played."
date: 2022-05-08T19:46:50+02:00
lastmod: 2026-10-16T18:58:52+02:00
url: https://klimek.link/projects/pchord/
author: "Marcin Klimek"
source: https://klimek.link/projects/pchord/
---

# Pchords

## Motivation

I need to improve playing chords on the piano, so I decided to write a simple tool to help me with this.

## What it does

The initial version was just a console app, and then I wrote a simple GUI for it. What I have now:

- generation of major, minor and dominant chords (half-diminished and altered soon);
- the randomly chosen chord has to be played starting from the third or the seventh (major and minor), without the root;
- played notes (read through MIDI) are compared with the generated ones.

## Current GUI

![it looks like this](media/it_looks_like_this.jpg)

## Version 2: in the browser

In late 2025 I gave Pchords a web version. The backend is FastAPI with a music-theory core of my own for notes, scales, chords, voicings and progressions, and the frontend is React and TypeScript with an on-screen piano. In Chrome and Edge the page reads a MIDI keyboard directly through Web MIDI and checks the chord as you play, and if you'd rather practise full chords, there's a root-note mode for that. The whole thing starts with Docker Compose.

*Diagram: Parts of the web version*

## Useful links

* [pychord](https://github.com/yuma-m/pychord)
* [mido](https://github.com/mido/mido)
* [howto py2app](https://www.metachris.com/2015/11/create-standalone-mac-os-x-applications-with-python-and-py2app/)
* [pyinstaller](https://pyinstaller.org/)

https://github.com/marcinklimek/pchords

Source: https://klimek.link/projects/pchord/
