feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 0cbfa4a was
0cbfa4a,
checked in by Paul Brossier <piem@piem.org>, 16 years ago
|
added simple phasevoc test
|
-
Property mode set to
100644
|
File size:
748 bytes
|
Line | |
---|
1 | import unittest |
---|
2 | |
---|
3 | from aubio.aubiowrapper import * |
---|
4 | |
---|
5 | |
---|
6 | buf_size = 1024 |
---|
7 | hop_size = 256 |
---|
8 | channels = 2 |
---|
9 | |
---|
10 | class aubio_phasevoc_test(unittest.TestCase): |
---|
11 | |
---|
12 | def setUp(self): |
---|
13 | self.o = new_aubio_pvoc(buf_size, hop_size, channels) |
---|
14 | |
---|
15 | def tearDown(self): |
---|
16 | del_aubio_pvoc(self.o) |
---|
17 | |
---|
18 | def test_create(self): |
---|
19 | """ test creation and deletion of phasevoc object """ |
---|
20 | pass |
---|
21 | |
---|
22 | def test_zeroes(self): |
---|
23 | """ test phasevoc object on zeroes """ |
---|
24 | input = new_fvec(hop_size, channels) |
---|
25 | fftgrain = new_cvec(buf_size, channels) |
---|
26 | aubio_pvoc_do (self.o, input, fftgrain) |
---|
27 | aubio_pvoc_rdo(self.o, fftgrain, input) |
---|
28 | for index in range(buf_size): |
---|
29 | for channel in range(channels): |
---|
30 | self.assertEqual(0., fvec_read_sample(input, channel, index)) |
---|
Note: See
TracBrowser
for help on using the repository browser.