<?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: AI Tool Research Lab</title>
    <description>The latest articles on DEV Community by AI Tool Research Lab (@aitoolresearchlab).</description>
    <link>https://dev.to/aitoolresearchlab</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%2F4059252%2F4c22c6ef-226b-48bf-9784-5d8487df96ef.png</url>
      <title>DEV Community: AI Tool Research Lab</title>
      <link>https://dev.to/aitoolresearchlab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aitoolresearchlab"/>
    <language>en</language>
    <item>
      <title>How to build AI products on top of deterministic domain rules</title>
      <dc:creator>AI Tool Research Lab</dc:creator>
      <pubDate>Sun, 09 Aug 2026 07:09:21 +0000</pubDate>
      <link>https://dev.to/aitoolresearchlab/how-to-build-ai-products-on-top-of-deterministic-domain-rules-20af</link>
      <guid>https://dev.to/aitoolresearchlab/how-to-build-ai-products-on-top-of-deterministic-domain-rules-20af</guid>
      <description>&lt;p&gt;Domain-specific AI products often fail in one of two ways. They either ask a language model to calculate facts it was never designed to calculate, or they hide a deterministic rules engine behind an answer that users cannot audit.&lt;/p&gt;

&lt;p&gt;A better architecture separates computation from interpretation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two-layer model
&lt;/h2&gt;

&lt;p&gt;The first layer produces facts from explicit inputs. The second layer explains those facts in natural language.&lt;/p&gt;

&lt;p&gt;For a calendar, financial calculator, medical scoring rule, or traditional charting system, the first layer should be deterministic whenever the domain permits it. The same input should produce the same structured output. Intermediate values should be visible, testable, and versioned.&lt;/p&gt;

&lt;p&gt;The AI layer should not silently recalculate those facts. It should receive a structured snapshot and answer questions about it.&lt;/p&gt;

&lt;p&gt;A simple data flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Validate input and normalize time, location, units, and locale.&lt;/li&gt;
&lt;li&gt;Run a deterministic domain engine.&lt;/li&gt;
&lt;li&gt;Store both the result and the calculation settings.&lt;/li&gt;
&lt;li&gt;Build an interpretation context from selected facts.&lt;/li&gt;
&lt;li&gt;Ask the model to explain, compare, or summarize within clear boundaries.&lt;/li&gt;
&lt;li&gt;Show the underlying facts next to the generated language.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why this matters for specialized calculators
&lt;/h2&gt;

&lt;p&gt;Consider a BaZi chart. Solar-term boundaries, birth time, location, time-zone handling, and the displayed Four Pillars are rule-based facts. If a language model guesses them directly, a fluent answer can still be internally inconsistent.&lt;/p&gt;

&lt;p&gt;In a system such as the &lt;a href="https://www.ba-zi.ai/zh-TW/calculator" rel="noopener noreferrer"&gt;Traditional Chinese BaZi calculator&lt;/a&gt;, the calculation should remain reproducible while AI interpretation stays optional. Users can inspect the chart first, then decide whether they want a narrative explanation.&lt;/p&gt;

&lt;p&gt;Qi Men Dunjia has the same architectural requirement. A &lt;a href="https://www.qimenmind.com/en/qimen-dunjia-calculator" rel="noopener noreferrer"&gt;Qi Men chart calculator&lt;/a&gt; must establish the time and nine-palace structure before an AI layer discusses patterns or decision factors. The model should interpret the supplied chart, not invent a different one halfway through the response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Treat provenance as product data
&lt;/h2&gt;

&lt;p&gt;A structured output should include more than the headline result. It can also carry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;normalized input values;&lt;/li&gt;
&lt;li&gt;time-zone and location assumptions;&lt;/li&gt;
&lt;li&gt;rule or algorithm version;&lt;/li&gt;
&lt;li&gt;relevant boundary conditions;&lt;/li&gt;
&lt;li&gt;confidence or uncertainty flags;&lt;/li&gt;
&lt;li&gt;a list of facts exposed to the language model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This provenance makes debugging possible. When a user reports a wrong answer, the team can determine whether the problem came from input normalization, the rules engine, context assembly, or the model response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test the seam, not only each layer
&lt;/h2&gt;

