home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / miscprog / pmusic11 / soundeff.c < prev    next >
Text File  |  1989-06-14  |  532b  |  26 lines

  1. /*
  2. * SoundEff.c - Example program showing use of the tritone() function
  3. *
  4. **********/
  5.  
  6. #include <stdio.h>
  7. #include <poly.h>
  8.         
  9. #define NEXTVAL(A) ( (A)>=8191? 1 : A + 5 )
  10. #define PREVVAL(A) ( A<=1? 8191 : A - 5 )
  11.  
  12. main()
  13. {
  14. int v1, v2, v3;
  15.  
  16.    printf("Press any key to quit... ");
  17.    v1 = 1, v2 = 4050, v3 = 8191;
  18.    while( !kbhit() )
  19.       {
  20.       tritone( 512, v1, v2, v3, 6 );
  21.       v1 = NEXTVAL(v1);             
  22.       v2 = PREVVAL(v2);             
  23.       v3 = PREVVAL(v3);             
  24.       }
  25. }
  26.