aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2005-12-13 17:19:29 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2005-12-13 17:19:29 +0000
commitaf352191cd185f9382c840f31e8ab2acd4d4bd8b (patch)
tree6144e84a1c03591e56bb92bde7f30df88f65cfae
parentf0cc2e5ef07983983acf46c25ca4b00f57bce806 (diff)
changing from 4 bars to 2 bars buffer
svn path=/trunk/externals/frankenstein/; revision=4201
-rwxr-xr-xritmo1.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/ritmo1.c b/ritmo1.c
index e7a848a..aa0cc86 100755
--- a/ritmo1.c
+++ b/ritmo1.c
@@ -14,22 +14,22 @@ typedef struct _ritmo1
t_symbol *x_arrayname_src; // where i read the current pattern
t_symbol *x_arrayname_dest; // where i put the computed pattern
t_float *buf1;
- t_float *buf2;
- t_float *buf3;
+// t_float *buf2;
+// t_float *buf3;
} t_ritmo1;
void ritmo1_allocate_buffers(t_ritmo1 *x)
{
x->buf1 = (t_float *)getbytes(BUFFER_LENGHT * sizeof(t_float));
- x->buf2 = (t_float *)getbytes(BUFFER_LENGHT * sizeof(t_float));
- x->buf3 = (t_float *)getbytes(BUFFER_LENGHT * sizeof(t_float));
+// x->buf2 = (t_float *)getbytes(BUFFER_LENGHT * sizeof(t_float));
+// x->buf3 = (t_float *)getbytes(BUFFER_LENGHT * sizeof(t_float));
}
void ritmo1_free(t_ritmo1 *x)
{
freebytes(x->buf1, sizeof(x->buf1));
- freebytes(x->buf2, sizeof(x->buf2));
- freebytes(x->buf3, sizeof(x->buf3));}
+// freebytes(x->buf2, sizeof(x->buf2));
+// freebytes(x->buf3, sizeof(x->buf3));}
static void ritmo1_bang(t_ritmo1 *x) {
@@ -61,16 +61,17 @@ static void ritmo1_bang(t_ritmo1 *x) {
// and write it in vecdest
for (i=0; i<16; i++)
{
- vecdest[i] = (x->buf1[i] + x->buf2[i] + x->buf3[i] + vecsrc[i])/4;
+ // vecdest[i] = (x->buf1[i] + x->buf2[i] + x->buf3[i] + vecsrc[i])/4;
+ vecdest[i] = (x->buf1[i] vecsrc[i])/2;
}
// redraw the arrays
garray_redraw(arysrc);
garray_redraw(arydest);
// step 2: cycle buffers
- x->buf3 = x->buf2;
- x->buf2 = x->buf1;
- x->buf1 = x->buf3;
+ // x->buf3 = x->buf2;
+ // x->buf2 = x->buf1;
+ // x->buf1 = x->buf3;
// fill the first buffer with src data
for (i=0; i<16; i++)
{