[PD-cvs] externals/frankenstein common.h,1.11,1.12 test.c,1.2,1.3
dmorelli
morellid at users.sourceforge.net
Tue Dec 6 19:10:01 CET 2005
Update of /cvsroot/pure-data/externals/frankenstein
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29193
Modified Files:
common.h test.c
Log Message:
added simpler functions to manage the rhythms memory
Index: test.c
===================================================================
RCS file: /cvsroot/pure-data/externals/frankenstein/test.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test.c 2 Dec 2005 18:56:07 -0000 1.2
--- test.c 6 Dec 2005 18:09:59 -0000 1.3
***************
*** 19,24 ****
t_object x_obj; // myself
t_outlet *l_out;
! t_rhythm_event *seq;
int seq_initialized;
} t_test;
--- 19,25 ----
t_object x_obj; // myself
t_outlet *l_out;
! t_rhythm_event *curr_seq;
int seq_initialized;
+ t_rhythm_memory_representation *rhythms_memory;
} t_test;
***************
*** 26,30 ****
void test_free(t_test *x)
{
! freeBeats(x->seq);
}
--- 27,31 ----
void test_free(t_test *x)
{
! freeBeats(x->curr_seq);
}
***************
*** 43,55 ****
if (x->seq_initialized)
{
! concatenateBeat(x->seq, 0, rnd, 1);
} else
{
! setFirstBeat(&(x->seq), 0, rnd, 1);
x->seq_initialized = 1;
}
// print the sequence
! events = x->seq;
while(events)
{
--- 44,56 ----
if (x->seq_initialized)
{
! concatenateBeat(x->curr_seq, 0, rnd, 1);
} else
{
! setFirstBeat(&(x->curr_seq), 0, rnd, 1);
x->seq_initialized = 1;
}
// print the sequence
! events = x->curr_seq;
while(events)
{
***************
*** 69,72 ****
--- 70,75 ----
x->seq_initialized = 0;
+ rhythm_memory_create(&(x->rhythms_memory));
+
return (x);
}
Index: common.h
===================================================================
RCS file: /cvsroot/pure-data/externals/frankenstein/common.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** common.h 6 Dec 2005 12:08:28 -0000 1.11
--- common.h 6 Dec 2005 18:09:59 -0000 1.12
***************
*** 193,196 ****
--- 193,198 ----
// first of all declare a pointer for the memory
t_rhythm_memory_representation *rhythms_memory;
+ // initialize it
+ rhythm_memory_create(&this_rep);
// then each time you get a rhythm let the memory evaluate it and
// tell you if is a new rhythm or a old one
More information about the Pd-cvs
mailing list