Example #1
0
int granufm_tilde_setup(void)
{
	t_class *c = class_new(gensym("granufm~"), (t_newmethod)granufm_new, (t_method)grans_free, (long)sizeof(t_grans), CLASS_NOINLET, A_GIMME, 0);
	
    class_addmethod(c, (t_method)grans_clear,   gensym("clear"),     0);
	class_addmethod(c, (t_method)grans_dsp,		gensym("dsp"),	A_CANT, 0);
	
    
    double coefshape[NSHAPINGTABS];
    PowTableFunction(NSHAPINGTABS, coefshape, 1, 0.0001, 1.0, 2.0);
    
    long i;
    for(i = 0; i < NSHAPINGTABS; i++){
        PowTableFunction(STABSZ, granu_exptab[i], 1, 0.0001, 1.0, coefshape[i] * 10.0);
    }
    
    SincFunction(STABSZ, granu_sincwindow, 1, (double)-GRANU_SINCRIPPLES, (double)GRANU_SINCRIPPLES);
    DampedSineFunction(STABSZ, granu_dampedsinetab, 1, 0.0, 5.0, 1.0);
    CosWindowFunction(STABSZ, granu_wind_costab, 1, 0.0, 2.0 * PI);
    SineFunction(STABSZ, granu_sinetab, 1, 0.0, 2.0 * PI);
    ExpDecayFunction(STABSZ, granu_expdecaytab, 1, 0.0, 5.0);
    
    
    granufm_class = c;
	return 0;
}
Example #2
0
void MakeCosWindow(t_grans *x)
{
    CosWindowFunction(STABSZ, x->wind_costab, 1, 0.0, 2.0 * PI);
}