From 06fb067d0566054f9b9c9fc088903d12fcf653ec Mon Sep 17 00:00:00 2001 From: "N.N." Date: Wed, 24 Jun 2015 10:29:57 +0000 Subject: Fixed [lookup~] behaviour, now like Max5 svn path=/trunk/externals/miXed/; revision=17495 --- cyclone/sickle/lookup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cyclone') diff --git a/cyclone/sickle/lookup.c b/cyclone/sickle/lookup.c index 3f51e69..e6fd142 100644 --- a/cyclone/sickle/lookup.c +++ b/cyclone/sickle/lookup.c @@ -36,7 +36,9 @@ static t_int *lookup_perform(t_int *w) { float off = *oin++; /* msp: converted to int (if not a signal) */ int siz = (int)*sin++ - 1; /* msp: converted to int (signal too) */ - float pos = (siz > 0 ? off + siz * (*xin++ + 1.0) * 0.5 : off); + float pos; +// pos = (siz > 0 ? off + siz * (*xin++ + 1.0) * 0.5 : off); // range: off - (off + siz) + pos = (siz > 0 ? off + (siz - off) * (*xin++ + 1.0) * 0.5 : off); // range: off - siz int ndx = (int)pos; int ndx1 = ndx + 1; if (ndx1 > 0 && ndx1 < vecsize) -- cgit v1.2.1