Hacker Newsnew | past | comments | ask | show | jobs | submit | reindernijhoff's commentslogin

The Dittytoy engine is just a tiny layer that calls the code of the ditty 44100 per second. So the whole sound wave synthesis is done in the code of the ditty.


That's pretty impressive. The whoosh sound is just filtered white noise, so I don't think it would be hard to add it.


And another amazing ditty on Dittytoy. This is a vocoder written in javascript and performing (a small part) of the aria "Nessun Dorma" from Puccini's opera "Turandot": https://dittytoy.net/ditty/6f30b0885d


I think the cool thing about this version is that the whole sound wave (including the code for the synthesizers) is generated by one single piece of javascript (<19 kb). So it is more about the code itself than the code size.


It puts the term 'softsynth' to good use. Incredible, really.


You probably like this ditty:

let t=0; synth.def(() => (255&(1|63(63&63+8Math.sin(t++/2e5)t/2e5)&100Math.tan(4Math.PIt/2e5)/4Math.sin(4Math.PI[165,220,175,262,196,147,220,165][7&(2t/2e5&12t/2e5^8t/2e5)]t/2e5)|2048(1+(1&t/4/2e5))t/2e5))/127-1).play(0,{env:one});

https://dittytoy.net/ditty/7c700fc1c3


thanks, that's pretty cool!


The dittytoy API is 57.4kb, so including the source of this ditty, everything fits < 80kb.

No samples or webaudio filters are used. Everything (the whole sound wave) is generated in code.


Where do you see the source of dittytoy? Asking because one of the commentators on the original link mentioned a code size of around 600kb.


GP made dittytoy.


I guess that makes their answer more authoritative then ;)


Dittytoy: an online platform that allows you to create music using a minimalistic javascript API. All music on Dittytoy is generated entirely in code.


Can you give me a link to an .obj that doesn't work so I can have a look?


haha :)


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

Search: