From 1164f265647eebba64937612049bfb472eddf1f0 Mon Sep 17 00:00:00 2001 From: Davide Morelli Date: Tue, 6 Dec 2005 18:09:59 +0000 Subject: added simpler functions to manage the rhythms memory svn path=/trunk/externals/frankenstein/; revision=4154 --- test.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index ebadac4..49462a3 100755 --- a/test.c +++ b/test.c @@ -18,14 +18,15 @@ typedef struct _test { t_object x_obj; // myself t_outlet *l_out; - t_rhythm_event *seq; + t_rhythm_event *curr_seq; int seq_initialized; + t_rhythm_memory_representation *rhythms_memory; } t_test; void test_free(t_test *x) { - freeBeats(x->seq); + freeBeats(x->curr_seq); } static void test_bang(t_test *x) { @@ -42,15 +43,15 @@ static void test_bang(t_test *x) { if (x->seq_initialized) { - concatenateBeat(x->seq, 0, rnd, 1); + concatenateBeat(x->curr_seq, 0, rnd, 1); } else { - setFirstBeat(&(x->seq), 0, rnd, 1); + setFirstBeat(&(x->curr_seq), 0, rnd, 1); x->seq_initialized = 1; } // print the sequence - events = x->seq; + events = x->curr_seq; while(events) { post("event: numerator=%i, denominator=%i", events->duration.numerator, events->duration.denominator); @@ -68,6 +69,8 @@ void *test_new(t_symbol *s, int argc, t_atom *argv) x->seq_initialized = 0; + rhythm_memory_create(&(x->rhythms_memory)); + return (x); } -- cgit v1.2.1