Commit 1e7fb0c1 authored by Jonathan Wilkes's avatar Jonathan Wilkes

Merge branch 'aggraef/purr-data-mojave-fixes2'

parents 4578df0e e9b9e57b
......@@ -4,15 +4,9 @@
[submodule "l2ork_addons/cwiid"]
path = externals/disis/cwiid
url = https://github.com/pd-l2ork/cwiid
[submodule "externals/fftease"]
path = externals/fftease
url = https://git.purrdata.net/jwilkes/fftease.git
[submodule "Gem"]
path = Gem
url = https://git.purrdata.net/jwilkes/Gem.git
[submodule "externals/lyonpotpourri"]
path = externals/lyonpotpourri
url = https://git.purrdata.net/jwilkes/lyonpotpourri3.0.git
[submodule "l2ork_addons/raspberry_pi/disis_gpio/wiringPi"]
path = l2ork_addons/raspberry_pi/disis_gpio/wiringPi
url = https://git.purrdata.net/jwilkes/wiringPi.git
......
......@@ -77,6 +77,12 @@
.PHONY: all incremental checkout clean realclean dist
# Target platform (OSX/macOS only): On Mojave (10.14 with Xcode 10) this needs
# to be at least 10.9, which is the default now. With older Xcode versions you
# can try earlier versions (>= 10.4) if you need to compile for legacy OSX
# versions.
export macos_target = 10.9
# Installation prefix under which Pd-l2ork is installed (Linux only). If this
# isn't set, a default location will be used (usually /usr/local). NOTE: We
# *always* assume that this variable is set properly in the install targets
......
......@@ -41,6 +41,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -41,6 +41,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -15,8 +15,12 @@ cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(cvs_root_dir)/packages
ifeq ($(macos_target),)
macos_target = 10.9
endif
# turn on weak linking and dlopen support
export MACOSX_DEPLOYMENT_TARGET = 10.3
export MACOSX_DEPLOYMENT_TARGET = $(macos_target)
# default target
default: all
......
......@@ -53,6 +53,10 @@ ALL_LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# these can be set from outside without (usually) breaking the build
CFLAGS = -Wall -W -g
LDFLAGS =
......@@ -112,9 +116,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......@@ -260,7 +264,7 @@ all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB)
multitouch.$(EXTENSION): multitouch.c
$(CC) $(ALL_CFLAGS) -o multitouch.o -c multitouch.c
$(CC) $(ALL_LDFLAGS) -mmacosx-version-min=10.5 -F/System/Library/PrivateFrameworks \
$(CC) $(ALL_LDFLAGS) -mmacosx-version-min=$(macos_target) -F/System/Library/PrivateFrameworks \
-o multitouch.$(EXTENSION) multitouch.o $(ALL_LIBS) \
-framework MultitouchSupport
chmod a-x multitouch.$(EXTENSION)
......
......@@ -40,6 +40,10 @@ EXTRA_DIST =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \
......
......@@ -40,6 +40,10 @@ SOURCES_windows =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
#LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
LIBRARY_VERSION = 0.9
......@@ -91,9 +95,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include \
......
......@@ -41,6 +41,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -42,6 +42,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -93,9 +97,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -43,6 +43,10 @@ LIBS = -lm
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -94,9 +98,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -45,6 +45,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -96,9 +100,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -408,6 +408,9 @@ endif
# OSX x86_64.
ifeq ($(system), Darwin)
ifeq ($(macos_target),)
macos_target = 10.9
endif
pkglibdir = $(HOME)/Library/Pd
pdincludepath := $(firstword $(wildcard \
$(externalsdir)/../pd/src \
......@@ -427,12 +430,12 @@ ifeq ($(system), Darwin)
stripflags = -x
ifeq ($(machine), i386)
cxx.flags := -fcheck-new
arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
arch.c.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
endif
ifeq ($(machine), x86_64)
arch.c.flags := -arch x86_64 -mmacosx-version-min=10.5
arch.ld.flags := -arch x86_64 -mmacosx-version-min=10.5
arch.c.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
arch.ld.flags := -arch x86_64 -mmacosx-version-min=$(macos_target)
endif
endif
......
......@@ -41,6 +41,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -41,6 +41,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -92,9 +96,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
......@@ -47,6 +47,10 @@ LIBS =
#
#------------------------------------------------------------------------------#
ifeq ($(macos_target),)
macos_target = 10.9
endif
# get library version from meta file
LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd)
......@@ -98,9 +102,9 @@ ifeq ($(UNAME),Darwin)
OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast
# build universal 32-bit on 10.4 and 32/64 on newer
ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8)
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=$(macos_target)
else
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4
FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=$(macos_target)
SOURCES += $(SOURCES_iphoneos)
endif
CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include
......
Subproject commit ecd960938ed5517a765770fe181b094bddae040c
FFTease 3.0 is Copyright (c) 1999-2014 Eric Lyon and Christopher Penrose
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
/* for compiling under XP */
#ifndef PIOVERTWO
#define PIOVERTWO 1.5707963268
#endif
#ifndef TWOPI
#define TWOPI 6.2831853072
#endif
This diff is collapsed.
#include <math.h>
#include "PenroseOscil.h"
t_float fftease_frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength ) {
return (frequency / samplingRate) * (t_float) bufferLength;
}
void fftease_makeSineBuffer( t_float *buffer, int bufferLength ) {
int i;
float myTwoPi = 8. * atan(1.);
for ( i=0; i <= bufferLength; i++ )
*(buffer+i) = sin( myTwoPi * ((t_float) i / (t_float) bufferLength) );
return;
}
t_float fftease_bufferOscil( t_float *phase, t_float increment, t_float *buffer,
int bufferLength )
{
t_float sample;
while ( *phase > bufferLength )
*phase -= bufferLength;
while ( *phase < 0. )
*phase += bufferLength;
sample = *( buffer + (int) (*phase) );
*phase += increment;
return sample;
}
#include "fftease.h"
t_float frequencyToIncrement( t_float samplingRate, t_float frequency, int bufferLength );
void makeSineBuffer( t_float *buffer, int bufferLength );
t_float bufferOscil( t_float *phase, t_float increment, t_float *buffer, int bufferLength );
#include "PenroseRand.h"
float fftease_rrand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/16384. - 1.);
}
float fftease_prand(int *seed)
{
int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777;
return((float)i/32768.);
}
float fftease_rrand(int *seed);
float fftease_prand(int *seed);
About FFTease 3.0
FFTease is a collection of objects designed to facilitate spectral sound
processing in Max. The collection was designed by Eric Lyon and
Christopher Penrose in 1999, and has been maintained by Eric Lyon since
2003.
Installation
The contents of "fftease32-externals" were compiled on Mac OSX 10.9.3
and should work on Intel-based Mac computers. For other Unix-based
computers, just type 'make' to build executables appropriate for your
computer. Then type 'perl collect.pl' to collect all the externals to
the "fftease32-externals" folder. Finally, move "fftease32-externals"
and "fftease32-help" to a Pd-accessible location.
Performance Considerations
The default Pd audio buffer settings for both I/O vector size and signal
vector size will work fine for FFT sizes up to around 4096 or so. For
larger FFT sizes, adjusting the Pd signal vector size and I/O vector
size upward can dramatically improve performance. With larger FFT sizes,
the reported CPU load may fluctuate. This is because a large FFT is
being performed only once for several vectors worth of samples. The
default FFT size is 1024, and the default overlap factor is 8. The
maximum FFT size is 1073741824. Let me know if you find a computer
powerful enough to compute the maximum FFT size in real-time.
For Coders
Full source code is included, so that intrepid coders may extend
FFTease, or even code up a 64-bit version. (Note that current 64-bit
versions of Pd compute all DSP with 32-bit resolution, thus a 64-bit
port does not yet seem advisable.) The FFTease code is distributed under
the MIT license to facilitate deployment to any combination of free,
open-source, commercial, or closed-source projects.
Have fun!
Eric Lyon
ericlyon@vt.edu
Blacksburg, Virginia
July, 2014
\ No newline at end of file
#include "fftease.h"
void fftease_bloscbank( t_float *S, t_float *O, int D, t_float iD, t_float *lf, t_float *la, t_float *index, t_float *tab,
int len, t_float synt, int lo, int hi )
{
int amp,freq,chan, i;
t_float a,ainc,f,finc,address;
for ( chan = lo; chan < hi; chan++ ) {
freq = ( amp = ( chan << 1 ) ) + 1;
if ( S[amp] > synt ){
finc = ( S[freq] - ( f = lf[chan] ) )* iD;
ainc = ( S[amp] - ( a = la[chan] ) )* iD;
address = index[chan];
for ( i = 0; i < D ; i++ ) {
O[i] += a*tab[ (int) address ];
address += f;
while ( address >= len )
address -= len;
while ( address < 0 )
address += len;
a += ainc;
f += finc;
}
lf[chan] = S[freq];
la[chan] = S[amp];
index[chan] = address;
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.