{"_id":"8-bit-browser-sounds","_rev":"2-5321b0cb31798152f9fb568535d0b546","name":"8-bit-browser-sounds","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"8-bit-browser-sounds","version":"1.0.0","keywords":["8-bit","sound"],"author":{"url":"https://github.com/lritter79","name":"Levon Ritter"},"license":"ISC","_id":"8-bit-browser-sounds@1.0.0","maintainers":[{"name":"packageman384","email":"levong2112@gmail.com"}],"dist":{"shasum":"f6441f127e44a78b0471f8aa9b0e860a06d4574e","tarball":"https://registry.npmjs.org/8-bit-browser-sounds/-/8-bit-browser-sounds-1.0.0.tgz","fileCount":3,"integrity":"sha512-9tjmGxO6ugehcxEmGX8pYWbRDQ/T96mdSMR4INti5Rxh/Zw+aZzC+oqcW+y+iEyheIURBy9tQoXiPBuTYJzJnQ==","signatures":[{"sig":"MEUCIFfY13yfU+xGFkKOG8IRQfBirHugwSapMKF1ssKEQn7jAiEA+9KdeJfG1TocxRyh8nezN5K4eIKdrQD+601Vv1s2tEU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3783},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"packageman384","email":"levong2112@gmail.com"},"_npmVersion":"10.8.1","description":"A wrapper for the OscillatorNode API with a couple functions to make 8 bit sounds in the browser with JavaScript! ","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.4","@types/node":"^22.1.0"},"_npmOperationalInternal":{"tmp":"tmp/8-bit-browser-sounds_1.0.0_1722830460643_0.008616853832881466","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"8-bit-browser-sounds","version":"1.0.1","keywords":["8-bit","sound"],"author":{"url":"https://github.com/lritter79","name":"Levon Ritter"},"license":"ISC","_id":"8-bit-browser-sounds@1.0.1","maintainers":[{"name":"packageman384","email":"levong2112@gmail.com"}],"homepage":"https://github.com/lritter79/8-bit-browser-sounds#readme","bugs":{"url":"https://github.com/lritter79/8-bit-browser-sounds/issues"},"dist":{"shasum":"6a325d0b1dee8dfe189f3f837f88dfd6ded52c35","tarball":"https://registry.npmjs.org/8-bit-browser-sounds/-/8-bit-browser-sounds-1.0.1.tgz","fileCount":4,"integrity":"sha512-pioETOrTrgCEPI2Z6cFeBjRpga4aGMtx312BtH3vV0kFp/oMyrTvt+hxlZHpMavpTmDBS5Fp2v0bcPBF+c1z2g==","signatures":[{"sig":"MEQCIF+VSS2WXmnLz7wfWon1MRytkXy2I6l2IrzEKdjNv8uyAiAWDAc7DIrXEV/YEFDWo4XUXOr5kfNyEC+J4snWL3LCiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6429},"main":"index.js","gitHead":"334f727a322807f06cedbe44f8aee60efaed8cee","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"_npmUser":{"name":"packageman384","email":"levong2112@gmail.com"},"repository":{"url":"git+https://github.com/lritter79/8-bit-browser-sounds.git","type":"git"},"_npmVersion":"10.8.1","description":"A wrapper for the OscillatorNode API with a couple functions to make 8 bit sounds in the browser with JavaScript! ","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.4","@types/node":"^22.1.0"},"_npmOperationalInternal":{"tmp":"tmp/8-bit-browser-sounds_1.0.1_1722831427999_0.5320276621267852","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"8-bit-browser-sounds","version":"1.0.2","description":"A wrapper for the OscillatorNode API with a couple functions to make 8 bit sounds in the browser with JavaScript! ","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsc"},"keywords":["8-bit","sound"],"author":{"name":"Levon Ritter","url":"https://github.com/lritter79"},"license":"ISC","devDependencies":{"@types/node":"^22.1.0","typescript":"^5.5.4"},"repository":{"type":"git","url":"git+https://github.com/lritter79/8-bit-browser-sounds.git"},"_id":"8-bit-browser-sounds@1.0.2","gitHead":"f7955d206446aca315e689bd5cfa1549abd059a1","bugs":{"url":"https://github.com/lritter79/8-bit-browser-sounds/issues"},"homepage":"https://github.com/lritter79/8-bit-browser-sounds#readme","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-zGVGbAXlEbND3SBoOcdotLEuq3+RH6DmuCMXedbnxsCsqH44EHtEjJD7+6//2F7YIovp7IvbS8E+vdHc7dk02g==","shasum":"0247d7b8025deb851848f38dbc994a78543f96c4","tarball":"https://registry.npmjs.org/8-bit-browser-sounds/-/8-bit-browser-sounds-1.0.2.tgz","fileCount":4,"unpackedSize":6438,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCteq7C/8nB7D8TduxZKRvO5CuQhi5puWwwMcJXMcxXLAIge8EujOzGlfPWVSwhn+OJbsKPCoJI+5ZNwp+w4EGHlTM="}]},"_npmUser":{"name":"packageman384","email":"levong2112@gmail.com"},"directories":{},"maintainers":[{"name":"packageman384","email":"levong2112@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/8-bit-browser-sounds_1.0.2_1722831565406_0.3749367952265936"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-05T04:01:00.642Z","modified":"2024-08-05T04:19:25.725Z","1.0.0":"2024-08-05T04:01:00.794Z","1.0.1":"2024-08-05T04:17:08.144Z","1.0.2":"2024-08-05T04:19:25.545Z"},"bugs":{"url":"https://github.com/lritter79/8-bit-browser-sounds/issues"},"author":{"name":"Levon Ritter","url":"https://github.com/lritter79"},"license":"ISC","homepage":"https://github.com/lritter79/8-bit-browser-sounds#readme","keywords":["8-bit","sound"],"repository":{"type":"git","url":"git+https://github.com/lritter79/8-bit-browser-sounds.git"},"description":"A wrapper for the OscillatorNode API with a couple functions to make 8 bit sounds in the browser with JavaScript! ","maintainers":[{"name":"packageman384","email":"levong2112@gmail.com"}],"readme":"# 8 Bit Browser Sounds Package\n\n8 Bit Browser Sounds is a simple npm package designed to generate sound and glissando effects using the Web Audio API. It provides easy-to-use functions for creating pure tones and frequency sweeps, suitable for a variety of applications including testing, audio generation, and learning purposes.\n\n## Installation\n\nTo install the package, use npm:\n\n```bash\nnpm install 8-bit-browser-sounds\n```\n\n## Usage\n\nUse wherever you want to add an 8 bit sound in your web app.\n\n### Functions\n\n#### makeSound\n\nGenerates a sound with a specified frequency, oscillator type, and duration.\n\n**Parameters:**\n\n- `frequency` (number, default = 440): The frequency of the sound in Hz.\n- `oscillatorType` (OscillatorNode[\"type\"], default = \"sine\"): The type of oscillator (e.g., \"sine\", \"square\", \"sawtooth\", \"triangle\").\n- `duration` (number, default = 150): The duration of the sound in milliseconds.\n\n**Example:**\n\n```javascript\nmakeSound(440, \"sine\", 500);\n```\n\n#### makeGlissando\n\nGenerates a glissando (frequency sweep) effect from a start frequency to an end frequency over a specified duration.\n\n**Parameters:**\n\n- `startFrequency` (number, default = 440): The starting frequency of the glissando in Hz.\n- `endFrequency` (number, default = 880): The ending frequency of the glissando in Hz.\n- `oscillatorType` (OscillatorNode[\"type\"], default = \"sine\"): The type of oscillator.\n- `duration` (number, default = 150): The duration of the glissando in milliseconds.\n\n**Example:**\n\n```javascript\nmakeGlissando(440, 880, \"sine\", 500);\n```\n\n#### checkInHumanRange\n\nChecks if a given frequency is within the human hearing range (20 Hz to 20,000 Hz).\n\n**Parameters:**\n\n- `frequency` (number): The frequency to check in Hz.\n\n**Returns:**\n\n- `boolean`: `true` if the frequency is within the human hearing range, otherwise `false`.\n\n**Example:**\n\n```javascript\nconst isInHumanRange = checkInHumanRange(440);\nconsole.log(isInHumanRange); // true\n```\n\n## Browser Compatibility\n\nPlease note that this package relies on the Web Audio API, which may not be supported in all browsers. If the Web Audio API is not supported, a warning will be logged to the console.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## License\n\nThis package is licensed under the MIT License. See the LICENSE file for details.\n\n---\n\nThis README provides an overview of the package and its usage. For more detailed examples and documentation, please refer to the source code and comments within the package.\n","readmeFilename":"README.md"}