&lt;p&gt;Unit tests can prove that the rules engine handles known cases, and prompt evaluations can score explanation quality. The most expensive failures often appear at the seam between them.&lt;/p&gt;

&lt;p&gt;For example, a correct structured result may be mapped to the wrong prompt field. A locale transformation may change a date. A summary step may drop a boundary flag. An AI response may refer to a value that was never present in the supplied context.&lt;/p&gt;

&lt;p&gt;Integration tests should therefore capture the exact structured payload passed to the model and verify that generated claims are grounded in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design the interface around verification
&lt;/h2&gt;

&lt;p&gt;The UI should let users distinguish three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;calculated facts&lt;/strong&gt;, produced by the deterministic engine;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;assumptions and settings&lt;/strong&gt;, chosen by the user or system;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;interpretation&lt;/strong&gt;, generated or written about those facts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction is more useful than a generic AI disclaimer. It shows users what can be reproduced and what remains interpretive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The general pattern
&lt;/h2&gt;

&lt;p&gt;The same architecture applies beyond metaphysical calculators. Tax estimators, eligibility tools, engineering calculators, scoring systems, and compliance checkers all benefit from a stable rules layer with an optional language layer.&lt;/p&gt;

&lt;p&gt;Use code for what must be consistent. Use AI for what benefits from explanation. Keep the boundary visible.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why audio-to-MIDI needs more than one workflow</title>
      <dc:creator>AI Tool Research Lab</dc:creator>
      <pubDate>Sun, 09 Aug 2026 07:07:28 +0000</pubDate>
      <link>https://dev.to/aitoolresearchlab/why-audio-to-midi-needs-more-than-one-workflow-1499</link>
      <guid>https://dev.to/aitoolresearchlab/why-audio-to-midi-needs-more-than-one-workflow-1499</guid>
      <description>&lt;p&gt;Audio-to-MIDI is often described as a single machine-learning problem: feed audio into a model and receive notes. In practice, that framing hides the decisions that matter most.&lt;/p&gt;

&lt;p&gt;A clean monophonic melody, a piano recording, and a full mastered song do not fail for the same reasons. Treating them as one workflow produces impressive demos and frustrating real-world results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start by classifying the source
&lt;/h2&gt;

&lt;p&gt;Before transcription, ask three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the signal monophonic or polyphonic?&lt;/li&gt;
&lt;li&gt;Is the target instrument isolated or mixed with other sources?&lt;/li&gt;
&lt;li&gt;Does the user need a rough musical sketch or an editable performance?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A monophonic lead has one dominant fundamental at a time. A piano can contain many simultaneous notes with long overlapping decays. A full mix adds drums, vocals, bass, reverb, compression, and mastering artifacts. These inputs need different preprocessing, confidence thresholds, and post-processing rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separation can matter more than the transcription model
&lt;/h2&gt;

&lt;p&gt;When the target instrument is buried in a mix, transcription quality is limited by what reaches the note detector. A larger model cannot recover every detail that has already been masked by other sources.&lt;/p&gt;

&lt;p&gt;A practical pipeline therefore separates the problem into stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;decode and normalize the audio;&lt;/li&gt;
&lt;li&gt;isolate or emphasize the target source when possible;&lt;/li&gt;
&lt;li&gt;estimate note onsets, offsets, pitch, and velocity;&lt;/li&gt;
&lt;li&gt;remove short false notes and merge unstable fragments;&lt;/li&gt;
&lt;li&gt;expose the result for human correction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also explains why a WAV workflow can behave differently from an &lt;a href="https://puremidi.com/mp3-to-midi" rel="noopener noreferrer"&gt;MP3-to-MIDI workflow&lt;/a&gt;. Lossy encoding can smear transients and introduce pre-echo around attacks. For material where note onset timing matters, the uncompressed &lt;a href="https://puremidi.com/wav-to-midi" rel="noopener noreferrer"&gt;WAV-to-MIDI path&lt;/a&gt; preserves more of the signal the detector needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confidence should influence the output
&lt;/h2&gt;

