Example #1
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)
Example #2
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))
Example #3
0
def cello(length,freq):
    sig=string(length,freq)
    sig=create_vibrato(
        sig,length,
        longer_than=512,
        rate=2.5,
        at=450,
        depth=0.25,
        pitch_depth=0.02
    )
    sig=sf.FixSize(polish(sig,freq))
    return pitch_move(sig)
Example #4
0
def vox_humana_inner(length,freq,a,b,c,z1=1.0,z2=1.25):
    vox=mix(
        sf.Pcnt75(sing_base(length,freq,z1)),
        sf.Pcnt25(sing_base(length,freq*2.0,z1))
    )
    length=sf.Length(+vox)
    vox=sf.FixSize(polish(vox,freq)) 
    if length>1024:
        rt=3.0
        dp=0.2
        pdp=0.1
    else:
        rt=4.5
        dp=0.1
        pdp=0.05
    if length>2048:
        a=length*0.75
    else:
        a=length*0.5
    vox=create_vibrato(vox,length,longer_than=512,rate=rt,depth=dp,pitch_depth=pdp,at=a)
    vox=do_formant(vox,a,b,c,freq)
    vox=polish(vox,freq)        
    vox=excite(vox,0.2,2.0)
    vox=polish(vox,freq)
    notch=(freq+a)/2.0      
    vox=mix(
        sf.Pcnt75(sf.RBJNotch(+vox,notch,0.5)),
        sf.Pcnt25(vox)
    )

    vox=mix(
        sf.Multiply(
            sf.FixSize(sf.Power(clean_noise(length,freq*0.5),1.5)),
            sf.SimpleShape((0,-60),(64,-35),(128,-40),(length,-60))
        ),
        vox
    )
    
    vox=polish(vox,freq)
    vox=sf.RBJPeaking(vox,freq,3,4)
    vox=polish(vox,freq)
    return sf.FixSize(vox)
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)