Ignore:
Timestamp:
Dec 19, 2018, 7:31:45 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/timestretch, fix/ffmpeg5, master
Children:
22d7902
Parents:
6e157df (diff), d0f19a7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/pitchshift' into feature/timestretch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_phasevoc.py

    r6e157df rcb0d7d0  
    22
    33from numpy.testing import TestCase, assert_equal, assert_array_less
     4from _tools import parametrize
    45from aubio import fvec, cvec, pvoc, float_type
    5 from nose2 import main
    6 from nose2.tools import params
    76import numpy as np
    87
     
    1918    return np.random.rand(hop_s).astype(float_type) * 2. - 1.
    2019
    21 class aubio_pvoc_test_case(TestCase):
     20class Test_aubio_pvoc_test_case(object):
    2221    """ pvoc object test case """
    2322
     
    6665            assert_equal ( t, 0.)
    6766
    68     @params(
     67    resynth_noise_args = "hop_s, ratio"
     68    resynth_noise_values = [
    6969            ( 256, 8),
    7070            ( 256, 4),
     
    8888            (8192, 4),
    8989            (8192, 2),
    90             )
     90            ]
     91
     92    @parametrize(resynth_noise_args, resynth_noise_values)
    9193    def test_resynth_steps_noise(self, hop_s, ratio):
    9294        """ check the resynthesis of a random signal is correct """
     
    9496        self.reconstruction(sigin, hop_s, ratio)
    9597
    96     @params(
     98    resynth_sine_args = "samplerate, hop_s, ratio, freq"
     99    resynth_sine_values = [
    97100            (44100,  256, 8,   441),
    98101            (44100,  256, 4,  1203),
     
    109112            (96000, 1024, 8, 47000),
    110113            (96000, 1024, 8,    20),
    111             )
     114            ]
     115
     116    @parametrize(resynth_sine_args, resynth_sine_values)
    112117    def test_resynth_steps_sine(self, samplerate, hop_s, ratio, freq):
    113118        """ check the resynthesis of a sine is correct """
     
    200205
    201206if __name__ == '__main__':
     207    from unittest import main
    202208    main()
    203 
Note: See TracChangeset for help on using the changeset viewer.