&lt;p&gt;Many systems convert every local pitch estimate into a MIDI event. That maximizes recall but often creates a dense cloud of tiny notes. A more usable workflow treats confidence as a control signal.&lt;/p&gt;

&lt;p&gt;For example, lower-confidence events can be shortened, suppressed, or presented as candidates for review. Adjacent fragments with compatible pitch and timing can be merged. Extremely short notes can be filtered unless the source is percussive. The correct thresholds depend on the instrument and the user's goal.&lt;/p&gt;

&lt;p&gt;This is not merely cleanup. MIDI is an editable symbolic representation, so usability matters as much as raw note accuracy. A result with slightly fewer correct notes can be more valuable if it has stable timing and is easy to repair.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep a human in the loop
&lt;/h2&gt;

&lt;p&gt;Audio transcription is rarely a final export. Musicians usually want to change tempo, correct a pitch, quantize selected notes, or move the result into a DAW.&lt;/p&gt;

&lt;p&gt;That is why an &lt;a href="https://puremidi.com/midi-editor-online" rel="noopener noreferrer"&gt;online MIDI editor&lt;/a&gt; belongs in the same workflow as transcription. The model produces a structured draft; the editor lets the user verify and adapt it. This is especially important for polyphonic recordings, expressive timing, bends, and audio with heavy effects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design two workflows, not one
&lt;/h2&gt;

&lt;p&gt;A useful product can expose at least two modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fast sketch:&lt;/strong&gt; optimized for a clean solo phrase and immediate playback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Editable production draft:&lt;/strong&gt; optimized for source separation, multitrack structure, confidence-aware cleanup, and manual correction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first mode minimizes friction. The second acknowledges uncertainty and gives the user control. Mixing both into one button tends to produce an interface that is simple but an output that is difficult to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  The broader lesson
&lt;/h2&gt;

&lt;p&gt;Machine-learning products improve when the workflow is designed around the structure of the input, not only the capability of the model. For audio-to-MIDI, the decisive questions are often upstream and downstream of inference: what signal was provided, what should be isolated, what uncertainty should be preserved, and how will a musician correct the result?&lt;/p&gt;

&lt;p&gt;Treat transcription as one stage in an editable pipeline, and the product becomes much more honest—and much more useful.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building a Browser MIDI Editing Workflow After Audio Conversion</title>
      <dc:creator>AI Tool Research Lab</dc:creator>
      <pubDate>Sun, 02 Aug 2026 15:06:24 +0000</pubDate>
      <link>https://dev.to/aitoolresearchlab/building-a-browser-midi-editing-workflow-after-audio-conversion-4pii</link>
      <guid>https://dev.to/aitoolresearchlab/building-a-browser-midi-editing-workflow-after-audio-conversion-4pii</guid>
      <description>&lt;p&gt;An audio-to-MIDI model rarely produces a finished arrangement. The practical output is a draft: notes may be too short, duplicated, shifted by an octave, assigned to the wrong instrument, or split into tracks that still need cleanup.&lt;/p&gt;

&lt;p&gt;That makes the editor—not just the converter—part of the workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Preserve the raw result
&lt;/h2&gt;

&lt;p&gt;Download the original &lt;code&gt;.mid&lt;/code&gt; file and keep it unchanged. Make an editable copy before deleting notes or changing tempo. This gives you a baseline when an edit makes the result worse and preserves evidence for comparing conversion methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Import and inspect structure
&lt;/h2&gt;

