aboutsummaryrefslogtreecommitdiff
path: root/GArhythm.c
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2006-01-21 15:14:09 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2006-01-21 15:14:09 +0000
commit6e1106e148ba32f529e7b154f95351281508978d (patch)
tree4b16273c3e52be0a8be7bfaab7e69e466609169f /GArhythm.c
parent8b733b7013073e37ad4787544d6c8b4e03bb50a6 (diff)
added an outlet to chords_memory which tells you how new is the chord you are adding
svn path=/trunk/externals/frankenstein/; revision=4461
Diffstat (limited to 'GArhythm.c')
-rwxr-xr-xGArhythm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/GArhythm.c b/GArhythm.c
index 9de31ff..a055026 100755
--- a/GArhythm.c
+++ b/GArhythm.c
@@ -2,6 +2,7 @@
*/
#include <stdlib.h>
+#include <time.h>
#include "m_pd.h"
#define BUFFER_LENGHT 16 // lunghezza dei buffers (quanti elementi nel pattern)
@@ -49,6 +50,7 @@ void GArhythm_init_pop(t_GArhythm *x)
{
int i, j, tmp, k;
double rnd;
+
for (i=0; i<MAX_POPULATION; i++)
{
for (j=0; j<BUFFER_LENGHT; j++)
@@ -649,7 +651,8 @@ static void *GArhythm_new(t_symbol *s, int argc, t_atom *argv)
x->reinsert_src=REINSERT_SRC;
x->reinsert_last=REINSERT_LAST;
-
+ srand( (unsigned)time( NULL ) );
+
if (argc>0)
{
x->x_arrayname_src_strum1 = atom_getsymbolarg(0, argc, argv);