{"_id":"@audio/mir-chord","_rev":"2-f527868259b2d2c00ddbd3277121aa29","name":"@audio/mir-chord","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/mir-chord","version":"1.0.0","keywords":["audio","dsp","mir","chord","chord-detection","viterbi"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/mir-chord@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"dist":{"shasum":"177982deb7ac18ca2d8f5ef9bbbf6e4b8b577a67","tarball":"https://registry.npmjs.org/@audio/mir-chord/-/mir-chord-1.0.0.tgz","fileCount":2,"integrity":"sha512-WJ651zRbZ6j/6NnqLpoghEevd7v09cz7kEAIPYfVUnlZrua7dCGKbM2qypvauSqu49qAJ8yX7AvKUeGeKkP2sA==","signatures":[{"sig":"MEUCIQDf7ec8jcxowjKzvEe96FZnxoUj3Zv8u05V9DrLzB+3/AIgBJsxtOUUHa3+JdmznGzfxsUhEwQVoXQFaWPhPgNOdRg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4679},"main":"chord.js","type":"module","engines":{"node":">=18"},"exports":{".":"./chord.js","./package.json":"./package.json"},"gitHead":"59e2811439a5d077fcfce741bae3e4090cecffe8","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"24 binary chord templates: C, C#, … B (major) then C, C#, … B (minor)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mir-chord_1.0.0_1783540379692_0.791008287992605","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/mir-chord","version":"1.0.1","description":"24 binary chord templates: C, C#, … B (major) then C, C#, … B (minor)","type":"module","sideEffects":false,"main":"chord.js","exports":{".":"./chord.js","./package.json":"./package.json"},"keywords":["audio","dsp","mir","chord","chord-detection","viterbi"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/audiojs/mir.git","directory":"packages/mir-chord"},"funding":"https://github.com/sponsors/audiojs","types":"index.d.ts","gitHead":"92646d93d32b77e5219d245361ffbcb361ff683e","_id":"@audio/mir-chord@1.0.1","bugs":{"url":"https://github.com/audiojs/mir/issues"},"homepage":"https://github.com/audiojs/mir#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-9UZ2eA2pDZVNOCfpoBcC+bSyCghriez0l+5QDWAvzQqBVLpfzxA/71H2hURaNZFDIuelfxZOaXzGCtvHdAAJDQ==","shasum":"283ee48ccde2a853018390e8353d3e0ebe2193e1","tarball":"https://registry.npmjs.org/@audio/mir-chord/-/mir-chord-1.0.1.tgz","fileCount":4,"unpackedSize":7543,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCT/kZXJVVZodYmOcI4gedsh9bZ8L/Utzr6D8AtVGAXPgIge65FhnWQHbHGPSJRgqJKKZV/RdnbyoLH5zcaAM/7l9U="}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mir-chord_1.0.1_1783731667264_0.28945109869263175"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:52:59.586Z","modified":"2026-07-11T01:01:07.555Z","1.0.0":"2026-07-08T19:52:59.848Z","1.0.1":"2026-07-11T01:01:07.413Z"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","keywords":["audio","dsp","mir","chord","chord-detection","viterbi"],"description":"24 binary chord templates: C, C#, … B (major) then C, C#, … B (minor)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/mir-chord\n\n> Chord detection — classify a chroma vector as one of 24 major/minor triads via cosine similarity with binary templates (Fujishima, 1999), with an optional Viterbi smoother for chord sequences.\n\n`npm install @audio/mir-chord`\n\n```js\nimport chord, { smooth as smoothChords, TEMPLATES } from '@audio/mir-chord'\n\nlet r = chord(chromaVec)\n// { root: 0..11 | -1, quality: 'maj'|'min'|'N', label: 'C'|'Am'|…|'N', confidence: -1..1 }\n```\n\nEach of the 24 templates is a length-12 binary vector (root, +4, +7 for major; root, +3, +7 for minor). `chord()` picks the highest-cosine template; below `minConfidence` it reports no-chord (`'N'`).\n\nOptions: - `minConfidence` — cosine similarity floor below which the result is `'N'` (default 0.3)\n\n```js\nlet seq = smoothChords(frames, { selfProb: 0.5 })\n// [{ root, quality, label }, …] — one per input frame\n```\n\n`smoothChords(frames, params)` runs Viterbi over a 24-state chord grid with a sticky self-transition prior — a lightweight stand-in for Mauch-style context models, effective at stabilizing short, noisy chroma sequences into held chords.\n\nOptions: - `selfProb` — probability mass on staying in the same chord frame-to-frame; higher = stickier (default 0.5)\n\n`TEMPLATES` is exported as the raw array of `{ root, quality, label, vec }` used for matching.\n\nPart of [@audio/mir](https://github.com/audiojs/mir).\n","readmeFilename":"README.md","homepage":"https://github.com/audiojs/mir#readme","repository":{"type":"git","url":"git+https://github.com/audiojs/mir.git","directory":"packages/mir-chord"},"bugs":{"url":"https://github.com/audiojs/mir/issues"}}