-
-
Save bitpit/847f691f79ad17851b41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "m_pd.h" | |
static t_class *cmidi_class; | |
typedef struct _cmidi {//Class variables | |
t_object x_obj; | |
t_float f; | |
} t_cmidi; | |
void *cmidi_new(t_floatarg f){//Instantiator | |
t_cmidi *x = (t_cmidi *)pd_new(cmidi_class); | |
x->f = f; | |
return (void *)x; | |
} | |
void out_bang(t_cmidi *x, t_floatarg f){ | |
x->f = f; | |
post("cmidi bang!"); | |
} | |
void cmidi_setup(void){ | |
cmidi_class = class_new(gensym("cmidi"), | |
(t_newmethod)cmidi_new, | |
0, sizeof(t_cmidi), | |
CLASS_DEFAULT, | |
A_DEFFLOAT,0); | |
class_addfloat(cmidi_class, out_bang); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "m_pd.h" | |
static t_class *elswating_class; | |
typedef struct _elswating {//Class variables | |
t_object x_obj; | |
t_float floaty; | |
} t_elswating; | |
void *elswating_new(void){//Instantiator | |
t_elswating *x = (t_elswating *)pd_new(elswating_class); | |
x->floaty = 2; | |
return (void *)x; | |
} | |
void out_bang(t_elswating *x, t_floatarg f){ | |
x->floaty = f; | |
post("elswating bang!"); | |
} | |
void elswating_setup(void){ | |
elswating_class = class_new(gensym("elswating"), | |
(t_newmethod)elswating_new, | |
0, sizeof(t_elswating), | |
CLASS_DEFAULT,0); | |
class_addfloat(elswating_class, out_bang); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment