Update of /cvsroot/pure-data/pd/extra/fiddle~ In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21746/fiddle~
Added Files: Tag: devel_0_39 fiddle~.c makefile Log Message: missing extra files
--- NEW FILE: fiddle~.c --- /* Copyright (c) 1997-1999 Miller Puckette and Ted Apel. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* * Fiddle is a pitch tracker hardwired to have hop size ("H") equal to * half its window size ("N"). * * This version should compile for Max "0.26," JMAX, Pd, or Max/MSP. * * The "lastanalysis" field holds the shifted FT of the previous H * samples. The buffer contains in effect points 1/2, 3/2, ..., (N-1)/2 * of the DTFT of a real vector of length N, half of whose points are zero, * i.e., only the first H points are used. Put another way, we get the * the odd-numbered points of the FFT of the H points, zero padded to 4*H in * length. The integer points 0, 1, ..., H-1 * are found by interpolating these others, using the fact that the * half-integer points are band-limited (they only have positive frequencies.) * To facilitate the interpolation the "lastanalysis" buffer contains [...1806 lines suppressed...] imag = ip = real + MAXPOINTS; src = buf; for (i = 0; i < np; i++) { *rp++ = *src++; *ip++ = *src++; } if (inv) ifft(np,real,imag); else fft(np,real,imag); rp = real; ip = imag; src = buf; for (i = 0; i < np; i++) { *src++ = *rp++; *src++ = *ip++; } }
#endif /* MSP */
--- NEW FILE: makefile --- NAME=fiddle~ CSYM=fiddle_tilde
current: pd_linux
# ----------------------- NT -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo VC="C:\Program Files\Microsoft Visual Studio\Vc98"
PDNTINCLUDE = /I. /I....\src /I$(VC)\include
PDNTLDIR = $(VC)\lib PDNTLIB = $(PDNTLDIR)\libc.lib \ $(PDNTLDIR)\oldnames.lib \ $(PDNTLDIR)\kernel32.lib \ ....\bin\pd.lib
.c.dll: cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
# ----------------------- IRIX 5.x -----------------------
pd_irix5: $(NAME).pd_irix5
.SUFFIXES: .pd_irix5
SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
SGIINCLUDE = -I../../src
.c.pd_irix5: $(CC) $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o rm $*.o
# ----------------------- IRIX 6.x -----------------------
pd_irix6: $(NAME).pd_irix6
.SUFFIXES: .pd_irix6
SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \ -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \ -Ofast=ip32
.c.pd_irix6: $(CC) $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o rm $*.o
# ----------------------- LINUX i386 -----------------------
pd_linux: $(NAME).pd_linux
.SUFFIXES: .pd_linux
LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \ -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS)
LINUXINCLUDE = -I../../src
.c.pd_linux: $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o
# ----------------------- Mac OSX -----------------------
pd_darwin: $(NAME).pd_darwin
.SUFFIXES: .pd_darwin
DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch
.c.pd_darwin: $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o rm -f $*.o
# ----------------------------------------------------------
clean: rm -f *.o *.pd_* so_locations