~pbatch/patchwerk

5cd96a3befc04aa94a4f8f8c64136e920299db67 — paul 1 year, 27 days ago 29ad407
re-enabled vdelay

FossilOrigin-Name: 3a5bed321acbe2216391692d6ae5c7d1a620b366c20d9b4e9ec9f122d05d391f
4 files changed, 7 insertions(+), 6 deletions(-)

M dsp/config.mk
M dsp/ugen_list.h
M dsp/vdelay.c
M dsp/vdelay.h
M dsp/config.mk => dsp/config.mk +1 -0
@@ 78,6 78,7 @@ NODES=\
	dcblock.o\
	fosc.o\
	randi.o\
	vdelay.o\

# old list
#NODES=\

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 48,7 48,7 @@ UGEN(TYPE_MAYGATE, maygate)
UGEN(TYPE_RANDI, randi)
UGEN(TYPE_RANDH, randh)
UGEN(TYPE_BLTRIANGLE, bltriangle)
/* UGEN(TYPE_VDELAY, vdelay) */
UGEN(TYPE_VDELAY, vdelay)
UGEN(TYPE_THRESH, thresh)
UGEN(TYPE_TGATE, tgate)
UGEN(TYPE_TDIV, tdiv)

M dsp/vdelay.c => dsp/vdelay.c +4 -4
@@ 10,7 10,7 @@ static void destroy(pw_node *node)

    vdelay = (vdelay_d *) pw_node_get_data(node);

    sp_vdelay_destroy(&vdelay->vdelay);
    sp_vardelay_destroy(&vdelay->vdelay);

    pw_node_cables_free(node);



@@ 32,7 32,7 @@ static void compute(pw_node *node)
        in = pw_cable_get(vdelay->in, i);
        vdelay->vdelay->feedback = pw_cable_get(vdelay->p_feedback, i);
        vdelay->vdelay->del = pw_cable_get(vdelay->p_del, i);
        sp_vdelay_compute(vdelay->sp, vdelay->vdelay, &in, &out);
        sp_vardelay_compute(vdelay->sp, vdelay->vdelay, &in, &out);
        pw_cable_set(vdelay->out, i, out);
    }
}


@@ 44,8 44,8 @@ void node_vdelay(sp_data *sp, pw_node *node, SPFLOAT maxdel)
    vdelay = malloc(sizeof(vdelay_d));
    vdelay->sp = sp;

    sp_vdelay_create(&vdelay->vdelay);
    sp_vdelay_init(sp, vdelay->vdelay, maxdel);
    sp_vardelay_create(&vdelay->vdelay);
    sp_vardelay_init(sp, vdelay->vdelay, maxdel);
    pw_node_cables_alloc(node, 4);
    pw_node_get_cable(node, 0, &vdelay->in);


M dsp/vdelay.h => dsp/vdelay.h +1 -1
@@ 1,7 1,7 @@
#ifndef VDELAY_H
typedef struct {
    sp_data *sp;
    sp_vdelay *vdelay;
    sp_vardelay *vdelay;
    pw_cable *in;
    pw_cable *p_feedback;
    pw_cable *p_del;