<?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: Rakim</title>
    <description>The latest articles on DEV Community by Rakim (@rakim777).</description>
    <link>https://dev.to/rakim777</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%2F4108620%2F82f10e84-20a7-4a52-a3bb-64c960e80ff1.png</url>
      <title>DEV Community: Rakim</title>
      <link>https://dev.to/rakim777</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakim777"/>
    <language>en</language>
    <item>
      <title>Why our gift-song form asks for a name and one memory, not a prompt</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Wed, 25 Nov 2026 09:50:48 +0000</pubDate>
      <link>https://dev.to/rakim777/why-our-gift-song-form-asks-for-a-name-and-one-memory-not-a-prompt-3hm5</link>
      <guid>https://dev.to/rakim777/why-our-gift-song-form-asks-for-a-name-and-one-memory-not-a-prompt-3hm5</guid>
      <description>&lt;p&gt;When you build a product on top of a generative model, the temptation is to give the user a big empty box and say "describe what you want". For a song gift, I think that is the wrong default. Here is the reasoning behind the form on &lt;a href="https://www.songupai.com/song-for-teacher" rel="noopener noreferrer"&gt;SongUp AI&lt;/a&gt;, and what I would tell anyone designing a similar input.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with the empty box
&lt;/h2&gt;

&lt;p&gt;Most people buying a personalised song are not musicians and have never written a prompt. They are standing in front of a blank field thinking about a teacher, a mother or a best friend. If the field says "describe your song", they write something like "a happy song about my teacher". The model can only give back something equally general.&lt;/p&gt;

&lt;p&gt;The output quality of a generative product is capped by the specificity of the input. The job of the interface is to pull specificity out of a person who does not know that is what is being asked.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we ask for instead
&lt;/h2&gt;

&lt;p&gt;For a teacher page the ask is short: the teacher's name, and what the class would want to say to them. For a Christmas song it is the names and one tradition. Two things, both concrete, both things the person already knows without thinking.&lt;/p&gt;

&lt;p&gt;The reasons it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A name is unambiguous.&lt;/strong&gt; It goes into the chorus. The listener hears it. That single detail changes how the result feels more than any style option.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One memory is enough.&lt;/strong&gt; More than one and people start summarising. One real detail gives the lyrics something to hang on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is hard to get wrong.&lt;/strong&gt; Nobody fails to remember a teacher's name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Preview before payment
&lt;/h2&gt;

&lt;p&gt;The second design decision is that people hear a free 30-second preview before paying, and a whole song is $2.99. From a product view this does two jobs. It lowers the risk of paying for something unheard, and it gives the user a feedback loop: if the preview misses, the fix is almost always the input sentence, not the style.&lt;/p&gt;

&lt;p&gt;That last point shaped the copy around the form. We tell people to change the sentence first. It is a more useful instruction than "try another genre".&lt;/p&gt;

&lt;h2&gt;
  
  
  Languages are an input problem too
&lt;/h2&gt;

