aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2007-06-19 14:34:11 +0000
committerThomas Grill <xovo@users.sourceforge.net>2007-06-19 14:34:11 +0000
commitdacf7b607b9d0fda8b9a38b58dc97ce77b9ce3e9 (patch)
tree6516ed960ea9cf0c02ed7fb3886a483954c75e49 /externals/grill/xsample/source
parent681682b3efa84c7d6323a43bdda54616b39cd73c (diff)
use branch hints
added xcode 2.4 project fixed one-shot loop bang updated copyrights svn path=/trunk/; revision=7786
Diffstat (limited to 'externals/grill/xsample/source')
-rw-r--r--externals/grill/xsample/source/groove.cpp12
-rwxr-xr-xexternals/grill/xsample/source/inter.h6
-rw-r--r--externals/grill/xsample/source/main.cpp4
-rw-r--r--externals/grill/xsample/source/main.h11
-rw-r--r--externals/grill/xsample/source/play.cpp4
-rw-r--r--externals/grill/xsample/source/record.cpp4
6 files changed, 27 insertions, 14 deletions
diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp
index fd899275..c989156e 100644
--- a/externals/grill/xsample/source/groove.cpp
+++ b/externals/grill/xsample/source/groove.cpp
@@ -1,7 +1,7 @@
/*
xsample - extended sample objects for Max/MSP and pd (pure data)
-Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org)
+Copyright (c) 2001-2007 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
@@ -322,7 +322,10 @@ void xgroove::s_pos_once(int n,t_sample *const *invecs,t_sample *const *outvecs)
else
s_pos_off(n,invecs,outvecs);
- if(UNLIKELY(lpbang)) ToOutBang(outchns+3);
+ if(UNLIKELY(lpbang)) {
+ doplay = false;
+ ToOutBang(outchns+3);
+ }
}
void xgroove::s_pos_loop(int n,t_sample *const *invecs,t_sample *const *outvecs)
@@ -361,6 +364,9 @@ void xgroove::s_pos_loop(int n,t_sample *const *invecs,t_sample *const *outvecs)
}
}
else {
+ ///////////////////////////////////
+ // Most of the time is spent in here
+ ///////////////////////////////////
for(int i = 0; i < n; ++i) {
const t_sample spd = speed[i]; // must be first because the vector is reused for output!
@@ -756,7 +762,7 @@ bool xgroove::do_xzone()
void xgroove::m_help()
{
post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
- post("(C) Thomas Grill, 2001-2006");
+ post("(C) Thomas Grill, 2001-2007");
#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else
diff --git a/externals/grill/xsample/source/inter.h b/externals/grill/xsample/source/inter.h
index 5ee87b90..f8a0881b 100755
--- a/externals/grill/xsample/source/inter.h
+++ b/externals/grill/xsample/source/inter.h
@@ -206,7 +206,7 @@ TMPLDEF void xinter::st_play4(const t_sample *bdt,const int smin,const int smax,
if(OCHNS == 1) {
t_sample *sig0 = sig[0];
for(int i = 0; i < n; ++i) {
- float o = *(pos++);
+ float o = pos[i];
register long oint = CASTINT<long>(o);
register t_sample fa,fb,fc,fd;
const float frac = o-oint;
@@ -289,13 +289,13 @@ looped1:
}
}
- const float f1 = 0.5f*(frac-1.0f);
+ const float f1 = frac*0.5f-0.5f;
const float f3 = frac*3.0f-1.0f;
const float amdf = (fa-fd)*frac;
const float cmb = fc-fb;
const float bma = fb-fa;
- *(sig0++) = fb + frac*( cmb - f1 * ( amdf+bma+cmb*f3 ) );
+ sig0[i] = fb + frac*( cmb - f1 * ( amdf+bma+cmb*f3 ) );
}
}
else {
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 7c8bd9d2..025352a3 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -1,7 +1,7 @@
/*
xsample - extended sample objects for Max/MSP and pd (pure data)
-Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org)
+Copyright (c) 2001-2007 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
@@ -16,7 +16,7 @@ static void xsample_main()
flext::post("xsample objects, version " XSAMPLE_VERSION);
flext::post("");
flext::post(" xrecord~, xplay~, xgroove~ ");
- flext::post(" (C)2001-2006 Thomas Grill ");
+ flext::post(" (C)2001-2007 Thomas Grill ");
#ifdef FLEXT_DEBUG
flext::post("");
flext::post("DEBUG BUILD - " __DATE__ " " __TIME__);
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index ec2218d3..8cf39d7d 100644
--- a/externals/grill/xsample/source/main.h
+++ b/externals/grill/xsample/source/main.h
@@ -86,8 +86,15 @@ extern "C++" {
}
#endif
-#if FLEXT_CPU == FLEXT_CPU_INTEL && defined(__GNUC__)
-template<typename I,typename F> inline I CASTINT(F o) { return lrintf(o); }
+#if 0 // FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUC__)
+#include <ppc_intrinsics.h>
+template<typename I,typename F>
+inline I CASTINT( F f )
+{
+ int i;
+ __stfiwx(__fctiwz(f),0,&i);
+ return i;
+}
#elif FLEXT_CPU == FLEXT_CPU_INTEL && defined(_MSC_VER)
template<typename I,typename F>
inline I CASTINT(F x) {
diff --git a/externals/grill/xsample/source/play.cpp b/externals/grill/xsample/source/play.cpp
index f3fdaab1..0f6fec5e 100644
--- a/externals/grill/xsample/source/play.cpp
+++ b/externals/grill/xsample/source/play.cpp
@@ -1,7 +1,7 @@
/*
xsample - extended sample objects for Max/MSP and pd (pure data)
-Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org)
+Copyright (c) 2001-2007 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
@@ -117,7 +117,7 @@ void xplay::m_help()
#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
- post("(C) Thomas Grill, 2001-2006");
+ post("(C) Thomas Grill, 2001-2007");
#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index b8c8a9b0..07c94b45 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -1,7 +1,7 @@
/*
xsample - extended sample objects for Max/MSP and pd (pure data)
-Copyright (c) 2001-2006 Thomas Grill (gr@grrrr.org)
+Copyright (c) 2001-2007 Thomas Grill (gr@grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
*/
@@ -452,7 +452,7 @@ void xrecord::m_help()
#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
- post("(C) Thomas Grill, 2001-2006");
+ post("(C) Thomas Grill, 2001-2007");
#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else