Skip to content
Sign UpLog In
Profile icon

Thai Pangsakulyanont

@dtinth
  • glsl-template

    Cover page
    Made with HTML, CSS, JS
    Recent comments (0)
Repls
Community
dtinth
dtinth
shared a Post
3 years ago
A geeky way to say “Happy Birthday”
It’s my friend’s birthday. I plan to send him some JS code that when pasted into DevTools plays the happy b’day song. This is the result. (Solo projec
A geeky way to say “Happy Birthday”
HTML, CSS, JS
AdrianHall
AdrianHall
Oh wow, that's so cool! You can just send them an email telling them to paste ((c=new AudioContext(),n=[...'畋畋畍甯畋甯畐甯畏甯甯甯畋畋畍甯畋甯畒甯畐甯甯甯畋畋畗甯畔甯畐畐畏甯畍甯甯甯畕畕畔甯畐甯畒甯畐甯甸甼甿町甽甿町甽甿甸甼甿甸甿畂甸甽畁畄町甿畃甼甿畄'].map(a=>a.charCodeAt(0)-30000),z=c.currentTime,t=(f,b,o=c.createOscillator(),g=c.createGain(),l=0.5)=>(o.frequency.value=f,o.connect(g),g.connect(c.destination),g.gain.setValueAtTime(0.5,z+b),g.gain.linearRampToValueAtTime(0,z+b+l),o.start(z+b),o.stop(z+b+l)))=>n.forEach((c,i)=>~c&&t(2202((c)/12),(i>=47?(i-47)2:i+(i3 years ago
phoomparin
phoomparin
What a pleasant surprise! Love this <33 years ago