nussl/separation/primitive/repet.py
def find_repeating_period_simple(beat_spectrum, min_period, max_period):
        """
        Computes the repeating period of the sound signal using the beat spectrum.
        This algorithm just looks for the max value in the interval 
        ``[min_period, max_period]``, inclusive. It discards the first value, and 
        returns the period in units of stft time bins.

        Args:
            beat_spectrum (:obj:`np.array`): input beat spectrum array
            min_period (int): minimum possible period value
            max_period (int): maximum possible period value
            
        Returns:
             period (int): The period of the sound signal in stft time bins
             
        See Also:
            :func:`find_repeating_period_complex`
            
        """
        min_period, max_period = int(min_period), int(max_period)
        # discard the first element of beat_spectrum (lag 0)
        beat_spectrum = beat_spectrum[1:]
        beat_spectrum = beat_spectrum[min_period - 1: max_period]

        if len(beat_spectrum) == 0:
            raise SeparationException('min_period is larger than the beat spectrum!')

        period = np.argmax(beat_spectrum) + min_period

        return period

        Computes the repeating period of the sound signal using the beat spectrum.
        This algorithm just looks for the max value in the interval 
        ``[min_period, max_period]``, inclusive. It discards the first value, and 
        returns the period in units of stft time bins.

        Args:
            beat_spectrum (:obj:`np.array`): input beat spectrum array
            min_period (int): minimum possible period value
            max_period (int): maximum possible period value
            
        Returns:
             period (int): The period of the sound signal in stft time bins
             
        See Also:
            :func:`find_repeating_period_complex`
            
        
Computes the repeating period of the sound signal using the beat spectrum.
This algorithm just looks for the max value in the interval
``[min_period, max_period]``, inclusive. It discards the first value, and
returns the period in units of stft time bins.
Computes the repeating period of the sound signal using the beat spectrum . This algorithm just looks for the max value in the interval ` ` [ min_period max_period ] ` ` inclusive . It discards the first value and returns the period in units of stft time bins .
def find_repeating_period_simple(beat_spectrum, min_period, max_period):
        min_period, max_period = int(min_period), int(max_period)
        beat_spectrum = beat_spectrum[1:]
        beat_spectrum = beat_spectrum[min_period - 1: max_period]
        if len(beat_spectrum) == 0:
            raise SeparationException('min_period is larger than the beat spectrum!')
        period = np.argmax(beat_spectrum) + min_period
        return period
def find_repeating_period_simple ( beat_spectrum , min_period , max_period ) : min_period , max_period = int ( min_period ) , int ( max_period ) beat_spectrum = beat_spectrum [ 1 : ] beat_spectrum = beat_spectrum [ min_period - 1 : max_period ] if len ( beat_spectrum ) == 0 : raise SeparationException ( 'min_period is larger than the beat spectrum!' ) period = np . argmax ( beat_spectrum ) + min_period return period
Computes the repeating period of the sound signal using the beat spectrum.
Computes the repeating period of the sound signal using the beat spectrum .
"""
        Computes the repeating period of the sound signal using the beat spectrum.
        This algorithm just looks for the max value in the interval 
        ``[min_period, max_period]``, inclusive. It discards the first value, and 
        returns the period in units of stft time bins.

        Args:
            beat_spectrum (:obj:`np.array`): input beat spectrum array
            min_period (int): minimum possible period value
            max_period (int): maximum possible period value
            
        Returns:
             period (int): The period of the sound signal in stft time bins
             
        See Also:
            :func:`find_repeating_period_complex`
            
        """ # discard the first element of beat_spectrum (lag 0)
period (int): The period of the sound signal in stft time bins
period ( int ) : The period of the sound signal in stft time bins
beat_spectrum
min_period
minimum possible period value
minimum possible period value
max_period
maximum possible period value
maximum possible period value
beat_spectrum (
`np.array`): input beat spectrum array
` np . array ` ) : input beat spectrum array