{"_id":"@audio/spectral-crest","_rev":"3-01212c033aa50ac5b18ed8ce69e113d3","name":"@audio/spectral-crest","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@audio/spectral-crest","version":"1.0.0","keywords":["audio","dsp","spectral","features","crest"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/spectral-crest@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":"607a9b250b269aa7074b175e3f4a5bfa708537f3","tarball":"https://registry.npmjs.org/@audio/spectral-crest/-/spectral-crest-1.0.0.tgz","fileCount":3,"integrity":"sha512-scXDpH05yVXsJ1MSHU7icPV1JKj7BBfHEhmQ2R81E/BaV6koBvYquxPkK5IWXtNQhh3/WzU5Uya21TKJ8KyPhg==","signatures":[{"sig":"MEQCIDYZKxrmYxRUKrk/WaUimuP2fv0KarHGcNbKFe1u22CVAiAtwMBz0qiD0BFmW0IHO4NtXcw/4R8GTJpXXEbNfwiJOw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1122},"main":"crest.js","type":"module","engines":{"node":">=18"},"exports":{".":"./crest.js","./package.json":"./package.json"},"gitHead":"a1aba4f2662a0f284ef88a04047c6cfa3c3ce6e5","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"_npmVersion":"11.12.1","description":"Spectral crest — peak-to-mean ratio of the POWER spectrum (≥1; high = peaky/tonal).","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spectral-crest_1.0.0_1783540009334_0.14456178414953857","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/spectral-crest","version":"1.0.1","keywords":["audio","dsp","spectral","features","crest"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/spectral-crest@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/spectral#readme","bugs":{"url":"https://github.com/audiojs/spectral/issues"},"dist":{"shasum":"547a7e1d618fe35a91e62e774d8fbd80a8060fb7","tarball":"https://registry.npmjs.org/@audio/spectral-crest/-/spectral-crest-1.0.1.tgz","fileCount":3,"integrity":"sha512-RTNm2KnzGQom/d9Bo+84GYx0lXia+JikIH3g87kTU9HHmYyL2FMXiidMi4RMyGTlXW9nmlMLElsco1Y7SnKH6A==","signatures":[{"sig":"MEUCIQC6BxL9CwQT3bC7fr14t9DK+QTk/f+2vDBnsj5cOJm/MQIgRJ01rZuN+HXM0iMTyCO6ZvWDzsrL0cdqFIu6J30XkB4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1768},"main":"crest.js","type":"module","engines":{"node":">=18"},"exports":{".":"./crest.js","./package.json":"./package.json"},"gitHead":"27a82efde8c69de05035cc9f97fc017936efb69e","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/spectral.git","type":"git","directory":"packages/spectral-crest"},"_npmVersion":"11.12.1","description":"Spectral crest — peak-to-mean ratio of the POWER spectrum (≥1; high = peaky/tonal).","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/spectral-crest_1.0.1_1783726338821_0.5735935314313856","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@audio/spectral-crest","version":"1.0.2","description":"Spectral crest — peak-to-mean ratio of the POWER spectrum (≥1; high = peaky/tonal).","type":"module","sideEffects":false,"main":"crest.js","exports":{".":"./crest.js","./package.json":"./package.json"},"keywords":["audio","dsp","spectral","features","crest"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/audiojs/spectral.git","directory":"packages/spectral-crest"},"funding":"https://github.com/sponsors/audiojs","gitHead":"0bf461273c2acb2401ff9842afec35a43fd05a9a","_id":"@audio/spectral-crest@1.0.2","bugs":{"url":"https://github.com/audiojs/spectral/issues"},"homepage":"https://github.com/audiojs/spectral#readme","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-xdtf1G/8Yc5EIJyb8DJl0uwq/aQPYoQXn6O+8D/0a4a+aQOWDE4xT6lhA+ThHsEEO/8Hf2SJupLTFqWEjwaZUw==","shasum":"280c80edfe4598d0c18577df873e5cb9aa9c1afc","tarball":"https://registry.npmjs.org/@audio/spectral-crest/-/spectral-crest-1.0.2.tgz","fileCount":4,"unpackedSize":2136,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9hBc4GjT2SA156KiNKovdscfGIExN4goqi6vRqsjQLQIgQfO6PsOJdDVW1jdss5bl7tuzCsE5224bEcBIC9tHH90="}]},"_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/spectral-crest_1.0.2_1783731872031_0.9463043902580917"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:46:49.167Z","modified":"2026-07-11T01:04:32.308Z","1.0.0":"2026-07-08T19:46:49.475Z","1.0.1":"2026-07-10T23:32:18.966Z","1.0.2":"2026-07-11T01:04:32.141Z"},"bugs":{"url":"https://github.com/audiojs/spectral/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/spectral#readme","keywords":["audio","dsp","spectral","features","crest"],"repository":{"type":"git","url":"git+https://github.com/audiojs/spectral.git","directory":"packages/spectral-crest"},"description":"Spectral crest — peak-to-mean ratio of the POWER spectrum (≥1; high = peaky/tonal).","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/spectral-crest\n\n> Spectral crest — peak-to-mean ratio of the power spectrum (≥1; high = peaky/tonal). FFmpeg `aspectralstats` / Peeters 2004 §6.4.\n\n`npm install @audio/spectral-crest`\n\n```js\nimport { fft } from 'fourier-transform'\nimport crest from '@audio/spectral-crest'\n\nlet win = frame.map((x, i) => x * (0.5 - 0.5 * Math.cos(2 * Math.PI * i / (frame.length - 1))))\nlet [re, im] = fft(win)\nlet mag = re.map((r, k) => Math.hypot(r, im[k]))\n\nlet c = crest(mag)   // 1 = flat spectrum, higher = one dominant bin\n```\n\nNo options — `crest(mag)` takes only the magnitude spectrum.\n\nPart of [@audio/spectral](https://github.com/audiojs/spectral).\n","readmeFilename":"README.md"}