{"_id":"@aurio/soundbank","_rev":"2-0bf1db8ec1bf5e86094fa2663c1849d7","name":"@aurio/soundbank","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@aurio/soundbank","version":"0.1.0","keywords":["aurio","tidalcycles","strudel","livecoding","music","audio","algorave","soundbank","samples","sampler"],"author":{"name":"Mourad Kejji"},"license":"MIT","_id":"@aurio/soundbank@0.1.0","maintainers":[{"name":"mouradif","email":"mkejji@gmail.com"}],"bin":{"soundbank":"index.mjs"},"dist":{"shasum":"ad9e843ad1bb42998f9763835cbc51737480e0fc","tarball":"https://registry.npmjs.org/@aurio/soundbank/-/soundbank-0.1.0.tgz","fileCount":2,"integrity":"sha512-P89F41AeVajQDKdrnMEchTZ6atJR3ZOIKlP9OqeI9UQdSlgidhotXjVh0TATQ/wNdxjzYCV3MWtz/KGvR6TSCQ==","signatures":[{"sig":"MEYCIQDoojb2Zoay8bbkPPu1FoMID3pIGQoRoi2vnimtQBQYYQIhALrE3QJf91HmnKXigUNktQ44VAMUQh+sQHhYYtN87XNo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7164},"type":"module","engines":{"node":">=20"},"_npmUser":{"name":"mouradif","email":"mkejji@gmail.com"},"_npmVersion":"11.11.0","description":"Simple HTTP soundbank server for serving a Strudel soundbank","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/soundbank_0.1.0_1781805025807_0.28240019178519793","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aurio/soundbank","version":"0.1.1","description":"Simple HTTP soundbank server for serving a Strudel soundbank","license":"MIT","author":{"name":"Mourad Kejji"},"type":"module","bin":{"soundbank":"index.mjs"},"keywords":["aurio","tidalcycles","strudel","livecoding","music","audio","algorave","soundbank","samples","sampler"],"engines":{"node":">=20"},"_id":"@aurio/soundbank@0.1.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-IgEYDELMyqI3THcTnxh6q8VMUNhN/6Hew85P2cZ1ObISedKYG0vOAgUus05hke1T6npIaSbE98TqaG0Ns/wFGQ==","shasum":"fa13636e43813982f0928202f73673ad6f65da45","tarball":"https://registry.npmjs.org/@aurio/soundbank/-/soundbank-0.1.1.tgz","fileCount":3,"unpackedSize":9738,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCnCTbtKGjmbPghCa4dkMucXF77oe0Y7fWuf9lCQHXNRgIgKVhEltL+CcsXFu0nKgQMhbYsOm8AGyEzyF/ECLrduEc="}]},"_npmUser":{"name":"mouradif","email":"mkejji@gmail.com"},"directories":{},"maintainers":[{"name":"mouradif","email":"mkejji@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/soundbank_0.1.1_1781805492310_0.5249879588690838"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T17:50:25.668Z","modified":"2026-06-18T17:58:12.563Z","0.1.0":"2026-06-18T17:50:25.951Z","0.1.1":"2026-06-18T17:58:12.440Z"},"author":{"name":"Mourad Kejji"},"license":"MIT","keywords":["aurio","tidalcycles","strudel","livecoding","music","audio","algorave","soundbank","samples","sampler"],"description":"Simple HTTP soundbank server for serving a Strudel soundbank","maintainers":[{"name":"mouradif","email":"mkejji@gmail.com"}],"readme":"# @aurio/soundbank\n\nA tiny HTTP server for serving local audio samples to Strudel.\n\nInspired by @strudel/sampler but with a few changes I needed to make.\n- No dependencies (not even cows).\n- No PostgreSQL default port conflicts.\n- No Directory traversal\n- No re-scan on each request by default. The whole point is to have as close to zero latency as possible. Index rebuild is opt-in and based on file-watching, so it's still better.\n\n## Installation\n\nRun directly with `npx`:\n\n```bash\nnpx @aurio/soundbank\n```\n\nOr install globally:\n\n```bash\nnpm install -g @aurio/soundbank\nsoundbank\n```\n\n## Usage\n\nServe samples from the current directory:\n\n```bash\nsoundbank\n```\n\nServe samples from a specific directory:\n\n```bash\nsoundbank --dir ~/Samples\n```\n\nUse a custom port:\n\n```bash\nsoundbank --port 9000\n```\n\nGenerate a `strudel.json` file and exit:\n\n```bash\nsoundbank --json\n```\n\nWatch the directory and automatically rebuild the sample index when files change:\n\n```bash\nsoundbank --watch\n```\n\n## Strudel\n\nAfter starting the server:\n\n```text\nServing soundbank:\n\n  /Users/alice/Samples\n\n- http://localhost:8787\n- http://192.168.1.143:8787\n```\n\nUse the displayed URL directly in Strudel:\n\n```js\nawait samples(\"http://localhost:8787\");\n```\n\nIf another device on your local network needs access, use the LAN URL printed by the server.\n\n## Supported Formats\n\n* WAV (`.wav`)\n* MP3 (`.mp3`)\n* OGG (`.ogg`)\n\n## Bank Naming\n\nGiven the following directory structure:\n\n```text\nSamples/\n├── drums/\n│   ├── kick.wav\n│   └── snare.wav\n└── bass/\n    └── sub.wav\n```\n\nThe generated banks are:\n\n```json\n{\n  \"drums\": [\n    \"/drums/kick.wav\",\n    \"/drums/snare.wav\"\n  ],\n  \"bass\": [\n    \"/bass/sub.wav\"\n  ]\n}\n```\n\nWith `--flat`, paths are flattened into unique names:\n\n```json\n{\n  \"drums_kick\": [\n    \"/drums/kick.wav\"\n  ],\n  \"drums_snare\": [\n    \"/drums/snare.wav\"\n  ],\n  \"bass_sub\": [\n    \"/bass/sub.wav\"\n  ]\n}\n```\n\n## Security\n\n`@aurio/soundbank` only serves files located under the configured root directory.\n\nPath traversal attempts such as:\n\n```text\n../../etc/passwd\n```\n\nare rejected.\n\n## Why?\n\nThis package started as a clean-room replacement for another sample server whose implementation had accumulated several design issues:\n\n* unnecessary runtime dependencies\n* repeated filesystem scans on every request\n* synchronous filesystem operations inside asynchronous handlers\n* lack of path traversal protection\n* poor defaults\n\nThe goal of `@aurio/soundbank` is simple:\n\n> Serve audio files to Strudel with as little code and as few surprises as possible.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}