~pbatch/patchwerk

828e3f63f4960fdad41345b3b145c037ffa04865 — paul 1 year, 1 month ago 8dfbc14
re-enabled fosc

FossilOrigin-Name: 12040b10e2aa978d6f1f605bb2e130ddc5e4623802386a6a6e903b4c36e20c8e
4 files changed, 7 insertions(+), 6 deletions(-)

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

# old list
#NODES=\

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

    fosc = (fosc_d *) pw_node_get_data(node);

    sp_fosc_destroy(&fosc->fosc);
    sp_fmpair_destroy(&fosc->fosc);

    pw_node_cables_free(node);



@@ 33,7 33,7 @@ static void compute(pw_node *node)
        fosc->fosc->car = pw_cable_get(fosc->p_car, i);
        fosc->fosc->mod = pw_cable_get(fosc->p_mod, i);
        fosc->fosc->indx = pw_cable_get(fosc->p_indx, i);
        sp_fosc_compute(fosc->sp, fosc->fosc, NULL, &out);
        sp_fmpair_compute(fosc->sp, fosc->fosc, NULL, &out);
        pw_cable_set(fosc->out, i, out);
    }
}


@@ 45,8 45,8 @@ void node_fosc(sp_data *sp, pw_node *node, sp_ftbl * tbl)
    fosc = malloc(sizeof(fosc_d));
    fosc->sp = sp;

    sp_fosc_create(&fosc->fosc);
    sp_fosc_init(sp, fosc->fosc, tbl);
    sp_fmpair_create(&fosc->fosc);
    sp_fmpair_init(sp, fosc->fosc, tbl);
    pw_node_cables_alloc(node, 6);

    pw_node_get_cable(node, 0, &fosc->p_freq);

M dsp/fosc.h => dsp/fosc.h +1 -1
@@ 1,7 1,7 @@
#ifndef FOSC_H
typedef struct {
    sp_data *sp;
    sp_fosc *fosc;
    sp_fmpair *fosc;
    pw_cable *p_freq;
    pw_cable *p_amp;
    pw_cable *p_car;

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 61,7 61,7 @@ UGEN(TYPE_TSEQ, tseq)
/* UGEN(TYPE_MODE, mode) */
UGEN(TYPE_CLOCK, clock)
UGEN(TYPE_BITCRUSH, bitcrush)
/* UGEN(TYPE_FOSC, fosc) */
UGEN(TYPE_FOSC, fosc)
UGEN(TYPE_WAVOUT, wavout)
UGEN(TYPE_CLAMP, clamp)
UGEN(TYPE_RPT, rpt)