aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2006-01-15 02:14:01 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2006-01-15 02:14:01 +0000
commit328efc562d91016416674007ea42e9b8515f6efb (patch)
treed73541e17e9a78847f50bb829a6e79a6f50af93e
parentbe7e8a70dbbbdc3ab2b1a8311b9380db5ca15553 (diff)
adding init feature (memory reinitialization)
svn path=/trunk/externals/frankenstein/; revision=4405
-rwxr-xr-xrhythms_memory.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rhythms_memory.c b/rhythms_memory.c
index a9763ef..75ea5a4 100755
--- a/rhythms_memory.c
+++ b/rhythms_memory.c
@@ -399,6 +399,16 @@ void *rhythms_memory_new(t_symbol *s, int argc, t_atom *argv)
return (x);
}
+// debugging function
+void init(t_rhythms_memory *x)
+{
+ if (x->curr_seq)
+ freeBeats(x->curr_seq);
+ if (x->rhythms_memory)
+ rhythm_memory_free(x->rhythms_memory);
+ x->seq_initialized = 0;
+ rhythm_memory_create(&(x->rhythms_memory));
+}
// debugging function
void crash(t_rhythms_memory *x)
@@ -426,6 +436,7 @@ void rhythms_memory_setup(void)
// builds a variation of a given rhythm
class_addmethod(rhythms_memory_class, (t_method)variation, gensym("variation"),
A_GIMME, 0);
+ class_addmethod(rhythms_memory_class, (t_method)init, gensym("init"), 0);
}