{"by":"dioptre","descendants":7,"id":46581431,"kids":[46647227,46635884,46636319,46581683,46585222],"score":32,"text":"Built this over the weekend to bridge the gap between &quot;can hum a melody&quot; and &quot;can code algorithmic music patterns&quot; (Strudel&#x2F;TidalCycles) for live coding and live dj&#x27;ing.<p>What it does:<p>Real-time pitch detection in browser using multiple algorithms:\nCREPE (deep learning model via TensorFlow.js)\nYIN (autocorrelation-based fundamental frequency estimation)\nFFT with harmonic product spectrum\nAMDF (average magnitude difference function)\nOutputs: visual piano roll, MIDI files, Strudel&#x2F;TidalCycles code\nAll client-side, nothing leaves your machine\nWhy multiple algorithms:\nDifferent pitch detection approaches work better for different inputs. CREPE is most accurate but computationally expensive; YIN is fast and works well for clean monophonic input; FFT&#x2F;HPS handles harmonic-rich sounds; AMDF is lightweight. Let users switch based on their use case.<p>Technical details:<p>React, runs entirely in browser via Web Audio API\nCanvas-based visualization with real-time waveform rendering<p>The original problem: I wanted to learn live coding but had zero music theory. This makes it trivial to capture melodic ideas and immediately use them in pattern-based music systems.<p>Try it: <a href=\"https:&#x2F;&#x2F;dioptre.github.io&#x2F;tidal&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;dioptre.github.io&#x2F;tidal&#x2F;</a><p>Works best on desktop. Will work more like a Digital Audio Workbench (DAW).<p>Source: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;dioptre&#x2F;tidal\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;dioptre&#x2F;tidal</a>","time":1768172778,"title":"Show HN: Voice Composer – Browser-based pitch detection to MIDI/strudel/tidal","type":"story","url":"https://dioptre.github.io/tidal/"}