{"_id":"@2cs/audio-resampler","name":"@2cs/audio-resampler","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@2cs/audio-resampler","version":"1.0.1","description":"Simple WebAudio based resampling library","main":"lib/resampler.js","scripts":{"build":"jshint index.js lib/resampler.js && browserify index.js > bundle.js","watch:index":"watch 'npm run build' . --wait=5","build:watch":"parallelshell 'npm run watch:index' 'http-server'","start":"npm run build && http-server"},"repository":{"type":"git","url":"git+https://github.com/notthetup/resampler.git"},"keywords":["webaudio","resample","audio"],"author":{"name":"Chinmay Pendharkar","email":"notthetup@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/notthetup/resampler/issues"},"homepage":"https://github.com/notthetup/resampler","dependencies":{"wav-encoder":"^1.3.0","webaudioloader":"^1.0.1"},"devDependencies":{"browserify":"^14.5.0","drag-drop":"^2.0.0","jshint":"^2.6.3","parallelshell":"^3.0.2","watch":"^1.0.2"},"gitHead":"ddc412dbe514b98264c5dcbde6b2c711c6ea75eb","_id":"@2cs/audio-resampler@1.0.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-KuKFxdPrDnuoQRGtp3vAEUmA+FwJG9bJ6GOBErqEPb5Q8AvCcsfYU8ccD3qX5FIww2WC+rKNOXA29JnOXKIrNw==","shasum":"3f79d91121b056b052f0b75db744a38d4be21542","tarball":"https://registry.npmjs.org/@2cs/audio-resampler/-/audio-resampler-1.0.1.tgz","fileCount":3,"unpackedSize":6663,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0pu79tDLIOwZ9WFZ1rvqXcYqs5ALa92xTR2z32G7N4AiAfkh+zS7P0ffu/3+25lMn31AQONr2mR5MMoQhkNS6Yvg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjN8kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtYA//RLZgz1hogUdtKsbmfctrDg7/36vo9haHFTMO5HQ6hDY3diED\r\nBGuZcQZK7xkFG7ZdqSPUxIazytMl0ZAxcIHpA3L9oNX5E9vqjkaz1MR5TzzH\r\nZPlBnjnM4OBXcJSPYrTSmI2Rmtg0NE77GuXQRBqUMTKkDVe93oWFJVp6DDLv\r\npSbtxxk1/vjejX+clKqnm8ewPwFBpgzbOVxAdY6ET1LdD04fmhhyaMNVaqsL\r\nWPjAIoXBYovDyE5RJYRz3UYvYCB/ePlEJDbYIuLxC57dJEpVeQh57cOI4Lqs\r\nzSUvjRpEKKjU4KAqt4Wn/5CuO7taHUx5NtDD55v+D35wK2s0j8x0oRULh4g+\r\nTPwa9k3Uv1O0fLSsVoF+WwRa6k1ibiRpAUyC95OJs5IfToMjEw7MJ57caRND\r\nG2MYkHokybGrrYJc4wUFwC/mEKpJNT36FS13oVt/29FRFJ2PumhubDPi1zxM\r\nihK82oo+VXKjzkP6xYogy3EhjBuCwEUJTOCmMxCAQG1+SPK3RXvY23wuIw0O\r\nvCflE5ljAFNuJiMZFb7XFx9C4Cfw23Bjsn+QTSnqseGA8RtD5YwKUHaI92VZ\r\ntqIhagBYJlGlvH3SCw5MbEKjTor8Q8jwoW0YE0svpvtpPbNxmZFCFRyFwQQA\r\n8opfJrZPaJDXAQJcALkujbPJlcIuIb26wiE=\r\n=rr8P\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"quocngo2cs","email":"quoc.ngo@2clicksolutions.com"},"directories":{},"maintainers":[{"name":"quocngo2cs","email":"quoc.ngo@2clicksolutions.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/audio-resampler_1.0.1_1670176548315_0.8174222589920703"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-04T17:55:48.271Z","1.0.1":"2022-12-04T17:55:48.475Z","modified":"2022-12-04T17:55:48.649Z"},"maintainers":[{"name":"quocngo2cs","email":"quoc.ngo@2clicksolutions.com"}],"description":"Simple WebAudio based resampling library","homepage":"https://github.com/notthetup/resampler","keywords":["webaudio","resample","audio"],"repository":{"type":"git","url":"git+https://github.com/notthetup/resampler.git"},"author":{"name":"Chinmay Pendharkar","email":"notthetup@gmail.com"},"bugs":{"url":"https://github.com/notthetup/resampler/issues"},"license":"MIT","readme":"# Audio-Resampler\n\n[![npm version](https://badge.fury.io/js/audio-resampler.svg)](http://badge.fury.io/js/audio-resampler)\n\nSimple WebAudio based resampling library.\n\n\n#### Runs on all [modern browsers which support WebAudio](http://caniuse.com/#search=audio-api).\n\n## Installation\n\n`npm install audio-resampler`\n\n## API\n\n```\nresampler = require('audio-resampler');\nresampler(input, targetSampleRate, oncomplete);\n```\n\n`input` : Input audio file. This can either be a URL, a File object, or an AudioBuffer.\n\n`targetSampleRate` : The target sample rate after the re-sampling process. This number is limted based on the browser implementation (usually >=3000, <=192000)\n\n`oncomplete`: Callback when the resampling process is completed. The argument to this callback is an Object which supports the following methods:\n\n`getAudioBuffer` : Returns the resampler AudioBuffer\n\n`getFile` : Returns a ObjectURL of a WAV file created from the resampled Audio.\n\n## Example Usage\n\n```\nresampler = require('audio-resampler');\nvar URL = \"https://dl.dropboxusercontent.com/u/957/audio/sine.wav\"\nresampler(URL, 192000, function(event){\n\tevent.getFile(function(fileEvent){\n\t\tvar a = document.createElement(\"a\");\n\t\tdocument.body.appendChild(a);\n\t\ta.download = \"resampled.wav\";\n\t\ta.style = \"display: none\";\n\t\ta.href = fileEvent;\n\t\ta.click();\n\t\twindow.URL.revokeObjectURL(fileEvent);\n\t\tdocument.body.removeChild(a);\n\t});\n});\n```\n\n## Test\n\nTo test this repository, you can run a local server using the `npm start` command which serves a simple drag-and-drop interface based webpage to resampler audio files.\n\n\n","readmeFilename":"README.md"}