{"_id":"@audio/tune-midi","_rev":"3-e884bd5e8ae600d41507ab78a2806950","name":"@audio/tune-midi","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@audio/tune-midi","version":"1.0.0","keywords":["audio","dsp","pitch-correction","midi"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/tune-midi@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":"e3d0300d586961101e00cd38cdfb44c25c34f076","tarball":"https://registry.npmjs.org/@audio/tune-midi/-/tune-midi-1.0.0.tgz","fileCount":3,"integrity":"sha512-QO4eUBuownQK04gqn/Ph0gvzagszmC9vc80JH91MVhICDTAuvb46ad9yLCbeu5DJEJV3nqFHoaWrSo8ySh2Wyg==","signatures":[{"sig":"MEUCIQCFmES9j675XNkZIGaB4ii7hm9e9B6c3fvPw0/tAr3XYwIgUAW9fgD7rzts2puU/W7wzuJx559Plf3Mx+Dj5Ikj83E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3390},"main":"midi.js","type":"module","engines":{"node":">=18"},"exports":{".":"./midi.js","./package.json":"./package.json"},"gitHead":"2d20660df653f55051dac387c9ece440f49df444","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"Note-target pitch correction — align melody to reference MIDI/notes (Melodyne class)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/pitch-yin":"^1.0.0","@audio/shift-psola":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tune-midi_1.0.0_1783548418839_0.2936062231899814","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/tune-midi","version":"1.0.1","keywords":["audio","dsp","pitch-correction","midi"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/tune-midi@1.0.1","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/tune#readme","bugs":{"url":"https://github.com/audiojs/tune/issues"},"dist":{"shasum":"03410fb27a454e9711e1609c317c027b86a601bf","tarball":"https://registry.npmjs.org/@audio/tune-midi/-/tune-midi-1.0.1.tgz","fileCount":3,"integrity":"sha512-B16ZxxEA50QT6WE8xa+71ZHgMeTNPt+c++i94MHaTc9C3053CyaLtg0YYKzE3MyFnL9IApouyo8rntrtoOh+vQ==","signatures":[{"sig":"MEUCIQCFRQCBSiOOh0bd8g4dgJ2j7HJL4yk1dCcbFfeQdlM9vwIgexYmGZAaU/mCCzS++YAHQ3WT2/3wfczI7eJ4uQy/4E8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4305},"main":"midi.js","type":"module","engines":{"node":">=18"},"exports":{".":"./midi.js","./package.json":"./package.json"},"gitHead":"71bbdfdfac1892bceb548535718db25189215441","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/tune.git","type":"git","directory":"packages/tune-midi"},"_npmVersion":"11.12.1","description":"Note-target pitch correction — align melody to reference MIDI/notes (Melodyne class)","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/note":"^1.0.0","@audio/pitch-yin":"^1.0.0","@audio/shift-psola":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tune-midi_1.0.1_1783726364051_0.41410408370161833","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/tune-midi","version":"1.0.2","description":"Note-target pitch correction — align melody to reference MIDI/notes (Melodyne class)","type":"module","sideEffects":false,"keywords":["audio","dsp","pitch-correction","midi"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"main":"midi.js","exports":{".":"./midi.js","./package.json":"./package.json"},"dependencies":{"@audio/pitch-yin":"^1.0.0","@audio/note":"^1.0.0","@audio/shift-psola":"^1.0.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/audiojs/tune.git","directory":"packages/tune-midi"},"types":"./midi.d.ts","funding":"https://github.com/sponsors/audiojs","gitHead":"6523156fb0284e40f8d6456e9d98021bb9fd26dd","_id":"@audio/tune-midi@1.0.2","bugs":{"url":"https://github.com/audiojs/tune/issues"},"homepage":"https://github.com/audiojs/tune#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-T/E4gDR6Tj/gi/mVz194cMS03+rzO1x/Hvger+lQ71niBV4lyh0J42uMMkhnLMmZmbdyaV1C8h2G2S1xXKKDwQ==","shasum":"cc2a6b75ff236838f63357941eb2c96b929bc8a5","tarball":"https://registry.npmjs.org/@audio/tune-midi/-/tune-midi-1.0.2.tgz","fileCount":4,"unpackedSize":5818,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICh3ZZU2BJlE113RMR7zUyeFV++ux/9Qzov1HknQJwawAiA9W8VLqMqkDY1dwXyakeDq5bc4jMSqy92nigNyHRrCkg=="}]},"_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/tune-midi_1.0.2_1783731969569_0.9534570711318475"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T22:06:58.592Z","modified":"2026-07-11T01:06:09.850Z","1.0.0":"2026-07-08T22:06:58.967Z","1.0.1":"2026-07-10T23:32:44.227Z","1.0.2":"2026-07-11T01:06:09.701Z"},"bugs":{"url":"https://github.com/audiojs/tune/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/tune#readme","keywords":["audio","dsp","pitch-correction","midi"],"repository":{"type":"git","url":"git+https://github.com/audiojs/tune.git","directory":"packages/tune-midi"},"description":"Note-target pitch correction — align melody to reference MIDI/notes (Melodyne class)","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/tune-midi\n\n> Note-target pitch correction — align melody to reference MIDI/notes (Melodyne class)\n\nMIDI-guided pitch correction — retune audio to a note guide (parsed SMF via\n`@audio/midi-parse`, or a plain note list): YIN F0 track → per-guide-note median →\nPSOLA shift to the guide pitch, crossfaded over dry. The melody-following complement\nof `tune-snap`'s scale snapping.\n\n```js\nimport tuneMidi from '@audio/tune-midi'\nimport parse from '@audio/midi-parse'\n\nlet corrected = tuneMidi(data, { guide: parse(smfBytes) })     // or { guide: [{time, duration, midi}] }\n```\n\n`tuneMidi(data: Float32Array, opts: {guide: Array<{time, duration, midi}> | {notes} (midi-parse output), fs=44100, a4=440, strength=1, tolerance=8 (¢), maxShift=700 (¢, skip wild targets), frameSize=2048, hop=512, fade=0.01}) → Float32Array`\n\nBuilt on `@audio/pitch-yin` (F0 tracking) and `@audio/shift-psola` (pitch shifting).\n\n## Install\n\n```\nnpm i @audio/tune-midi\n```\n","readmeFilename":"README.md"}