Exemplo n.º 1
0
def plot_figure_dunwah():
    import dunwah
    filt = dunwah.dsp()
    para = 'wah'
    name = "DunWah"
    rg = log10(linspace(*np.power(10, filt.get_range(para)), num=10))
    filt.init(48000)
    plot_figure(filt, name, para, rg)
Exemplo n.º 2
0
def plot_figure_dunwah():
    import dunwah

    filt = dunwah.dsp()
    para = "wah"
    name = "DunWah"
    rg = log10(linspace(*np.power(10, filt.get_range(para)), num=10))
    filt.init(48000)
    plot_figure(filt, name, para, rg)
Exemplo n.º 3
0
def plot_figure_dunwah(clr="-", fs=44100):
    import dunwah
    filt = dunwah.dsp()
    para = 'wah'
    name = "DunWah"
    #rg = linspace(*filt.get_range(para), num=10)
    rg = log10(linspace(*np.power(10, filt.get_range(para)), num=10))
    filt.init(fs)
    plot_figure(filt, name, para, rg, clr, fs)
Exemplo n.º 4
0
def plot_figure_dunwah(clr="-", fs=44100):
    import dunwah
    filt = dunwah.dsp()
    para = 'wah'
    name = "DunWah"
    #rg = linspace(*filt.get_range(para), num=10)
    rg = log10(linspace(*np.power(10,filt.get_range(para)), num=10))
    filt.init(fs)
    plot_figure(filt, name, para, rg, clr, fs)
Exemplo n.º 5
0
def compare_dynamics(freq, fs):
    global title
    title("Freq = %g" % freq)

    lfo_freq = 5.0
    block_size = 64
    time = 1
    block_cnt = (time * fs + block_size - 1) / block_size
    samples = block_cnt * block_size

    def sine(freq, div=1):
        return array(sin(2 * pi * linspace(0, freq * time, samples / div)),
                     dtype=float32)

    tm = linspace(0, samples / float(fs), samples)
    lfo = 0.5 + sine(lfo_freq, block_size) * 0.5
    signal = sine(freq).reshape(block_cnt, block_size)
    tt = linspace(0, 1, samples / 100)

    def sweep(filt, para, clr):
        filt[para] = 0.0
        filt.compute(zeros(10000, float32))
        out = zeros((block_cnt, block_size))
        for i in range(block_cnt):
            filt[para] = lfo[i]
            out[i] = filt.compute(signal[i])
        t = 0.999
        ampl = lfilter([1 - t], [1, -t], abs(out.reshape(samples)))
        plot(tm[4000:], 20 * log10(ampl[4000:]), clr)

    import dunwah
    filt = dunwah.dsp()
    filt.init(fs)
    para = "wah"

    sweep(filt, para, "r")

    from pluginloader import Plugin
    filt = Plugin("../build/default/src/plugins/libcrybaby.so")
    filt.init(fs)
    filt['crybaby2.refvolt'] = 0.1
    para = 'crybaby2.hotpotz'

    sweep(filt, para, "b")
Exemplo n.º 6
0
def compare_dynamics(freq, fs):
    global title
    title("Freq = %g" % freq)

    lfo_freq = 5.0
    block_size = 64
    time = 1
    block_cnt = (time*fs+block_size-1)/block_size
    samples = block_cnt * block_size

    def sine(freq, div=1):
        return array(sin(2*pi*linspace(0,freq*time,samples / div)),dtype=float32)

    tm = linspace(0,samples/float(fs),samples)
    lfo = 0.5 + sine(lfo_freq,block_size) * 0.5
    signal = sine(freq).reshape(block_cnt,block_size)
    tt = linspace(0,1,samples / 100)

    def sweep(filt, para, clr):
        filt[para] = 0.0
        filt.compute(zeros(10000,float32))
        out = zeros((block_cnt,block_size))
        for i in range(block_cnt):
            filt[para] = lfo[i]
            out[i] = filt.compute(signal[i])
        t = 0.999
        ampl = lfilter([1-t],[1,-t],abs(out.reshape(samples)))
        plot(tm[4000:], 20*log10(ampl[4000:]), clr)

    import dunwah
    filt = dunwah.dsp()
    filt.init(fs)
    para = "wah"

    sweep(filt, para, "r")

    from pluginloader import Plugin
    filt = Plugin("../build/default/src/plugins/libcrybaby.so")
    filt.init(fs)
    filt['crybaby2.refvolt'] = 0.1
    para = 'crybaby2.hotpotz'

    sweep(filt, para, "b")
Exemplo n.º 7
0
def load_dunwah():
    import dunwah
    return dunwah.dsp()