aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cyclone/sickle/buffir.c8
-rw-r--r--cyclone/sickle/index.c7
-rw-r--r--cyclone/sickle/lookup.c13
-rw-r--r--cyclone/sickle/peek.c9
-rw-r--r--cyclone/sickle/poke.c11
-rw-r--r--cyclone/sickle/record.c12
-rw-r--r--cyclone/sickle/wave.c19
-rw-r--r--shared/shared.h1
-rw-r--r--shared/sickle/arsic.h2
9 files changed, 55 insertions, 27 deletions
diff --git a/cyclone/sickle/buffir.c b/cyclone/sickle/buffir.c
index 13eee79..b3abd0e 100644
--- a/cyclone/sickle/buffir.c
+++ b/cyclone/sickle/buffir.c
@@ -4,6 +4,7 @@
#include <string.h>
#include "m_pd.h"
+#include "shared.h"
#include "common/loud.h"
#include "common/fitter.h"
#include "sickle/sic.h"
@@ -116,7 +117,7 @@ static t_int *buffir_perform(t_int *w)
t_float *oin = (t_float *)(w[4]);
t_float *sin = (t_float *)(w[5]);
int vecsize = sic->s_vecsize;
- t_float *vec = sic->s_vectors[0]; /* playable implies nonzero (mono) */
+ t_word *vec = sic->s_vectors[0]; /* playable implies nonzero (mono) */
int histsize = x->x_histsize;
while (nblock--)
{
@@ -133,7 +134,8 @@ static t_int *buffir_perform(t_int *w)
npoints = vecsize - off;
if (npoints > 0)
{
- t_float *coefp = vec + off;
+// t_float *coefp = vec + off;
+ t_float *coefp = &vec[0].w_float + off;
t_float *hp = hihead;
t_float sum = 0.;
*lohead++ = *hihead++ = *xin++;
@@ -212,4 +214,6 @@ void buffir_tilde_setup(void)
class_addmethod(buffir_class, (t_method)buffir_set,
gensym("set"), A_SYMBOL, A_DEFFLOAT, A_DEFFLOAT, 0);
fitter_setup(buffir_class, 0);
+ logpost(NULL, 4, "this is cyclone/buffir~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/index.c b/cyclone/sickle/index.c
index 036e6fb..c185e9e 100644
--- a/cyclone/sickle/index.c
+++ b/cyclone/sickle/index.c
@@ -6,6 +6,7 @@
#include <string.h>
#include "m_pd.h"
+#include "shared.h"
#include "sickle/sic.h"
#include "sickle/arsic.h"
@@ -36,7 +37,7 @@ static t_int *index_perform(t_int *w)
t_index *x = (t_index *)sic;
t_float *xin = (t_float *)(w[3]);
int index, maxindex = sic->s_vecsize - 1;
- t_float *vp = sic->s_vectors[x->x_effchannel];
+ t_word *vp = sic->s_vectors[x->x_effchannel];
if (vp) /* handle array swapping on the fly via ft1 */
{
while (nblock--)
@@ -46,7 +47,7 @@ static t_int *index_perform(t_int *w)
index = 0;
else if (index > maxindex)
index = maxindex;
- *out++ = vp[index];
+ *out++ = vp[index].w_float;
}
}
else while (nblock--) *out++ = 0;
@@ -104,4 +105,6 @@ void index_tilde_setup(void)
gensym("set"), A_SYMBOL, 0);
class_addmethod(index_class, (t_method)index_ft1,
gensym("ft1"), A_FLOAT, 0);
+ logpost(NULL, 4, "this is cyclone/index~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/lookup.c b/cyclone/sickle/lookup.c
index 1c6a8af..dd2b203 100644
--- a/cyclone/sickle/lookup.c
+++ b/cyclone/sickle/lookup.c
@@ -6,6 +6,7 @@
more compatible (and less useful). */
#include "m_pd.h"
+#include "shared.h"
#include "sickle/sic.h"
#include "sickle/arsic.h"
@@ -30,7 +31,7 @@ static t_int *lookup_perform(t_int *w)
t_float *oin = (t_float *)(w[4]);
t_float *sin = (t_float *)(w[5]);
int vecsize = sic->s_vecsize;
- t_float *vec = sic->s_vectors[0]; /* playable implies nonzero (mono) */
+ t_word *vec = sic->s_vectors[0]; /* playable implies nonzero (mono) */
while (nblock--)
{
float off = *oin++; /* msp: converted to int (if not a signal) */
@@ -40,12 +41,12 @@ static t_int *lookup_perform(t_int *w)
int ndx1 = ndx + 1;
if (ndx1 > 0 && ndx1 < vecsize)
{
- float val = vec[ndx];
- *out++ = val + (vec[ndx1] - val) * (pos - ndx);
+ float val = vec[ndx].w_float;
+ *out++ = val + (vec[ndx1].w_float - val) * (pos - ndx);
}
/* CHECKED: */
- else if (ndx1 == 0) *out++ = *vec * (pos + 1.0);
- else if (ndx1 == vecsize) *out++ = vec[ndx] * (ndx1 - pos);
+ else if (ndx1 == 0) *out++ = vec[0].w_float * (pos + 1.0);
+ else if (ndx1 == vecsize) *out++ = vec[ndx].w_float * (ndx1 - pos);
else *out++ = 0;
}
}
@@ -91,4 +92,6 @@ void lookup_tilde_setup(void)
arsic_setup(lookup_class, lookup_dsp, SIC_FLOATTOSIGNAL);
class_addmethod(lookup_class, (t_method)lookup_set,
gensym("set"), A_SYMBOL, 0);
+ logpost(NULL, 4, "this is cyclone/lookup~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/peek.c b/cyclone/sickle/peek.c
index 333f427..5a5233e 100644
--- a/cyclone/sickle/peek.c
+++ b/cyclone/sickle/peek.c
@@ -6,6 +6,7 @@
#include <string.h>
#include "m_pd.h"
+#include "shared.c"
#include "sickle/sic.h"
#include "sickle/arsic.h"
@@ -50,7 +51,7 @@ static void peek_set(t_peek *x, t_symbol *s)
static void peek_float(t_peek *x, t_float f)
{
t_arsic *sic = (t_arsic *)x;
- t_float *vp;
+ t_word *vp;
arsic_validate(sic, 0); /* LATER rethink (efficiency, and complaining) */
if (vp = sic->s_vectors[x->x_effchannel])
{
@@ -61,7 +62,7 @@ static void peek_float(t_peek *x, t_float f)
{
double timesince;
t_float f = x->x_value;
- vp[ndx] = (x->x_clipmode ? peek_doclip(f) : f);
+ vp[ndx].w_float = (x->x_clipmode ? peek_doclip(f) : f);
x->x_pokemode = 0;
timesince = clock_gettimesince(x->x_clocklasttick);
if (timesince > 1000) peek_tick(x);
@@ -72,7 +73,7 @@ static void peek_float(t_peek *x, t_float f)
}
}
/* CHECKED: output not clipped */
- else outlet_float(((t_object *)x)->ob_outlet, vp[ndx]);
+ else outlet_float(((t_object *)x)->ob_outlet, vp[ndx].w_float);
}
}
}
@@ -144,4 +145,6 @@ void peek_tilde_setup(void)
gensym("ft2"), A_FLOAT, 0);
class_addmethod(peek_class, (t_method)peek_clip,
gensym("clip"), A_FLOAT, 0);
+ logpost(NULL, 4, "this is cyclone/peek~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/poke.c b/cyclone/sickle/poke.c
index 7e45558..3e7eab7 100644
--- a/cyclone/sickle/poke.c
+++ b/cyclone/sickle/poke.c
@@ -5,6 +5,7 @@
/* LATER: 'click' method */
#include "m_pd.h"
+#include "shared.h"
#include "unstable/fragile.h"
#include "sickle/sic.h"
#include "sickle/arsic.h"
@@ -52,7 +53,7 @@ static void poke_bang(t_poke *x)
static void poke_float(t_poke *x, t_float f)
{
t_arsic *sic = (t_arsic *)x;
- t_float *vp;
+ t_word *vp;
arsic_validate(sic, 0); /* LATER rethink (efficiency, and complaining) */
if (vp = sic->s_vectors[x->x_effchannel])
{
@@ -60,7 +61,7 @@ static void poke_float(t_poke *x, t_float f)
if (ndx >= 0 && ndx < sic->s_vecsize)
{
double timesince;
- vp[ndx] = f;
+ vp[ndx].w_float = f;
timesince = clock_gettimesince(x->x_clocklasttick);
if (timesince > 1000) poke_tick(x);
else if (!x->x_clockset)
@@ -87,7 +88,7 @@ static t_int *poke_perform(t_int *w)
t_float *in1 = (t_float *)(w[3]);
t_float *in2 = (t_float *)(w[4]);
t_poke *x = (t_poke *)sic;
- t_float *vp = sic->s_vectors[x->x_effchannel];
+ t_word *vp = sic->s_vectors[x->x_effchannel];
if (vp && sic->s_playable)
{
int vecsize = sic->s_vecsize;
@@ -96,7 +97,7 @@ static t_int *poke_perform(t_int *w)
t_float f = *in1++;
int ndx = (int)*in2++;
if (ndx >= 0 && ndx < vecsize)
- vp[ndx] = f;
+ vp[ndx].w_float = f;
}
}
return (w + sic->s_nperfargs + 1);
@@ -152,4 +153,6 @@ void poke_tilde_setup(void)
gensym("set"), A_SYMBOL, 0);
class_addmethod(poke_class, (t_method)poke_ft2,
gensym("ft2"), A_FLOAT, 0);
+ logpost(NULL, 4, "this is cyclone/poke~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/record.c b/cyclone/sickle/record.c
index f03e784..e65126f 100644
--- a/cyclone/sickle/record.c
+++ b/cyclone/sickle/record.c
@@ -155,14 +155,20 @@ loopover:
ch = nch;
while (ch--)
{
- t_float *vp = sic->s_vectors[ch];
+ t_word *vp = sic->s_vectors[ch];
if (vp)
{
t_float *ip = (t_float *)(w[3 + ch]) + ndone;
vp += phase;
i = nxfer;
/* LATER consider handling under and overflows */
- while (i--) *vp++ = *ip++;
+// while (i--) *vp++ = *ip++;
+ int j = 0;
+ while (i--)
+ {
+ vp[j].w_float = ip[j];
+ j++;
+ }
}
}
i = nxfer;
@@ -263,4 +269,6 @@ void record_tilde_setup(void)
gensym("set"), A_SYMBOL, 0);
class_addmethod(record_class, (t_method)record_reset,
gensym("reset"), 0);
+ logpost(NULL, 4, "this is cyclone/record~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/cyclone/sickle/wave.c b/cyclone/sickle/wave.c
index 7804c88..10c98a3 100644
--- a/cyclone/sickle/wave.c
+++ b/cyclone/sickle/wave.c
@@ -4,6 +4,7 @@
#include <string.h>
#include "m_pd.h"
+#include "shared.h"
#include "sickle/sic.h"
#include "sickle/arsic.h"
@@ -42,7 +43,7 @@ static t_int *wave_perform(t_int *w)
t_float *sin = (t_float *)(w[4]);
t_float *ein = (t_float *)(w[5]);
int vecsize = sic->s_vecsize;
- t_float **vectable = sic->s_vectors;
+ t_word **vectable = sic->s_vectors;
float ksr = sic->s_ksr;
int nointerp = x->x_nointerp;
int maxindex = (nointerp ? vecsize - 1 : vecsize - 3);
@@ -68,9 +69,9 @@ static t_int *wave_perform(t_int *w)
else if (ndx > maxindex) ndx = maxindex;
while (ch--)
{
- t_float *vp = vectable[ch];
+ t_word *vp = vectable[ch];
t_float *out = (t_float *)(outp[ch]);
- out[iblock] = (vp ? vp[ndx] : 0);
+ out[iblock] = (vp ? vp[ndx].w_float : 0);
}
}
else
@@ -83,15 +84,15 @@ static t_int *wave_perform(t_int *w)
else frac = xpos - ndx;
while (ch--)
{
- t_float *vp = vectable[ch];
+ t_word *vp = vectable[ch];
t_float *out = (t_float *)(outp[ch]);
if (vp)
{
vp += ndx;
- a = vp[-1];
- b = vp[0];
- c = vp[1];
- d = vp[2];
+ a = vp[-1].w_float;
+ b = vp[0].w_float;
+ c = vp[1].w_float;
+ d = vp[2].w_float;
cminusb = c-b;
out[iblock] = b + frac * (
cminusb - 0.1666667f * (1. - frac) * (
@@ -158,4 +159,6 @@ void wave_tilde_setup(void)
gensym("set"), A_SYMBOL, 0);
class_addmethod(wave_class, (t_method)wave_interp,
gensym("interp"), A_FLOAT, 0);
+ logpost(NULL, 4, "this is cyclone/wave~ %s, %dth %s build",
+ CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE);
}
diff --git a/shared/shared.h b/shared/shared.h
index 60e616a..6feaace 100644
--- a/shared/shared.h
+++ b/shared/shared.h
@@ -5,6 +5,7 @@
#ifndef __SHARED_H__
#define __SHARED_H__
+#include "../cyclone/build_counter"
/* Microsoft Visual Studio is not C99, it does not provide stdint.h */
#ifdef _MSC_VER
diff --git a/shared/sickle/arsic.h b/shared/sickle/arsic.h
index a941279..38db505 100644
--- a/shared/sickle/arsic.h
+++ b/shared/sickle/arsic.h
@@ -10,7 +10,7 @@ typedef struct _arsic
t_sic s_sic;
int s_vecsize; /* used also as a validation flag */
int s_nchannels;
- t_float **s_vectors;
+ t_word **s_vectors;
t_symbol **s_channames;
int s_nperfargs;
t_int *s_perfargs;