&lt;p&gt;Songs with vocals are available in 76 languages. The design lesson is that the language selector cannot be a footnote. For many families the person receiving the gift is most comfortable in a language different from the person buying it, and the form has to make choosing that obvious and not buried in settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would copy
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Replace the open prompt with two or three concrete questions only the user can answer.&lt;/li&gt;
&lt;li&gt;Let them hear a small piece of the result before any payment step.&lt;/li&gt;
&lt;li&gt;Write error-recovery copy that points at the input, not the model.&lt;/li&gt;
&lt;li&gt;Treat language as a first-class field.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this is specific to music. Any generative product aimed at non-experts runs into the same wall: the user knows the story, and the model needs the detail. The form is the translator between them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I build SongUp AI. The presenter in our short videos is AI-generated.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ux</category>
      <category>ai</category>
      <category>webdev</category>
      <category>product</category>
    </item>
    <item>
      <title>One idea, three cuts: a repeatable workflow for YouTube Shorts, Reels and Pinterest video pins</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Tue, 24 Nov 2026 10:22:35 +0000</pubDate>
      <link>https://dev.to/rakim777/one-idea-three-cuts-a-repeatable-workflow-for-youtube-shorts-reels-and-pinterest-video-pins-3jeo</link>
      <guid>https://dev.to/rakim777/one-idea-three-cuts-a-repeatable-workflow-for-youtube-shorts-reels-and-pinterest-video-pins-3jeo</guid>
      <description>&lt;p&gt;Disclosure: I build AI Video GT (&lt;a href="https://aivideogt.com" rel="noopener noreferrer"&gt;https://aivideogt.com&lt;/a&gt;), an AI video and image studio. This post is general advice for anyone making short vertical video; the tool section at the end is the only product mention.&lt;/p&gt;

&lt;p&gt;Most small teams do not have a video problem. They have a repeat problem: every short starts from a blank page. This is the workflow I use to turn one idea into three platform-ready cuts in one sitting, with no editing skills beyond trimming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: write the hook before anything else
&lt;/h2&gt;

&lt;p&gt;The first two seconds decide whether the clip is watched. Most people watch muted, so the hook has to work as text on screen. Write it as one line of seven words or fewer, and write the opening frame to match.&lt;/p&gt;

&lt;p&gt;Good hooks name a result or an open question: "Trim a video free in your browser", "One photo, one moving shot". Weak hooks name yourself: "Hi everyone, today we are".&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: pick 2 to 4 clips, 3 to 5 seconds each
&lt;/h2&gt;

&lt;p&gt;A 12 to 15 second short usually needs three clips. Pick them to differ in shot size: one wide, one medium, one close. Cut each to the best 4 seconds rather than letting a clip run long. If your source is landscape, either centre-crop for a vertical frame or place the clip over a blurred copy of itself so nothing important is cut off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: put the call to action in the last two seconds
&lt;/h2&gt;

&lt;p&gt;One line, one place to go. Say where the viewer should look, not three things. A short URL on the final frame works on every platform, including those that strip links from captions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: export once, then write three captions
&lt;/h2&gt;

&lt;p&gt;Export a 1080x1920 file. Then write the text for each platform separately instead of pasting the same caption three times:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;YouTube Shorts:&lt;/strong&gt; keyword-first title under 70 characters, the page link on the first line of the description, and the AI-generated label switched on if your clip contains generated footage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Facebook Reels:&lt;/strong&gt; a conversational sentence, with the link in the first comment because captions are not clickable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pinterest video pins:&lt;/strong&gt; a descriptive title and description written like a search query, plus the destination link on the pin itself. People find pins by searching, so say plainly what the clip shows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: do not post the same file twice in one day
&lt;/h2&gt;

&lt;p&gt;Platforms notice repeats, and so do viewers. If you have two clips in a day, make them different videos with different clips and a different hook, not two exports of the same cut.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: measure after two days and after seven
&lt;/h2&gt;

&lt;p&gt;Look at views and likes at 2 days and 7 days, and write them in a plain table. After a month you will see which hooks repeat. Keep what works and drop the rest. Do not read anything into a single post.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on AI-generated footage
&lt;/h2&gt;

&lt;p&gt;If any clip is AI-generated, say so in the caption and use the platform's label where there is one. It costs nothing and keeps viewers on your side. Do not present generated footage as real events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the tools come in
&lt;/h2&gt;

&lt;p&gt;Parts of this workflow are plain video editing: trimming, joining, resizing and compressing. AI Video GT has free browser video tools for those (trim, crop, resize, compress, merge, convert) at &lt;a href="https://aivideogt.com/video-tools" rel="noopener noreferrer"&gt;https://aivideogt.com/video-tools&lt;/a&gt;; they need no account. If you want to generate the clips themselves, the text-to-video and image-to-video pages are at &lt;a href="https://aivideogt.com/video" rel="noopener noreferrer"&gt;https://aivideogt.com/video&lt;/a&gt; and &lt;a href="https://aivideogt.com/tools/image-to-video" rel="noopener noreferrer"&gt;https://aivideogt.com/tools/image-to-video&lt;/a&gt;. The cost of each generation is shown before you generate, and failed generations are refunded automatically.&lt;/p&gt;

&lt;p&gt;If you do this already, what is your hook formula?&lt;/p&gt;

</description>
      <category>video</category>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How a song language gets added to an AI music product: probe, listen, ship</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Sun, 22 Nov 2026 17:09:01 +0000</pubDate>
      <link>https://dev.to/rakim777/how-a-song-language-gets-added-to-an-ai-music-product-probe-listen-ship-1ced</link>
      <guid>https://dev.to/rakim777/how-a-song-language-gets-added-to-an-ai-music-product-probe-listen-ship-1ced</guid>
      <description>&lt;p&gt;When we say SongUp AI sings in 76 languages, the number hides the most useful part of the story: a language is not "supported" because a model accepts the text. It is supported when someone has listened to the output and the words are the words that were typed. This post is about the small process we use before a language goes on the list. I build SongUp AI, so this is a builder's view, not a neutral review.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure that taught us to check
&lt;/h2&gt;

&lt;p&gt;A music model will happily accept lyrics in a language it handles badly. It does not throw an error. It returns a track with confident singing, and the words in it may be a close cousin of what you asked for, or a few lines may be skipped, or the vocal drifts into a different language halfway through. If you only check that the request returned audio, all of those look like success.&lt;/p&gt;

&lt;p&gt;So the question for each new language is not "does the call succeed" but "does the sung result match the text".&lt;/p&gt;

&lt;h2&gt;
  
  
  The three steps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Probe.&lt;/strong&gt; Before a language is added, we run a handful of short test requests in it: a name, a place, a short chorus, and a longer verse. The point is to cover short and long input, because some languages behave well on a line and fall apart over a verse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Listen.&lt;/strong&gt; The ideal check is a reader of the language listening with the lyrics open. We look for every line being sung, the words being the typed words, and names coming out recognizably. A transcription check can help with a first pass, but a human ear catches the cases that matter, such as a name sung with the wrong stress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Ship in tiers.&lt;/strong&gt; A language can be on the list for choosing as the sung language even before it has a curated library of example songs. Today the library of ready-made songs covers a smaller set of languages than the 76 you can pick when you make your own, and that gap is intentional: a library song gets a higher bar than a custom request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two fields, not one
&lt;/h2&gt;

&lt;p&gt;One design decision paid off more than expected: the language you write the lyrics in and the language they are sung in are two separate choices. A grandchild may want to write in English and have the song sung in Urdu. Treating that as one field forces people to translate first, which is where mistakes creep in. Splitting it lets the product help with the translation step and show the result before anything is final. The free 30-second preview is what makes this safe: you hear the first half minute before you pay anything, and a whole song is $2.99.&lt;/p&gt;

&lt;p&gt;You can see the language list at &lt;a href="https://www.songupai.com/languages" rel="noopener noreferrer"&gt;songupai.com/languages&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell another builder
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Treat "the call returned audio" as a smoke test, never as a pass.&lt;/li&gt;
&lt;li&gt;Log the reason when you reject or rewrite a request, so you can see which languages and which input shapes fail.&lt;/li&gt;
&lt;li&gt;Give users a cheap way to verify before they commit. A preview is better than any disclaimer.&lt;/li&gt;
&lt;li&gt;Keep the list honest. A shorter list that works beats a long one that mostly works.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building something similar and have a different approach to checking sung output, I would like to hear it in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Made with SongUp AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>music</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Two language fields, not one: what grandparent songs taught us about input design</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Thu, 19 Nov 2026 10:26:23 +0000</pubDate>
      <link>https://dev.to/rakim777/two-language-fields-not-one-what-grandparent-songs-taught-us-about-input-design-loe</link>
      <guid>https://dev.to/rakim777/two-language-fields-not-one-what-grandparent-songs-taught-us-about-input-design-loe</guid>
      <description>&lt;p&gt;&lt;em&gt;I build SongUp AI, an AI song maker. This is a small product lesson from it, written for anyone who designs forms&lt;br&gt;
for people who live between two languages.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A song for a grandparent is one of the gifts people make with SongUp AI, and the holidays bring more of them.&lt;br&gt;
Think about who is typing that request. Often enough it is a grandchild who grew up in the US, the UK, Canada or&lt;br&gt;
Australia, and the grandmother grew up somewhere else. The grandchild writes English comfortably. The&lt;br&gt;
grandmother's language is Tagalog, Urdu, Spanish, Polish or Arabic, and the grandchild can understand it at the&lt;br&gt;
dinner table but could not write a verse in it.&lt;/p&gt;

&lt;p&gt;If your form has one "language" field, you force that person into a bad choice. Either the song comes out in&lt;br&gt;
English, which is not the language the gift is for, or they try to write lyrics in a language they only half speak,&lt;br&gt;
and give up.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: separate "what you write in" from "what it is sung in"
&lt;/h2&gt;

&lt;p&gt;In SongUp AI you describe the song, or write your own lyrics, in whatever language is easiest for you, and you pick&lt;br&gt;
the song language on its own. The song language list has 76 entries. So the grandchild can type:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A warm, gentle song for my grandma Rosa. She grew up in a village near Guadalajara, raised six kids,&lt;br&gt;
still makes tamales every Christmas Eve and calls everyone "mijo", even the dog.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and choose Spanish as the language it is sung in. The details survive the translation, and the name stays a name.&lt;/p&gt;

&lt;p&gt;Three things we learned building around that split:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Names are not words.&lt;/strong&gt; A translation step will happily "translate" a name or a nickname. "Mijo" should stay&lt;br&gt;
"mijo". A song for a grandparent lives or dies on the names and the pet words, so those must come through as typed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Script is a stronger signal than a dropdown.&lt;/strong&gt; If someone pastes lyrics in Arabic script, they usually&lt;br&gt;
want an Arabic song, whatever the dropdown says. We now let what people actually typed weigh in when guessing the&lt;br&gt;
default, and the person can still change it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Let people hear it before they pay.&lt;/strong&gt; Someone writing for a grandparent in a language they only half speak is&lt;br&gt;
nervous that it will sound wrong. So a free account can hear a 30-second preview of a song made from their own&lt;br&gt;
lyrics before buying. One full song is $2.99, paid once, no subscription.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters beyond music
&lt;/h2&gt;

&lt;p&gt;Any product used by families split across countries has the same shape: the person filling in the form is not the&lt;br&gt;
person the output is for. Gift cards, greeting cards, photo books, recorded messages. If you only ask one language&lt;br&gt;
question, you are quietly asking "which of these two people matters?"&lt;/p&gt;

&lt;p&gt;A useful test: ask your form "who reads the output?" and "who writes the input?". If those can be different people&lt;br&gt;
with different languages, give them two fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the song ends up
&lt;/h2&gt;

&lt;p&gt;Plenty of grandparents will never open a link, so the song downloads as an MP3: families can put it on a CD, a USB&lt;br&gt;
stick for the car, or a smart speaker. For this audience the download button matters more than the share button.&lt;/p&gt;

&lt;p&gt;If you want to see the flow, the page we built for this case is here:&lt;br&gt;
&lt;a href="https://www.songupai.com/song-for-grandma" rel="noopener noreferrer"&gt;a song for Grandma, with her name in it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Today's short video on the same idea: &lt;a href="https://youtube.com/shorts/OlTDFXeNFfU" rel="noopener noreferrer"&gt;https://youtube.com/shorts/OlTDFXeNFfU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd like to hear from anyone who has designed for bilingual families: where else does one language field break?&lt;/p&gt;

</description>
      <category>ux</category>
      <category>ai</category>
      <category>i18n</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>Pay after you hear it: why our AI song maker sings 30 seconds free first</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Sun, 15 Nov 2026 12:11:17 +0000</pubDate>
      <link>https://dev.to/rakim777/pay-after-you-hear-it-why-our-ai-song-maker-sings-30-seconds-free-first-1j2n</link>
      <guid>https://dev.to/rakim777/pay-after-you-hear-it-why-our-ai-song-maker-sings-30-seconds-free-first-1j2n</guid>
      <description>&lt;p&gt;&lt;em&gt;I build SongUp AI, so this is a maker's build note, not a neutral review.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you sell something people have never bought before, the hardest question is not "how much?" It is "what am I actually getting?" A custom song is a strange purchase. Nobody can picture it in advance. You type a few lines about your partner, your dad or your dog, and you are asked to pay before you know if the voice, the style or even the words will work.&lt;/p&gt;

&lt;p&gt;So on SongUp AI anyone can hear the first 30 seconds of a song made from their own lyrics before paying anything. Here is the thinking behind that design.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The preview has to be &lt;em&gt;their&lt;/em&gt; song, not a demo
&lt;/h2&gt;

&lt;p&gt;A sample in the chosen style only tells you what "acoustic pop" sounds like. What people want to know is how &lt;em&gt;their&lt;/em&gt; chorus sounds with &lt;em&gt;their&lt;/em&gt; person's name in it.&lt;/p&gt;

&lt;p&gt;So the free preview is generated from the user's own words. It costs more to run than playing a sample, but it is the only preview that answers the real question.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Thirty seconds is a design decision, not an accident
&lt;/h2&gt;

&lt;p&gt;Too short and the song never reaches the chorus. Too long and there is no reason to keep the full song. Thirty seconds usually covers an intro and the first verse or hook, which is where the name and the first memory land. That moment, hearing a name sung, is what people react to.&lt;/p&gt;

&lt;p&gt;The full song after that is one payment of $2.99, and plans start at $9.99 a month for people who make a lot of songs. Both are on one page so nobody has to dig for the price: &lt;a href="https://www.songupai.com/pricing" rel="noopener noreferrer"&gt;songupai.com/pricing&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Show the price before the button, not after
&lt;/h2&gt;

&lt;p&gt;"Unlock full song" buttons that only reveal the price on the checkout page are common, and every surprise there costs trust. A price printed next to the button may get fewer clicks, but the clicks that happen come from people who already decided.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Be honest about what AI makes
&lt;/h2&gt;

&lt;p&gt;Some requests get refused by the music model (certain names, long descriptions), and some lines come out sung oddly. We would rather a user hear that in a free preview than after paying. It also means support tickets start with "can you fix this line?" instead of "I want a refund."&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;If your product's value is a feeling, let people have the feeling before they pay. In our case that is 30 seconds of a song built from their own words. Here is a 16-second clip of the idea (the presenter is AI-generated, not a customer):&lt;/p&gt;


&lt;div&gt;
    &lt;iframe src="https://www.youtube.com/embed/meKakruo34g" width="315" height="560"&gt;
    &lt;/iframe&gt;
  &lt;/div&gt;


&lt;p&gt;What do you preview for free in your product, and how did you choose where the free part ends?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pricing details: &lt;a href="https://www.songupai.com/pricing" rel="noopener noreferrer"&gt;songupai.com/pricing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>product</category>
      <category>buildinpublic</category>
      <category>ai</category>
      <category>ux</category>
    </item>
    <item>
      <title>What a "song for dad" form taught me about asking users for input</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Wed, 11 Nov 2026 02:12:52 +0000</pubDate>
      <link>https://dev.to/rakim777/what-a-song-for-dad-form-taught-me-about-asking-users-for-input-556e</link>
      <guid>https://dev.to/rakim777/what-a-song-for-dad-form-taught-me-about-asking-users-for-input-556e</guid>
      <description>&lt;p&gt;I build SongUp AI, an AI song maker. People type a few lines about someone, pick a voice and a mood, and get a song back. One of the most common reasons to open it is a gift for a parent, and the "song for dad" flow has taught me more about input design than any dashboard I have built. These are the notes I wish I had before writing the first form.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adjectives are the wrong question
&lt;/h2&gt;

&lt;p&gt;The first version of the gift form had a box that said, more or less, "Describe him". People answered with adjectives: kind, funny, hard-working, the best. A language model can write a verse from that, and the verse is fine, and it fits every father on earth. Nobody cries at "you were always there for me".&lt;/p&gt;

&lt;p&gt;What works is the opposite of a description: small true details. So the prompts now ask for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one thing he always says,&lt;/li&gt;
&lt;li&gt;one thing he fixed, built or drove you to,&lt;/li&gt;
&lt;li&gt;what you never say to him out loud.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last one does most of the work. It is also the on-screen hook of the short video we made for the page: "Write what you never say out loud". A question that is slightly uncomfortable to answer gives you the line the whole song hangs on.&lt;/p&gt;

&lt;p&gt;The general lesson for any generative product: the quality of the output is capped by how specific the input is, and users do not volunteer specifics unless the form asks for them one at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Names are the hardest field
&lt;/h2&gt;

&lt;p&gt;A gift song has one word that must be right: the name. Text models spell it fine; singing voices do not always pronounce it the way the family does, and "Dad" itself is Papa, Baba, Abba, Appa or Tata depending on the house. We sing in 76 languages, so this comes up daily.&lt;/p&gt;

&lt;p&gt;Two things helped. First, treating the name as its own piece of input instead of something buried in a paragraph. Second, a pronunciation hint: a place to write the name the way it sounds. It is a tiny field, and it removed a class of "the song is lovely but that is not his name" messages.&lt;/p&gt;

&lt;p&gt;If your product reads user text aloud, in any voice, give names their own handling early. It is cheaper than apologising later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Long input needs a decision, not a silent cut
&lt;/h2&gt;

&lt;p&gt;People who write to their fathers write a lot. Some paste a full page. A song has a length, so something has to give. Quietly trimming the text is the worst option: the user notices the missing verse, which is always the one that mattered.&lt;/p&gt;

&lt;p&gt;Now, when the lyrics run past roughly 1,700 characters, the Create step asks what to do: split it into parts, shorten it, or go ahead anyway. One extra question, asked only when needed, and the choice stays with the person who wrote the words.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let people hear it before the price matters
&lt;/h2&gt;

&lt;p&gt;The piece of the flow I would defend hardest is the order: you hear the first 30 seconds of your own lyrics, sung, before paying anything. One full song is then $2.99.&lt;/p&gt;

&lt;p&gt;For a gift this matters more than usual. The buyer is not judging audio quality in the abstract; they are checking one thing, "does this sound like it is about my dad?" No landing page copy answers that. Thirty seconds of their own words does. It also keeps us honest: if the preview is not good, nobody has paid for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell another builder
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ask for facts, not opinions. "What does he always say?" beats "Describe him".&lt;/li&gt;
&lt;li&gt;Find the one field that must be right (for us, the name) and give it its own input and its own check.&lt;/li&gt;
&lt;li&gt;When input does not fit, ask; never cut silently.&lt;/li&gt;
&lt;li&gt;Put the proof before the price.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of this is specific to music. It applies to any tool where a model turns a few lines from a person into something that is supposed to feel personal.&lt;/p&gt;

&lt;p&gt;If you want to see the flow as a user would, it is here: &lt;a href="https://www.songupai.com/song-for-dad" rel="noopener noreferrer"&gt;a song for dad, in your own words&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;P.S. The 28-second version of the idea: &lt;a href="https://youtube.com/shorts/Fvye5ikx-Ck" rel="noopener noreferrer"&gt;https://youtube.com/shorts/Fvye5ikx-Ck&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ux</category>
      <category>ai</category>
      <category>webdev</category>
      <category>buildinpublic</category>
    </item>
    <item>
      <title>I counted which languages people make AI songs in: 10,725 songs, 75 languages, 30 days</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Sat, 07 Nov 2026 05:32:28 +0000</pubDate>
      <link>https://dev.to/rakim777/i-counted-which-languages-people-make-ai-songs-in-10725-songs-75-languages-30-days-2ja8</link>
      <guid>https://dev.to/rakim777/i-counted-which-languages-people-make-ai-songs-in-10725-songs-75-languages-30-days-2ja8</guid>
      <description>&lt;p&gt;I run SongUp AI, a web app that writes and sings full songs from a prompt, your own lyrics or a hummed tune. Every song we generate is stored with the language it was made in, and I had never looked at that column properly. So I counted.&lt;/p&gt;

&lt;p&gt;This is a short write-up of what the data says, and of the small decisions that decide whether a number like this can be trusted.&lt;/p&gt;

&lt;h2&gt;
  
  
  The headline numbers
&lt;/h2&gt;

&lt;p&gt;From 8 October to 6 November 2026, people made &lt;strong&gt;10,725 songs in 75 languages&lt;/strong&gt;. That is a 30-day window, so it is a snapshot and not a trend.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;89% of songs were not in English.&lt;/strong&gt; English is 10.7% of the total.&lt;/li&gt;
&lt;li&gt;Persian is the largest language at &lt;strong&gt;24.2%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Arabic is second at &lt;strong&gt;13.8%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;English is third at &lt;strong&gt;10.7%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Hindi is 5.1%, Bengali 3.3% and Urdu 3.0%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The top of the list is not where an English-first product would start: English is third, behind Persian and Arabic.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I counted
&lt;/h2&gt;

&lt;p&gt;The idea is simple: every song row has a language code, so the count is a group-by. One grouped query over finished songs in the window, leaving out ready-made library copies and songs with no language; only totals are published.&lt;/p&gt;

&lt;p&gt;Then the percentage of each language is its count divided by the total, rounded to one decimal place. The work is in the choices around the count.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four things that change the answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. What counts as a song.&lt;/strong&gt; I counted generated songs, not unique users. One person making twenty songs in Persian counts twenty times. If you want to know how many people use a language, that is a different question and needs a distinct count of accounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Which language the row says.&lt;/strong&gt; The count is only as good as the language field stored with each song. A stored value can differ from what you actually hear in an edge case, so I would use a count like this for the big picture and not for anything that needs per-song accuracy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The window.&lt;/strong&gt; Thirty days is short. A holiday, a post going viral in one country or one outreach campaign can move a single language by several points. I would not read the gap between Hindi (5.1%) and Bengali (3.3%) as a ranking, but the gap between Persian and everything else is wide enough to be real.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Rounding.&lt;/strong&gt; Percentages rounded to one decimal can add up to 99.9 or 100.1. If you publish a table, keep the raw counts next to the rounded percentages so nobody has to guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  What surprised me
&lt;/h2&gt;

&lt;p&gt;The most useful result was not the top of the list, it was the shape of it. A product built "for English first" would have one huge bar and a long tail. Ours has a small head of a few large languages (Persian, Arabic, English, Hindi) and then a long tail across 70 more. That affects real engineering decisions: where to spend time checking pronunciation, which scripts need right-to-left layout testing, and which languages deserve a dedicated landing page. Right-to-left rendering and Arabic dialect choice are not edge cases for us, they are the main case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it or reuse the idea
&lt;/h2&gt;

&lt;p&gt;If you run any product with user-generated content, add a language field early and count it early. It costs nothing and it will probably tell you something you did not expect about who your users are.&lt;/p&gt;

&lt;p&gt;The figures and the date range are on one page: &lt;a href="https://www.songupai.com/ai-music-by-language" rel="noopener noreferrer"&gt;AI music by language&lt;/a&gt;. If you quote them, please include the window (8 October to 6 November 2026).&lt;/p&gt;

&lt;p&gt;If you have run a similar count on your own product, I would like to hear which language surprised you.&lt;/p&gt;

</description>
      <category>data</category>
      <category>music</category>
      <category>sql</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Why our stem separator runs in the browser on a laptop and on our servers for a phone</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Thu, 05 Nov 2026 22:48:22 +0000</pubDate>
      <link>https://dev.to/rakim777/why-our-stem-separator-runs-in-the-browser-on-a-laptop-and-on-our-servers-for-a-phone-2bol</link>
      <guid>https://dev.to/rakim777/why-our-stem-separator-runs-in-the-browser-on-a-laptop-and-on-our-servers-for-a-phone-2bol</guid>
      <description>&lt;p&gt;I build SongUp AI, an AI song maker with a set of browser audio tools. One of the most used paid tools is the stem separator: upload a song, get vocals, drums, bass and the rest back as separate tracks. This is the story of how it went from "runs entirely in your browser" to "runs wherever it will actually finish", and the numbers that forced each step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 1: everything on the device
&lt;/h2&gt;

&lt;p&gt;The first version ran a Demucs-family model (htdemucs, exported to ONNX) in the browser with onnxruntime-web. No upload, no server cost, the file never left the computer. On a desktop with 16 GB of RAM it was fine.&lt;/p&gt;

&lt;p&gt;The problem showed up in the logs on 15 October: three paying users opened the stem tools on their phones that day and zero finished. The model needs about 2.5 GB of memory while it runs. A phone browser does not have that, and when it runs out the tab is reloaded with no error you can catch. From the user's side the page just blinks and the song is gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 2: phones go to a server
&lt;/h2&gt;

&lt;p&gt;We had Cloudflare credit, so the server side became a Cloudflare Worker with a Durable Object queue (one job at a time, driven by alarms) and a Container running Node 22, onnxruntime-node and ffmpeg with the same ONNX models baked into the image. Stems land in R2 and are kept for seven days, then a cron deletes them. A D1 table tracks the jobs.&lt;/p&gt;

&lt;p&gt;Speed on CPU came out at roughly 1 to 1.5 times the song length: a three-minute song takes two to four minutes. Durable Object alarms have a 15-minute wall limit, so songs are capped at six minutes and 40 MB.&lt;/p&gt;

&lt;p&gt;Routing rules in the client:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;phones, and computers reporting 4 GB or less through &lt;code&gt;navigator.deviceMemory&lt;/code&gt;, always use the server;&lt;/li&gt;
&lt;li&gt;a browser where a run crashed before (we keep a flag in storage) always uses the server;&lt;/li&gt;
&lt;li&gt;everything else tries the device first and moves to the server once per file on any error, a two-minute stall, or an estimate of more than 12 minutes still to go.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Paid users get 5 server splits a day and 30 a month. Failed jobs do not count.&lt;/p&gt;

&lt;p&gt;One cost lesson from this stage: the container stayed awake for three minutes after every job by default. Sixty-three jobs, about 90 minutes of real work, produced hours of billed uptime. &lt;code&gt;sleepAfter = '1m'&lt;/code&gt; cut most of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 3: paid users go to the server everywhere
&lt;/h2&gt;

&lt;p&gt;The device-first rule for desktops looked right until we audited the tools paid users use most. In 14 days the client had reported 108 "stem run cut off (out of memory)" events. Seventy-four of them came from the mashup tool, which splits two songs back to back, and most were on 8 to 32 GB machines running Safari or Firefox, which do not expose &lt;code&gt;deviceMemory&lt;/code&gt; at all. The heuristic had no information to work with, so it chose the browser, and the browser died.&lt;/p&gt;

&lt;p&gt;So the rule changed: a paid member splits on our servers on every device, in every tool that needs stems (stem separator, mashup, karaoke and acapella, blend). Only when the server has done ten splits for that account in a day does the computer fall back to the browser. Server load at the time was under 30 of the 100 site-wide splits a day we allow, so there was room.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would tell someone building the same thing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Memory, not CPU, is the limit for in-browser audio ML.&lt;/strong&gt; A model that fits on a laptop will take a phone tab down silently. Catch it on the next load (we store a flag before a run and clear it after) because you will not catch it during.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;deviceMemory&lt;/code&gt; is a hint, not a fact.&lt;/strong&gt; Safari and Firefox never send it. Any rule built on it needs a default for "unknown", and the safe default is the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit by user segment, not by average.&lt;/strong&gt; The average success rate looked fine. Paid users on the tools they paid for did not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure idle time on containers.&lt;/strong&gt; The job cost was small; the idle after each job was the bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep both paths.&lt;/strong&gt; The browser path is still a zero-cost fallback when the server quota is spent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The tool is at &lt;a href="https://www.songupai.com/tools/stem-separator" rel="noopener noreferrer"&gt;https://www.songupai.com/tools/stem-separator&lt;/a&gt;. The stems part needs a paid plan; the models load from our own R2 bucket, nothing is fetched from GitHub at run time.&lt;/p&gt;

&lt;p&gt;Not solved yet, in the interest of honesty: Demucs leaves some vocal "ghosting" in the instrumental on dense mixes, the desktop-to-server fallback has not been exercised on a real phone end to end, and our tempo detector is still ambiguous on dancehall (it reads 132 BPM where other tools say 112 or 66). Those are next.&lt;/p&gt;

&lt;p&gt;P.S. The song side of the same app, in 28 seconds (a song for a husband, his name in the chorus):&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>audio</category>
      <category>cloudflare</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Chord detection in the browser: what a free chord finder can and cannot hear</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Wed, 28 Oct 2026 16:47:25 +0000</pubDate>
      <link>https://dev.to/rakim777/chord-detection-in-the-browser-what-a-free-chord-finder-can-and-cannot-hear-469o</link>
      <guid>https://dev.to/rakim777/chord-detection-in-the-browser-what-a-free-chord-finder-can-and-cannot-hear-469o</guid>
      <description>&lt;p&gt;I build SongUp AI, and one of the free tools on the site is a chord finder: you drop in an MP3, WAV, M4A or FLAC file and it returns the chord progression with a timestamp for every change, plus the key and the BPM. The part I care about most is where it runs. The analysis happens in your browser, so the song never leaves your device. That choice shapes what the tool is good at, and it is worth explaining honestly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the tool actually does
&lt;/h2&gt;

&lt;p&gt;At a high level there are two jobs. The first is finding &lt;em&gt;when&lt;/em&gt; things change. Onset analysis looks for the moments where energy jumps, which is where notes and chords tend to start. Those onsets also give the tempo estimate.&lt;/p&gt;

&lt;p&gt;The second job is finding &lt;em&gt;what&lt;/em&gt; is playing. A chromagram folds every frequency in the audio into twelve pitch classes, C through B, regardless of octave. A C major chord lights up C, E and G. The tool compares each slice of the chromagram against chord profiles, 168 chord types in all: major, minor, sevenths, diminished, augmented and suspended chords. The best match per segment becomes a chord on the timeline. Summing the chroma across the whole song gives the key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why in the browser
&lt;/h2&gt;

&lt;p&gt;Three reasons. Privacy: people upload unreleased demos and other people's songs they are learning, and neither needs to sit on a server. Cost: running the analysis on the visitor's device means the tool can stay free with a free account and no daily limit. Speed: there is no upload step for a 40 MB WAV, so the wait is only the analysis.&lt;/p&gt;

&lt;p&gt;The cost of that choice is that the model has to be light enough to run on a phone, so it will not match a trained musician on dense material.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it works well, and where it does not
&lt;/h2&gt;

&lt;p&gt;It works best on songs where the harmony is clear: a guitar or piano with a voice, pop with a steady band, a singer-songwriter demo. It struggles where any chord detector struggles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Heavy distortion and dense mixes.&lt;/strong&gt; Distorted guitars add many overtones, which smear the chroma.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bass-less or bass-heavy mixes.&lt;/strong&gt; Inversions (C/E) are hard to separate from a different chord.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast passing chords.&lt;/strong&gt; A chord that lasts half a beat may merge with its neighbour.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extended jazz voicings.&lt;/strong&gt; A 13th chord can read as a simpler chord with the same core notes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The practical fix for the first two is the one the page suggests: if you can, split the song into stems first and run the chord finder on the instrument stem without the vocal. Less going on means a cleaner chromagram.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I use the result
&lt;/h2&gt;

&lt;p&gt;I treat the output as a first draft. I copy the progression as text, play along with the track, and fix the two or three chords that sound wrong. That is still much faster than working out a whole song by ear, and the timestamps make it easy to jump to the bar that needs checking.&lt;/p&gt;

&lt;p&gt;If you want to try it on a song you are learning: &lt;a href="https://www.songupai.com/tools/chord-recognition" rel="noopener noreferrer"&gt;AI Chord Finder: chords, key and BPM of any song&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would like to hear which songs trip it up, especially in genres outside pop, so I know where to look next.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Drafted with help from an AI writing assistant and edited by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>music</category>
      <category>javascript</category>
      <category>webaudio</category>
      <category>ai</category>
    </item>
    <item>
      <title>A producer's order of operations when every tool is on one page</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Sun, 25 Oct 2026 13:29:20 +0000</pubDate>
      <link>https://dev.to/rakim777/a-producers-order-of-operations-when-every-tool-is-on-one-page-163</link>
      <guid>https://dev.to/rakim777/a-producers-order-of-operations-when-every-tool-is-on-one-page-163</guid>
      <description>&lt;p&gt;Most of my music workflow used to be a list of tabs. One tab to split a song into stems, another to match the key of two tracks, another to clean up a vocal, another to master the result. Each tab wanted its own file, its own download, and its own re-upload. The work was not hard. The friction was the problem.&lt;/p&gt;

&lt;p&gt;The SongUp AI Studio puts those steps on one page. There are 44 tools in the list, from a song maker and Hum to Song to a stem separator, a karaoke maker, a mashup maker, auto-tune and mastering. You scroll, pick a tool, and it opens in place. Opening the page costs nothing. Running a tool asks you to sign in with a free account and, for runs, a paid plan, so the page is a free place to look around but not a free place to process audio.&lt;/p&gt;

&lt;p&gt;Here is the order I would use if I were starting a track from a rough idea, and why.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with the idea.&lt;/strong&gt; If you have a melody in your head but no chords or words, Hum to Song turns a 5 to 20 second hum into notes, a key, a tempo and a chord for each bar, then records a backing band in that key. Doing this first means every later step has a key and tempo to follow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Split the stems when you need to learn from or rebuild a song.&lt;/strong&gt; A stem separator gives you vocals and the instruments as separate files. It is the fastest way to check how a reference track is arranged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build the mashup last among the creative steps.&lt;/strong&gt; A mashup is only as good as the two keys and tempos you put together. Check those before you layer anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tune the vocal before mastering.&lt;/strong&gt; Auto-tune is easier on a clean vocal stem than on a full mix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Master at the end, on the finished mix.&lt;/strong&gt; Mastering a track you are still changing wastes the time you put into it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The rule underneath the list is simple: change one thing at a time, and keep the file you started from. The page makes that easier because the file never has to leave the page between steps.&lt;/p&gt;

&lt;p&gt;None of this replaces a good ear. The tools do the repetitive work, and you still decide what sounds right. If a step sounds wrong, go back one step and listen again.&lt;/p&gt;

&lt;p&gt;If you want to try the order, open the Studio, start with Hum to Song or the stem separator, and work down the list: &lt;a href="https://www.songupai.com/studio" rel="noopener noreferrer"&gt;https://www.songupai.com/studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I build SongUp AI. The list above is how I work, not a claim about how anyone else should.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>music</category>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Our music model ignores the key we ask for, so the browser measures the backing instead</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Mon, 19 Oct 2026 00:51:42 +0000</pubDate>
      <link>https://dev.to/rakim777/our-music-model-ignores-the-key-we-ask-for-so-the-browser-measures-the-backing-instead-5e3d</link>
      <guid>https://dev.to/rakim777/our-music-model-ignores-the-key-we-ask-for-so-the-browser-measures-the-backing-instead-5e3d</guid>
      <description>&lt;p&gt;&lt;a href="https://www.songupai.com/ai-tools/humming" rel="noopener noreferrer"&gt;Hum to Song&lt;/a&gt; has one promise: the tune you hummed is really in the finished song. Not "inspired by", not a new melody in the same mood. Your notes.&lt;/p&gt;

&lt;p&gt;The pipeline looked simple on paper:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Transcribe the hum in the browser (Spotify's open-source Basic Pitch model) into notes, plus tempo, key and a chord for every bar.&lt;/li&gt;
&lt;li&gt;Ask a text-to-music model (we use Google's Lyria) for a backing band in exactly that key, tempo and chord loop.&lt;/li&gt;
&lt;li&gt;Play the melody on top.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 2 is where it broke. The model doesn't accept audio input, so the only way to steer it is the prompt. On our test sheet ("Twinkle", A major, 96 BPM) real backings showed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tempo:&lt;/strong&gt; usually exact, but not always (we got 95 and 100).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key:&lt;/strong&gt; followed 1 time out of 3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chords:&lt;/strong&gt; the loop often started on its own bar. One backing opened its body on the IV chord.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intro:&lt;/strong&gt; we asked for 4 bars and got 2-, 3- and 8-bar intros, often with a drum fill in the last one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Laying the melody on at bar 5, in A, at 96 BPM produced exactly what you'd expect: a melody fighting the band. So we stopped trusting the prompt and started measuring the audio we got back. Everything below runs in an &lt;code&gt;OfflineAudioContext&lt;/code&gt; in the browser, with no samples to download, and gives the same result every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Tempo: a comb filter near the tempo we asked for
&lt;/h2&gt;

&lt;p&gt;We compute an onset envelope (~10 ms hop), then score candidate tempi by summing the envelope at every beat position, for every phase. The search stays within ±8% of the requested BPM, because a free-range tempo search on pop music happily locks onto half or double time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findTempo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Features&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;targetBpm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;evalBpm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bpm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;period&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;bpm&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frameSec&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;bestPhase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;ph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;ph&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;period&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;ph&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ph&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;period&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;sampleAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;best&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;best&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;bestPhase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ph&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// Per beat, so faster tempi don't win just by counting more beats.&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;bpm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;phaseFrames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bestPhase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;strength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;best&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;period&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="c1"&gt;// ...search target ±8%, then half and double time, which only win when&lt;/span&gt;
  &lt;span class="c1"&gt;// they're clearly stronger (&amp;gt; 1.35×), because the melody should follow&lt;/span&gt;
  &lt;span class="c1"&gt;// the tempo it was written in.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Normalising the score per beat was the fix that mattered. Without it, double time wins almost every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Where does the body start?
&lt;/h2&gt;

&lt;p&gt;The downbeat is the beat (of 4) that carries the kick and the chord changes, so each candidate offset is scored on low-end energy plus how much the chroma changes across it.&lt;/p&gt;

&lt;p&gt;Finding the end of the intro was harder. The obvious rule ("the biggest jump in level") failed on a real backing: the drum fill in the last intro bar was the biggest jump, one bar early. A fill is loud but has no low end. So a bar only counts as the start of the body when the level &lt;strong&gt;and&lt;/strong&gt; the kick/bass energy reach what the song holds for most of its length:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;barLow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.75&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;lowRef&lt;/span&gt;
    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;quietSoFar&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.65&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;introBars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;lowRef&lt;/code&gt; and the level reference are medians over bars in the middle of the song, so a loud final chorus doesn't skew them.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Key: correlate pitch classes, all 12 ways
&lt;/h2&gt;

&lt;p&gt;Take the melody's pitch classes weighted by note length, rotate them through −6…+5 semitones, and correlate each rotation with the backing's average chroma over the body. The requested key gets a tiny 0.02 bonus as a tie-breaker. The best rotation is the transposition.&lt;/p&gt;

&lt;p&gt;This is why the finished song can end up a few semitones away from what you hummed. We'd rather move your tune than have it clash with the band.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Chords: one Goertzel filter per semitone
&lt;/h2&gt;

&lt;p&gt;The model often plays its own chords rather than the ones we asked for. To keep the tune off clashes we need to know what the band plays every half bar, and here the analysis FFT let us down: at 11 kHz with 1024-sample frames, a bin is ~11 Hz wide, wider than the gap between neighbouring notes below about A3.&lt;/p&gt;

&lt;p&gt;So the harmony map uses one Goertzel filter per semitone from E2 to C6. Goertzel is a single-bin DFT: cheap when you only need ~45 specific frequencies, and it can be tuned exactly to each note.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;goertzel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;coeff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;coeff&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;s2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;coeff&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// power at freq&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fold the 45 powers into 12 pitch classes, normalise to max = 1, and you have a chroma vector per half bar.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Shift the phrase, then fix only the real clashes
&lt;/h2&gt;

&lt;p&gt;Two last moves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Phrase shift:&lt;/strong&gt; try starting the melody on the bar the band comes in, and up to 3 bars later. Score each by how much of the melody's duration sits on pitch classes the band is playing. Only move if it's at least 5% better; otherwise keep the natural entrance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clash fix:&lt;/strong&gt; a note moves only when its pitch class is nearly absent from the band (&amp;lt; 0.3) &lt;em&gt;and&lt;/em&gt; a note a semitone away rings strongly (≥ 0.55). Then it moves by one semitone toward it. Whole-tone neighbours are left alone, so passing notes survive. Only minor-second rubs get fixed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On one real backing these steps took the melody's consonance with the band from 0.50 to 0.63. A unit-test script with 60 checks pins the maths so the next tweak doesn't quietly undo it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell anyone building on generative audio
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Treat the model's output as data to measure, not a contract.&lt;/strong&gt; The prompt is a request. The audio is the truth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain prompts beat clever ones.&lt;/strong&gt; One plain chord loop ("A | D | D | E, I–IV–IV–V in A major") was followed better than a detailed per-section timeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let users hear the cheap step first.&lt;/strong&gt; Before anything is charged, Hum to Song plays back the transcribed notes on their own: "this is the tune we heard". If the transcription is wrong, nobody pays to find out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to try it, hum 5–20 seconds into &lt;a href="https://www.songupai.com/ai-tools/humming" rel="noopener noreferrer"&gt;Hum to Song&lt;/a&gt; and listen to what it heard. That part is free; the full song needs a paid SongUp AI plan. The non-technical version of this post, with recording tips, is the &lt;a href="https://www.songupai.com/blog/how-to-turn-humming-into-a-song" rel="noopener noreferrer"&gt;hum-to-song guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webaudio</category>
      <category>ai</category>
      <category>music</category>
    </item>
    <item>
      <title>Building a lo-fi tape + vinyl effect in plain TypeScript (no Web Audio graph, no WASM)</title>
      <dc:creator>Rakim</dc:creator>
      <pubDate>Fri, 16 Oct 2026 17:28:07 +0000</pubDate>
      <link>https://dev.to/rakim777/building-a-lo-fi-tape-vinyl-effect-in-plain-typescript-no-web-audio-graph-no-wasm-307p</link>
      <guid>https://dev.to/rakim777/building-a-lo-fi-tape-vinyl-effect-in-plain-typescript-no-web-audio-graph-no-wasm-307p</guid>
      <description>&lt;p&gt;Most "lo-fi" browser effects are a Web Audio graph: a &lt;code&gt;BiquadFilterNode&lt;/code&gt;, a &lt;code&gt;WaveShaperNode&lt;/code&gt;, maybe a noise buffer. That's fine for a filter, but two parts of the lo-fi sound don't map to built-in nodes very well: &lt;strong&gt;sample-and-hold rate reduction&lt;/strong&gt; and &lt;strong&gt;tape wow and flutter&lt;/strong&gt;. So for the &lt;a href="https://songupai.com/tools/lofi-effect" rel="noopener noreferrer"&gt;Lo-Fi &amp;amp; Vintage Sampler&lt;/a&gt; we wrote the whole chain as a plain sample loop in TypeScript over &lt;code&gt;AudioBuffer&lt;/code&gt; channel data.&lt;/p&gt;

&lt;p&gt;This post walks through the four stages and the small decisions that made them sound right.&lt;/p&gt;

&lt;h2&gt;
  
  
  The chain
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input → [sampler] → [tape] → [vinyl] → [clipper] → dry/wet mix → peak limit to -1 dBFS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every stage can be switched off, and a &lt;code&gt;mix&lt;/code&gt; control blends the original back in. Here are the settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;LoFiSettings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;sampler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;bits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;tape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;wow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;tapeCut&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;hiss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;vinyl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;crackle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;clipper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;clipDb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;mix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  1. A tiny biquad you can run per sample
&lt;/h2&gt;

&lt;p&gt;Web Audio's &lt;code&gt;BiquadFilterNode&lt;/code&gt; only runs inside a graph. Inside a loop you need your own, so we use the RBJ Audio EQ Cookbook formulas (lowpass, highpass and lowshelf) in a 25-line class with &lt;code&gt;run(x)&lt;/code&gt; that keeps &lt;code&gt;x1, x2, y1, y2&lt;/code&gt; state. Every stage below uses it.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Sampler: rate and bit depth
&lt;/h2&gt;

&lt;p&gt;Old samplers ran at low sample rates with few bits. Two steps make that sound:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;step&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sr&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// input samples per held sample&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;levels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bits&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aa&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aa&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;            &lt;span class="c1"&gt;// 2 lowpass biquads at 0.9 × new Nyquist&lt;/span&gt;
&lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nx"&gt;step&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="nx"&gt;step&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;held&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;levels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;levels&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;held&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anti-alias first.&lt;/strong&gt; Without the two lowpass filters in front, sample-and-hold folds the highs back down as harsh, inharmonic aliasing. With them you get the dull, round sampler tone people mean by "SP-1200-ish". (It's a general recipe, not a model of any one machine.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A fractional step.&lt;/strong&gt; &lt;code&gt;step&lt;/code&gt; isn't an integer, so the accumulator keeps any target rate exact instead of snapping to &lt;code&gt;sr / n&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Tape: one motor, one wobble
&lt;/h2&gt;

&lt;p&gt;Wow (slow) and flutter (fast) are pitch wobble, and the easy way to get pitch wobble is a &lt;strong&gt;delay line whose delay time moves&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;maxDelay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;wowDepth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.55&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;            &lt;span class="c1"&gt;// wow ~0.55 Hz, up to 2.5 ms&lt;/span&gt;
  &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;flutterDepth&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;6.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;1.3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// flutter ~6.5 Hz&lt;/span&gt;
&lt;span class="c1"&gt;// read the ring buffer at w - d with linear interpolation&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One detail matters more than it looks: &lt;strong&gt;both channels use the same &lt;code&gt;t&lt;/code&gt;&lt;/strong&gt;. A real cassette has one motor, so left and right wobble together. Give each channel its own LFO and the stereo image smears and "chorus-es", which reads as a modulation effect, not as tape.&lt;/p&gt;

&lt;p&gt;After the wobble come &lt;code&gt;tanh&lt;/code&gt; saturation (normalised by &lt;code&gt;tanh(drive)&lt;/code&gt; so the level doesn't jump), a +2.5 dB low shelf at 90 Hz (head bump), an adjustable high cut, and highpassed noise for hiss.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Vinyl: crackle as rare, decaying clicks
&lt;/h2&gt;

&lt;p&gt;Crackle is not constant noise. It's &lt;strong&gt;rare, random impulses that die away quickly&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crackle&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.0004&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;click&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crackle&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;clickDecay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;crackLp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nx"&gt;click&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="nx"&gt;clickDecay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The clicks go through a 5 kHz lowpass so they "pop" instead of "tick", and the whole signal gets a 45 Hz highpass and a 12 kHz lowpass for the band-limited record sound. The PRNG is a seeded LCG per channel, so a render is repeatable.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Clipper and a safe output
&lt;/h2&gt;

&lt;p&gt;A hard clip at &lt;code&gt;clipDb&lt;/code&gt;, scaled back up, then one last pass that pulls the peak down to −1 dBFS if anything is over. Whatever settings someone dials in, the downloaded MP3 or WAV never clips.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the page responsive
&lt;/h2&gt;

&lt;p&gt;A 4-minute stereo song is about 21 million loop iterations. We process in chunks of 65,536 samples and &lt;code&gt;await&lt;/code&gt; a &lt;code&gt;setTimeout(0)&lt;/code&gt; between them, which updates a progress bar and keeps the tab responsive. No worker was needed for this one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing DSP without ears
&lt;/h2&gt;

&lt;p&gt;The DSP lives in its own module (&lt;code&gt;lofi-dsp.ts&lt;/code&gt;), separate from the React page, so it can be tested in Node. The checks are plain assertions on synthetic signals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a 4-bit sampler leaves at most 17 distinct levels, and at 11 kHz most samples are repeats (sample-and-hold works)&lt;/li&gt;
&lt;li&gt;the output peak never goes over 0.89 (−1 dBFS)&lt;/li&gt;
&lt;li&gt;the hard clipper turns a loud sine into mostly flat tops&lt;/li&gt;
&lt;li&gt;with wow and flutter on, the period of a steady 1 kHz tone changes from cycle to cycle&lt;/li&gt;
&lt;li&gt;mix at 0% gives back the original, apart from the −1 dB ceiling&lt;/li&gt;
&lt;li&gt;the full chain renders a 3-minute stereo song in under 20 seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Two siblings shipped the same day
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://songupai.com/tools/vocal-chop-maker" rel="noopener noreferrer"&gt;Vocal Chop Maker&lt;/a&gt;: onset detection cuts a dry vocal into up to 16 chops, which you play from the keyboard or a Web MIDI device and export as a ZIP.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://songupai.com/tools/drum-swing" rel="noopener noreferrer"&gt;Drum Swing &amp;amp; Humanizer&lt;/a&gt;: swing delays every second 16th by &lt;code&gt;(swing − 50%) × 2 × one 16th&lt;/code&gt;. That's 40 ms at 62% and 90 BPM. It exports a 4-bar MIDI file and a loop-exact WAV. There's a longer write-up on the maths in &lt;a href="https://songupai.com/blog/what-is-swing-in-music" rel="noopener noreferrer"&gt;What is swing in music&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three run in the browser (you need a free account). Questions about the DSP are welcome in the comments.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I build SongUp AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>music</category>
    </item>
  </channel>
</rss>