&lt;p&gt;Open the MIDI in a piano-roll editor and check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tempo and time signature;&lt;/li&gt;
&lt;li&gt;track count and instrument assignments;&lt;/li&gt;
&lt;li&gt;the lowest and highest detected pitches;&lt;/li&gt;
&lt;li&gt;whether the first musical event aligns with the intended start;&lt;/li&gt;
&lt;li&gt;clusters of very short notes;&lt;/li&gt;
&lt;li&gt;overlapping notes that should represent one sustained event.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;PureMIDI's &lt;a href="https://puremidi.com/midi-editor-online" rel="noopener noreferrer"&gt;online MIDI editor&lt;/a&gt; currently supports browser-side MIDI import, a piano-roll view, multiple tracks, instrument selection, mute/solo/visibility controls, note drawing and erasing, velocity editing, undo/redo, playback, and MIDI export. Some score-derived projects can also expose MusicXML or Guitar Pro-related export paths; those capabilities should not be promised for every imported file.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Fix global errors first
&lt;/h2&gt;

&lt;p&gt;Correct errors that affect the whole file before editing individual notes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Align the start time.&lt;/li&gt;
&lt;li&gt;Correct tempo if the imported value is wrong.&lt;/li&gt;
&lt;li&gt;Transpose octave-shifted material by 12 semitones.&lt;/li&gt;
&lt;li&gt;Assign sensible instruments and track names.&lt;/li&gt;
&lt;li&gt;Mute or hide tracks while isolating a problem part.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Global corrections make local note errors easier to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Clean notes in short sections
&lt;/h2&gt;

&lt;p&gt;Work phrase by phrase. Remove obvious false notes, extend notes that end too early, separate accidental overlaps, and listen after each small batch of changes. Velocity should be edited after pitches and timing are stable; otherwise time is spent polishing notes that may later be deleted.&lt;/p&gt;

&lt;p&gt;Keyboard shortcuts and undo/redo matter here because transcription cleanup involves many reversible micro-edits. A useful editor should make the comparison between the original phrase and the changed MIDI fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Keep track decisions explicit
&lt;/h2&gt;

&lt;p&gt;For multi-track files, record why a track was deleted, merged, duplicated, muted, or assigned another instrument. If the result will be used in a DAW, export a clean MIDI version before adding DAW-specific instruments and effects.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Export and verify
&lt;/h2&gt;

&lt;p&gt;After exporting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reopen the new MIDI file;&lt;/li&gt;
&lt;li&gt;verify track count, tempo, notes, and instruments;&lt;/li&gt;
&lt;li&gt;listen from the beginning and around every edited boundary;&lt;/li&gt;
&lt;li&gt;confirm that the exported file—not only the in-memory editor state—contains the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This round-trip check catches export bugs and unsupported metadata before the source project is closed.&lt;/p&gt;

&lt;h2&gt;
  
  
  A repeatable cleanup checklist
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ ] Raw conversion preserved
[ ] Tempo and time signature checked
[ ] Start offset corrected
[ ] Octave range checked
[ ] Track names and instruments reviewed
[ ] False and duplicate notes removed
[ ] Note lengths corrected
[ ] Velocity reviewed
[ ] Exported MIDI reopened and verified
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production verification
&lt;/h2&gt;

&lt;p&gt;The public, self-owned benchmark MIDI imports successfully and displays one track with 18 notes. The piano-roll screenshot contains no conversion ID or personal filename.&lt;/p&gt;

&lt;p&gt;The first production round-trip check failed: changing the imported file from 120 BPM to 110 BPM and exporting preserved 18 notes and one track, but the parsed duration changed from 17.843 seconds to 8.922 seconds. The cause was a 220 PPQ source being exported with a default 480 PPQ header while retaining the original tick values.&lt;/p&gt;

&lt;p&gt;The fix was deployed to production in merge commit &lt;code&gt;f62bbe7efe8ea9addbe7508cb21c6471323eedd6&lt;/code&gt;. A fresh browser round trip on &lt;code&gt;https://puremidi.com/midi-editor-online&lt;/code&gt; imported the frozen benchmark, changed the tempo from 120 BPM to 110 BPM, and exported 220 PPQ, 110.00011 BPM, one track, 18 notes, and a 19.465-second duration. The production round-trip verification now passes.&lt;/p&gt;

</description>
      <category>music</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
