Hacker News new | past | comments | ask | show | jobs | submit | warenhor's comments login

In case you want (like me) to share your best art with you colleagues:

let e = $.Event('keyup'); '09090586 '.split('').map((k, i) => {setTimeout(()=>{$.play(InstrumentPerKeyEnum[k],k,e.type==="keydown")}, i * 200); setTimeout(() => {$.play(InstrumentPerKeyEnum[k],k,e.type==="keyup")}, i * 250)});


I think bongo cat needs a MIDI interpreter


let e = $.Event('keyup'); Math.PI.toFixed(50).split('').map((k, i) => {setTimeout(()=>{$.play(InstrumentPerKeyEnum[k],k,e.type==="keydown")}, i * 200); setTimeout(() => {$.play(InstrumentPerKeyEnum[k],k,e.type==="keyup")}, i * 250)});


It's not working in the console


Indeed, I forgot to define `e` on the same line, cheers.


Nice! the ending was fun :)


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: