コード例 #1
0
def folk_flute(length,freq):
    sig=mix(
        byquad_filter(
            'low',
            sf.Mix(
                phasing_triangle(length,freq),
                sf.Pcnt1(sf.MakeSquare(sf.SineWave(length,freq*0.9)))
            ),
            freq*2.0,
            2
        ),
        sf.Multiply(
            byquad_filter(
                'peak',
                clean_noise(length,freq*0.5),
                freq,
                0.5,
                16
            ),
            sf.SimpleShape((0,-60),(64,-28),(128,-40),(length,-40))
        )
    )
    sig=create_vibrato(
        sig,length,
        longer_than=512,
        rate=2.5,
        at=450,
        depth=0.5,
        pitch_depth=0.02
    )
    return sf.FixSize(polish(sig,freq))
コード例 #2
0
def voice1(length, freq):

    sigs = []
    for i in range(1, 3):
        sig = byquad_filter(
            'peak',
            byquad_filter(
                'peak',
                sf.Pcnt1(
                    sf.SineWave(length, freq - 2.0 + random.random() * 4.0)),
                1.0, 64), freq, 0.1, 64)

        sig = byquad_filter('peak', sig, freq, 1.0, 128)

        sig = sf.FixSize(excite(sig, 1.0, 2.0))
        sig = sf.FixSize(sf.Saturate(sf.LinearVolume(sig, 2.0)))

        sig = create_vibrato(sig,
                             length,
                             longer_than=0.5,
                             rate=2 + random.random(),
                             at=0.45,
                             depth=0.1,
                             pitch_depth=0.01)

        sigs.append(sig)
    sig = mix(sigs)
    return sf.Finalise(sig)
コード例 #3
0
def shawm(length,freq):
    s1=simple_sawtooth(length,freq)
    if freq>1000:
        s_freq=1000
    else:
        s_freq=freq*2.0
    
    sig=mix(
        s1,
        sf.Multiply(
            clean_noise(length,s_freq),
            sf.SimpleShape((0,-60),(64,-20),(128,-30),(length,-40))
        )
    )

    sig=sf.FixSize(sig)
    sig=byquad_filter('peak',sig,freq*3.0,1,6)
    sig=byquad_filter('low', sig,freq*6.0,1)
    sig=polish(sig,freq)
    return sf.FixSize(sig)
コード例 #4
0
def brittle(length, freq):
    sig = sf.WhiteNoise(length)
    for i in xrange(0, 2):
        sig = byquad_filter('low', sig, 1, 1)
    sig = sf.Pcnt25(sf.FixSize(sf.Power(sig, 1.0)))
    sig = sf.DirectMix(1.0, sig)
    sig = sf.Multiply(sf.SineWave(length, freq), sig)
    #sig=sf.SineWave(length,freq)
    sig = sf.FixSize(sig)
    sig = sf.Power(sig, 10)
    sig = sf.Finalise(sig)
    return sig
コード例 #5
0
def vox_humana_femail_soprano_ma(length,freq):
    vox = vox_humana_femail_soprano_a(length,freq)
    if length>128:
        qsh =sf.NumericShape((0,0.1),(120,2),  (length,0.1))
        msh =sf.NumericShape((0,1.0),(120,1.0),(length,0.0))
        mshr=sf.NumericShape((0,0.0),(120,0.0),(length,1.0))
        init=byquad_filter('low',+vox,freq,qsh)
        vox =sf.Multiply(vox ,mshr)
        init=sf.Multiply(init,msh)
        vox =mix(vox,init)
        vox=sf.FixSize(polish(vox,freq))
    return vox
コード例 #6
0
def voice1(length,freq):

    sigs=[]
    for i in range(1,3):
        sig=byquad_filter(
            'peak',
            byquad_filter(
                'peak',
                sf.Pcnt1(sf.SineWave(length,freq-2.0+random.random()*4.0)),
                1.0,
                64
            ),
            freq,
            0.1,
            64
        )
        
        sig=byquad_filter(
            'peak',
            sig,
            freq,
            1.0,
            128
        )
    
        sig=sf.FixSize(excite(sig,1.0,2.0))
        sig=sf.FixSize(sf.Saturate(sf.LinearVolume(sig,2.0)))
        
        sig=create_vibrato(
            sig,length,
            longer_than=0.5,
            rate=2 + random.random(),
            at=0.45,
            depth=0.1,
            pitch_depth=0.01
        )     
        
        sigs.append(sig)
    sig=mix(sigs)
    return sf.Finalise(sig)
コード例 #7
0
def brittle(length,freq):
    sig=sf.WhiteNoise(length)
    for i in xrange(0,2):
        sig=byquad_filter(
            'low',
            sig,
            1,
            1
        )
    sig=sf.Pcnt25(sf.FixSize(sf.Power(sig,1.0)))
    sig=sf.DirectMix(1.0,sig)
    sig=sf.Multiply(
        sf.SineWave(length,freq),
        sig
    )
    #sig=sf.SineWave(length,freq)
    sig=sf.FixSize(sig)
    sig=sf.Power(sig,10)
    sig=sf.Finalise(sig)
    return sig