<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: FightNome</title>
    <description>The latest articles on DEV Community by FightNome (@fightnome).</description>
    <link>https://dev.to/fightnome</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204555%2F8f716524-388b-46ea-b8f4-25f493da4fbd.png</url>
      <title>DEV Community: FightNome</title>
      <link>https://dev.to/fightnome</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fightnome"/>
    <language>en</language>
    <item>
      <title>Lining up recorded voice callouts with a beat in a boxing training app</title>
      <dc:creator>FightNome</dc:creator>
      <pubDate>Sat, 24 Oct 2026 19:54:56 +0000</pubDate>
      <link>https://dev.to/fightnome/lining-up-recorded-voice-callouts-with-a-beat-in-a-boxing-training-app-2ih1</link>
      <guid>https://dev.to/fightnome/lining-up-recorded-voice-callouts-with-a-beat-in-a-boxing-training-app-2ih1</guid>
      <description>&lt;p&gt;&lt;em&gt;I work on FightNome. This post is about a feature of our own app.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;FightNome calls strikes out loud while you shadowbox or work pads. You hear "jab", you throw a jab. For that to feel right, the word has to land on the beat itself. Here's how we think about that problem, in plain terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  The beat grid
&lt;/h2&gt;

&lt;p&gt;Everything hangs off the tempo. One beat lasts 60000 / BPM milliseconds. Our workouts run from 74 to 128 BPM, so the spacing between beats changes a lot:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;BPM&lt;/th&gt;
&lt;th&gt;Beat length&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;74&lt;/td&gt;
&lt;td&gt;about 811 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;about 667 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;128&lt;/td&gt;
&lt;td&gt;about 469 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The music bed is a single track recorded at 90 BPM. It gets time-stretched to whatever tempo a section uses, so the grid and the music always agree.&lt;/p&gt;

&lt;h2&gt;
  
  
  One word, one file
&lt;/h2&gt;

&lt;p&gt;Every callout is a separate recording of a person saying one word: jab, cross, hook, upper, body, teep, slip, roll and so on. There are 42 of them in the iOS project at the moment. It's a real voice, not text to speech.&lt;/p&gt;

&lt;p&gt;One word per file keeps the model simple. A combination is a list of words placed on beats, so changing a combo means changing the list and nothing else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting early
&lt;/h2&gt;

&lt;p&gt;A spoken word has an onset, and the part you recognize it by arrives slightly after the file starts playing. A file that starts exactly on the beat would sound late. So each callout starts 40 to 60 ms before its beat, and the word lands on the tick.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsd8p2li04rrl5wzu8vsd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsd8p2li04rrl5wzu8vsd.jpg" alt="Beat grid with the three tempos and their beat lengths in milliseconds" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In pseudocode (a sketch of the idea, not our source):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;beat_ms&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;bpm&lt;/span&gt;
&lt;span class="n"&gt;play_at&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;beat_index&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;beat_ms&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;head_start_ms&lt;/span&gt;   &lt;span class="c1"&gt;# 40 to 60 ms
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That head start is small next to a beat. At 74 BPM it's between 5 and 7 percent of a beat. At 128 BPM it's between 9 and 13 percent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two ways to place the words
&lt;/h2&gt;

&lt;p&gt;In combo mode the words repeat a sequence you built, strike by strike. Placement is predictable, and the editor lets a strike take half of its window ("Quick Strike x2"). At 128 BPM half a beat is about 234 ms, a short slot for any word.&lt;/p&gt;

&lt;p&gt;In reaction mode the app picks words at random, from 6 to 45 calls a minute. At 45 calls a minute you get one call every 1.33 seconds, which at 90 BPM is every two beats. At 6 calls a minute it's one every ten seconds. The same grid rules apply, and only the choice of word changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're still unsure about
&lt;/h2&gt;

&lt;p&gt;Output delay differs between phone speakers, wired earbuds and Bluetooth headphones, and any fixed head start is a compromise across those. If you've dealt with output latency in a simple way, I'd like to hear how.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you want to try it
&lt;/h2&gt;

&lt;p&gt;FightNome is a paid app: FightNome Pro is $8.99 a month or $49.99 a year (App Store US prices), and the yearly plan has a 3-day trial. There's no free tier. It runs on iOS 26 and up and on Google Play. Search "FightNome" in either store, or go to &lt;a href="https://fightnome.app" rel="noopener noreferrer"&gt;https://fightnome.app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I used AI assistance to draft this post and edited it myself.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>audio</category>
      <category>ios</category>
      <category>android</category>
    </item>
  </channel>
</rss>
