~pbatch/patchwerk

55a5d76dd62d57f855d26ef30deff11a5ee31fa1 — paul 1 year, 22 days ago 596256c
re-enabled pdhalf

FossilOrigin-Name: 504ee173ea36f6a18bfb76f9f70860deaac188c7aee083bcacd1aae5e80da172
4 files changed, 7 insertions(+), 6 deletions(-)

M dsp/config.mk
M dsp/pdhalf.c
M dsp/pdhalf.h
M dsp/ugen_list.h
M dsp/config.mk => dsp/config.mk +1 -0
@@ 81,6 81,7 @@ NODES=\
	vdelay.o\
	eqfil.o\
	mode.o\
	pdhalf.o\

# old list
#NODES=\

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

    pdhalf = (pdhalf_d *) pw_node_get_data(node);

    sp_pdhalf_destroy(&pdhalf->pdhalf);
    sp_phasewarp_destroy(&pdhalf->pdhalf);

    pw_node_cables_free(node);



@@ 31,7 31,7 @@ static void compute(pw_node *node)
    for(i = 0; i < blksize; i++) {
        in = pw_cable_get(pdhalf->in, i);
        pdhalf->pdhalf->amount = pw_cable_get(pdhalf->p_amount, i);
        sp_pdhalf_compute(pdhalf->sp, pdhalf->pdhalf, &in, &out);
        sp_phasewarp_compute(pdhalf->sp, pdhalf->pdhalf, &in, &out);
        pw_cable_set(pdhalf->out, i, out);
    }
}


@@ 43,8 43,8 @@ void node_pdhalf(sp_data *sp, pw_node *node)
    pdhalf = malloc(sizeof(pdhalf_d));
    pdhalf->sp = sp;

    sp_pdhalf_create(&pdhalf->pdhalf);
    sp_pdhalf_init(sp, pdhalf->pdhalf);
    sp_phasewarp_create(&pdhalf->pdhalf);
    sp_phasewarp_init(sp, pdhalf->pdhalf);
    pw_node_cables_alloc(node, 3);
    pw_node_get_cable(node, 0, &pdhalf->in);


M dsp/pdhalf.h => dsp/pdhalf.h +1 -1
@@ 1,7 1,7 @@
#ifndef PDHALF_H
typedef struct {
    sp_data *sp;
    sp_pdhalf *pdhalf;
    sp_phasewarp *pdhalf;
    pw_cable *in;
    pw_cable *p_amount;
    pw_cable *out;

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 72,7 72,7 @@ UGEN(TYPE_TOG, tog)
UGEN(TYPE_JCREV, jcrev)
UGEN(TYPE_SATURATOR, saturator)
/* UGEN(TYPE_CLIP, clip) */
/* UGEN(TYPE_PDHALF, pdhalf) */
UGEN(TYPE_PDHALF, pdhalf)
UGEN(TYPE_BROWN, brown)
UGEN(TYPE_PINKNOISE, pinknoise)
UGEN(TYPE_SAMPHOLD, samphold)