Created
April 14, 2024 11:02
-
-
Save leomastoras/f24b2d8517378ad36991d10a56cd0abc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function play() { | |
// Code to send: ----------------- | |
((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(220*2**((c)/12),(i>=47?(i-47)*2:i+(i%2)/6)/4)))() | |
// ------------------------------- | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment