nussl/separation/primitive/melodia.py
def rosenmodel(t1, t2, fs):
    """
    This model for generating singing vowel sounds from sine tones comes
    from:

    https://simonl02.users.greyc.fr/files/Documents/Teaching/SignalProcessingLabs/lab3.pdf

    The above will be referred to throughout these docstrings as THE DOCUMENT.

    Original author: Fatemeh Pishdadian

    The arguments to the fucntions throughout this text follow the 
    signatures laid out in THE DOCUMENT.

    This is used in Melodia to generate the melody signal to produce a 
    mask.

    Equation 2 in THE DOCUMENT.
    """

    N1 = np.floor(t1 * fs)
    N2 = np.floor(t2 * fs)

    samp_vec1 = np.arange(N1+1)
    samp_vec2 = np.arange(N1,N1+N2+1)

    ir_func1 =  0.5 * (1 - np.cos((np.pi * samp_vec1)/N1))
    ir_func2 = np.cos(np.pi * (samp_vec2 - N1)/(2 * N2))

    vchord_filt = np.concatenate((ir_func1,ir_func2))

    return vchord_filt

    This model for generating singing vowel sounds from sine tones comes
    from:

    https://simonl02.users.greyc.fr/files/Documents/Teaching/SignalProcessingLabs/lab3.pdf

    The above will be referred to throughout these docstrings as THE DOCUMENT.

    Original author: Fatemeh Pishdadian

    The arguments to the fucntions throughout this text follow the 
    signatures laid out in THE DOCUMENT.

    This is used in Melodia to generate the melody signal to produce a 
    mask.

    Equation 2 in THE DOCUMENT.
    
This model for generating singing vowel sounds from sine tones comes
from.



The above will be referred to throughout these docstrings as THE DOCUMENT.

Original author: Fatemeh Pishdadian

The arguments to the fucntions throughout this text follow the
signatures laid out in THE DOCUMENT.

This is used in Melodia to generate the melody signal to produce a
mask.

Equation 2 in THE DOCUMENT.
This model for generating singing vowel sounds from sine tones comes from . The above will be referred to throughout these docstrings as THE DOCUMENT . Original author : Fatemeh Pishdadian The arguments to the fucntions throughout this text follow the signatures laid out in THE DOCUMENT . This is used in Melodia to generate the melody signal to produce a mask . Equation 2 in THE DOCUMENT .
def rosenmodel(t1, t2, fs):
    N1 = np.floor(t1 * fs)
    N2 = np.floor(t2 * fs)
    samp_vec1 = np.arange(N1+1)
    samp_vec2 = np.arange(N1,N1+N2+1)
    ir_func1 =  0.5 * (1 - np.cos((np.pi * samp_vec1)/N1))
    ir_func2 = np.cos(np.pi * (samp_vec2 - N1)/(2 * N2))
    vchord_filt = np.concatenate((ir_func1,ir_func2))
    return vchord_filt
def rosenmodel ( t1 , t2 , fs ) : N1 = np . floor ( t1 * fs ) N2 = np . floor ( t2 * fs ) samp_vec1 = np . arange ( N1 + 1 ) samp_vec2 = np . arange ( N1 , N1 + N2 + 1 ) ir_func1 = 0.5 * ( 1 - np . cos ( ( np . pi * samp_vec1 ) / N1 ) ) ir_func2 = np . cos ( np . pi * ( samp_vec2 - N1 ) / ( 2 * N2 ) ) vchord_filt = np . concatenate ( ( ir_func1 , ir_func2 ) ) return vchord_filt
This model for generating singing vowel sounds from sine tones comes
from:
This model for generating singing vowel sounds from sine tones comes from :
"""
    This model for generating singing vowel sounds from sine tones comes
    from:

    https://simonl02.users.greyc.fr/files/Documents/Teaching/SignalProcessingLabs/lab3.pdf

    The above will be referred to throughout these docstrings as THE DOCUMENT.

    Original author: Fatemeh Pishdadian

    The arguments to the fucntions throughout this text follow the 
    signatures laid out in THE DOCUMENT.

    This is used in Melodia to generate the melody signal to produce a 
    mask.

    Equation 2 in THE DOCUMENT.
    """
t1
t2
fs