/*
* SoundEff.c - Example program showing use of the tritone() function
*
**********/

#include <stdio.h>
#include <poly.h>
        
#define NEXTVAL(A) ( (A)>=8191? 1 : A + 5 )
#define PREVVAL(A) ( A<=1? 8191 : A - 5 )

main()
{
int v1, v2, v3;

   printf("Press any key to quit... ");
   v1 = 1, v2 = 4050, v3 = 8191;
   while( !kbhit() )
      {
      tritone( 512, v1, v2, v3, 6 );
      v1 = NEXTVAL(v1);             
      v2 = PREVVAL(v2);             
      v3 = PREVVAL(v3);             
      }
}
