{"id":13547785,"url":"https://github.com/loov/jsfx","last_synced_at":"2025-04-04T23:10:02.322Z","repository":{"id":1336504,"uuid":"1282359","full_name":"loov/jsfx","owner":"loov","description":"Javascript Sound Effect Generator","archived":false,"fork":false,"pushed_at":"2017-05-13T19:12:07.000Z","size":1295,"stargazers_count":579,"open_issues_count":2,"forks_count":49,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-28T22:13:18.704Z","etag":null,"topics":["game-development","javascript","sound","sound-effects"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loov.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-22T17:17:52.000Z","updated_at":"2025-03-06T20:19:00.000Z","dependencies_parsed_at":"2022-08-16T13:10:24.358Z","dependency_job_id":null,"html_url":"https://github.com/loov/jsfx","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fjsfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fjsfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fjsfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loov%2Fjsfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loov","download_url":"https://codeload.github.com/loov/jsfx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247261612,"owners_count":20910108,"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":["game-development","javascript","sound","sound-effects"],"created_at":"2024-08-01T12:01:01.010Z","updated_at":"2025-04-04T23:10:02.288Z","avatar_url":"https://github.com/loov.png","language":"JavaScript","readme":"![](https://raw.githubusercontent.com/loov/jsfx/master/jsfx.png)\n\nThis is a JavaScript library for sound effect generation and is supported on\n[most current browsers](http://caniuse.com/#feat=audio).\n\nGeneration speed is approximately 1s audio = 10ms processing. Of course that\nvalue can vary a lot, depending on the settings or browser that you use.\n\n### How to use it?\n\nOpen [index.html](http://loov.github.io/jsfx/) - this helps to pick out your samples.\n\nTry clicking the presets and tweaking all the options. Once you are satisified\nwith your result click add button at top-right.\n\nEnter a name for the sound e.g. \"select\", repeat that as many times as you like. Tip: You can save your settings by making a bookmark of the page.\n\nAt the bottom of the page there is a Library section. There you can relisten\nor remove sounds that you do not like.\n\nOnce you are satisfied with your selection copy the JSON description\n(it's inside the input box).\n\nIt will look something like:\n\n    {\"select\":{\"Volume\":{\"Sustain\":0.1,\"Decay\":0.15,\"Punch\":0.55}}}\n\nTo use that library, you need to include `jsfx.js` in your code and use `jsfx.Sounds(libarry)` to initialize it. For example:\n\n```html\n\u003cscript src=\"jsfx.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nvar library = {\n\t\"select\": {\"Volume\":{\"Sustain\":0.1,\"Decay\":0.15,\"Punch\":0.55}},\n\t\"long\": {\"Volume\":{\"Sustain\":0.1,\"Decay\":0.5,\"Punch\":1}}\n};\nvar sfx = jsfx.Sounds(library);\n\u003c/script\u003e\n\u003cbutton onclick=\"sfx.select()\"\u003eSelect\u003c/button\u003e\n\u003cbutton onclick=\"sfx.long()\"\u003eLong\u003c/button\u003e\n```\n\nNote that it will load with a delay to avoid blocking the page load for too\nlong, so calling those function immediately may result in silence.\n\n### Using with AudioContext (experimental)\n\nYou can use AudioContext to procedurally generate the sounds, for example:\n\n```html\n\u003cscript src=\"jsfx.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nvar library = {\n\t\"static\": {\"Volume\":{\"Sustain\":0.1,\"Decay\":0.15,\"Punch\":0.55}},\n\t\"dynamic\": function(){\n\t\treturn {\"Frequency\": { \"Start\": Math.random()*440 + 220 }};\n\t},\n\t\"coin\": jsfx.Preset.Coin\n};\nvar sfx = jsfx.Live(library);\n\u003c/script\u003e\n\u003cbutton onclick=\"sfx.static()\"\u003eStatic\u003c/button\u003e\n\u003cbutton onclick=\"sfx.dynamic()\"\u003eDynamic\u003c/button\u003e\n\u003cbutton onclick=\"sfx.coin()\"\u003eCoin\u003c/button\u003e\n```\n\n### Few notes...\n\nIt's recommended to copy the jsfx.js to your own project instead of\nautomatically downloading the latest version. Since every slight adjustment\nto the audio generation code can affect the resulting audio significantly.\n\nThe stable API is what is described in the README, everything else is\nsubject to change.\n\n### Thanks to\n\nThis project was inspired by [sfxr](http://www.drpetter.se/project_sfxr.html)\nand was used as a reference for some algorithms and modes.","funding_links":[],"categories":["🚀 A series of exquisite and compact web page cool effects"],"sub_categories":["Other Effect"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floov%2Fjsfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floov%2Fjsfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floov%2Fjsfx/lists"}