{"id":25940713,"url":"https://github.com/2003scape/rsc-sounds","last_synced_at":"2025-07-14T20:33:34.303Z","repository":{"id":36469922,"uuid":"226710666","full_name":"2003scape/rsc-sounds","owner":"2003scape","description":"🔊 extract runescape classic sounds from cache to wav (and vice versa)","archived":false,"fork":false,"pushed_at":"2022-08-02T22:04:56.000Z","size":585,"stargazers_count":13,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-22T02:39:29.979Z","etag":null,"topics":["alaw","bzip2","resample","rsc","rsps","runescape","sound","sounds","ulaw","wav"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2003scape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-08T18:14:17.000Z","updated_at":"2025-05-11T17:11:43.000Z","dependencies_parsed_at":"2022-08-08T15:01:23.394Z","dependency_job_id":null,"html_url":"https://github.com/2003scape/rsc-sounds","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/2003scape/rsc-sounds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003scape","download_url":"https://codeload.github.com/2003scape/rsc-sounds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003scape%2Frsc-sounds/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260852085,"owners_count":23072586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alaw","bzip2","resample","rsc","rsps","runescape","sound","sounds","ulaw","wav"],"created_at":"2025-03-04T05:18:36.753Z","updated_at":"2025-06-20T00:03:18.679Z","avatar_url":"https://github.com/2003scape.png","language":"JavaScript","readme":"# rsc-sounds\nextract runescape classic sounds from cache to wav (and vice versa). jagex used\nSun's original [.au sound format](https://en.wikipedia.org/wiki/Au_file_format),\nwhich is headerless, 8-bit, u-law encoded, 8000 Hz pcm samples. this module can\ndecompress original sounds from sound archives as\n[headered WAVs](https://en.wikipedia.org/wiki/WAV), and recompress (+ resample)\nnew WAVs into archives.\n\n## install\n\n    $ npm install @2003scape/rsc-sounds # use -g for the CLI program\n\n## cli usage\n```\nrsc-sounds \u003ccommand\u003e\n\nCommands:\n  rsc-sounds dump-wav \u003carchive\u003e [sounds..]  extract WAV files from a sounds mem\n                                            archive\n  rsc-sounds pack-wav \u003carchive\u003e \u003cfiles..\u003e   pack WAV file(s) into a sounds mem\n                                            archive\n  rsc-sounds play \u003carchive\u003e \u003csound\u003e         play a sound from an archive\n\nOptions:\n  --help     Show help                                                 [boolean]\n  --version  Show version number                                       [boolean]\n```\n\n    $ rsc-sounds play sounds1.mem death # play death sound on speaker\n    $ rsc-sounds pack-wav sounds2.mem scream.wav chop.wav # add new sounds\n    $ rsc-sounds dump-wav sounds1.mem -i sounds1.json # dump all original sounds\n    $ rsc-sounds dump-wav sounds1.mem death # dump death.wav\n\n## example\n```javascript\nconst fs = require('fs');\nconst { Sounds } = require('@2003scape/rsc-sounds');\n\nif (typeof window !== 'undefined') {\n    fs.writeFileSync = () =\u003e {};\n}\n\n// create sounds2.mem with a new .wav file\nconst sounds = new Sounds();\nsounds.loadArchive(fs.readFileSync('./sounds1.mem'));\nsounds.putWav('scream', fs.readFileSync('./scream.wav'));\nfs.writeFileSync('./sounds2.mem', sounds.toArchive());\n\n// load the archive and play the new sound\nconst sounds2 = new Sounds();\nsounds2.loadArchive(fs.readFileSync('./sounds2.mem'));\nfs.writeFileSync('./scream-recovered.wav', sounds2.getWav('scream'));\nconst duration = sounds2.playSound('scream');\nsetTimeout(() =\u003e console.log('done'), duration);\n```\n\n## api\n### sounds = new Sounds()\ncreate a new sound (de)serializer instance.\n\n### sounds.loadArchive(buffer)\nload a sounds mem archive buffer.\n\n### sounds.putWav(name, buffer)\nre-encode and re-sample any WAV file and add it to the archive buffer.\n\n### sounds.getWav(name)\nreturn a headered WAV file from the archive buffer.\n\n### sounds.playSound(name)\nplay a sound from the archive on the speakers (works in browser as well).\n\n### sounds.toArchive()\nreturn a sounds mem archive.\n\n## license\nCopyright 2019  2003Scape Team\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Affero General Public License as published by the\nFree Software Foundation, either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along\nwith this program. If not, see http://www.gnu.org/licenses/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003scape%2Frsc-sounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003scape%2Frsc-sounds/lists"}