Пример #1
0
def echo_division(sig_):
    sig = sig_
    m1 = sf.Magnitude(+sig)
    if m1 == 0.0:
        return sig
    length = sf.Length(+sig)
    convol = sf.ReadFile("temp/swell.wav")
    sigW = convolve(+sig, convol[0])
    sig = realise(sig, sigW)
    c_log("Reference count:", sig.getReferenceCount())
    m2 = sf.Magnitude(+sig)
    sig = realise(sf.NumericVolume(sig, m1 / m2))
    return sig
Пример #2
0
def excite(sig_,mix_ammount,power):
    sig=sig_
    m=sf.Magnitude(+sig)
    sigh=sf.BesselHighPass(+sig,500,2)
    mh=sf.Magnitude(+sigh)
    sigh=sf.Power(sigh,power)
    sigh=sf.Clean(sigh)
    sigh=sf.BesselHighPass(sigh,1000,2)
    nh=sf.Magnitude(+sigh)
    sigh=sf.LinearVolume(sigh,mh/nh)
    sig=mix(sf.LinearVolume(sigh,mix_ammount),sf.LinearVolume(sig,1.0-mix_ammount))
    n=sf.Magnitude(+sig)
    return realise(sf.LinearVolume(sig,m/n))
Пример #3
0
def excite(sig_, mix_ammount, power):
    sig = sig_
    m = sf.Magnitude(+sig)
    sigh = sf.BesselHighPass(+sig, 500, 2)
    mh = sf.Magnitude(+sigh)
    sigh = sf.Power(sigh, power)
    sigh = sf.Clean(sigh)
    sigh = sf.BesselHighPass(sigh, 1000, 2)
    nh = sf.Magnitude(+sigh)
    sigh = sf.LinearVolume(sigh, mh / nh)
    sig = mix(sf.LinearVolume(sigh, mix_ammount),
              sf.LinearVolume(sig, 1.0 - mix_ammount))
    n = sf.Magnitude(+sig)
    return realise(sf.LinearVolume(sig, m / n))
Пример #4
0
def tremolate(sig_, rate, mag):
    sig = sig_
    m1 = sf.Magnitude(+sig)
    if m1 == 0.0:
        return sig
    length = sf.Length(+sig)
    ev = sf.NumericVolume(sf.MakeTriangle(sf.PhasedSineWave(length + 64, rate, random.random())), mag)
    ev = sf.Cut(0, length, ev)
    fv = sf.Pcnt2(+ev)
    ev = sf.DirectMix(1.0, ev)
    sig = sf.FrequencyModulate(sig, fv)
    sig = sf.Multiply(ev, sig)
    convol = sf.ReadFile("temp/swell.wav")
    sigW = convolve(+sig, convol[0])
    sig = mix(sig, sigW)
    m2 = sf.Magnitude(+sig)
    sig = realise(sf.NumericVolume(sig, m1 / m2))
    return sig