Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ AUDIO THREAD PART III

Name: Anonymous 2008-05-24 3:21

#include <stdio.h>
#include <stdlib.h>

main() {
 int i,j,k,l;
 while(1) {
  l=rand()%100;
  for(k=0;k<l;k++) {
   for(i=0;i<255;i+=128)
    for(j=0;j<k;j++)
     putchar(i);
   for(;i;i-=128)
    for(j=0;j<k;j++)
     putchar(i);
  }
 }
}


gcc -o lolsound lolsound.c
./lolsound > /dev/dsp


First one to hack this into saying "Have you read your SICP today?" gets an internet.

Name: Anonymous 2008-05-24 16:23

>Figure out a way of calculating the frequency (it has to do with 8000Hz) and you can generate any tone.

Help.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List