r/javascript • u/Emergency_Activity38 • Apr 16 '26
tiks – Procedural UI sounds in 2KB, zero audio files, pure Web Audio synthesis
https://rexa-developer.github.io/tiks
145
Upvotes
r/javascript • u/Emergency_Activity38 • Apr 16 '26
32
u/Emergency_Activity38 Apr 16 '26
I built tiks because every native app has satisfying interaction sounds but web apps have been silent for 30 years.
Instead of shipping MP3s or base64 audio, tiks generates 10 UI sounds (click, toggle, success, error, etc.) at runtime using oscillators and gain envelopes through the Web Audio API. ~2KB gzipped.
npm:
npm install @rexa-developer/tiksGitHub: rexa-developer/tiks
Would love feedback on the sound design!
6
u/boneskull Apr 16 '26
Neat. Would like tools to generate my own sounds.
4
u/celtric Apr 16 '26
Working on https://www.reddit.com/r/windows95/comments/1shjwwa/ive_created_a_win95inspired_virtual_os_for_my/ I realized how useful feedback sounds are, specially for certain UIs and certain populations (kids, elder people). I think your statement is very neat and the implementation very clean, I'm definitely interested in seeing something like this gains traction.
Btw for all these UX decisions, I try to see what people like https://www.nngroup.com/ back up with actual studies. Have you done some research around this?
3
u/iccir Apr 16 '26
First, nicely done!
Note that your comment in
getPinkNoise()is wrong - this isn't the Voss-McCartney algorithm. It's Paul Kellet's "PK3" IIR filter from his 1999-10-17 post to the musicdsp mailing list. Voss-McCartney involves summing multiple uniform random number generators.Here's an archived web page with more information. It's not your fault - at some point, someone released sample code with the wrong comment and it's caused a lot of confusion.
2
u/kwartel Apr 16 '26
The demo page doesn’t seem to work on iOS Safari :(
7
u/evoactivity Apr 16 '26
Looks interesting but I really want to clickity clack on a demo page.
Edit: I’m dumb, I was looking for a demo link on the GitHub, didn’t see it.
1
u/wardenOfDemonreach Apr 16 '26
Love this. Will definitely try it out at some point
1
u/Dreadsin Apr 17 '26
Does this work on mobile browsers?
1
u/skratlo Apr 17 '26
Spot on! I'm going to use this. Have you considered hosting the source code outside of GitHub?
3
u/Seanitzel Apr 16 '26
This is awesome and i actually created a similar internal system for my app! However im on my iPhone iOS26.4 And no matter what browser i tried(even though they are all webkit lol) audio doesn't seem to work :/
2
u/lino-b May 13 '26
Ciao
2
u/equinusocio Apr 16 '26
Really cool, but on Safari doesn't work properly. Sometimes I have no sound at all.
1
u/AutoModerator Apr 16 '26
Project Page (?): https://github.com/rexa-developer/tiks
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/patrk Apr 16 '26
Awesome, well done! Will definitely use this.
1
u/louisremi Apr 16 '26
Nice!
1
u/Individual-Brief1116 Apr 16 '26
This is brilliant. We've been building silent web apps for decades while every mobile app has satisfying click sounds. Definitely trying this out.
1
u/TrimMenno May 08 '26
How is it possible to be this cute?
1
u/[deleted] Apr 16 '26
[removed] — view removed comment