Ejemplo n.º 1
0
void randomvals_dsp(t_randomvals *x, t_signal **sp, short *count)
{				
	dsp_add(randomvals_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n, x);
}
Ejemplo n.º 2
0
static void pdp_scope_dsp(t_pdp_scope *x, t_signal **sp)
{
    dsp_add(pdp_scope_perform, 3, x, sp[0]->s_n, sp[0]->s_vec);

}
Ejemplo n.º 3
0
static void triangle_dsp(t_triangle *x, t_signal **sp)
{
    dsp_add(triangle_perform, 5, x, sp[0]->s_n,
	    sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec);
}
Ejemplo n.º 4
0
Archivo: fade~.c Proyecto: Angeldude/pd
static void fade_tilde_dsp(t_fade_tilde *x, t_signal **sp)
{
  dsp_add(fade_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n);
}
Ejemplo n.º 5
0
static void dcombsR_dsp(t_dcombsR *x, t_signal **sp)
{
    dsp_add(dcombsR_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 6
0
static void foldback_tilde_dsp(t_foldback_tilde *x, t_signal **sp)
{
    dsp_add(foldback_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 7
0
static void sigzero_dsp(t_sigzero *x, t_signal **sp)
{
  dsp_add(sigzero_perform, 3, sp[0]->s_vec, x, sp[0]->s_n);
}
Ejemplo n.º 8
0
static void aubiotempo_tilde_dsp(t_aubiotempo_tilde *x, t_signal **sp)
{
  dsp_add(aubiotempo_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 9
0
static void intg_dsp(t_intg *intg, t_signal **sp) {
	dsp_add(intg_perform, 4,
		&intg->intg, sp[0]->s_n, sp[1]->s_vec, sp[0]->s_vec);
}
Ejemplo n.º 10
0
static void median_dsp(t_median *x, t_signal **sp){
   dsp_add(median_perform, 4, x, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);
}
Ejemplo n.º 11
0
// ../../../../Jamoma/Core/DSP/library/build/JamomaDSP.dylib Method
void decibels_dsp(t_decibels *x, t_signal **sp, short *count)
{
	if (count[0] && count[1])
   		dsp_add(decibels_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 12
0
static void trapezoid_dsp(t_trapezoid *x, t_signal **sp)
{
    dsp_add(trapezoid_perform, 6, x, sp[0]->s_n,
	    sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec);
}
Ejemplo n.º 13
0
// ---------------------------------------------------
// DSP Function
// ---------------------------------------------------
static void rminus_dsp(t_rminus *x, t_signal **sp)
{
    dsp_add(rminus_perform, 4, sp[0]->s_n,
            sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec);
}
Ejemplo n.º 14
0
static void sigdelwrite_dsp(t_sigdelwrite *x, t_signal **sp)
{
    dsp_add(sigdelwrite_perform, 3, sp[0]->s_vec, &x->x_cspace, sp[0]->s_n);
    x->x_sortno = ugen_getsortno();
    sigdelwrite_checkvecsize(x, sp[0]->s_n);
}
Ejemplo n.º 15
0
void distortion_dsp(t_distortion *x, t_signal **sp)
{

	dsp_add(distortion2_perform, 6, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec,sp[0]->s_n);

}
Ejemplo n.º 16
0
void stringpitch_dsp(t_stringpitch *x, t_signal **sp, short *connect) {
	int vs = sys_getblksize();

	if (vs > x->BufSize) post(" You need to use a smaller signal vector size...",0);
	else if (connect[0]) dsp_add(stringpitch_perform, 3, sp[0]->s_vec, x, sp[0]->s_n);
}
Ejemplo n.º 17
0
void gendyn_dsp(t_gendyn *x, t_signal **sp, short *count){
	dsp_add(gendyn_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 18
0
static void log_dsp(t_log *x, t_signal **sp)
{
    dsp_add(log_perform, 4, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec,
	    &x->x_rcplogbase);
}
Ejemplo n.º 19
0
void channel_dsp(t_channel *x, t_signal **sp, short *count)
{
    dsp_add(channel_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 20
0
        /* set up prolog DSP code  */
void vinlet_dspprolog(struct _vinlet *x, t_signal **parentsigs,
    int myvecsize, int calcsize, int phase, int period, int frequency,
    int downsample, int upsample,  int reblock, int switched)
{
    t_signal *insig;
        /* no buffer means we're not a signal inlet */
    if (!x->x_buf)
        return;
    x->x_updown.downsample = downsample;
    x->x_updown.upsample   = upsample;

        /* if the "reblock" flag is set, arrange to copy data in from the
        parent. */
    if (reblock)
    {
        int parentvecsize, bufsize, oldbufsize, prologphase;
        int re_parentvecsize; /* resampled parentvectorsize */
            /* this should never happen: */
        if (!x->x_buf) return;

            /* the prolog code counts from 0 to period-1; the
            phase is backed up by one so that AFTER the prolog code
            runs, the "x_fill" phase is in sync with the "x_read" phase. */
        prologphase = (phase - 1) & (period - 1);
        if (parentsigs)
        {
            insig = parentsigs[inlet_getsignalindex(x->x_inlet)];
            parentvecsize = insig->s_vecsize;
            re_parentvecsize = parentvecsize * upsample / downsample;
        }
        else
        {
            insig = 0;
            parentvecsize = 1;
            re_parentvecsize = 1;
        }

        bufsize = re_parentvecsize;
        if (bufsize < myvecsize) bufsize = myvecsize;
        if (bufsize != (oldbufsize = x->x_bufsize))
        {
            t_float *buf = x->x_buf;
            t_freebytes(buf, oldbufsize * sizeof(*buf));
            buf = (t_float *)t_getbytes(bufsize * sizeof(*buf));
            memset((char *)buf, 0, bufsize * sizeof(*buf));
            x->x_bufsize = bufsize;
            x->x_endbuf = buf + bufsize;
            x->x_buf = buf;
        }
        if (parentsigs)
        {
            x->x_hop = period * re_parentvecsize;

            x->x_fill = prologphase ?
                x->x_endbuf - (x->x_hop - prologphase * re_parentvecsize) :
                    x->x_endbuf;

            if (upsample * downsample == 1)
                    dsp_add(vinlet_doprolog, 3, x, insig->s_vec,
                        re_parentvecsize);
            else {
              int method = (x->x_updown.method == 3?
                (pd_compatibilitylevel < 44 ? 0 : 1) : x->x_updown.method);
              resamplefrom_dsp(&x->x_updown, insig->s_vec, parentvecsize,
                re_parentvecsize, method);
              dsp_add(vinlet_doprolog, 3, x, x->x_updown.s_vec,
                re_parentvecsize);
        }

            /* if the input signal's reference count is zero, we have
               to free it here because we didn't in ugen_doit(). */
            if (!insig->s_refcount)
                signal_makereusable(insig);
        }
        else memset((char *)(x->x_buf), 0, bufsize * sizeof(*x->x_buf));
        x->x_directsignal = 0;
    }
    else
    {
            /* no reblocking; in this case our output signal is "borrowed"
            and merely needs to be pointed to the real one. */
        x->x_directsignal = parentsigs[inlet_getsignalindex(x->x_inlet)];
    }
}
Ejemplo n.º 21
0
/* called to start DSP.  Here we call Pd back to add our perform
   routine to a linear callback list which Pd in turn calls to grind
   out the samples. */
static void fileosc_dsp(t_fileosc *x, t_signal **sp)
{
  dsp_add(fileosc_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n, x);
}
Ejemplo n.º 22
0
        /* set up epilog DSP code.  If we're reblocking, this is the
        time to copy the samples out to the containing object's outlets.
        If we aren't reblocking, there's nothing to do here.  */
void voutlet_dspepilog(struct _voutlet *x, t_signal **parentsigs,
    int myvecsize, int calcsize, int phase, int period, int frequency,
    int downsample, int upsample, int reblock, int switched)
{
    if (!x->x_buf) return;  /* this shouldn't be necesssary... */
    x->x_updown.downsample=downsample;
    x->x_updown.upsample=upsample;
    if (reblock)
    {
        t_signal *outsig;
        int parentvecsize, bufsize, oldbufsize;
        int re_parentvecsize;
        int bigperiod, epilogphase, blockphase;
        if (parentsigs)
        {
            outsig = parentsigs[outlet_getsignalindex(x->x_parentoutlet)];
            parentvecsize = outsig->s_vecsize;
            re_parentvecsize = parentvecsize * upsample / downsample;
        }
        else
        {
            outsig = 0;
            parentvecsize = 1;
            re_parentvecsize = 1;
        }
        bigperiod = myvecsize/re_parentvecsize;
        if (!bigperiod) bigperiod = 1;
        epilogphase = phase & (bigperiod - 1);
        blockphase = (phase + period - 1) & (bigperiod - 1) & (- period);
        bufsize = re_parentvecsize;
        if (bufsize < myvecsize) bufsize = myvecsize;
        if (bufsize != (oldbufsize = x->x_bufsize))
        {
            t_sample *buf = x->x_buf;
            t_freebytes(buf, oldbufsize * sizeof(*buf));
            buf = (t_sample *)t_getbytes(bufsize * sizeof(*buf));
            memset((char *)buf, 0, bufsize * sizeof(*buf));
            x->x_bufsize = bufsize;
            x->x_endbuf = buf + bufsize;
            x->x_buf = buf;
        }
        if (re_parentvecsize * period > bufsize) bug("voutlet_dspepilog");
        x->x_write = x->x_buf + re_parentvecsize * blockphase;
        if (x->x_write == x->x_endbuf) x->x_write = x->x_buf;
        if (period == 1 && frequency > 1)
            x->x_hop = re_parentvecsize / frequency;
        else x->x_hop = period * re_parentvecsize;
        /* post("phase %d, block %d, parent %d", phase & 63,
            parentvecsize * blockphase, parentvecsize * epilogphase); */
        if (parentsigs)
        {
            /* set epilog pointer and schedule it */
            x->x_empty = x->x_buf + re_parentvecsize * epilogphase;
            if (upsample * downsample == 1)
                dsp_add(voutlet_doepilog, 3, x, outsig->s_vec,
                    re_parentvecsize);
            else
            {
                int method = (x->x_updown.method == 3?
                    (pd_compatibilitylevel < 44 ? 0 : 1) : x->x_updown.method);
                dsp_add(voutlet_doepilog_resampling, 2, x, re_parentvecsize);
                resampleto_dsp(&x->x_updown, outsig->s_vec, re_parentvecsize,
                    parentvecsize, method);
            }
        }
    }
        /* if we aren't blocked but we are switched, the epilog code just
        copies zeros to the output.  In this case the blocking code actually
        jumps over the epilog if the block is running. */
    else if (switched)
    {
        if (parentsigs)
        {
            t_signal *outsig =
                parentsigs[outlet_getsignalindex(x->x_parentoutlet)];
            dsp_add_zero(outsig->s_vec, outsig->s_n);
        }
    }
}
Ejemplo n.º 23
0
static void lincong_dsp(t_lincong *x, t_signal **sp)
{
    x->x_sr = sp[0]->s_sr;
    dsp_add(lincong_perform, 4, x, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);
}
Ejemplo n.º 24
0
void random_dsp(t_random *x, t_signal **sp, short *count)
{
	// add to the dsp chain -- i need my class, my input vector, my output vector, and my vector size...
	dsp_add(random_perform, 4, x, sp[0]->s_vec-1, sp[0]->s_n+1);
}
Ejemplo n.º 25
0
void morph_tilde_dsp(t_morph_tilde *x, t_signal **sp){

  dsp_add(morph_tilde_perform, 5, sp[0]->s_vec,
	sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n, x);

}
Ejemplo n.º 26
0
static void random_dsp(t_random *x, t_signal **sp)
{
	// add to the dsp chain -- i need my class, my input vector, my output vector, and my vector size...
	dsp_add(random_perform, 3, x, sp[0]->s_vec, sp[0]->s_n);
}
Ejemplo n.º 27
0
static void overdrive_dsp(t_overdrive *x, t_signal **sp)
{
    dsp_add(overdrive_perform, 5, x, sp[0]->s_n,
            sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec);
}
Ejemplo n.º 28
0
static void connes_dsp(t_connes *x, t_signal **sp) {
  dsp_add(connes_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
}
void ibufconcatenate_dsp(t_ibufconcatenate *x, t_signal **sp, short *count)
{				
	if (!x->max_mode)
		dsp_add(ibufconcatenate_perform, 7, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, sp[0]->s_n, x);
}
Ejemplo n.º 30
0
static void envg_dsp(t_envg *envg, t_signal **sp) {
	dsp_add(envg_perform, 10,
		&envg->envg, sp[0]->s_n, sp[7]->s_vec, sp[0]->s_vec,
		sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec,
		sp[5]->s_vec, sp[6]->s_vec);
}