kopia lustrzana https://github.com/xdsopl/robot36
fixed stft code generator
rodzic
b77e9c1b3d
commit
bd0e98ba75
Plik diff jest za duży
Load Diff
|
@ -26,14 +26,15 @@ double gauss(double n, double N, double o)
|
|||
int main()
|
||||
{
|
||||
const int N = 1 << 14;
|
||||
const double o = 0.2;
|
||||
printf("/* code generated by 'utils/stft.c' */\n");
|
||||
printf("static const int stft_N = %d;\n", N);
|
||||
printf("static const float stft_w[%d] = {\n", N);
|
||||
double sum = 0.0;
|
||||
for (int n = 0; n < N; n++)
|
||||
sum += gauss(n, N|1, 0.2);
|
||||
sum += gauss(n, N|1, o);
|
||||
for (int n = 0; n < N; n++) {
|
||||
printf("\t%g%s\n", gauss(n, N, 0.2) / sum, n < (N-1) ? "," : "");
|
||||
printf("\t%g%s\n", gauss(n, N|1, o) / sum, n < (N-1) ? "," : "");
|
||||
}
|
||||
printf("};\n");
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue