// generate sine waves in a linear scale of frequencies // #include #include #define PI (4*atan(1)) #define FS 8000.0 // audio sampling frequency int main( void) { double t, f; for( int i = 0; i < 1000; ++i) { t = i/FS; f = 500 + (i/100)*300; printf( "%g\n", sin(2*PI*f*t) ); } return 0; } // assuming p1 is 3-point moving average: // plot // plot with args: | dft // plot with args: | p1 // plot with args: | p1 | dft