<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://tcanabrava.github.io/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https:&#x2F;&#x2F;tcanabrava.github.io</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme>dark</tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>gamedev</tabi:current_section>
    </tabi:metadata><title>Tomaz Canabrava Ramblings - gamedev</title>
        <subtitle>Somewhat updated list of C++, Qt and KDE bits</subtitle>
    <link href="https://tcanabrava.github.io/tags/gamedev/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://tcanabrava.github.io/tags/gamedev/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2026-08-31T00:00:00+00:00</updated><id>https://tcanabrava.github.io/tags/gamedev/atom.xml</id><entry xml:lang="en">
        <title>Harmonicon: a rhythm game you play on a real harmonica</title>
        <published>2026-08-31T00:00:00+00:00</published>
        <updated>2026-08-31T00:00:00+00:00</updated>
        <author>
            <name>Tomaz Canabrava</name>
        </author>
        <link rel="alternate" href="https://tcanabrava.github.io/introducing-harmonicon/" type="text/html"/>
        <id>https://tcanabrava.github.io/introducing-harmonicon/</id>
        
            <content type="html">&lt;p&gt;For once, something on this blog that isn’t C++.&lt;&#x2F;p&gt;
&lt;p&gt;Harmonicon is a rhythm game for blues harmonica. Notes scroll toward a hit line
and you play on an actual harmonica, into your microphone, and the game listens.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-idea&quot;&gt;The idea&lt;&#x2F;h2&gt;
&lt;p&gt;The harmonica is cheap, fits in a pocket, and it hides everything:
the reeds are inside, your tongue and throat do most of the work,
and nothing about the instrument tells you whether the note that just
came out is the note you meant. You can practise a bend wrong for a
month quite happily.&lt;&#x2F;p&gt;
&lt;p&gt;Let the instrument be the input. Harmonicon captures the microphone, runs pitch
detection on it in real time, and scores what you actually played against the chart.
Every note you score is a note you genuinely hit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;playing-a-song&quot;&gt;Playing a song&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;tcanabrava.github.io&#x2F;introducing-harmonicon&#x2F;play-2d.png&quot; alt=&quot;The 2D play mode: a lane per harmonica hole, with notation and a tab readout above&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The default view is one lane per hole: ten for a diatonic, twelve for a
chromatic, taken from whatever the chart was written for. Blue notes are blows,
orange are draws, and the number on each is the hole you need. Above the lanes
there’s the phrase in standard notation and as harmonica tab, because those are
the two ways harmonica players actually read music, and the panel on the right
tells you which harp to pick up and which position you’re playing in.&lt;&#x2F;p&gt;
&lt;p&gt;There’s also a 3D view, which is the same game rendered around a harmonica model
that moves with the beat.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;tcanabrava.github.io&#x2F;introducing-harmonicon&#x2F;play-3d.png&quot; alt=&quot;The 3D play mode: notes travelling down toward an animated harmonica model&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;span id=&quot;continue-reading&quot;&gt;&lt;&#x2F;span&gt;&lt;h2 id=&quot;getting-away-from-charts&quot;&gt;Getting away from charts&lt;&#x2F;h2&gt;
&lt;p&gt;Charts are good for learning a song and bad for learning to play. The Jam
Session mode drops the scoring entirely and gives you a rolling 12-bar blues to
improvise over.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;tcanabrava.github.io&#x2F;introducing-harmonicon&#x2F;jam-session.png&quot; alt=&quot;Jam Session: a 12-bar chord grid on the left, a live-tinted hole map on the right&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The useful part is the hole map on the right. As the backing moves through the
bars, each hole recolours: gold if it’s a chord tone of the bar sounding right
now, green if it’s elsewhere in the blues scale, dim if it’s going to sound
wrong. You follow the colour instead of trying to recall theory at tempo, and
the theory arrives later, on its own.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;lessons&quot;&gt;Lessons&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;tcanabrava.github.io&#x2F;introducing-harmonicon&#x2F;lessons-list.png&quot; alt=&quot;The lessons list, grouped into units from fundamentals to jazz&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;There’s a curriculum underneath all of this, grouped into units and gated by
prerequisites — from getting one clean single note out of the thing, through
bends and articulation, up to improvising over a blues. Some lessons are scored
drills. A few aren’t scoreable at all: tongue blocking sounds identical to
puckering from the microphone’s point of view, so that one is instruction you
mark as done and the game trusts you.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;under-the-hood&quot;&gt;Under the hood&lt;&#x2F;h2&gt;
&lt;p&gt;Rust, with &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;bevyengine.org&#x2F;&quot;&gt;Bevy&lt;&#x2F;a&gt; for the engine and &lt;code&gt;cpal&lt;&#x2F;code&gt; for audio
capture. The interesting problem is the pitch detection, which is why there are
five algorithms to chose from: FFT, YIN, pYIN, MPM and NMF.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;status&quot;&gt;Status&lt;&#x2F;h2&gt;
&lt;p&gt;There’s a lot in it — a bending
trainer, an in-game song editor with MIDI import, adaptive difficulty, A–B
looping, latency calibration, a spectrogram — but “early&#x2F;experimental” is an
honest label rather than modesty.&lt;&#x2F;p&gt;
&lt;p&gt;It’s MIT licensed and the code is at
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tcanabrava&#x2F;harmonicon&quot;&gt;github.com&#x2F;tcanabrava&#x2F;harmonicon&lt;&#x2F;a&gt;.
If you own a harmonica and a microphone, that’s the entire hardware requirement.&lt;&#x2F;p&gt;
</content>
        <summary type="html">For once, something on this blog that isn’t C++.
Harmonicon is a rhythm game for blues harmonica. Notes scroll toward a hit line
and you play on an actual harmonica, into your microphone, and the game listens.
The idea
The harmonica is cheap, fits in a pocket, and it hides everything:
the reeds are inside, your tongue and throat do most of the work,
and nothing about the instrument tells you whether the note that just
came out is the note you meant. You can practise a bend wrong for a
month quite happily.
Let the instrument be the input. Harmonicon captures the microphone, runs pitch
detection on it in real time, and scores what you actually played against the chart.
Every note you score is a note you genuinely hit.
Playing a song

The default view is one lane per hole: ten for a diatonic, twelve for a
chromatic, taken from whatever the chart was written for. Blue notes are blows,
orange are draws, and the number on each is the hole you need. Above the lanes
there’s the phrase in standard notation and as harmonica tab, because those are
the two ways harmonica players actually read music, and the panel on the right
tells you which harp to pick up and which position you’re playing in.
There’s also a 3D view, which is the same game rendered around a harmonica model
that moves with the beat.
…</summary>
        </entry>
</feed>
