diff options
author | Jamie Bullock <jamie@jamiebullock.com> | 2014-11-11 16:15:28 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@jamiebullock.com> | 2014-11-11 16:15:28 +0000 |
commit | acb301168deafed61ff4c59910cc989d67e25f40 (patch) | |
tree | 0253a66770c124757d0e55a3d404e2eb937ea01b /tests/xttest_util.hpp | |
parent | 4dcfb2941e6e4cb123b217d0c30c14bf541d2127 (diff) | |
download | LibXtract-acb301168deafed61ff4c59910cc989d67e25f40.tar.gz LibXtract-acb301168deafed61ff4c59910cc989d67e25f40.tar.bz2 LibXtract-acb301168deafed61ff4c59910cc989d67e25f40.zip |
Add more F0 tests
Diffstat (limited to 'tests/xttest_util.hpp')
-rw-r--r-- | tests/xttest_util.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/xttest_util.hpp b/tests/xttest_util.hpp index a669ae9..381f2cf 100644 --- a/tests/xttest_util.hpp +++ b/tests/xttest_util.hpp @@ -2,5 +2,18 @@ #include <stdint.h> +// Fill table with sine wave at given frequency and amplitude void xttest_gen_sine(double *table, uint32_t tablesize, double samplerate, double frequency, double amplitude); + +// Fill table with noise at given frequency and amplitude +// N.B. The implementation actually provides "fake" noise from a table for reproducible testing void xttest_gen_noise(double *table, uint32_t tablesize, double amplitude); + +// Add table1 and table2 sample-by-sample leaving the result in table1 +void xttest_add(double *table1, double *table2, uint32_t tablesize); + +// Multiply table by a constant leavint the result in table +void xttest_mul(double *table, uint32_t tablesize, double constant); + +// Return MIDI cent value for frequency +uint16_t xttest_ftom(double frequency); |