~pbatch/patchwerk

596256c21960d19a9f0fea00cdab8ca53b29b5bb — paul 1 year, 21 days ago e85df2e
re-enabled mode

FossilOrigin-Name: 76c96d54cc12b1c91a49f13987ce66a91138df515f4fc0ca42488801e5cf5a7f
4 files changed, 7 insertions(+), 6 deletions(-)

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

# old list
#NODES=\

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

    mode = (mode_d *) pw_node_get_data(node);

    sp_mode_destroy(&mode->mode);
    sp_modalres_destroy(&mode->mode);

    pw_node_cables_free(node);



@@ 32,7 32,7 @@ static void compute(pw_node *node)
        in = pw_cable_get(mode->in, i);
        mode->mode->freq = pw_cable_get(mode->p_freq, i);
        mode->mode->q = pw_cable_get(mode->p_q, i);
        sp_mode_compute(mode->sp, mode->mode, &in, &out);
        sp_modalres_compute(mode->sp, mode->mode, &in, &out);
        pw_cable_set(mode->out, i, out);
    }
}


@@ 44,8 44,8 @@ void node_mode(sp_data *sp, pw_node *node)
    mode = malloc(sizeof(mode_d));
    mode->sp = sp;

    sp_mode_create(&mode->mode);
    sp_mode_init(sp, mode->mode);
    sp_modalres_create(&mode->mode);
    sp_modalres_init(sp, mode->mode);
    pw_node_cables_alloc(node, 4);
    pw_node_get_cable(node, 0, &mode->in);


M dsp/mode.h => dsp/mode.h +1 -1
@@ 1,7 1,7 @@
#ifndef MODE_H
typedef struct {
    sp_data *sp;
    sp_mode *mode;
    sp_modalres *mode;
    pw_cable *in;
    pw_cable *p_freq;
    pw_cable *p_q;

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 58,7 58,7 @@ UGEN(TYPE_EXPON, expon)
UGEN(TYPE_LPC, lpc)
/* UGEN(TYPE_RSPLINE, rspline) */
UGEN(TYPE_TSEQ, tseq)
/* UGEN(TYPE_MODE, mode) */
UGEN(TYPE_MODE, mode)
UGEN(TYPE_CLOCK, clock)
UGEN(TYPE_BITCRUSH, bitcrush)
UGEN(TYPE_FOSC, fosc)