Mercurial > hg > libxtract
comparison tests/xttest_util.hpp @ 267:41fe82c7ff80
Add more F0 tests
author | Jamie Bullock <jamie@jamiebullock.com> |
---|---|
date | Tue, 11 Nov 2014 16:15:28 +0000 |
parents | ecd6f2cf1346 |
children | 446f6d3dc809 |
comparison
equal
deleted
inserted
replaced
266:5f15c7be9e0e | 267:41fe82c7ff80 |
---|---|
1 | 1 |
2 | 2 |
3 #include <stdint.h> | 3 #include <stdint.h> |
4 | 4 |
5 // Fill table with sine wave at given frequency and amplitude | |
5 void xttest_gen_sine(double *table, uint32_t tablesize, double samplerate, double frequency, double amplitude); | 6 void xttest_gen_sine(double *table, uint32_t tablesize, double samplerate, double frequency, double amplitude); |
7 | |
8 // Fill table with noise at given frequency and amplitude | |
9 // N.B. The implementation actually provides "fake" noise from a table for reproducible testing | |
6 void xttest_gen_noise(double *table, uint32_t tablesize, double amplitude); | 10 void xttest_gen_noise(double *table, uint32_t tablesize, double amplitude); |
11 | |
12 // Add table1 and table2 sample-by-sample leaving the result in table1 | |
13 void xttest_add(double *table1, double *table2, uint32_t tablesize); | |
14 | |
15 // Multiply table by a constant leavint the result in table | |
16 void xttest_mul(double *table, uint32_t tablesize, double constant); | |
17 | |
18 // Return MIDI cent value for frequency | |
19 uint16_t xttest_ftom(double frequency); |