<?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: Muhammad Abdullah</title>
    <description>The latest articles on DEV Community by Muhammad Abdullah (@abdullahrauf245hue).</description>
    <link>https://dev.to/abdullahrauf245hue</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%2F4222695%2Fe79e48e9-f700-4730-9a35-07ea8d9ec962.jpg</url>
      <title>DEV Community: Muhammad Abdullah</title>
      <link>https://dev.to/abdullahrauf245hue</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdullahrauf245hue"/>
    <language>en</language>
    <item>
      <title>Body Band: your heartbeat sets the rhythm, your breath shapes the sound</title>
      <dc:creator>Muhammad Abdullah</dc:creator>
      <pubDate>Fri, 20 Nov 2026 20:16:32 +0000</pubDate>
      <link>https://dev.to/abdullahrauf245hue/body-band-your-heartbeat-sets-the-rhythm-your-breath-shapes-the-sound-1771</link>
      <guid>https://dev.to/abdullahrauf245hue/body-band-your-heartbeat-sets-the-rhythm-your-breath-shapes-the-sound-1771</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Body Band plays music from your pulse and breathing. A webcam reads both through the Presage SmartSpectra SDK, and the music follows them live. Each heartbeat plays a soft kick and a note. Breathing in opens a warm pad sound, and breathing out closes it again. You don't wear, hold or press anything: you sit in front of the camera and breathe.&lt;/p&gt;

&lt;p&gt;The screen looks like a piece of studio hardware. A strip across the top shows pulse and breathing rate, a dial's blue arc fills as you breathe in, and two panels show what each sound is doing. Three breathing guides (4-7-8, box breathing and coherence breathing) put a needle on the dial where your breath should be, and a SYNC score shows how closely your real breathing follows it.&lt;/p&gt;

&lt;p&gt;Every note comes from one scale (A minor pentatonic), so the music sounds pleasant whatever your body does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;A live camera session with my narration. The SDK reads my pulse and breathing from the webcam, and the breathing arc and the music follow them.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/9LxZwy8pMdg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;You can try the interface without a camera at &lt;a href="https://bodyband.vercel.app" rel="noopener noreferrer"&gt;https://bodyband.vercel.app&lt;/a&gt; (Simulated and Manual modes). Camera mode runs on your own computer, because the SDK reads the webcam there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/abdullahrauf245-hue/BODY-BAND" rel="noopener noreferrer"&gt;https://github.com/abdullahrauf245-hue/BODY-BAND&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The README has setup instructions, including a double-click start for Windows (&lt;code&gt;BodyBand.bat&lt;/code&gt;) and steps for macOS (Apple Silicon) and Linux.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;Body Band uses three SmartSpectra metrics: pulse rate, breathing rate and the chest-breathing trace (&lt;code&gt;MetricType.PULSE_RATE&lt;/code&gt;, &lt;code&gt;BREATHING_RATE&lt;/code&gt;, &lt;code&gt;CHEST_BREATHING&lt;/code&gt;).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Sound&lt;/th&gt;
&lt;th&gt;Screen&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Chest-breathing trace (where you are in a breath)&lt;/td&gt;
&lt;td&gt;Opens and closes a filtered pad, louder and brighter as you breathe in&lt;/td&gt;
&lt;td&gt;Blue arc on the dial, breath-depth meter, live breath trace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pulse rate&lt;/td&gt;
&lt;td&gt;One soft kick and one note per heartbeat; a faster pulse plays higher, brighter notes&lt;/td&gt;
&lt;td&gt;Pulse in BPM, beat light, beat-to-beat times&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Breathing rate&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Breaths per minute and seconds per cycle&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  How the SDK is integrated
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The SDK is the Node.js package &lt;code&gt;@smartspectra/node-sdk&lt;/code&gt;. A small local server (&lt;code&gt;server.js&lt;/code&gt;) creates a &lt;code&gt;SmartSpectraSDK&lt;/code&gt; with only the three metrics above, opens the webcam with &lt;code&gt;useCamera()&lt;/code&gt; at 640x480 and 30 fps, and listens for &lt;code&gt;metrics&lt;/code&gt;, &lt;code&gt;validationStatus&lt;/code&gt;, &lt;code&gt;videoOutput&lt;/code&gt; and &lt;code&gt;error&lt;/code&gt; events.&lt;/li&gt;
&lt;li&gt;The server decodes each metrics packet with &lt;code&gt;decodeMetrics&lt;/code&gt; and streams the newest pulse rate, breathing rate and chest-trace samples to the page over Server-Sent Events.&lt;/li&gt;
&lt;li&gt;The page scales the chest trace to 0..1 over the last few breaths, and a Web Audio engine with no libraries turns it into sound. A cough or a shift in the chair moves the trace far more than a breath does, so the scale uses the 4th to 96th percentile. Impossible pulse readings are ignored, and the tempo glides to a new pulse instead of jumping.&lt;/li&gt;
&lt;li&gt;If the SDK stops (API key refused, minutes used up, no internet, frame rate too low), the page says what happened in plain words.&lt;/li&gt;
&lt;li&gt;The SDK's hints, such as "place more of the chest in view", appear in the camera panel, and its &lt;code&gt;videoOutput&lt;/code&gt; frames are shown there, mirrored, as a live preview.&lt;/li&gt;
&lt;li&gt;The rest of the app doesn't know where the numbers come from. A simulated body and a one-button manual mode send the same events, which is how the hosted demo works without a camera.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What the real readings looked like
&lt;/h3&gt;

&lt;p&gt;In the first live camera session the SDK sent one or two chest-trace samples per packet while the camera held 29 to 30 frames a second. The raw readings had some noise, so I tuned for it. Pulse readings outside 35 to 200 are ignored, and each pulse shown is the median of the last five. The breath scale ignores outliers. The SYNC score allows about a second of sensor delay when it compares your breath with the guide. These parts have unit tests (&lt;code&gt;npm test&lt;/code&gt;, 27 passing).&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use.&lt;/strong&gt; You hear your heartbeat and breathing as music, and you change the music by changing how you breathe. Slow, deep breaths make long, open swells, and a faster heart makes the melody climb. With a guide on, breathing becomes a small game of keeping the arc on the needle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Consent: choosing the camera opens a camera check that explains what will happen, what it costs and where data goes. The SDK opens the camera only after the person presses START MEASURING. The session stops by itself after 2 minutes, when they press Stop, or when they close the tab. The camera panel shows a live picture the whole time, so it is always clear that the camera is on.&lt;/li&gt;
&lt;li&gt;Storage, retention and deletion: Body Band stores no video and no readings. The live picture and the latest numbers are held in memory during a session and dropped when it ends, so there is nothing to keep or delete. The only file it writes is &lt;code&gt;.env&lt;/code&gt;, which holds the user's own API key on their own computer.&lt;/li&gt;
&lt;li&gt;Sharing: Body Band sends nothing anywhere itself. The server listens only on the user's own computer, and only the Body Band page can start the camera or read its picture.&lt;/li&gt;
&lt;li&gt;SDK: the SmartSpectra SDK contacts Presage to check the API key and download its models, and usage counts against the key. SDK telemetry is turned off (&lt;code&gt;enableTelemetry: false&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;AI services: none.&lt;/li&gt;
&lt;li&gt;Not medical: Body Band is an art and wellbeing project. It makes no diagnosis, gives no health advice, and its readings should not be used for any health decision.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
