Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -5,6 +5,7 @@ from numpy.testing import TestCase, assert_equal, assert_almost_equal · 4 unmodified lines | ||
| 5 | 5 | from aubio import notes |
| 6 | 6 | |
| 7 | 7 | AUBIO_DEFAULT_NOTES_SILENCE = -70. |
| 8 | +AUBIO_DEFAULT_NOTES_RELEASE_DROP = 10. | |
| 8 | 9 | AUBIO_DEFAULT_NOTES_MINIOI_MS = 30. |
| 9 | 10 | |
| 10 | 11 | class aubio_notes_default(TestCase): |
| @@ -38,6 +39,19 @@ class aubio_notes_params(TestCase): · 27 unmodified lines | ||
| 38 | 39 | self.o.set_silence(val) |
| 39 | 40 | assert_equal (self.o.get_silence(), val) |
| 40 | 41 | |
| 42 | + def test_get_release_drop(self): | |
| 43 | + assert_equal (self.o.get_release_drop(), AUBIO_DEFAULT_NOTES_RELEASE_DROP) | |
| 44 | + | |
| 45 | + def test_set_release_drop(self): | |
| 46 | + val = 50 | |
| 47 | + self.o.set_release_drop(val) | |
| 48 | + assert_equal (self.o.get_release_drop(), val) | |
| 49 | + | |
| 50 | + def test_set_release_drop_wrong(self): | |
| 51 | + val = -10 | |
| 52 | + with self.assertRaises(ValueError): | |
| 53 | + self.o.set_release_drop(val) | |
| 54 | + | |
| 41 | 55 | from .utils import list_all_sounds |
| 42 | 56 | list_of_sounds = list_all_sounds('sounds') |
| 43 | 57 | |