[PD-cvs] pd/src desire.tk, 1.1.2.600.2.318, 1.1.2.600.2.319 builtins.c, 1.1.2.54, 1.1.2.55
chunlee
chunlee at users.sourceforge.net
Wed Aug 8 20:40:45 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14118
Modified Files:
Tag: desiredata
desire.tk builtins.c
Log Message:
macro object
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.318
retrieving revision 1.1.2.600.2.319
diff -C2 -d -r1.1.2.600.2.318 -r1.1.2.600.2.319
*** desire.tk 8 Aug 2007 16:32:00 -0000 1.1.2.600.2.318
--- desire.tk 8 Aug 2007 18:40:39 -0000 1.1.2.600.2.319
***************
*** 2434,2437 ****
--- 2434,2440 ----
set ::macro_state 0
+
+
+
def Canvas macro_toggle {} {if {![$::macro state]} {set ::macro_state 1} {$::macro state= 0; $::macro dump}}
#def Canvas macro_play {} {puts ">> $@click_at <<"; $::macro idx= 0; $::macro play [$::macro delay]}
***************
*** 4985,4988 ****
--- 4988,4995 ----
}
+ def Canvas macro_event_append {e} {
+ puts "check if the q is empty"
+ puts "event::: $e"
+ }
#-----------------------------------------------------------------------------------#
class_new Wire {View}
Index: builtins.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v
retrieving revision 1.1.2.54
retrieving revision 1.1.2.55
diff -C2 -d -r1.1.2.54 -r1.1.2.55
*** builtins.c 4 Aug 2007 04:11:35 -0000 1.1.2.54
--- builtins.c 8 Aug 2007 18:40:43 -0000 1.1.2.55
***************
*** 983,986 ****
--- 983,1012 ----
}
+ /*---- Macro ----*/
+ static t_class *macro_class;
+ struct t_macro : t_object {
+ t_symbol *sym;
+ };
+
+ static void *macro_new(t_symbol *s) {
+ t_macro *x = (t_macro *)pd_new(macro_class);
+ if (*s->name) x->sym = s;
+ else x->sym = gensym("macro");
+ return x;
+ }
+
+ static void macro_send(t_macro *x, t_symbol *s, int argc, t_atom *argv) {
+ std::ostringstream t;
+ t << s->name;
+ for (int i=0; i<argc; i++) {t << " " << &argv[i];}
+ sys_mgui(x->dix->canvas, "macro_event_append", "S", t.str().data());
+ }
+ static void macro_setup() {
+ t_class *c = macro_class = class_new2("macro",macro_new,0,sizeof(t_macro),0,"S");
+ class_addanything(c, macro_send);
+ }
+
+ /*-----------------*/
+
/* MSW and OSX don't appear to have single-precision ANSI math */
#if defined(MSW) || defined(__APPLE__)
***************
*** 2863,2866 ****
--- 2889,2893 ----
namecanvas_setup();
print_setup();
+ macro_setup();
delay_setup();
metro_setup();
More information about the Pd-cvs
mailing list