by the time I was a electronics student, one of our DSP teachers told us about synthesis and analysis of sounds. That was quite interesting and funny
The code below was part of this exam. We had to reverse engineer and explain how this obscure code worked
Code: Select all
/* Obscure.c Examen Partiel 2b
T.Rochebois IEF-UPS bat220
02/03/98
*/
#include <stdio.h>
main(){double _ =0,o=2.2675e-3,
e1se =1.5759e12, doub1e=0,__1=0,f1oat
=0,l1_=0,l__=0,_1__=0, _l_=0,_1_=0;short O;FILE
* fc1ose =fopen("saw.pcm", "wb");for(;o< .3;__1=doub1e,
l1_ = f1oat,_1__ =l__,_1_=_l_, fwrite(&O,1,2,fc1ose),_+=(o *=1+
2.267576e-6)){_-=2*(_>1);O=(e1se*= 1-9.070254e-6)*( _1_-(_l_=_1__-(l__=
l1_-(f1oat=__1 -(doub1e=_*(_*_*(_*_*3-10)+7))))));}fclose(fc1ose);}/*GENERATOR*/

