示例#1
0
文件: vexp_if.c 项目: PaMuOS/PMOS_OF
void
expr_setup(void)
{
        /*
         * expr initialization
         */
        expr_class = class_new(gensym("expr"), (t_newmethod)expr_new,
            (t_method)expr_ff, sizeof(t_expr), 0, A_GIMME, 0);
        class_addlist(expr_class, expr_list);
        exprproxy_class = class_new(gensym("exprproxy"), 0,
                                        0, sizeof(t_exprproxy), CLASS_PD, 0);
        class_addfloat(exprproxy_class, exprproxy_float);

        /*
         * expr~ initialization
         */
        expr_tilde_class = class_new(gensym("expr~"), (t_newmethod)expr_new,
            (t_method)expr_ff, sizeof(t_expr), 0, A_GIMME, 0);
        class_addmethod(expr_tilde_class, nullfn, gensym("signal"), 0);
        CLASS_MAINSIGNALIN(expr_tilde_class, t_expr, exp_f);
        class_addmethod(expr_tilde_class,(t_method)expr_dsp, gensym("dsp"), 0);
        /*
         * fexpr~ initialization
         */
        fexpr_tilde_class = class_new(gensym("fexpr~"), (t_newmethod)expr_new,
            (t_method)expr_ff, sizeof(t_expr), 0, A_GIMME, 0);
        class_addmethod(fexpr_tilde_class, nullfn, gensym("signal"), 0);
        class_addmethod(fexpr_tilde_class,(t_method)expr_start,
                                                        gensym("start"), 0);
        class_addmethod(fexpr_tilde_class,(t_method)expr_stop,
                                                        gensym("stop"), 0);

        class_addmethod(fexpr_tilde_class,(t_method)expr_dsp,gensym("dsp"), 0);
        class_addmethod(fexpr_tilde_class, (t_method)fexpr_tilde_set,
                        gensym("set"), A_GIMME, 0);
        class_addmethod(fexpr_tilde_class, (t_method)fexpr_tilde_clear,
                        gensym("clear"), A_GIMME, 0);
        class_addmethod(fexpr_tilde_class,(t_method)expr_verbose,
                                                        gensym("verbose"), 0);



        post("expr, expr~, fexpr~ version %s under GNU General Public License ", exp_version);

}
void residency_buffer_tilde_setup(void)
{
    t_class *c;
    c = class_new(gensym("residency_buffer~"), (t_newmethod)residency_buffer_new,
                  (t_method)residency_buffer_free,sizeof(t_residency_buffer), 0,A_GIMME,0);
	CLASS_MAINSIGNALIN(c, t_residency_buffer, x_f);
	class_addmethod(c,(t_method)residency_buffer_dsp,gensym("dsp"),0);
	class_addmethod(c,(t_method)residency_buffer_mute,gensym("mute"),A_FLOAT,0);
    class_addmethod(c,(t_method)residency_buffer_interpolation,gensym("interpolation"),A_FLOAT,0);
	class_addmethod(c,(t_method)residency_buffer_oscbank,gensym("oscbank"),A_FLOAT,0);
	class_addmethod(c,(t_method)residency_buffer_transpose,gensym("transpose"),A_FLOAT,0);
	class_addmethod(c,(t_method)residency_buffer_synthresh,gensym("synthresh"),A_FLOAT,0);
	class_addmethod(c,(t_method)residency_buffer_calcbuf,gensym("calcbuf"), A_FLOAT, 0);
	class_addmethod(c,(t_method)residency_buffer_playthrough,gensym("playthrough"), A_FLOAT, 0);
	class_addmethod(c,(t_method)residency_buffer_acquire_sample,gensym("acquire_sample"), 0);
    residency_buffer_class = c;
    fftease_announce(OBJECT_NAME);
}
示例#3
0
void moop_tilde_setup(void) {
	moop_class = class_new(gensym("moop~"), (t_newmethod)moop_new, 0,
		sizeof(t_moop), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFSYM, 0);
	class_addmethod(moop_class, (t_method)moop_dsp, gensym("dsp"), A_CANT, 0);
	CLASS_MAINSIGNALIN(moop_class, t_moop, x_f);
	class_addmethod(moop_class, (t_method)moop_tilde_set,
        gensym("set"), A_SYMBOL, 0);
	class_addmethod(moop_class, (t_method)moop_hold, gensym("hold"),
		A_DEFFLOAT, 0);
	class_addmethod(moop_class, (t_method)moop_period, gensym("period"),
		A_DEFFLOAT, 0);
	class_addmethod(moop_class, (t_method)moop_time, gensym("times"),
		A_GIMME, 0);
	class_addmethod(moop_class, (t_method)moop_range, gensym("range"),
		A_DEFFLOAT, 0);
	class_addmethod(moop_class, (t_method)moop_tempo, gensym("tempo"),
		A_DEFFLOAT, 0);
}
示例#4
0
void dynss_tilde_setup(void)
{
    t_class *c;
    c = class_new(gensym("dynss~"), (t_newmethod)dynss_new, 0, sizeof(t_dynss), 0,0);
    CLASS_MAINSIGNALIN(c,t_dynss,x_f);
    class_addmethod(c,(t_method)dynss_dsp, gensym("dsp"), A_CANT, 0);
    
    class_addmethod(c,(t_method)version,gensym("version"),0);
    class_addmethod(c,(t_method)dynss_devx,gensym("devx"),A_FLOAT,0);
    class_addmethod(c,(t_method)dynss_devy,gensym("devy"),A_FLOAT,0);
    class_addmethod(c,(t_method)dynss_freq,gensym("freq"),A_FLOAT,0);
    class_addmethod(c,(t_method)dynss_printwave,gensym("printwave"),0);
    class_addmethod(c,(t_method)dynss_new_wave,gensym("new_wave"),0);
    class_addmethod(c,(t_method)dynss_new_amps,gensym("new_amps"),0);
    class_addmethod(c,(t_method)dynss_pointcount,gensym("pointcount"),A_FLOAT,0);
    potpourri_announce(OBJECT_NAME);
    dynss_class = c;
}
示例#5
0
文件: cavoc~.c 项目: Angeldude/pd
void cavoc_tilde_setup(void){
  cavoc_class = class_new(gensym("cavoc~"), (t_newmethod)cavoc_new, 
      (t_method)cavoc_free ,sizeof(t_cavoc), 0,A_GIMME,0);
  CLASS_MAINSIGNALIN(cavoc_class, t_cavoc, x_f);
  class_addmethod(cavoc_class,(t_method)cavoc_dsp,gensym("dsp"),0);
  class_addmethod(cavoc_class,(t_method)cavoc_mute,gensym("mute"),A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_overlap,gensym("overlap"),A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_winfac,gensym("winfac"),A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_rule,gensym("rule"),A_GIMME,0);
	class_addmethod(cavoc_class,(t_method)cavoc_density,gensym("density"),A_FLOAT,0);
	class_addmethod(cavoc_class,(t_method)cavoc_hold_time,gensym("hold_time"),A_FLOAT,0);
	class_addmethod(cavoc_class,(t_method)cavoc_external_trigger,gensym("external_trigger"),A_FLOAT,0);
	class_addmethod(cavoc_class,(t_method)cavoc_retune,gensym("retune"),A_FLOAT,A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_winfac,gensym("winfac"),A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_overlap,gensym("overlap"),A_FLOAT,0);
  class_addmethod(cavoc_class,(t_method)cavoc_fftinfo,gensym("fftinfo"),0);
  post("%s %s",OBJECT_NAME,FFTEASE_ANNOUNCEMENT);
}
示例#6
0
void pvtuner_tilde_setup(void)
{
    pvtuner_class = class_new(gensym("pvtuner~"), (t_newmethod)pvtuner_new,
                              (t_method)pvtuner_free ,sizeof(t_pvtuner), 0,A_GIMME,0);
    CLASS_MAINSIGNALIN(pvtuner_class, t_pvtuner, x_f );
    class_addmethod(pvtuner_class, (t_method)pvtuner_dsp, gensym("dsp"), 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_mute, gensym("mute"), A_DEFFLOAT,0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_bypass, gensym("bypass"), A_DEFFLOAT,0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_assist, gensym("assist"), 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_basefreq,gensym("basefreq"),A_DEFFLOAT,0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_frequency_range,gensym("frequency_range"),A_DEFFLOAT,A_DEFFLOAT,0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_diatonic,gensym("diatonic"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_eastern,gensym("eastern"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_minor,gensym("minor"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_eq12,gensym("eq12"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_pentatonic,gensym("pentatonic"),0);
    /* Pd cannot disambiguate */
    /*
    	class_addmethod(pvtuner_class, (t_method)pvtuner_added_sixth_major,gensym("added_sixth_major"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_added_sixth_minor,gensym("added_sixth_minor"),0);
    */
    class_addmethod(pvtuner_class, (t_method)pvtuner_major_added_sixth,gensym("major_added_sixth"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_minor_added_sixth,gensym("minor_added_sixth"),0);

    class_addmethod(pvtuner_class, (t_method)pvtuner_major_seventh_chord,gensym("major_seventh_chord"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_minor_seventh_chord,gensym("minor_seventh_chord"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_dominant_seventh_chord,gensym("dominant_seventh_chord"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_eq8,gensym("eq8"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_pentaclust,gensym("pentaclust"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_quarterclust,gensym("quarterclust"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_eq5,gensym("eq5"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_slendro,gensym("slendro"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_pelog,gensym("pelog"),0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_import_scale,gensym("import_scale"),A_DEFSYM,0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_toptune,gensym("toptune"),A_FLOAT, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_topfreq,gensym("topfreq"),A_FLOAT, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_list,gensym("list"),A_GIMME, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_frequency_range,gensym("frequency_range"),A_FLOAT,A_FLOAT, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_overlap,gensym("overlap"),A_FLOAT, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_winfac,gensym("winfac"),A_FLOAT, 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_fftinfo,gensym("fftinfo"), 0);
    class_addmethod(pvtuner_class, (t_method)pvtuner_binfo,gensym("binfo"), 0);
    post("%s %s",OBJECT_NAME,FFTEASE_ANNOUNCEMENT);
}
示例#7
0
文件: disto~.c 项目: Angeldude/pd
void disto_tilde_setup(void)
{
    post( disto_version );
    disto_class = class_new(gensym("disto~"), (t_newmethod)disto_new, (t_method)disto_free,
    	sizeof(t_disto), 0, 0);

    CLASS_MAINSIGNALIN( disto_class, t_disto, x_f );
    class_addmethod(disto_class, (t_method)disto_drive, gensym("drive"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_drymix, gensym("drymix"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_wetmix, gensym("wetmix"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_feedback, gensym("feedback"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_volume, gensym("volume"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_hipassfreq, gensym("hipassfreq"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_hipassQ, gensym("hipassQ"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_lowpassfreq, gensym("lowpassfreq"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_lowpassQ, gensym("lowpassQ"), A_FLOAT, 0);
    class_addmethod(disto_class, (t_method)disto_dsp, gensym("dsp"), 0);
    class_addmethod(disto_class, (t_method)disto_preset, gensym("preset"), A_FLOAT, 0);
}
示例#8
0
void presidency_tilde_setup(void)
{
  presidency_class = class_new(gensym("presidency~"), (t_newmethod)presidency_new, 
			 (t_method)presidency_free ,sizeof(t_presidency), 0,A_GIMME,0);
  CLASS_MAINSIGNALIN(presidency_class, t_presidency, x_f);
  class_addmethod(presidency_class,(t_method)presidency_dsp,gensym("dsp"),0);
  class_addmethod(presidency_class,(t_method)presidency_mute,gensym("mute"),A_FLOAT,0);
  class_addmethod(presidency_class,(t_method)presidency_fftinfo,gensym("fftinfo"),0);
  class_addmethod(presidency_class,(t_method)presidency_playthrough,gensym("playthrough"),A_FLOAT,0); 
  class_addmethod(presidency_class,(t_method)presidency_size,gensym("size"),A_FLOAT,0);
  class_addmethod(presidency_class,(t_method)presidency_overlap,gensym("overlap"),A_FLOAT,0); 
  class_addmethod(presidency_class,(t_method)presidency_winfac,gensym("winfac"),A_FLOAT,0);  
  class_addmethod(presidency_class,(t_method)presidency_verbose,gensym("verbose"),A_FLOAT,0);
  class_addmethod(presidency_class,(t_method)presidency_acquire_sample,gensym("acquire_sample"),0);
  class_addmethod(presidency_class,(t_method)presidency_low_freq,gensym("low_freq"),A_FLOAT,0);
  class_addmethod(presidency_class,(t_method)presidency_high_freq,gensym("high_freq"),A_FLOAT,0);
  class_addmethod(presidency_class,(t_method)presidency_abs_thresh,gensym("abs_thresh"),A_FLOAT,0);
  post("%s %s",OBJECT_NAME,FFTEASE_ANNOUNCEMENT);
}
示例#9
0
void morph_tilde_setup(void) {
morph_tilde_class = class_new(gensym("morph~"),
							(t_newmethod)morph_tilde_new,
							(t_method)morph_tilde_destroy, 
							sizeof(t_morph_tilde),
							CLASS_DEFAULT,
						A_GIMME, 0);

class_addmethod(morph_tilde_class, (t_method) morph_tilde_dsp, 
				gensym("dsp"), (t_atomtype) 0);
class_addmethod(morph_tilde_class, (t_method) morph_tilde_amp,
				gensym("amplitude factor"), A_DEFFLOAT, 0);
class_addmethod(morph_tilde_class, (t_method) morph_tilde_freq,
				gensym("frequency factor"), A_DEFFLOAT, 0);

CLASS_MAINSIGNALIN(morph_tilde_class,t_morph_tilde,f);
 post("\nmorph~ 1.0\n Based on SndObj library spectral classes");
 post("(c) V Lazzarini, 2004\n");
}
void
aubioOnset_tilde_setup (void)
{
    aubioOnset_tilde_class = class_new (gensym ("aubioOnset~"),
                                        (t_newmethod) aubioOnset_tilde_new,
                                           0, sizeof (t_aubioOnset_tilde), CLASS_DEFAULT, 
                                           A_GIMME, 0);
    class_addmethod (aubioOnset_tilde_class,
                     (t_method) aubioOnset_tilde_dsp, gensym ("dsp"), 0);
    class_addmethod (aubioOnset_tilde_class,
                     (t_method) aubioOnset_tilde_debug, gensym ("debug"), 0);
    class_addmethod (aubioOnset_tilde_class,
                     (t_method) aubioOnset_tilde_threshold, gensym ("threshold"), A_DEFFLOAT, 0);
    class_addmethod (aubioOnset_tilde_class,
                     (t_method) aubioOnset_tilde_silence, gensym ("silence"), A_DEFFLOAT, 0);
    class_addmethod (aubioOnset_tilde_class,
                     (t_method) aubioOnset_tilde_minioi, gensym ("minioi"), A_DEFFLOAT, 0);
    CLASS_MAINSIGNALIN (aubioOnset_tilde_class, t_aubioOnset_tilde, threshold);
}
示例#11
0
文件: pyo~.c 项目: BackupGGCode/pyo
void pyo_tilde_setup(void) {
    pyo_tilde_class = class_new(gensym("pyo~"), (t_newmethod)pyo_tilde_new,
        (t_method)pyo_tilde_free, sizeof(t_pyo_tilde), CLASS_DEFAULT, A_DEFFLOAT, 0);
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_dsp, gensym("dsp"), 0);
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_clear, gensym("clear"), 0);
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_value, gensym("value"), 
                    A_GIMME, 0); /* send value(s) to a Sig or SigTo object */
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_set, gensym("set"), 
                    A_GIMME, 0); /* send value(s) to any object's attribute */
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_read, gensym("read"), 
                    A_GIMME, 0); /* read a script file */
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_call, gensym("call"), 
                    A_GIMME, 0); /* call a function or a method */
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_create, gensym("create"), 
                    A_GIMME, 0); /* create a python object */
    class_addmethod(pyo_tilde_class, (t_method)pyo_tilde_debug, gensym("debug"), 
                    A_DEFFLOAT, 0); /* set the debug (verbose) mode */
    CLASS_MAINSIGNALIN(pyo_tilde_class, t_pyo_tilde, f);
}
示例#12
0
void 
shmsrc_tilde_setup(void)
{
  shmsrc_tilde_class = class_new(gensym("shmsrc~"), 
				 (t_newmethod)shmsrc_tilde_new, 
				 (t_method)shmsrc_tilde_free,
				 sizeof(t_shmsrc_tilde), 
				 0, 
				 A_DEFSYM, 
				 A_DEFFLOAT, 
				 A_NULL);
  /* this is magic to declare that the leftmost, "main" inlet
     takes signals; other signal inlets are done differently... */
  CLASS_MAINSIGNALIN(shmsrc_tilde_class, t_shmsrc_tilde, x_f);
  /* here we tell Pd about the "dsp" method, which is called back
     when DSP is turned on. */
  class_addmethod(shmsrc_tilde_class, (t_method)shmsrc_tilde_dsp, gensym("dsp"), 0);
  class_addmethod(shmsrc_tilde_class, (t_method)shmsrc_tilde_set_name, gensym("set_name"), A_DEFSYM, 0);
  class_addmethod(shmsrc_tilde_class, (t_method)shmsrc_tilde_set_prefix, gensym("set_prefix"), A_DEFSYM, 0);
}
示例#13
0
void teabox_tilde_setup(void)
{
    teabox_class = class_new(gensym("teabox~"), (t_newmethod)teabox_new, (t_method)teabox_free,
                             sizeof(t_teabox), 0, A_GIMME, 0);

    CLASS_MAINSIGNALIN(teabox_class, t_teabox, f);
    class_addmethod(teabox_class, (t_method)teabox_dsp, gensym("dsp"), A_NULL);

    class_addmethod(teabox_class, (t_method)teabox_getversion,	gensym("getversion"), 0);
    class_addmethod(teabox_class, (t_method)teabox_getstatus,	gensym("getstatus"), 0);

    class_sethelpsymbol(teabox_class, gensym("help-teabox~.pd"));

#ifdef UB
    // For the Pd Mac-Universal-Binary build (from Xcode) we need to setup the classes here
    // This way they will be available in Pd by just adding teabox~ to the startup libs
    teabox_bits_tilde_setup();
    teabox_count_tilde_setup();
#endif
}
示例#14
0
文件: g_magicglass.c 项目: morast/pd
void magicGlass_setup(void)
{
    magicGlass_class = class_new(gensym("magicGlass"),
                                 0,
                                 (t_method)magicGlass_free,
                                 sizeof(t_magicGlass),
                                 0,
                                 A_DEFFLOAT,
                                 0);
    CLASS_MAINSIGNALIN(magicGlass_class, t_magicGlass, x_sigF);
    class_addmethod(magicGlass_class,
      	            (t_method)magicGlass_dsp,
	            gensym("dsp"),
	            0);
    class_addbang(magicGlass_class, (t_method)magicGlass_bang);
    class_addfloat(magicGlass_class, (t_method)magicGlass_float);
    class_addsymbol(magicGlass_class, (t_method)magicGlass_symbol);
    class_addanything(magicGlass_class, (t_method)magicGlass_anything);
    class_addlist(magicGlass_class, (t_method)magicGlass_list);
}
示例#15
0
void oscil_tilde_setup(void)
{
    oscil_class = class_new(gensym("oscil~"), (t_newmethod)oscil_new,
                            (t_method)oscil_dsp_free ,sizeof(t_oscil), 0, A_GIMME,0);
    CLASS_MAINSIGNALIN(oscil_class, t_oscil, x_f );
    class_addmethod(oscil_class, (t_method)oscil_dsp, gensym("dsp"), 0);
    class_addmethod(oscil_class, (t_method)oscil_mute, gensym("mute"), A_DEFFLOAT,0);
    class_addmethod(oscil_class, (t_method)oscil_sine, gensym("sine"), 0);
    class_addmethod(oscil_class, (t_method)oscil_triangle, gensym("triangle"), 0);
    class_addmethod(oscil_class, (t_method)oscil_square, gensym("square"), 0);
    class_addmethod(oscil_class, (t_method)oscil_sawtooth, gensym("sawtooth"), 0);
    class_addmethod(oscil_class, (t_method)oscil_buzz, gensym("buzz"), 0);
    class_addmethod(oscil_class, (t_method)oscil_list, gensym("list"), A_GIMME, 0);
    class_addmethod(oscil_class, (t_method)oscil_amph, gensym("amph"), A_GIMME, 0);
    class_addmethod(oscil_class, (t_method)oscil_fadetype, gensym("fadetype"), A_FLOAT, 0);
    class_addmethod(oscil_class, (t_method)oscil_fadetime, gensym("fadetime"), A_FLOAT, 0);
    class_addmethod(oscil_class, (t_method)oscil_harmcount, gensym("harmcount"), A_FLOAT, 0);
    class_addmethod(oscil_class, (t_method)oscil_interpolate, gensym("interpolate"), A_FLOAT, 0);
    potpourri_announce(OBJECT_NAME);
}
示例#16
0
void scratcher_tilde_setup(void)
{
    logpost(NULL, 4, scratcher_version);
    scratcher_class = class_new(gensym("scratcher~"), (t_newmethod)scratcher_new, (t_method)scratcher_free,
                                sizeof(t_scratcher), 0, A_GIMME, 0);


    // set callbacks
    scratcher_widgetbehavior.w_getrectfn =    scratcher_getrect;
    scratcher_widgetbehavior.w_displacefn =   scratcher_displace;
    scratcher_widgetbehavior.w_selectfn =     scratcher_select;
    scratcher_widgetbehavior.w_activatefn =   NULL;
    scratcher_widgetbehavior.w_deletefn =     scratcher_delete;
    scratcher_widgetbehavior.w_visfn =        scratcher_vis;
    scratcher_widgetbehavior.w_clickfn =      scratcher_click;

#if PD_MINOR_VERSION >= 37
    class_setpropertiesfn(scratcher_class, scratcher_properties);
    class_setsavefn(scratcher_class, scratcher_save);
#else
    scratcher_widgetbehavior.w_propertiesfn = scratcher_properties;
    scratcher_widgetbehavior.w_savefn =       scratcher_save;
#endif

    CLASS_MAINSIGNALIN( scratcher_class, t_scratcher, x_f );
    class_addmethod(scratcher_class, (t_method)scratcher_dsp, gensym("dsp"), A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_record, gensym("record"), A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_resize, gensym("resize"), A_FLOAT, A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_sensibility, gensym("sensibility"), A_FLOAT, A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_maxspeed, gensym("maxspeed"), A_FLOAT, A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_inertia, gensym("inertia"), A_FLOAT, A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_showspeed, gensym("showspeed"), A_FLOAT, A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_play, gensym("play"), A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_stop, gensym("stop"), A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_reset, gensym("reset"), A_NULL);
    class_addmethod(scratcher_class, (t_method)scratcher_dialog, gensym("dialog"), A_GIMME, A_NULL);

    sys_vgui("eval [read [open {%s/%s.tcl}]]\n",
             scratcher_class->c_externdir->s_name,
             scratcher_class->c_name->s_name);
}
示例#17
0
文件: bthresher~.c 项目: Angeldude/pd
void bthresher_tilde_setup(void){
  bthresher_class = class_new(gensym("bthresher~"), (t_newmethod)bthresher_new, 
      (t_method)bthresher_free ,sizeof(t_bthresher), 0,A_GIMME,0);
  CLASS_MAINSIGNALIN(bthresher_class, t_bthresher, x_f);
  class_addmethod(bthresher_class,(t_method)bthresher_dsp,gensym("dsp"),0);
  class_addmethod(bthresher_class,(t_method)bthresher_mute,gensym("mute"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_bypass,gensym("bypass"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_overlap,gensym("overlap"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_winfac,gensym("winfac"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_fftinfo,gensym("fftinfo"),0);
  class_addmethod(bthresher_class,(t_method)bthresher_rdamper,gensym("rdamper"),A_FLOAT,A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_rthreshold,gensym("rthreshold"),A_FLOAT,A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_dump,gensym("dump"),0);
  class_addmethod(bthresher_class,(t_method)bthresher_list,gensym("list"),A_GIMME,0);
  class_addmethod(bthresher_class,(t_method)bthresher_alldamp,gensym("alldamp"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_allthresh,gensym("allthresh"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_inf_hold,gensym("inf_hold"),A_FLOAT,0);
  class_addmethod(bthresher_class,(t_method)bthresher_max_hold,gensym("max_hold"),A_FLOAT,0); 
  class_addmethod(bthresher_class,(t_method)bthresher_bin,gensym("bin"),A_FLOAT,A_FLOAT,A_FLOAT,0);
  post("%s %s",OBJECT_NAME,FFTEASE_ANNOUNCEMENT);
}
示例#18
0
void zeroCrossing_tilde_setup(void)
{
    zeroCrossing_tilde_class = 
    class_new(
    	gensym("zeroCrossing~"),
    	(t_newmethod)zeroCrossing_tilde_new,
    	(t_method)zeroCrossing_tilde_free,
        sizeof(t_zeroCrossing_tilde),
        CLASS_DEFAULT, 
        A_GIMME,
		0
    );

    CLASS_MAINSIGNALIN(zeroCrossing_tilde_class, t_zeroCrossing_tilde, x_f);

	class_addbang(zeroCrossing_tilde_class, zeroCrossing_tilde_bang);
	
	class_addmethod(
		zeroCrossing_tilde_class, 
        (t_method)zeroCrossing_tilde_window,
		gensym("window"),
		A_DEFFLOAT,
		0
	);
	
	class_addmethod(
		zeroCrossing_tilde_class, 
        (t_method)zeroCrossing_tilde_overlap,
		gensym("overlap"),
		A_DEFFLOAT,
		0
	);
	
    class_addmethod(
    	zeroCrossing_tilde_class,
    	(t_method)zeroCrossing_tilde_dsp,
    	gensym("dsp"),
    	0
    );
}
示例#19
0
extern "C" void ambisonicReverb_tilde_setup(void)
{
    ambisonicReverb_class = class_new(gensym("ambisonicReverb~"),
                              (t_newmethod)ambisonicReverb_new,
                              (t_method)ambisonicReverb_free, sizeof(t_ambisonicReverb),
                              CLASS_DEFAULT,
                              A_GIMME, 0);


    // in params



    class_addmethod(ambisonicReverb_class, (t_method)ambisonicReverb_dsp, gensym("dsp"), A_CANT);




    CLASS_MAINSIGNALIN(ambisonicReverb_class, t_ambisonicReverb, f);


}
示例#20
0
文件: pod~.c 项目: gregtronel/pod
void pod_tilde_setup(void)
{
    pod_tilde_class = class_new(gensym("pod~"), (t_newmethod)pod_tilde_new, (t_method)pod_tilde_free, sizeof(t_pod_tilde), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, 0);
    
    CLASS_MAINSIGNALIN(pod_tilde_class, t_pod_tilde, x_f);
    
    class_addmethod(
        pod_tilde_class,
        (t_method)pod_tilde_dsp,
        gensym("dsp"),
        0
    );
    
    class_addmethod(pod_tilde_class, (t_method)pod_tilde_print, gensym("print"), 0);
    
    class_addmethod(
        pod_tilde_class,
        (t_method)pod_tilde_outer_filter,
        gensym("outer_filter"),
        A_DEFFLOAT,
        0
    );
    
    class_addmethod(
        pod_tilde_class,
        (t_method)pod_tilde_middle_filter,
        gensym("middle_filter"),
        A_DEFFLOAT,
        0
    );
    
    class_addmethod(
        pod_tilde_class,
        (t_method)pod_tilde_create_window,
        gensym("create_window"),
        0
    );
    
}
示例#21
0
文件: nlms2~.c 项目: Angeldude/pd
void nlms2_tilde_setup(void)
{
  nlms2_tilde_class = class_new(gensym("nlms2~"), (t_newmethod)nlms2_tilde_new, 
                    (t_method)nlms2_tilde_free, sizeof(t_nlms2_tilde), 
                    CLASS_DEFAULT, A_GIMME, 0);

  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_a,
                  gensym("adaptation"), A_DEFFLOAT, 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_geta,
                  gensym("getadaptation"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_mu, 
                  gensym("mu"), A_DEFFLOAT, 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_getmu,
                  gensym("getmu"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_alpha, 
                  gensym("alpha"), A_DEFFLOAT, 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_getalpha,
                  gensym("getalpha"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_getN,
                  gensym("getN"), 0); 
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_init,
                  gensym("init_unity"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_clear,
                  gensym("clear"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_print,
                  gensym("print"), 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_write, 
                  gensym("write"), A_DEFSYMBOL, 0);
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_read, 
                  gensym("read"), A_DEFSYMBOL, 0);

  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_dsp, gensym("dsp"), 0);
  CLASS_MAINSIGNALIN(nlms2_tilde_class, t_nlms2_tilde, f);
  
  class_addmethod(nlms2_tilde_class, (t_method)nlms2_tilde_helper, gensym("help"), 0);
}
示例#22
0
void barkSpec_tilde_setup(void)
{
	barkSpec_tilde_class =
	class_new(
		gensym("barkSpec~"),
		(t_newmethod)barkSpec_tilde_new,
		(t_method)barkSpec_tilde_free,
		sizeof(t_barkSpec_tilde),
		CLASS_DEFAULT,
		A_GIMME,
		0
	);

	CLASS_MAINSIGNALIN(barkSpec_tilde_class, t_barkSpec_tilde, x_f);

	class_addbang(barkSpec_tilde_class, barkSpec_tilde_bang);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_filterFreqs,
		gensym("filter_freqs"),
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_print,
		gensym("print"),
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_createFilterbank,
		gensym("filterbank"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_hat,
		gensym("hat"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_window,
		gensym("window"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
        (t_method)barkSpec_tilde_overlap,
		gensym("overlap"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_windowFunction,
		gensym("window_function"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_filterAvg,
		gensym("filter_avg"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_powerSpectrum,
		gensym("power_spectrum"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_normalize,
		gensym("normalize"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		barkSpec_tilde_class,
		(t_method)barkSpec_tilde_dsp,
		gensym("dsp"),
		0
	);
}
示例#23
0
文件: sin~.c 项目: porres/Porres-ELS
void sin_tilde_setup(void){
    sin_class = class_new(gensym("sin~"), (t_newmethod)sin_new,
        0, sizeof(t_sin), CLASS_DEFAULT, 0);
    CLASS_MAINSIGNALIN(sin_class, t_sin, x_f);
    class_addmethod(sin_class, (t_method) sin_dsp, gensym("dsp"), A_CANT,  0);
}
示例#24
0
/* Setup synthe on PureData */
void synthe_setup(void){
  synthe_class = class_new(gensym("synthe"),(t_newmethod)synthe_new,(t_method) synthe_free, sizeof(t_synthe),CLASS_DEFAULT, A_GIMME, 0);
  class_addmethod(synthe_class, (t_method)synthe_dsp, gensym("dsp"), 0);
  class_addmethod(synthe_class, (t_method)synthe_messages,gensym("messages"), A_DEFFLOAT, A_DEFFLOAT, 0);
  CLASS_MAINSIGNALIN(synthe_class, t_synthe, f);
}
示例#25
0
void magSpec_tilde_setup(void)
{
    magSpec_tilde_class = 
    class_new(
    	gensym("magSpec~"),
    	(t_newmethod)magSpec_tilde_new,
    	(t_method)magSpec_tilde_free,
        sizeof(t_magSpec_tilde),
        CLASS_DEFAULT, 
        A_GIMME,
		0
    );

    CLASS_MAINSIGNALIN(magSpec_tilde_class, t_magSpec_tilde, x_f);

	class_addbang(magSpec_tilde_class, magSpec_tilde_bang);
	
	class_addmethod(
		magSpec_tilde_class, 
        (t_method)magSpec_tilde_window,
		gensym("window"),
		A_DEFFLOAT,
		0
	);
	
	class_addmethod(
		magSpec_tilde_class, 
        (t_method)magSpec_tilde_overlap,
		gensym("overlap"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		magSpec_tilde_class,
        (t_method)magSpec_tilde_windowFunction,
		gensym("window_function"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		magSpec_tilde_class, 
        (t_method)magSpec_tilde_normalize, 
		gensym("normalize"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		magSpec_tilde_class, 
        (t_method)magSpec_tilde_powerSpectrum,
		gensym("power_spectrum"),
		A_DEFFLOAT,
		0
	);
	
    class_addmethod(
    	magSpec_tilde_class,
    	(t_method)magSpec_tilde_dsp,
    	gensym("dsp"),
    	0
    );
}
示例#26
0
void specRolloff_tilde_setup(void)
{
    specRolloff_tilde_class =
    class_new(
    	gensym("specRolloff~"),
    	(t_newmethod)specRolloff_tilde_new,
    	(t_method)specRolloff_tilde_free,
        sizeof(t_specRolloff_tilde),
        CLASS_DEFAULT,
        A_GIMME,
		0
    );

    CLASS_MAINSIGNALIN(specRolloff_tilde_class, t_specRolloff_tilde, x_f);

	class_addbang(specRolloff_tilde_class, specRolloff_tilde_bang);

	class_addmethod(
		specRolloff_tilde_class,
        (t_method)specRolloff_tilde_concentration,
		gensym("concentration"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		specRolloff_tilde_class,
        (t_method)specRolloff_tilde_window,
		gensym("window"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		specRolloff_tilde_class,
        (t_method)specRolloff_tilde_overlap,
		gensym("overlap"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		specRolloff_tilde_class,
        (t_method)specRolloff_tilde_windowFunction,
		gensym("window_function"),
		A_DEFFLOAT,
		0
	);

	class_addmethod(
		specRolloff_tilde_class,
        (t_method)specRolloff_tilde_powerSpectrum,
		gensym("power_spectrum"),
		A_DEFFLOAT,
		0
	);

    class_addmethod(
    	specRolloff_tilde_class,
    	(t_method)specRolloff_tilde_dsp,
    	gensym("dsp"),
    	0
    );
}
示例#27
0
文件: dwt~.c 项目: Angeldude/pd
void dwt_tilde_setup(void)
{
  //post("dwt~ v0.1");


    dwt_class = class_new(gensym("dwt~"), (t_newmethod)dwt_new,
    	(t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0);
    CLASS_MAINSIGNALIN(dwt_class, t_dwt, x_f);
    class_addmethod(dwt_class, (t_method)dwt_print, gensym("print"), 0);
    class_addmethod(dwt_class, (t_method)dwt_reset, gensym("reset"), 0);
    class_addmethod(dwt_class, (t_method)dwt_dsp, gensym("dsp"), 0); 

    class_addmethod(dwt_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); 
    class_addmethod(dwt_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); 
    class_addmethod(dwt_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0);

    class_addmethod(dwt_class, (t_method)dwt_even, gensym("even"), A_DEFFLOAT, 0);
    class_addmethod(dwt_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); 

    

    /*class_addmethod(dwt_class, (t_method)dwt_wavelet, gensym("wavelet"), A_DEFFLOAT, 0); */


    idwt_class = class_new(gensym("idwt~"), (t_newmethod)idwt_new,
    	(t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0);

    CLASS_MAINSIGNALIN(idwt_class, t_dwt, x_f);
    class_addmethod(idwt_class, (t_method)dwt_print, gensym("print"), 0);
    class_addmethod(idwt_class, (t_method)dwt_dsp, gensym("dsp"), 0); 

    class_addmethod(idwt_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); 
    class_addmethod(idwt_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); 
    class_addmethod(idwt_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); 

    class_addmethod(idwt_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); 

    class_addmethod(idwt_class, (t_method)dwt_even, gensym("even"), A_DEFFLOAT, 0);



    dwt16_class = class_new(gensym("dwt16~"), (t_newmethod)dwt16_new,
    	(t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0);
    CLASS_MAINSIGNALIN(dwt16_class, t_dwt, x_f);
    class_addmethod(dwt16_class, (t_method)dwt_print, gensym("print"), 0);
    class_addmethod(dwt16_class, (t_method)dwt_reset, gensym("reset"), 0);
    class_addmethod(dwt16_class, (t_method)dwt_dsp, gensym("dsp"), 0); 

    class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); 
    class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); 
    class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0);




    idwt16_class = class_new(gensym("idwt16~"), (t_newmethod)idwt16_new,
    	(t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0);

    CLASS_MAINSIGNALIN(idwt16_class, t_dwt, x_f);
    class_addmethod(idwt16_class, (t_method)dwt_print, gensym("print"), 0);
    class_addmethod(idwt16_class, (t_method)dwt_dsp, gensym("dsp"), 0); 

    class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); 
    class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); 
    class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); 

    class_addmethod(idwt16_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); 




}
示例#28
0
文件: zhzxh~.c 项目: myQuil/amPd
void zhzxh_tilde_setup(void)
{
	zhzxh_class = class_new(gensym("zhzxh~"), (t_newmethod)zhzxh_new, 0, sizeof(t_zhzxh), 0, A_GIMME, 0);
	CLASS_MAINSIGNALIN(zhzxh_class, t_zhzxh, f);
	class_addmethod(zhzxh_class, (t_method)zhzxh_dsp, gensym("dsp"), 0);
}
示例#29
0
/******************setup**********/
void phasevoc_tilde_setup(void)
{
  phasevoc_tilde_class = class_new(gensym("phasevoc~"),
				   (t_newmethod)phasevoc_tilde_new,
				   (t_method)phasevoc_tilde_free,
				   sizeof(t_phasevoc_tilde),
				   0,
				   A_GIMME,
				   0);
  
CLASS_MAINSIGNALIN(phasevoc_tilde_class, t_phasevoc_tilde, f);
  
  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_timestretch, 
		  gensym("timestretch"), 
		  A_DEFFLOAT, 
		  0);
  
  class_addmethod(phasevoc_tilde_class,
		  (t_method)phasevoc_tilde_pitchshift,
		  gensym("pitchshift"), 
		  A_DEFFLOAT, 
		  0);
  
  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_samphold, 
		  gensym("samphold"), 
		  A_DEFFLOAT, 
		  0);
  
  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_phaselock, 
		  gensym("phaselock"), 
		  A_DEFFLOAT, 
		  0);
  
  
  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_reinit,
		  gensym("reinit"), 
		  0);


  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_pause, 
		  gensym("pause"),
		  0);  

  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_unpause,
		  gensym("unpause"), 
		  0);

  
  class_addmethod(phasevoc_tilde_class, 
		  (t_method)phasevoc_tilde_dsp, 
		  gensym("dsp"), 
		  0);

  //  class_sethelpsymbol(phasevoc_tilde_class, gensym("help-phasevoc~"));

}