{"id":15396142,"url":"https://github.com/killedbyapixel/zzfx","last_synced_at":"2025-05-16T06:04:38.721Z","repository":{"id":48121925,"uuid":"178907954","full_name":"KilledByAPixel/ZzFX","owner":"KilledByAPixel","description":"A Tiny JavaScript Sound FX System","archived":false,"fork":false,"pushed_at":"2025-04-17T03:28:50.000Z","size":892,"stargazers_count":611,"open_issues_count":6,"forks_count":38,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-16T06:04:38.052Z","etag":null,"topics":["codegolf","game-development","html5","javascript","sizecoding","sound","sound-effects","sound-synthesis"],"latest_commit_sha":null,"homepage":"https://zzfx.3d2k.com","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/KilledByAPixel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-01T16:55:25.000Z","updated_at":"2025-05-14T09:09:48.000Z","dependencies_parsed_at":"2024-05-19T20:26:20.490Z","dependency_job_id":"5814db8e-aa04-4430-97fc-4d81abb41dd7","html_url":"https://github.com/KilledByAPixel/ZzFX","commit_stats":{"total_commits":417,"total_committers":4,"mean_commits":104.25,"dds":0.01918465227817745,"last_synced_commit":"e5390764053cf24c56e9d8f82c842345691d16d2"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FZzFX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FZzFX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FZzFX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KilledByAPixel%2FZzFX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KilledByAPixel","download_url":"https://codeload.github.com/KilledByAPixel/ZzFX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478186,"owners_count":22077675,"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":["codegolf","game-development","html5","javascript","sizecoding","sound","sound-effects","sound-synthesis"],"created_at":"2024-10-01T15:31:28.635Z","updated_at":"2025-05-16T06:04:38.710Z","avatar_url":"https://github.com/KilledByAPixel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZzFX - Zuper Zmall Zound Zynth\n\n[![NPM Package][npm]][npm-url]\n[![Build Size][build-size]][build-size-url]\n[![NPM Downloads][npm-downloads]][npmtrends-url]\n[![DeepScan][deepscan]][deepscan-url]\n\nZzFX is a tiny sound generator designed to produce a wide variety of sound effects with minimal code overhead. It's perfect for games, prototypes, and any web application that needs sound without the bulk of traditional sound files.\n\n# [ZzFX Sound Designer](https://killedbyapixel.github.io/ZzFX) - [Soundboard Demo](https://codepen.io/KilledByAPixel/full/BaowKzv)\n\n![ZzFX Image](/screenshot.png)\n\n## 🌟 Features\n\n- Compact: Less than 1 kilobyte when compressed!\n- Versatile: 20 controllable parameters for diverse sound effects.\n- No Dependencies: Standalone with no external libraries.\n- Cross-Browser: Compatible with nearly all web browsers.\n- Open Source: MIT licensed, use it anywhere!\n\n## 🔊 Why Use ZzFX?\n\n- Code-Driven Sound: Add or change sound effects with just one line of code.\n- Lightweight: No sound asset files mean faster download times.\n- Prototyping: Ideal for placeholder sound effects.\n- Game Jams: Minimal overhead for size-limited competitions like [JS13K](https://js13kgames.com/).\n- Not Just for Games: Enhance any website with sound.\n\n## 🚀 How to Use\n\n* Download from github or use `npm install zzfx`\n* Import ZZFX as a module with using `import {ZZFX, zzfx} from './ZzFX.js'`\n* Or paste the code from [ZzFXMicro.min.js](https://github.com/KilledByAPixel/ZzFX/blob/master/ZzFXMicro.min.js)\n* To play a sound just call zzfx(), something like `zzfx(...[,,,,.1,,,,9])`\n* Use [the ZzFX sound designer web app](https://killedbyapixel.github.io/ZzFX) to craft new sounds.\n\nSample sounds...\n\n```javascript\nzzfx(...[,,925,.04,.3,.6,1,.3,,6.27,-184,.09,.17]); // Game Over\nzzfx(...[,,537,.02,.02,.22,1,1.59,-6.98,4.97]); // Heart\nzzfx(...[1.5,.8,270,,.1,,1,1.5,,,,,,,,.1,.01]); // Piano\nzzfx(...[,,129,.01,,.15,,,,,,,,5]); // Drum\n```\n\n## 🎶 ZzFX Music\n\n- [ZzFX now supports music via ZzFXM by Keith Clark!](https://keithclark.github.io/ZzFXM/)\n- Super tiny player and songs.\n- Compatible with [NoteCraft](https://killedbyapixel.github.io/NoteCraft/) exports.\n\n## 🛠️ ZzFX UI Features\n\n- Random Sound Generation: Create sounds from presets.\n- Sound Management: Auto-save, rename, and favorite sounds.\n- Sound Visualization: View sound wave images on playback.\n- Sharing: Load sounds via pasted zzfx code.\n- Export/Import: Drag-and-drop support for sound lists.\n- Offline Playback: Save sounds as .wav files.\n\n## 🖥️ ZzFX Micro Code\n\nHere's all the code you need to play ZzFX sounds with JavaScript!\n\n```javascript\nlet // ZzFXMicro - Zuper Zmall Zound Zynth - v1.3.1 by Frank Force ~ 1000 bytes\nzzfxV=.3,               // volume\nzzfxX=new AudioContext, // audio context\nzzfx=                   // play sound\n(p=1,k=.05,b=220,e=0,r=0,t=.1,q=0,D=1,u=0,y=0,v=0,z=0,l=0,E=0,A=0,F=0,c=0,w=1,m=0,B=0\n,N=0)=\u003e{let M=Math,d=2*M.PI,R=44100,G=u*=500*d/R/R,C=b*=(1-k+2*k*M.random(k=[]))*d/R,\ng=0,H=0,a=0,n=1,I=0,J=0,f=0,h=N\u003c0?-1:1,x=d*h*N*2/R,L=M.cos(x),Z=M.sin,K=Z(x)/4,O=1+K,\nX=-2*L/O,Y=(1-K)/O,P=(1+h*L)/2/O,Q=-(h+L)/O,S=P,T=0,U=0,V=0,W=0;e=R*e+9;m*=R;r*=R;t*=\nR;c*=R;y*=500*d/R**3;A*=d/R;v*=d/R;z*=R;l=R*l|0;p*=zzfxV;for(h=e+m+r+t+c|0;a\u003ch;k[a++]\n=f*p)++J%(100*F|0)||(f=q?1\u003cq?2\u003cq?3\u003cq?Z(g**3):M.max(M.min(M.tan(g),1),-1):1-(2*g/d%2+2\n)%2:1-4*M.abs(M.round(g/d)-g/d):Z(g),f=(l?1-B+B*Z(d*a/l):1)*(f\u003c0?-1:1)*M.abs(f)**D*(a\n\u003ce?a/e:a\u003ce+m?1-(a-e)/m*(1-w):a\u003ce+m+r?w:a\u003ch-c?(h-a-c)/t*w:0),f=c?f/2+(c\u003ea?0:(a\u003ch-c?1:(\nh-a)/c)*k[a-c|0]/2/p):f,N?f=W=S*T+Q*(T=U)+P*(U=f)-Y*V-X*(V=W):0),x=(b+=u+=y)*M.cos(A*\nH++),g+=x+x*E*Z(a**5),n\u0026\u0026++n\u003ez\u0026\u0026(b+=v,C+=v,n=0),!l||++I%l||(b=C,u=G,n=n||1);p=zzfxX.\ncreateBuffer(1,h,R);p.getChannelData(0).set(k);b=zzfxX.createBufferSource();\nb.buffer=p;b.connect(zzfxX.destination);b.start()}\n```\n\n## 🎮 Games Using ZzFX\n\n[Space Huggers](https://js13kgames.com/entries/space-huggers) / [Driven Wild](https://www.newgrounds.com/portal/view/972740) / [The Way of the Dodo](https://js13kgames.com/games/the-way-of-the-dodo) / [Squad 13](https://js13kgames.com/2024/games/squad-13) / [Coup Ahoo](https://js13kgames.com/2024/games/coup-ahoo) / [Bubble Burst](https://js13kgames.com/games/bubble-burst) / [Packabunchas](https://js13kgames.com/entries/packabunchas) / [Galaxy Rider](https://js13kgames.com/entries/galaxy-rider) / [The Adventures of Captain Callisto](https://js13kgames.com/entries/the-adventures-of-captain-callisto) / [Welcome to Space](https://js13kgames.com/entries/welcome-to-space) / [Bogus Roads](https://www.newgrounds.com/portal/view/747570) / [NoteCraft](https://js13kgames.com/entries/notecraft) / [The Wandering Wraith](https://js13kgames.com/entries/the-wandering-wraith) / [Bounce Back](https://www.newgrounds.com/portal/view/755171) / [Hue Jumper](https://killedbyapixel.itch.io/hue-jumper) / [Bubba's Back Room](https://js13kgames.com/entries/bubbas-back-room) / [Backstabber Hero](https://js13kgames.com/entries/backstabber-hero) / [Spendotron: 2019](https://killedbyapixel.itch.io/currency-wars) / [Dioretsa](https://js13kgames.com/entries/20461-dioretsa) / [Back 2 Back](https://js13kgames.com/entries/back-2-back) / [Quick Wins](https://js13kgames.com/entries/quick-wins) / [Back Relax](http://js13kgames.com/entries/back-relax) / [Back To The Island](https://js13kgames.com/entries/back-to-the-island) / [Backspace It](http://js13kgames.com/entries/backspace-it) / [Back To The Stars](https://js13kgames.com/entries/back-to-the-stars) / [Can't Get Back](https://js13kgames.com/entries/cant-get-back) / [Letchworth Village](https://js13kgames.com/entries/letchworth-village) / [Noegnud](https://js13kgames.com/entries/noegnud) / [Sausage Redemption](https://gogoprog.itch.io/sausage-redemption) / [Marshmallow Sky](https://github.com/baturinsky/marshmallow-sky) / [Big Champ](https://js13kgames.com/entries/big-champ) / [I want to google the game](https://js13kgames.com/entries/i-want-to-google-the-game) / [Edge Not Found](https://js13kgames.com/entries/edge-not-found) / [Stolen Sword](https://js13kgames.com/entries/stolen-sword) / [Highway 404](https://js13kgames.com/entries/highway-404) / [The Last Spartan](https://js13kgames.com/entries/the-last-spartan) / [OS13k](https://github.com/KilledByAPixel/OS13k) / [Crab Story](https://www.crabstory.io/) / [Cooking for Skully](https://github.com/gheja/js13k2022) / [Egg Time Rewind](https://js13kgames.com/entries/egg-time-rewind) / [Charon Jr.](https://js13kgames.com/entries/charon-jr) / [13](https://js13kgames.com/entries/13) / [Soul Surf](https://js13kgames.com/entries/soul-surf) / [Dead Again](https://js13kgames.com/entries/dead-again) / [Trench Fisher](https://swashvirus.github.io/trench-fisher) / [Path to Glory](https://js13kgames.com/entries/path-to-glory) / [Merlin vs Alfonso](https://js13kgames.com/entries/merlin-vs-alfonso) / [Casual Crusade](https://js13kgames.com/entries/casual-crusade) / [Squirtcopter](https://joachimford.uk/squirtcopter/) / [Wendol Village](https://js13kgames.com/2024/games/wendol-village) / [Brewing Disaster](https://js13kgames.com/2024/games/brewing-disaster) / [Data Warrior: 13kb limit](https://js13kgames.com/2024/games/data-warrior-13kb-limit) / [Unblock](https://js13kgames.com/games/unblock) / [204Snake!](https://www.newgrounds.com/portal/view/960100) / [GATOR](https://www.newgrounds.com/portal/view/960757) / [A Hedgehog's Search](https://willsm1111.itch.io/a-hedgehogs-search)\n\n\n![ZzFX Image](/icon.png)\n\n[npm]: https://img.shields.io/npm/v/zzfx\n[npm-url]: https://www.npmjs.com/package/zzfx\n[build-size]: https://badgen.net/bundlephobia/minzip/zzfx?3\n[build-size-url]: https://bundlephobia.com/result?p=zzfx\n[npm-downloads]: https://img.shields.io/npm/dw/zzfx\n[npmtrends-url]: https://www.npmtrends.com/zzfx\n[deepscan]: https://deepscan.io/api/teams/22950/projects/26379/branches/838286/badge/grade.svg\n[deepscan-url]: https://deepscan.io/dashboard#view=project\u0026tid=22950\u0026pid=26379\u0026bid=838286\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilledbyapixel%2Fzzfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkilledbyapixel%2Fzzfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkilledbyapixel%2Fzzfx/lists"}