You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(22) |
Aug
(270) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(8) |
Feb
(24) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(3) |
Nov
(1) |
Dec
(14) |
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(31) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(90) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Martin R. <ru...@us...> - 2004-08-01 23:25:42
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21580 Modified Files: FOOMSub.m Log Message: fixed some warnings Index: FOOMSub.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMSub.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMSub.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMSub.m 1 Aug 2004 23:25:34 -0000 1.2 *************** *** 41,94 **** - (BOOL)activate { ! int i; ! _active = NO; ! if (INPUTS == 0) ! { ! return _active; ! } ! for (i = 0; i < INPUTS; i++) ! { ! if ([INPUT(i) _activate] == YES) ! { ! _active = YES; ! } ! } ! return _active; } - (BOOL)compute { ! int i, first = YES; ! id m; ! COMPUTE_PROLOGUE; ! for (i = 0; i < INPUTS; i++) ! { ! m = INPUT(i); ! if ([m compute] == YES) ! { ! if (first == YES) ! { ! [_buffer mov:[m getBuffer]]; ! first = NO; ! } ! else ! { ! [_buffer sub:[m getBuffer]]; ! } ! } } ! COMPUTE_EPILOGUE; } - (int)incrementBuffer { ! return 0; } --- 41,94 ---- - (BOOL)activate { ! int i; ! _active = NO; ! if (INPUTS == 0) ! { ! return _active; ! } ! for (i = 0; i < INPUTS; i++) ! { ! if ([INPUT(i) activate] == YES) ! { ! _active = YES; ! } ! } ! return _active; } - (BOOL)compute { ! int i, first = YES; ! id m; ! COMPUTE_PROLOGUE; ! for (i = 0; i < INPUTS; i++) ! { ! m = INPUT(i); ! if ([m compute] == YES) ! { ! if (first == YES) ! { ! [_buffer mov:[m getBuffer]]; ! first = NO; ! } ! else ! { ! [_buffer sub:[m getBuffer]]; ! } ! } } ! COMPUTE_EPILOGUE; } - (int)incrementBuffer { ! return 0; } |
From: Martin R. <ru...@us...> - 2004-08-01 02:13:10
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1696 Added Files: Makefile.am Log Message: added another missing file --- NEW FILE: Makefile.am --- # foo/libfoo/modules/orthodox/Makefile.am # 2004 rumori # $Id: Makefile.am,v 1.1 2004/08/01 02:13:01 rumori Exp $ noinst_LTLIBRARIES = libfoomorthodox.la NULL = libfoomorthodox_la_SOURCES = \ FOOMAdd.h \ FOOMAdd.m \ FOOMBandlimitedNoise.h \ FOOMBandlimitedNoise.m \ FOOMConstant.h \ FOOMConstant.m \ FOOMConstantBiquad.h \ FOOMConstantBiquad.m \ FOOMConstantTwoPole.h \ FOOMConstantTwoPole.m \ FOOMConstantTwoPoleTwoZero.h \ FOOMConstantTwoPoleTwoZero.m \ FOOMDiff.h \ FOOMDiff.m \ FOOMDirac.h \ FOOMDirac.m \ FOOMDiv.h \ FOOMDiv.m \ FOOMExpon.h \ FOOMExpon.m \ FOOMFiltreVariableEtat.h \ FOOMFiltreVariableEtat.m \ FOOMFof.h \ FOOMFof.m \ FOOMGate.h \ FOOMGate.m \ FOOMInteg.h \ FOOMInteg.m \ FOOMLine.h \ FOOMLine.m \ FOOMLookup.h \ FOOMLookup.m \ FOOMMath.h \ FOOMMath.m \ FOOMMul.h \ FOOMMul.m \ FOOMNeg.h \ FOOMNeg.m \ FOOMNoise.h \ FOOMNoise.m \ FOOMOscillator.h \ FOOMOscillator.m \ FOOMReadBpf.h \ FOOMReadBpf.m \ FOOMReadSnd.h \ FOOMReadSnd.m \ FOOMReadTranspSnd.h \ FOOMReadTranspSnd.m \ FOOMReverb.h \ FOOMReverb.m \ FOOMReverb8.h \ FOOMReverb8.m \ FOOMReverbOutput.h \ FOOMReverbOutput.m \ FOOMSub.h \ FOOMSub.m \ FOOMTransposeBpf.h \ FOOMTransposeBpf.m \ FOOMTransposeSnd.h \ FOOMTransposeSnd.m \ FOOMVariableTwoPole.h \ FOOMVariableTwoPole.m \ $(NULL) if USE_GNUSTEP_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make endif FOO_CFLAGS = @FOO_CFLAGS@ FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ @FOO_GNUSTEP_OBJCFLAGS@ FOO_LDFLAGS = @FOO_LDFLAGS@ @FOO_GNUSTEP_LDFLAGS@ FOO_LIBS = @FOO_LIBS@ libfoomorthodox_la_CFLAGS = $(FOO_CFLAGS) libfoomorthodox_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ $(FND_DEFINE) libfoomorthodox_la_LIBADD = -lm |
From: Martin R. <ru...@us...> - 2004-08-01 02:05:19
|
Update of /cvsroot/foo/foo/libfoo/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv771 Added Files: Makefile.am Log Message: added missing automake file --- NEW FILE: Makefile.am --- # foo/libfoo/modules/Makefile.am # 2004 rumori # $Id: Makefile.am,v 1.1 2004/08/01 02:05:11 rumori Exp $ SUBDIRS = orthodox |
From: Martin R. <ru...@us...> - 2004-07-31 08:10:29
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13680 Modified Files: configure.ac Log Message: minor changes and cleanup to the build system Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure.ac 31 Jul 2004 07:01:21 -0000 1.4 --- configure.ac 31 Jul 2004 08:10:20 -0000 1.5 *************** *** 6,21 **** # $Id$ ! AC_INIT(libfoo, 0.1.0, foo...@li...) ! AC_PREREQ(2.57) AC_CONFIG_AUX_DIR(autotools) AC_CANONICAL_TARGET([]) ! AC_CONFIG_SRCDIR([include/FOOBreakpointFunction.h]) ! ! AM_INIT_AUTOMAKE(foo, 0.1.0) ! AM_CONFIG_HEADER(config.h) ! # SHARED_VERSION_INFO="0:1:0" # Find the compiler --- 6,21 ---- # $Id$ ! AC_INIT(libfoo,0.1.0,foo...@li...) ! AC_PREREQ(2.53) ! AC_CONFIG_SRCDIR([src/FOOObject.m]) AC_CONFIG_AUX_DIR(autotools) AC_CANONICAL_TARGET([]) + AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION) + AM_CONFIG_HEADER(src/config.h) ! SHARED_VERSION_INFO="0:1:0" ! AC_CHECK_PROG(autogen, autogen, yes, no) # Find the compiler *************** *** 26,30 **** AC_PROG_LIBTOOL ! # set objc stuff _AM_DEPENDENCIES([OBJC]) --- 26,30 ---- AC_PROG_LIBTOOL ! # objc workaround due to missing objc support in autoconf _AM_DEPENDENCIES([OBJC]) *************** *** 51,55 **** # check for foundation library to use - # os dependent check case "${target_os}" in --- 51,54 ---- *************** *** 58,67 **** enable_gnustep=no; ;; ! *) enable_gnustep=yes; esac # check for OpenStep compatible foundation ! use_gs_base=no if test ${enable_gnustep} = yes; then # check for gnustep --- 57,72 ---- enable_gnustep=no; ;; ! *linux*) enable_gnustep=yes; + ;; + *) + AC_MSG_WARN([Foo was not ported yet to another platform than linux or darwin!]) esac # check for OpenStep compatible foundation ! use_gnustep_base=no ! FOO_GNUSTEP_OBJCFLAGS="" ! FOO_GNUSTEP_LDFLAGS="" ! if test ${enable_gnustep} = yes; then # check for gnustep *************** *** 78,82 **** # check for base.make in order to obtain compile flags AC_CHECK_FILE([${GNUSTEP_MAKEFILES}/Additional/base.make], ! [use_gs_base=yes], [AC_MSG_ERROR(gnustep-base package not found)]) --- 83,87 ---- # check for base.make in order to obtain compile flags AC_CHECK_FILE([${GNUSTEP_MAKEFILES}/Additional/base.make], ! [use_gnustep_base=yes], [AC_MSG_ERROR(gnustep-base package not found)]) *************** *** 92,95 **** --- 97,103 ---- use_foundation="GNUstep" + FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)" + FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)" + else # set flags for cocoa framework *************** *** 98,102 **** use_foundation="Cocoa" fi ! AM_CONDITIONAL(USE_GS_BASE, test "$use_gs_base" = yes) # check for libsndfile --- 106,110 ---- use_foundation="Cocoa" fi ! AM_CONDITIONAL(USE_GNUSTEP_BASE, test "$use_gnustep_base" = yes) # check for libsndfile *************** *** 122,125 **** --- 130,134 ---- # Export variables + AC_SUBST(SHARED_VERSION_INFO) AC_SUBST(FOO_CFLAGS) AC_SUBST(FOO_OBJCFLAGS) *************** *** 127,130 **** --- 136,141 ---- AC_SUBST(FOO_LIBS) AC_SUBST(GNUSTEP_MAKEFILES) + AC_SUBST(FOO_GNUSTEP_OBJCFLAGS) + AC_SUBST(FOO_GNUSTEP_LDFLAGS) AC_OUTPUT([ |
From: Martin R. <ru...@us...> - 2004-07-31 08:10:29
|
Update of /cvsroot/foo/foo/libfoo/tests/foosine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13680/tests/foosine Modified Files: Makefile.am Log Message: minor changes and cleanup to the build system Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/tests/foosine/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 31 Jul 2004 07:18:48 -0000 1.2 --- Makefile.am 31 Jul 2004 08:10:20 -0000 1.3 *************** *** 12,21 **** $(NULL) ! FOO_CFLAGS = @FOO_CFLAGS@ ! FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ ! FOO_LDFLAGS = @FOO_LDFLAGS@ ! FOO_LIBS = @FOO_LIBS@ ! ! if USE_GS_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make --- 12,16 ---- $(NULL) ! if USE_GNUSTEP_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make *************** *** 23,34 **** endif foosine_CFLAGS = $(FOO_CFLAGS) foosine_OBJCFLAGS = $(FOO_OBJCFLAGS) \ - $(GNUSTEP_HEADERS_FLAGS) \ $(FND_DEFINE) \ - $(AUXILIARY_OBJCFLAGS) \ -I../../modules ! foosine_LDFLAGS = $(FOO_LDFLAGS) \ ! $(GNUSTEP_LIBRARIES_FLAGS) foosine_LDADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ --- 18,31 ---- endif + FOO_CFLAGS = @FOO_CFLAGS@ + FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ @FOO_GNUSTEP_OBJCFLAGS@ + FOO_LDFLAGS = @FOO_LDFLAGS@ @FOO_GNUSTEP_LDFLAGS@ + FOO_LIBS = @FOO_LIBS@ + foosine_CFLAGS = $(FOO_CFLAGS) foosine_OBJCFLAGS = $(FOO_OBJCFLAGS) \ $(FND_DEFINE) \ -I../../modules ! foosine_LDFLAGS = $(FOO_LDFLAGS) foosine_LDADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ |
From: Martin R. <ru...@us...> - 2004-07-31 08:10:29
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13680/src Modified Files: Makefile.am Log Message: minor changes and cleanup to the build system Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 31 Jul 2004 04:09:20 -0000 1.3 --- Makefile.am 31 Jul 2004 08:10:20 -0000 1.4 *************** *** 35,44 **** $(NULL) ! FOO_CFLAGS = @FOO_CFLAGS@ ! FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ ! FOO_LDFLAGS = @FOO_LDFLAGS@ ! FOO_LIBS = @FOO_LIBS@ ! ! if USE_GS_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make --- 35,39 ---- $(NULL) ! if USE_GNUSTEP_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make *************** *** 46,56 **** endif libfoo_la_CFLAGS = $(FOO_CFLAGS) libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ ! $(GNUSTEP_HEADERS_FLAGS) \ ! $(FND_DEFINE) \ ! $(AUXILIARY_OBJCFLAGS) libfoo_la_LDFLAGS = $(FOO_LDFLAGS) \ ! $(GNUSTEP_LIBRARIES_FLAGS) libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ --- 41,54 ---- endif + FOO_CFLAGS = @FOO_CFLAGS@ + FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ @FOO_GNUSTEP_OBJCFLAGS@ + FOO_LDFLAGS = @FOO_LDFLAGS@ @FOO_GNUSTEP_LDFLAGS@ + FOO_LIBS = @FOO_LIBS@ + libfoo_la_CFLAGS = $(FOO_CFLAGS) libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ ! $(FND_DEFINE) libfoo_la_LDFLAGS = $(FOO_LDFLAGS) \ ! -version-info @SHARED_VERSION_INFO@ libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ |
From: Martin R. <ru...@us...> - 2004-07-31 07:25:36
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8034 Modified Files: bootstrap Log Message: disable automake-1.8 detection Index: bootstrap =================================================================== RCS file: /cvsroot/foo/foo/libfoo/bootstrap,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bootstrap 31 Jul 2004 02:16:30 -0000 1.2 --- bootstrap 31 Jul 2004 07:25:27 -0000 1.3 *************** *** 13,19 **** if test -z $1; then amvers="no" ! if automake-1.8 --version >/dev/null 2>&1; then ! amvers="-1.8" ! elif automake-1.7 --version >/dev/null 2>&1; then amvers="-1.7" elif automake-1.6 --version >/dev/null 2>&1; then --- 13,20 ---- if test -z $1; then amvers="no" ! # if automake-1.8 --version >/dev/null 2>&1; then ! # amvers="-1.8" ! # elif automake-1.7 --version >/dev/null 2>&1; then ! if automake-1.7 --version >/dev/null 2>&1; then amvers="-1.7" elif automake-1.6 --version >/dev/null 2>&1; then |
From: Martin R. <ru...@us...> - 2004-07-31 07:18:57
|
Update of /cvsroot/foo/foo/libfoo/tests/foosine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7173/tests/foosine Modified Files: Makefile.am foosine.m Log Message: adopt test to mac os x Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/tests/foosine/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 31 Jul 2004 07:00:10 -0000 1.1 --- Makefile.am 31 Jul 2004 07:18:48 -0000 1.2 *************** *** 31,35 **** foosine_LDFLAGS = $(FOO_LDFLAGS) \ $(GNUSTEP_LIBRARIES_FLAGS) ! foosine_LDADD = $(FND_LIBS) \ -lobjc \ ../../src/libfoo.la --- 31,35 ---- foosine_LDFLAGS = $(FOO_LDFLAGS) \ $(GNUSTEP_LIBRARIES_FLAGS) ! foosine_LDADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ ../../src/libfoo.la Index: foosine.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/tests/foosine/foosine.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** foosine.m 31 Jul 2004 07:00:10 -0000 1.1 --- foosine.m 31 Jul 2004 07:18:48 -0000 1.2 *************** *** 39,42 **** --- 39,43 ---- #endif + #include <stdlib.h> #include <limits.h> #include <string.h> |
From: Martin R. <ru...@us...> - 2004-07-31 07:01:30
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4156 Modified Files: Makefile.am configure.ac Log Message: integrated tests dir with build system Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.ac 31 Jul 2004 04:09:18 -0000 1.3 --- configure.ac 31 Jul 2004 07:01:21 -0000 1.4 *************** *** 136,139 **** --- 136,141 ---- modules/Makefile modules/orthodox/Makefile + tests/Makefile + tests/foosine/Makefile ]) Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 31 Jul 2004 04:09:18 -0000 1.2 --- Makefile.am 31 Jul 2004 07:01:21 -0000 1.3 *************** *** 6,10 **** NULL = ! SUBDIRS = include modules src DIST_SUBDIRS = $(SUBDIRS) autotools m4 --- 6,10 ---- NULL = ! SUBDIRS = include modules src tests DIST_SUBDIRS = $(SUBDIRS) autotools m4 |
From: Martin R. <ru...@us...> - 2004-07-31 07:00:19
|
Update of /cvsroot/foo/foo/libfoo/tests/foosine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3836/foosine Added Files: Makefile.am foosine.m Log Message: add tests directory with foosine test --- NEW FILE: Makefile.am --- # foo/libfoo/tests/foosine/Makefile.am # 2004 rumori # $Id: Makefile.am,v 1.1 2004/07/31 07:00:10 rumori Exp $ NULL = bin_PROGRAMS = foosine foosine_SOURCES = \ foosine.m \ $(NULL) FOO_CFLAGS = @FOO_CFLAGS@ FOO_OBJCFLAGS = @FOO_OBJCFLAGS@ FOO_LDFLAGS = @FOO_LDFLAGS@ FOO_LIBS = @FOO_LIBS@ if USE_GS_BASE include @GNUSTEP_MAKEFILES@/library-combo.make include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make endif foosine_CFLAGS = $(FOO_CFLAGS) foosine_OBJCFLAGS = $(FOO_OBJCFLAGS) \ $(GNUSTEP_HEADERS_FLAGS) \ $(FND_DEFINE) \ $(AUXILIARY_OBJCFLAGS) \ -I../../modules foosine_LDFLAGS = $(FOO_LDFLAGS) \ $(GNUSTEP_LIBRARIES_FLAGS) foosine_LDADD = $(FND_LIBS) \ -lobjc \ ../../src/libfoo.la --- NEW FILE: foosine.m --- /* * foosine.m * * test libfoo by creating a sinewave * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef GNUSTEP_BASE_LIBRARY #include <GSConfig.h> #endif #include <limits.h> #include <string.h> #include <sndfile.h> #import <Foundation/NSAutoreleasePool.h> #include <FOOGlobal.h> #include <FOOContext.h> #include <FOOOutput.h> #include <orthodox/FOOMOscillator.h> #include <orthodox/FOOMConstant.h> #define FOOSINE_BLOCKSIZE 1024 #define FOOSINE_SAMPLERATE 48000 #define FOOSINE_BLOCKS 64 static FOOContext *_context; /* this is a hack to allow for using libfoo without elkfoo * should be better soon... */ id getCurrentContext () { return _context; } // getCurrentContext int main (int argc, char **argv) { FOOOutput *output; FOOMOscillator *osc; FOOMConstant *freq; sample_t *buf; SNDFILE *file; SF_INFO sfinfo; // autorelease pool [[NSAutoreleasePool alloc] init]; // create context _context = [[FOOContext alloc] initWithChans: 1]; [_context setTime: 0]; AUTORELEASE(_context); // create and init modules output = (FOOOutput *)[[FOOOutput alloc] initWithContext: _context]; [output initWithChannel: 1]; osc = [[[FOOMOscillator alloc] init] initializePhase: 0]; freq = [[[FOOMConstant alloc] init] setValue: 440.0f]; // connect modules [osc connectInput: 0 to: freq]; [output connect: osc]; // create soundfile memset (&sfinfo, 0, sizeof(sfinfo)); sfinfo.samplerate = FOOSINE_SAMPLERATE; sfinfo.channels = 1; sfinfo.format = (SF_FORMAT_AIFF | SF_FORMAT_PCM_16); if (! (file = sf_open("foosine.aiff", SFM_WRITE, &sfinfo))) { fprintf(stderr, "error : Not able to open output file.\n"); exit(EXIT_FAILURE); } sf_close(file); // do task's work (this should get into libfoo once) if (! (buf = malloc(FOOSINE_BLOCKSIZE * sizeof(sample_t)))) { fprintf(stderr, "malloc failed. desperating...\n"); exit(EXIT_FAILURE); } [_context setSamplingRate: FOOSINE_SAMPLERATE]; [_context setBufferSize: FOOSINE_BLOCKSIZE]; [_context setSampleTime: 0.]; [_context compile]; [_context openOutput: @"foosine.aiff" addin: NO at: 0.]; [_context run: FOOSINE_BLOCKS * FOOSINE_BLOCKSIZE factor: .5]; [_context closeOutput]; return 0; } // main |
From: Martin R. <ru...@us...> - 2004-07-31 07:00:19
|
Update of /cvsroot/foo/foo/libfoo/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3836 Added Files: Makefile.am Log Message: add tests directory with foosine test --- NEW FILE: Makefile.am --- # foo/libfoo/tests/Makefile.am # 2004 rumori # $Id: Makefile.am,v 1.1 2004/07/31 07:00:10 rumori Exp $ SUBDIRS = foosine |
From: Martin R. <ru...@us...> - 2004-07-31 06:59:27
|
Update of /cvsroot/foo/foo/libfoo/tests/foosine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3680/foosine Log Message: Directory /cvsroot/foo/foo/libfoo/tests/foosine added to the repository |
From: Martin R. <ru...@us...> - 2004-07-31 06:59:16
|
Update of /cvsroot/foo/foo/libfoo/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3651/tests Log Message: Directory /cvsroot/foo/foo/libfoo/tests added to the repository |
From: Martin R. <ru...@us...> - 2004-07-31 04:09:29
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802 Modified Files: AUTHORS ChangeLog Makefile.am README acinclude.m4 configure.ac Log Message: integrated foo orthodox modules with build system Index: acinclude.m4 =================================================================== RCS file: /cvsroot/foo/foo/libfoo/acinclude.m4,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** acinclude.m4 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- acinclude.m4 31 Jul 2004 04:09:18 -0000 1.2 *************** *** 1,5 **** # acinclude.m4 - # 2004 rumori builtin(include,m4/objc.m4) --- 1,6 ---- # acinclude.m4 # 2004 rumori + # $Id$ + builtin(include,m4/objc.m4) Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.ac 31 Jul 2004 02:16:30 -0000 1.2 --- configure.ac 31 Jul 2004 04:09:18 -0000 1.3 *************** *** 4,7 **** --- 4,9 ---- # 2004 martin rumori + # $Id$ + AC_INIT(libfoo, 0.1.0, foo...@li...) *************** *** 60,65 **** esac ! # check for gnustep if test ${enable_gnustep} = yes; then AC_MSG_CHECKING([for GNUstep installation]) --- 62,69 ---- esac ! # check for OpenStep compatible foundation ! use_gs_base=no if test ${enable_gnustep} = yes; then + # check for gnustep AC_MSG_CHECKING([for GNUstep installation]) *************** *** 76,80 **** [use_gs_base=yes], [AC_MSG_ERROR(gnustep-base package not found)]) - AM_CONDITIONAL(USE_GS_BASE, test "$use_gs_base" = yes) # target specific stuff --- 80,83 ---- *************** *** 89,99 **** use_foundation="GNUstep" - else ! # check for cocoa framework ! ! use_foundation="Cocoa" fi # check for libsndfile --- 92,102 ---- use_foundation="GNUstep" else ! # set flags for cocoa framework ! FOO_LIBS="${FOO_LIBS} -framework Cocoa" ! use_foundation="Cocoa" fi + AM_CONDITIONAL(USE_GS_BASE, test "$use_gs_base" = yes) # check for libsndfile *************** *** 131,134 **** --- 134,139 ---- include/Makefile src/Makefile + modules/Makefile + modules/orthodox/Makefile ]) Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 30 Jul 2004 20:10:23 -0000 1.1.1.1 --- Makefile.am 31 Jul 2004 04:09:18 -0000 1.2 *************** *** 1,6 **** NULL = ! SUBDIRS = include src DIST_SUBDIRS = $(SUBDIRS) autotools m4 --- 1,10 ---- + # foo/libfoo/Makefile.am + # 2004 rumori + + # $Id$ NULL = ! SUBDIRS = include modules src DIST_SUBDIRS = $(SUBDIRS) autotools m4 Index: AUTHORS =================================================================== RCS file: /cvsroot/foo/foo/libfoo/AUTHORS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AUTHORS 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- AUTHORS 31 Jul 2004 04:09:14 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + $Id$ + (C) 1993-2004 gerhard eckel, ramon gonzalez-arroyo, ircam, zkm (C) 2003-2004 martin rumori Index: README =================================================================== RCS file: /cvsroot/foo/foo/libfoo/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- README 31 Jul 2004 04:09:18 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + $Id$ + foo sound synthesis readme -------------------------- Index: ChangeLog =================================================================== RCS file: /cvsroot/foo/foo/libfoo/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ChangeLog 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- ChangeLog 31 Jul 2004 04:09:18 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + $Id$ + 2004-07-29 rumori - autotools build system for ng foo |
From: Martin R. <ru...@us...> - 2004-07-31 04:09:28
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802/src Modified Files: Makefile.am Log Message: integrated foo orthodox modules with build system Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 31 Jul 2004 02:16:30 -0000 1.2 --- Makefile.am 31 Jul 2004 04:09:20 -0000 1.3 *************** *** 1,3 **** --- 1,8 ---- + # foo/libfoo/src/Makefile.am + # 2004 rumori + # $Id$ + + lib_LTLIBRARIES = libfoo.la NULL = *************** *** 39,53 **** include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make - # FOO_OBJCFLAGS += $(GNUSTEP_HEADERS_FLAGS) $(FND_DEFINE) $(AUXILIARY_OBJCFLAGS) - # FOO_LDFLAGS += $(GNUSTEP_LIBRARIES_FLAGS) - # FOO_LIBS += $(FND_LIBS) endif ! lib_LTLIBRARIES = libfoo.la ! libfoo_la_CFLAGS = $(FOO_CFLAGS) libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ $(GNUSTEP_HEADERS_FLAGS) \ $(FND_DEFINE) \ $(AUXILIARY_OBJCFLAGS) ! libfoo_la_LDFLAGS = $(FOO_LDFLAGS) $(GNUSTEP_LIBRARIES_FLAGS) ! libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) --- 44,57 ---- include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make endif ! libfoo_la_CFLAGS = $(FOO_CFLAGS) libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ $(GNUSTEP_HEADERS_FLAGS) \ $(FND_DEFINE) \ $(AUXILIARY_OBJCFLAGS) ! libfoo_la_LDFLAGS = $(FOO_LDFLAGS) \ ! $(GNUSTEP_LIBRARIES_FLAGS) ! libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) \ ! -lobjc \ ! ../modules/orthodox/libfoomorthodox.la |
From: Martin R. <ru...@us...> - 2004-07-31 04:09:28
|
Update of /cvsroot/foo/foo/libfoo/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802/include Modified Files: FOOObject.h Makefile.am Log Message: integrated foo orthodox modules with build system Index: FOOObject.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/include/FOOObject.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** FOOObject.h 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- FOOObject.h 31 Jul 2004 04:09:19 -0000 1.2 *************** *** 63,66 **** --- 63,72 ---- /* end: memory management macros for mac os x */ + /* more tedious stuff for mac os x */ + #ifndef NULL + #define NULL (0) /* haha */ + #endif + /* end: more tedious stuff for mac os x */ + @interface FOOObject : NSObject Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/include/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- Makefile.am 31 Jul 2004 04:09:19 -0000 1.2 *************** *** 1,2 **** --- 1,7 ---- + # foo/libfoo/include/Makefile.am + # 2004 rumori + + # $Id$ + NULL = |
From: Martin R. <ru...@us...> - 2004-07-31 04:09:28
|
Update of /cvsroot/foo/foo/libfoo/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802/m4 Modified Files: Makefile.am Log Message: integrated foo orthodox modules with build system Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/m4/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- Makefile.am 31 Jul 2004 04:09:19 -0000 1.2 *************** *** 0 **** --- 1,4 ---- + # foo/libfoo/m4/Makefile.am + # 2004 rumori + + # $Id$ |
From: Martin R. <ru...@us...> - 2004-07-31 04:09:28
|
Update of /cvsroot/foo/foo/libfoo/autotools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802/autotools Modified Files: Makefile.am Log Message: integrated foo orthodox modules with build system Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/autotools/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- Makefile.am 31 Jul 2004 04:09:19 -0000 1.2 *************** *** 0 **** --- 1,4 ---- + # foo/libfoo/autotools/Makefile.am + # 2004 rumori + + # $Id$ |
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12338 Added Files: FOOMAdd.h FOOMAdd.m FOOMBandlimitedNoise.h FOOMBandlimitedNoise.m FOOMConstant.h FOOMConstant.m FOOMConstantBiquad.h FOOMConstantBiquad.m FOOMConstantTwoPole.h FOOMConstantTwoPole.m FOOMConstantTwoPoleTwoZero.h FOOMConstantTwoPoleTwoZero.m FOOMDiff.h FOOMDiff.m FOOMDirac.h FOOMDirac.m FOOMDiv.h FOOMDiv.m FOOMExpon.h FOOMExpon.m FOOMFiltreVariableEtat.h FOOMFiltreVariableEtat.m FOOMFof.h FOOMFof.m FOOMGate.h FOOMGate.m FOOMInteg.h FOOMInteg.m FOOMLine.h FOOMLine.m FOOMLookup.h FOOMLookup.m FOOMMath.h FOOMMath.m FOOMMul.h FOOMMul.m FOOMNeg.h FOOMNeg.m FOOMNoise.h FOOMNoise.m FOOMOscillator.h FOOMOscillator.m FOOMReadBpf.h FOOMReadBpf.m FOOMReadSnd.h FOOMReadSnd.m FOOMReadTranspSnd.h FOOMReadTranspSnd.m FOOMReverb.h FOOMReverb.m FOOMReverb8.h FOOMReverb8.m FOOMReverbOutput.h FOOMReverbOutput.m FOOMSub.h FOOMSub.m FOOMTransposeBpf.h FOOMTransposeBpf.m FOOMTransposeSnd.h FOOMTransposeSnd.m FOOMVariableTwoPole.h FOOMVariableTwoPole.m Log Message: initial checkin --- NEW FILE: FOOMLookup.h --- /* -*-Mode:objc-*- */ /* * FOOMLookup.h * * module lookup * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMLookup.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMLOOKUP_H_INCLUDED #define FOOM_FOOMLOOKUP_H_INCLUDED #include "FOOEagerModule.h" #include "FOOSubstrate.h" #include "FOOLookupTable.h" @interface FOOMLookup : FOOEagerModule { /* Substrate *substrate; // statically typed */ id _substrate; sample_t *_samples; int _offset; int _count; int _taps; FOOLookupTable *_table; } - initializeWithSubstrate: (FOOSubstrate *)substr taps: (int)n; @end #endif /* #ifndef FOOM_FOOMLOOKUP_H_INCLUDED */ --- NEW FILE: FOOMLookup.m --- /* -*-Mode:objc-*- */ /* * FOOMLookup.m * * module lookup * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMLookup.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMLookup.h" #include "FOOSoundFile.h" #include "FOOSoundStream.h" #include "FOORegion.h" #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size @implementation FOOMLookup - initializeWithSubstrate: (FOOSubstrate *)substr taps: (int)n { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && [substr isKindOfClass: [FOOSoundStream class]] == NO && [substr isKindOfClass: [FOORegion class]] == NO) { FOO_ERROR(YES, self); } _substrate = substr; _taps = n; _count = SAMPLE_BUFFER_SIZE; _offset = -_count; _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [FOOGlobalsManager getSineXoverXTable: _taps]; return self; } - (void) dealloc { NSZoneFree([self zone], _samples); [super dealloc]; } - reset { [super reset]; bzero(_samples, _count * sizeof(sample_t)); _offset = -_count; return self; } - (BOOL) activate { if ([_inputs count] == 0) { return (_active = NO); } _active = [[_inputs objectAtIndex: 0] activate]; return _active; } - (BOOL) compute { id m; sample_t *sb, *in, *out, *base, *delta; double sr, pos, sdelta; int n, tinc, size, ipos, cot, tot; COMPUTE_PROLOGUE; m = [_inputs objectAtIndex: 0]; [m compute]; n = BLOCKSIZE; sr = SAMPLERATE; sb = _samples; in = [[m getBuffer] data]; out = [_buffer data]; tot = _taps / 2; cot = _count / 2; size = [_substrate size]; base = [_table getBase]; delta = [_table getDelta]; tinc = [_table getSize] / tot; while (n--) { pos = *in++ * sr; ipos = (int) pos; sdelta = pos - ipos; if (ipos >= size || ipos < 0) { // not completely correct *out++ = 0; continue; } if (ipos >= _offset + _count || ipos < _offset) { _offset = ipos - cot; ipos = cot; [_substrate getSamples: sb offset: _offset size: _count]; } else { ipos -= _offset; if (ipos > (_count - tot)) { int f = ipos - cot + 1; int r = _count - f; bcopy(sb + f, sb, r * sizeof(sample_t)); _offset += f; ipos = cot - 1; [_substrate getSamples: sb + r offset: _offset + r size: f]; } else if (ipos < tot) { bcopy(sb + ipos, sb + cot, cot * sizeof(sample_t)); _offset -= cot - ipos; ipos = cot; [_substrate getSamples: sb offset: _offset size: cot]; } } { sample_t *s = sb + ipos; double fti = sdelta * tinc; // has to be double ! int ti1 = (int) fti, ti2 = tinc - ti1 - 1, si; double tdelta = fti - ti1, sum = 0; // idem for (si = 0; si > -tot; si--, ti1 += tinc) { sum += s[si] * (base[ti1] + delta[ti1] * tdelta); } tdelta = 1 - tdelta; for (si = 1; si < tot; si++, ti2 += tinc) { sum += s[si] * (base[ti2] + delta[ti2] * tdelta); } *out++ = sum; } } COMPUTE_EPILOGUE; } /* * archiving methods */ // - awake // { // [super awake]; // samples = NSZoneCalloc([self zone], count, sizeof(sample_t)); // table = [GlobalsManager getSineXoverXTable:taps]; // return self; // } // - read:(TypedStream *)stream // { // [super read:stream]; // objc_read_types(stream, "@iii", &substrate, &offset, &count, &taps); // return self; // } // - write:(TypedStream *)stream // { // [super write:stream]; // objc_write_types(stream, "@iii", &substrate, &offset, &count, &taps); // return self; // } @end --- NEW FILE: FOOMConstant.h --- /* -*-Mode:objc-*- */ /* * FOOMConstant.h * * module constant * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMConstant.h,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #ifndef FOOM_FOOMCONSTANT_H_INCLUDED #define FOOM_FOOMCONSTANT_H_INCLUDED #include "FOOModule.h" @interface FOOMConstant : FOOModule { sample_t _value; } - setValue: (sample_t)aValue; - (sample_t) getValue; @end #endif /* #ifndef FOOM_FOOMCONSTANT_H_INCLUDED */ --- NEW FILE: FOOMInteg.h --- /* -*-Mode:objc-*- */ /* * FOOMInteg.h * * module integ * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMInteg.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMINTEG_H_INCLUDED #define FOOM_FOOMINTEG_H_INCLUDED #include "FOOModule.h" @interface FOOMInteg : FOOModule { double _last; } @end #endif /* #ifndef FOOM_FOOMINTEG_H_INCLUDED */ --- NEW FILE: FOOMDiv.m --- /* -*-Mode:objc-*- */ /* * FOOMDiv.m * * module div * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMDiv.m,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #include "FOOMDiv.h" @implementation FOOMDiv - (BOOL) activate { int i; if (INPUTS == 0) { return (_active = NO); } for (i = 0; i < INPUTS; i++) { if ([INPUT(i) activate] == NO) { return (_active = NO); } } return (_active = YES); } - (BOOL) compute { int i; id m; COMPUTE_PROLOGUE; m = INPUT(0); [m compute]; [_buffer mov: [m getBuffer]]; for (i = 1; i < [_inputs count]; i++) { m = INPUT(i); [m compute]; [_buffer div:[m getBuffer]]; } COMPUTE_EPILOGUE; } - (int)incrementBuffer { return 0; } @end --- NEW FILE: FOOMReadTranspSnd.h --- /* -*-Mode:objc-*- */ /* * FOOMReadTranspSnd.h * * module readtranspsnd * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReadTranspSnd.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMREADTRANSPSND_H_INCLUDED #define FOOM_FOOMREADTRANSPSND_H_INCLUDED #include "FOOEagerModule.h" #include "FOOSoundStream.h" #include "FOOSoundFile.h" #include "FOORegion.h" #include "FOOLookupTable.h" @interface FOOMReadTranspSnd : FOOEagerModule { id _substrate; /* input */ /* Substrate *substrate; /\* input *\/ */ sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ int _count; /* size of cache */ int _endCache; /* end of cache */ int _taps; /* # of zero-crossings in sinc used for resampling */ FOOLookupTable *_table; /* sinc */ int _begin; /* begin time */ int _end; /* end time */ double _position; /* sample position in input */ double _beginT; /* begin time in seconds */ double _factor; /* transposition factor */ } - initializeWith: substr; - initializeTaps: (int)n; - initPos; - (BOOL)computeRead; - (BOOL)computeTransp; @end #endif /* #ifndef FOOM_FOOMREADTRANSPSND_H_INCLUDED */ --- NEW FILE: FOOMTransposeSnd.m --- /* -*-Mode:objc-*- */ /* * FOOMTransposeSnd.m * * module transpose sound * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMTransposeSnd.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMTransposeSnd.h" #define ROLL_OFF_FREQU 0.9 #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size @implementation FOOMTransposeSnd - initializeWith: substr taps: (int) n { if ([substr isKindOf: [FOOSoundFile class]] == NO && [substr isKindOf: [FOOSoundStream class]] == NO && [substr isKindOf: [FOORegion class]] == NO) { FOO_ERROR(YES, self); } _substrate = substr; _beginT = TIMEFRAME; _taps = n; _count = SAMPLE_BUFFER_SIZE; if (_taps >= _count) { FOO_ERROR(YES, self); } _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [FOOGlobalsManager getSineXoverXTable:_taps]; [self initPos]; return self; } - initPos { _position = 0; _offset = -_count; _end = _offset + _count; return self; } - (void) dealloc { if (_samples != NULL) { NSZoneFree([self zone], _samples); } [super dealloc]; } - reset { [super reset]; bzero(_samples, _count * sizeof(sample_t)); [self initPos]; return self; } - startUp { [super startUp]; _begin = SEC_TO_SAM(_beginT); _factor = [_substrate getSamplingRate] / SAMPLERATE; return self; } - (BOOL)activate { if (INPUTS == 0 || _begin >= BLOCKEND || _position - _taps > [_substrate size]) { return (_active = NO); } _active = [INPUT(0) activate]; return _active; } - (BOOL)compute { id m; int b, n, tinc, tot; double p; sample_t *in, *out, *base, *delta; int maxtot = _count / 2; COMPUTE_PROLOGUE; m = [_inputs objectAt:0]; // m = [_inputs objectAtIndex:0]; [m compute]; n = BLOCKSIZE; in = [[m getBuffer] data]; out = [_buffer data]; tot = _taps / 2; if (tot > maxtot) { FOO_ERROR(NO, YES); tot = maxtot; } tinc = [_table getSize] / tot; base = [_table getBase]; delta = [_table getDelta]; if (_begin > SAMPLETIME) { b = _begin - SAMPLETIME; bzero(out, b * sizeof(sample_t)); in += b; out += b; n -= b; } while (n--) { p = *in++ * _factor; if (p < 0) { p = -p; } if (p > 1) { /* down sampling */ sample_t *s; double lp = p / ROLL_OFF_FREQU; double P = (_position - ((int)_position)) / lp; double ptinc = tinc / lp; double fti, sum = 0; int ti, si, ptot = tot * lp; if (ptot > maxtot) { FOO_ERROR(NO, YES); ptot = maxtot; } if (_end <= _position + ptot) { _offset = _position - ptot + 1; _end = _offset + _count; [_substrate getSamples:_samples offset:_offset size:_count]; } s = _samples + ((int)_position - _offset); for (fti = P * tinc, si = 0; si < ptot; si++, fti += ptinc) { ti = (int)fti; sum += s[-si] * (base[ti] + delta[ti] * (fti - ti)); } P = 1. / lp - P; for (fti = P * tinc, si = 1; si < ptot; si++, fti += ptinc) { ti = (int)fti; sum += s[si] * (base[ti] + delta[ti] * (fti - ti)); } *out++ = sum / lp; } else { /* over sampling */ sample_t *s; double P = _position - ((int)_position); double fti = P * tinc; int ti1 = (int) fti, ti2 = tinc - ti1 - 1, si; double tdelta = fti - ti1, sum = 0; if (_end < _position + tot) { _offset =_position - tot + 1; _end = _offset + _count; [_substrate getSamples:_samples offset:_offset size:_count]; } s = _samples + ((int)_position - _offset); for (si = 0; si > -tot; si--, ti1 += tinc) { sum += s[si] * (base[ti1] + delta[ti1] * tdelta); } tdelta = 1 - tdelta; for (si = 1; si < tot; si++, ti2 += tinc) { sum += s[si] * (base[ti2] + delta[ti2] * tdelta); } *out++ = sum; } _position += p; } COMPUTE_EPILOGUE; } - (int)getTimeInterval: (double*)b : (double*)e { *b = _beginT; return (TI_BEG); } /* * archiving methods */ #if 0 // to be done - awake { [super awake]; _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [GlobalsManager getSineXoverXTable:_taps]; [self initPos]; return self; } - read:(TypedStream *)stream { [super read:stream]; objc_read_types(stream, "@[8c]ii", &_substrate, &_beginT, &_count, &_taps); return self; } - write:(TypedStream *)stream { [super write:stream]; objc_write_types(stream, "@[8c]ii", &_substrate, &_beginT, &_count, &_taps); return self; } #endif @end --- NEW FILE: FOOMReverb.h --- /* -*-Mode:objc-*- */ /* * FOOMReverb.h * * module reverb * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReverb.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMREVERB_H_INCLUDED #define FOOM_FOOMREVERB_H_INCLUDED #include "FOOEagerModule.h" #include <Foundation/NSArray.h> #include <math.h> typedef struct _delay { float *begin; float *end; float *read; float *write; } delay_t; typedef struct _filter { double c0; double c1; double d0; double z_1; } filter_t; @interface FOOMReverb : FOOEagerModule { NSMutableArray *_buffers; // statically typed NSMutableArray *_outputs; // statically typed delay_t **_delays; filter_t **_filters; int _channels; double _tr0; double _damp; int _tail; float _delvec[16]; float *_times; } - initializeChannels: (int)n tr0: (double)t damp: (double)d delays: (float*)l; - getBuffer: (int)count; - (int) channels; @end #endif /* #ifndef FOOM_FOOMREVERB_H_INCLUDED */ --- NEW FILE: FOOMReadTranspSnd.m --- /* -*-Mode:objc-*- */ /* * FOOMReadTranspSnd.m * * module reverb * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReadTranspSnd.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMReadTranspSnd.h" // defined in <GNUstepBase/preface.h> #ifndef ABS #define ABS(x) ((x) > 0 ? (x) : (-x)) #endif #define ROLL_OFF_FREQU 0.9 #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size @implementation FOOMReadTranspSnd - init { [super init]; _samples = NULL; return self; } - initializeWith: substr { if ([substr isKindOf:[FOOSoundFile class]] == NO && [substr isKindOf:[FOOSoundStream class]] == NO && [substr isKindOf:[FOORegion class]] == NO) { FOO_ERROR(YES, self); } _substrate = substr; _beginT = TIMEFRAME; _taps = 0; [self initPos]; return self; } - initializeTaps: (int)n { _taps = n; _count = SAMPLE_BUFFER_SIZE; if (_taps < 4 || _taps >= _count) { FOO_ERROR(YES, self); } if (_samples != NULL) { NSZoneFree([self zone], _samples); } _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [FOOGlobalsManager getSineXoverXTable:_taps]; [self initPos]; return self; } - initializeWith:substr taps: (int)n { [self initializeWith:substr]; [self initializeTaps:n]; return self; } - (void) deallooc { if (_samples != NULL) { NSZoneFree([self zone], _samples); } return [super dealloc]; } - initPos { _position = 0; if (_taps != 0) { _offset = -_count; _endCache = _offset + _count; } return self; } - reset { [super reset]; [self initPos]; return self; } - startUp { [super startUp]; _begin = SEC_TO_SAM(_beginT); _end = _begin + [_substrate size]; if ([_substrate getSamplingRate] != SAMPLERATE) { _factor = [_substrate getSamplingRate] / SAMPLERATE; [self initializeTaps:[FOOGlobalsManager getDefaultTaps]]; } else { _factor = 1; } return self; } - (BOOL)activate { if (_taps == 0) { if (_begin >= BLOCKEND || _end < SAMPLETIME) _active = NO; else _active = YES; } else { if (_begin >= BLOCKEND || _position - _taps >= [_substrate size]) { _active = NO; } else { _active = YES; } } return _active; } - (BOOL)compute { if (_taps == 0) { return [self computeRead]; } else { return [self computeTransp]; } } - (BOOL)computeRead { sample_t *p; int b, e, s; COMPUTE_PROLOGUE; p = DATA_OF_BUF(_buffer); if (_begin > SAMPLETIME) { b = _begin - SAMPLETIME; bzero(p, b * sizeof(sample_t)); } else { b = 0; } if (_end < BLOCKEND) { e = BLOCKSIZE - (BLOCKEND - _end); bzero(p + e, (BLOCKSIZE - e) * sizeof(sample_t)); } else { e = BLOCKSIZE; } s = e - b; if ([_substrate getSamples:p + b offset:_position size:s] == NO) { FOO_ERROR(NO, _active); } _position += s; COMPUTE_EPILOGUE; } - (BOOL)computeTransp { int n, b, tinc, tot; double p; sample_t *out, *base, *delta; int maxtot = _count / 2; COMPUTE_PROLOGUE; n = BLOCKSIZE; out = [_buffer data]; tot = _taps / 2; if (tot > maxtot) { FOO_ERROR(NO, YES); tot = maxtot; } tinc = [_table getSize] / tot; base = [_table getBase]; delta = [_table getDelta]; if (_begin > SAMPLETIME) { b = _begin - SAMPLETIME; bzero(out, b * sizeof(sample_t)); out += b; n -= b; } p = _factor; if (p < 0) { p = -p; } while (n--) { if (p > 1) { /* down sampling */ sample_t *s; double lp = p / ROLL_OFF_FREQU; double P = (_position - ((int)_position)) / lp; double ptinc = tinc / lp; double fti, sum = 0; int ti, si, ptot = tot * lp; if (ptot > maxtot) { FOO_ERROR(NO, YES); ptot = maxtot; } if (_endCache <= _position + ptot) { _offset = _position - ptot + 1; _endCache = _offset + _count; [_substrate getSamples:_samples offset:_offset size:_count]; } s = _samples + ((int)_position - _offset); for (fti = P * tinc, si = 0; si < ptot; si++, fti += ptinc) { ti = (int) fti; sum += s[-si] * (base[ti] + delta[ti] * (fti - ti)); } P = 1. / lp - P; for (fti = P * tinc, si = 1; si < ptot; si++, fti += ptinc) { ti = (int) fti; sum += s[si] * (base[ti] + delta[ti] * (fti - ti)); } *out++ = sum / lp; } else { /* over sampling */ sample_t *s; double P = _position - ((int)_position); double fti = P * tinc; int ti1 = (int) fti, ti2 = tinc - ti1 - 1, si; double tdelta = fti - ti1, sum = 0; if (_endCache < _position + tot) { _offset = _position - tot + 1; _endCache = _offset + _count; [_substrate getSamples:_samples offset:_offset size:_count]; } s = _samples + ((int)_position - _offset); for (si = 0; si > -tot; si--, ti1 += tinc) { sum += s[si] * (base[ti1] + delta[ti1] * tdelta); } tdelta = 1 - tdelta; for (si = 1; si < tot; si++, ti2 += tinc) { sum += s[si] * (base[ti2] + delta[ti2] * tdelta); } *out++ = sum; } _position += p; } COMPUTE_EPILOGUE; } - (int)getTimeInterval:(double*)b :(double*)e { *b = _beginT; *e = _beginT + [_substrate size] / [_substrate getSamplingRate]; return (TI_BEG_END); } /* * archiving methods */ #if 0 // to be done - awake { [super awake]; _samples = NULL; return self; } - read:(TypedStream *)stream { [super read:stream]; objc_read_types(stream, "@[8c]", &_substrate, &_beginT); return self; } - write:(TypedStream *)stream { [super write:stream]; objc_write_types(stream, "@[8c]", &_substrate, &_beginT); return self; } #endif @end --- NEW FILE: FOOMDiv.h --- /* -*-Mode:objc-*- */ /* * FOOMDiv.h * * module dic * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMDiv.h,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #ifndef FOOM_FOOMDIV_H_INCLUDED #define FOOM_FOOMDIV_H_INCLUDED #include "FOOModule.h" @interface FOOMDiv : FOOModule { } @end #endif /* #ifndef FOOM_FOOMDIV_H_INCLUDED */ --- NEW FILE: FOOMTransposeSnd.h --- /* -*-Mode:objc-*- */ /* * FOOMTransposeSnd.h * * module transp-snd * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMTransposeSnd.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMTRANSPOSESND_H_INCLUDED #define FOOM_FOOMTRANSPOSESND_H_INCLUDED #include "FOOEagerModule.h" #include "FOOSoundStream.h" #include "FOOSoundFile.h" #include "FOORegion.h" #include "FOOLookupTable.h" #include "FOOMMath.h" @interface FOOMTransposeSnd : FOOEagerModule { /* Substrate *substrate; /\* input *\/ */ id _substrate; sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ int _count; /* size of cache */ int _end; /* end of cache */ int _taps; /* # of zero-crossings in sinc used for resampling */ FOOLookupTable *_table; /* sinc */ int _begin; /* begin time */ double _position; /* sample position in input */ double _beginT; /* begin time in seconds */ double _factor; /* sampling rate correction */ } - initializeWith: substr taps: (int)n; - initPos; @end #endif /* #ifndef FOOM_FOOMTRANSPOSESND_H_INCLUDED */ --- NEW FILE: FOOMReverb.m --- /* -*-Mode:objc-*- */ /* * FOOMReverb.m * * module reverb * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReverb.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ //#include <stdlib.h> /* needed ? [GE] */ #include "FOOMReverb.h" /************************** begin reverb code in C ***************************/ #define fcopy(s, d, c) bcopy(s, d, (c) * sizeof(float)) /* * default delay times */ static float delay_times_8[] = { .05113, .05371, .05741, .06017, .06654, .07267, .07591, .08107 }; static float delay_times_12[] = { .05113, .05371, .05741, .06017, .06654, .07267, .07591, .08107, .08465, .09215, .09789, .10511 }; static float delay_times_16[] = { .04113, .04371, .04741, .05017, .05654, .06267, .06591, .06807, .07167, .07301, .07789, .08011, .08222, .08501, .08777, .08777 }; /* * _filters */ static filter_t* make_filter(double len, double tr0, double damp) { filter_t *new; if ((new = (filter_t*)malloc(sizeof(filter_t))) == NULL) { return NULL; } if (tr0 == -1) { new->c0 = 1; damp = 1; } else { new->c0 = pow(10., -3 * len / tr0); } new->d0 = 2. / (1 + pow(new->c0, 1 - 1 / damp)); new->c1 = 1 - new->d0; new->z_1 = 0; return new; } static filter_t** make_filters(int n, double tr0, double damp, float *delays) { filter_t **new; int i; if ((new = (filter_t**)malloc(n * sizeof(filter_t*))) == NULL) { return NULL; } if (delays == NULL) { switch (n) { case 8: delays = delay_times_8; break; case 12: delays = delay_times_12; break; case 16: delays = delay_times_16; break; default: return NULL; } for (i = 0; i < n; i++) { new[i] = make_filter(delays[i], tr0, damp); } } return new; } static void free_filters(filter_t **filters, int n) { int i; for (i = 0; i < n; i++) { free(filters[i]); } free(filters); } /* * delays */ static delay_t* make_delay(int len, int bufsiz) { delay_t *new; float *p; int i; if (len < bufsiz) { len = bufsiz; } if ((new = (delay_t*)malloc(sizeof(delay_t)+sizeof(float)*len)) == NULL) { return NULL; } new->begin = (float*) (new + 1); new->end = new->begin + len; new->read = new->begin; new->write = new->end - bufsiz; for (i = 0, p = new->begin; i < len - bufsiz; i++) { *p++ = 0; } return new; } static delay_t** makedelays(int n, int bufsiz, double sr, float* delays) { delay_t **new; int i, len; if ((new = (delay_t**)malloc(n * sizeof(delay_t*))) == NULL) { return NULL; } if (delays == NULL) { switch (n) { case 8: delays = delay_times_8; break; case 12: delays = delay_times_12; break; case 16: delays = delay_times_16; break; default: return NULL; } } for (i = 0; i < n; i++) { len = rint(delays[i] * sr); new[i] = make_delay(len, bufsiz); } return new; } static void freedelays(delay_t **delays, int n) { int i; for (i = 0; i < n; i++) { free(delays[i]); } free(delays); } /* * delay write */ static void delwrite(int j, delay_t** d, float** s, int l) { int i, n, m; delay_t *delay; float *data; for (i = 0; i < j; i++) { delay = d[i]; data = s[i]; if (delay->write + l <= delay->end) { fcopy(data, delay->write, l); delay->write += l; } else { n = delay->end - delay->write; m = l - n; fcopy(data, delay->write, n); fcopy(data + n, delay->begin, m); delay->write = delay->begin + m; } if (delay->write >= delay->end) { delay->write = delay->begin; } } } /* * delay read and filter */ static void ab1delay(int n, delay_t** d, filter_t** f, float** s, int l, double x) { int i, j; double z_1, c0, c1, d0; delay_t *delay; filter_t *filter; float *data, *p, *e; for (i = 0; i < n; i++) { delay = d[i]; filter = f[i]; data = s[i]; z_1 = filter->z_1; c0 = filter->c0; c1 = filter->c1; d0 = filter->d0; p = delay->read; e = delay->end; for (j = 0; j < l; j++) { z_1 = c0 * *p++ + c1 * z_1; *data++ = d0 * z_1 * x; if (p >= e) { p = delay->begin; } } delay->read = p; filter->z_1 = z_1; } } /* * matrices */ static void hada8(float **d, int n) { float *x0 = d[0], *x1 = d[1], *x2 = d[2], *x3 = d[3]; float *x4 = d[4], *x5 = d[5], *x6 = d[6], *x7 = d[7]; register float t0, t1, t2, t3, t4, t5; register float t6, t7, t8, t9, ta, tb; while (n--) { t4 = *x0 + *x1; t5 = *x0 - *x1; t6 = *x2 + *x3; t7 = *x2 - *x3; t0 = t4 + t6; t1 = t5 + t7; t2 = t4 - t6; t3 = t5 - t7; t4 = *x4 + *x5; t5 = *x4 - *x5; t6 = *x6 + *x7; t7 = *x6 - *x7; t8 = t4 + t6; t9 = t5 + t7; ta = t4 - t6; tb = t5 - t7; *x0++ = t0 + t8; *x1++ = t1 + t9; *x2++ = t2 + ta; *x3++ = t3 + tb; *x4++ = t0 - t8; *x5++ = t1 - t9; *x6++ = t2 - ta; *x7++ = t3 - tb; } } static void feedback3(float **x, int n) { float *x0 = x[0], *x1 = x[1], *x2 = x[2]; float t; while (n--) { t = (*x0 + *x1 + *x2) * -2/3.; *x0++ += t; *x1++ += t; *x2++ += t; } } #define f4(x, i0, i1, i2, i3, o0, o1, o2, o3) \ x = (*i0 + *i1 + *i2 + *i3) * -.5; \ o0 = *i0++ + x; \ o1 = *i1++ + x; \ o2 = *i2++ + x; \ o3 = *i3++ + x; static void feedback4(float **x, int n) { float *x0 = x[11], *x1 = x[2], *x2 = x[5]; float *x3 = x[8], *x4 = x[9], *x5 = x[0]; float *x6 = x[3], *x7 = x[6], *x8 = x[10]; float *x9 = x[1], *xa = x[4], *xb = x[7]; float *y0 = x[0], *y1 = x[1], *y2 = x[2]; float *y3 = x[3], *y4 = x[4], *y5 = x[5]; float *y6 = x[6], *y7 = x[7], *y8 = x[8]; float *y9 = x[9], *ya = x[10], *yb = x[11]; float t, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, ta, tb; while (n--) { f4(t, x0, x1, x2, x3, t0, t1, t2, t3); f4(t, x4, x5, x6, x7, t4, t5, t6, t7); f4(t, x8, x9, xa, xb, t8, t9, ta, tb); *y0++ = t0; *y1++ = t1; *y2++ = t2; *y3++ = t3; *y4++ = t4; *y5++ = t5; *y6++ = t6; *y7++ = t7; *y8++ = t8; *y9++ = t9; *ya++ = ta; *yb++ = tb; } } static void feedback12(float **x, int n) { feedback3(x, n); feedback3(x + 3, n); feedback3(x + 6, n); feedback3(x + 9, n); feedback4(x, n); } static void hada16(float **d, int n) { hada8(d, n); hada8(d + 8, n); { float *x0 = d[0], *x1 = d[1], *x2 = d[2], *x3 = d[3]; float *x4 = d[4], *x5 = d[5], *x6 = d[6], *x7 = d[7]; float *x8 = d[8], *x9 = d[9], *x10 = d[10], *x11 = d[11]; float *x12 = d[12], *x13 = d[13], *x14 = d[14], *x15 = d[15]; float t; while (n--) { t = *x8; *x8++ = *x0 - t; *x0++ += t; t = *x9; *x9++ = *x1 - t; *x1++ += t; t = *x10; *x10++ = *x2 - t; *x2++ += t; t = *x11; *x11++ = *x3 - t; *x3++ += t; t = *x12; *x12++ = *x4 - t; *x4++ += t; t = *x13; *x13++ = *x5 - t; *x5++ += t; t = *x14; *x14++ = *x6 - t; *x6++ += t; t = *x15; *x15++ = *x7 - t; *x7++ += t; } } } /*************************** end reverb code in C ****************************/ #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz @implementation FOOMReverb - initializeChannels: (int)n tr0: (double)t damp: (double)d delays: (float*)l { int i; if (n != 8 && n != 12 && n != 16) { FOO_ERROR(YES, self); } _channels = n; _tr0 = t; _damp = d; _delays = NULL; if (l != NULL) { for (i = 0; i < _channels; i++) { _delvec[i]= l[i]; } _times = _delvec; } else { _times = NULL; } _filters = make_filters(_channels, _tr0, _damp, _times); return self; } - reset { [super reset]; if (_buffers != nil) { RELEASE(_buffers); _buffers = nil; } // reset delays and _filters here return self; } - (void) dealloc { if (_buffers != nil) { RELEASE(_buffers); _buffers = nil; } if (_outputs != nil) { RELEASE(_outputs); _outputs = nil; } if (_delays != NULL) { freedelays(_delays, _channels); } if (_filters != NULL) { free_filters(_filters, _channels); } [super dealloc]; } - assignBuffers: (int)currBuffer { int i; id m; [super assignBuffers:currBuffer]; if (_buffers == nil) { _buffers = [[NSMutableArray allocWithZone:[self zone]] init]; _outputs = [[NSMutableArray allocWithZone:[self zone]] init]; for (i = 0; i < _channels; i++) { [_buffers addObject: [_context nextSharedBuffer]]; [_outputs addObject: [_context nextSharedBuffer]]; } } return self; } - (BOOL)activate { int i; _active = NO; if ([_inputs count] == 0) { return _active; } #if 0 for (i = 0; i < [inputs count]; i++) { if ([[inputs objectAt:i] activate] == YES) { // if ([[inputs objectAtIndex:i] activate] == YES) { _tail = INFINITE_TAIL; return (_active = YES); } } if (_tail > 0) { if (_tail == INFINITE_TAIL) _tail = INFINITE_TAIL; // calculate tail here, now infinite ! else _tail -= BLOCKSIZE; _active = YES; } else { _active = NO; } #else for (i = 0; i < [_inputs count]; i++) { [INPUT(i) activate]; } _active = YES; #endif return _active; } - (BOOL)compute { int i, n = BLOCKSIZE; float *data[16]; id m; if (_active == YES) { if (_valid == YES) { return _active; } if (_delays == NULL) { _delays = makedelays(_channels, n, SAMPLERATE, _times); } for (i = 0; i < _channels; i++) { data[i] = [[_buffers objectAtIndex: i] data]; } delwrite(_channels, _delays, data, n); switch (_channels) { case 8: ab1delay(_channels, _delays, _filters, data, n, 0.353553); hada8(data, n); break; case 12: ab1delay(_channels, _delays, _filters, data, n, 1.); feedback12(data, n); break; case 16: ab1delay(_channels, _delays, _filters, data, n, 0.25); hada16(data, n); break; default: FOO_ERROR(NO, NO); } for (i = 0; i < _channels; i++) { [[_outputs objectAtIndex: i] mov: [_buffers objectAtIndex: i]]; } for (i = 0; i < INPUTS; i++) { m = INPUT(i); [m compute]; [[_buffers objectAtIndex: i] add: [m getBuffer]]; } [_buffer mov: [_outputs objectAtIndex: 0]]; _valid = YES; } else { bzero([_buffer data], sizeof(sample_t) * BLOCKSIZE); for (i = 0; i < _channels - 1; i++) { bzero([[_buffers objectAtIndex: i] data], sizeof(sample_t) * BLOCKSIZE); } } return _active; } - getBuffer: (int)index { if (index < 0 || index >= _channels) { FOO_ERROR(YES, nil); } return [_outputs objectAtIndex: index]; } - (int)channels { return _channels; } /* * archiving methods */ #if 0 // to be done - read:(TypedStream *)stream { [super read:stream]; objc_read_types(stream, "i[8c][8c]", &_channels, &_tr0, &_damp); return self; } - write:(TypedStream *)stream { [super write:stream]; objc_write_types(stream, "i[8c][8c]", &_channels, &_tr0, &_damp); return self; } #endif @end --- NEW FILE: FOOMLine.m --- /* -*-Mode:objc-*- */ /* * FOOMLine.m * * module line * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMLine.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMLine.h" @implementation FOOMLine - initializeStart: (double)s end: (double)e dur: (double)d { _beginT = TIMEFRAME; _endT = _beginT + d; _origin = s; _phase = 0; _range = e - s; return self; } - reset { [super reset]; _phase = -_incr; return self; } - startUp { [super startUp]; _begin = SEC_TO_SAM(_beginT); _end = SEC_TO_SAM(_endT); _incr = _range / (_end - _begin); _phase = -_incr; return self; } - (BOOL) activate { if (_begin >= BLOCKEND || _end < SAMPLETIME) { _active = NO; } else { _active = YES; } return _active; } - (BOOL) compute { sample_t *p; double c, i, o; int b, e, s, m; COMPUTE_PROLOGUE; p = DATA_OF_BUF(_buffer); if (_begin > SAMPLETIME) { b = _begin - SAMPLETIME; bzero(p, b * sizeof(sample_t)); } else { b = 0; } if (_end < BLOCKEND) { e = BLOCKSIZE - (BLOCKEND - _end); bzero(p + e, (BLOCKSIZE - e) * sizeof(sample_t)); } else { e = BLOCKSIZE; } s = e - b; p += b; o = _origin; i = _incr; c = _phase; m = s; while (m--) { c += i; *p++ = o + c; } _phase = c; COMPUTE_EPILOGUE; } - (int) getTimeInterval: (double*)b : (double*)e { *b = _beginT; *e = _endT; return (TI_BEG_END); } /* * archiving methods */ // - read:(TypedStream *)stream // { // [super read:stream]; // objc_read_types(stream, "[8c][8c][8c][8c][8c]", &origin, &incr, &beginT, &endT, &range); // return self; // } // - write:(TypedStream *)stream // { // [super write:stream]; // objc_write_types(stream, "[8c][8c][8c][8c][8c]", &origin, &incr, &beginT, &endT, &range); // return self; // } @end --- NEW FILE: FOOMNeg.m --- /* -*-Mode:objc-*- */ /* * FOOMNeg.m * * modules neg * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMNeg.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMNeg.h" @implementation FOOMNeg - (BOOL) activate { if (INPUTS == 0) { return (_active = NO); } _active = [INPUT(0) activate]; return _active; } - (BOOL) compute { sample_t *in, *out; int n = BLOCKSIZE; COMPUTE_PROLOGUE; [INPUT(0) compute]; in = DATA_OF_MOD(INPUT(0)); out = DATA_OF_BUF(_buffer); while (n--) { *out++ = - *in++; } COMPUTE_EPILOGUE; } @end --- NEW FILE: FOOMReadBpf.m --- /* -*-Mode:objc-*- */ /* * FOOMReadBpf.m * * module read bpf * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReadBpf.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMReadBpf.h" #include "FOOBreakpointFunction.h" #define FIRST_TIME -1 @implementation FOOMReadBpf - initializeWith: substr { lineseg_t *sp; if ([substr isKindOf:[FOOBreakpointFunction class]] == NO) { FOO_ERROR(YES, self); } _substrate = substr; _beginT = TIMEFRAME; _lasttime = FIRST_TIME; _current = [_substrate segments]; for (sp = _current; sp->count != 0; sp++) { ; } _last = sp; return self; } - reset { lineseg_t *sp; [super reset]; _current = [_substrate segments]; for (sp = _current; sp->count != 0; sp++) { ; } _last = sp; return self; } - startUp { [super startUp]; _begin = SEC_TO_SAM(_beginT + [_substrate beginT]); _end = _begin + SEC_TO_SAM([_substrate sizeT]); return self; } - (BOOL)activate { if (_begin >= BLOCKEND || _end < SAMPLETIME) { _active = NO; } else { _active = YES; } return _active; } - (BOOL)compute { sample_t *p, value, delta; double alpha; int count = 0, debut, fin, restSeg, restBlk, curr_count; COMPUTE_PROLOGUE; p = DATA_OF_BUF(_buffer); if (_lasttime == FIRST_TIME) { for (count = 0; count < _begin - SAMPLETIME; count++) { *p++ = 0; } _offset = 0; _lasttime = SAMPLETIME; } while (count < BLOCKSIZE) { if (_current == _last) { while (count++ < BLOCKSIZE) { *p++ = 0; } } else { debut = _offset; value = _current->value; delta = _current->delta; alpha = _current->alpha; curr_count = _current->count; restSeg = curr_count - _offset; restBlk = BLOCKSIZE - count; if (_offset == 0) { if (alpha == 0) { _phase = 0; } else { _factor = pow(exp(alpha), 1. / (curr_count - 1)); _phase = 1. / _factor; } } if (restBlk < restSeg) { fin = _offset + restBlk; count += restBlk; _offset += restBlk; } else { fin = _offset + restSeg; count += restSeg; _offset = 0; _current++; } if (alpha == 0) { double ph = _phase; int n = fin - debut; while (n--) { ph += delta; *p++ = value + ph; } _phase = ph; } else { double ph = _phase; int n = fin - debut; while (n--) { ph *= _factor; *p++ = value + delta * (1 - ph); } _phase = ph; } } } _lasttime = SAMPLETIME + BLOCKSIZE; COMPUTE_EPILOGUE; } - (int)getTimeInterval:(double*)b :(double*)e { *b = _beginT + [_substrate beginT]; *e = *b + [_substrate sizeT]; return (TI_BEG_END); } /* * archiving methods */ #if 0 // to be done - read:(TypedStream *)stream { [super read:stream]; objc_read_types(stream, "@[8c]", &_substrate, &_beginT); return self; } - write:(TypedStream *)stream { [super write:stream]; objc_write_types(stream, "@[8c]", &_substrate, &_beginT); return self; } #endif @end --- NEW FILE: FOOMDirac.m --- /* -*-Mode:objc-*- */ /* * FOOMDirac.m * * module dirac * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMDirac.m,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #include "FOOMDirac.h" @implementation FOOMDirac - initialize: (double)value { _timeT = TIMEFRAME; _amplitude = value; return self; } - startUp { [super startUp]; _time = SEC_TO_SAM(_timeT); return self; } - (BOOL) activate { if (_time >= SAMPLETIME && _time <= BLOCKEND) { return (_active = YES); } else { return (_active = NO); } } - (BOOL) compute { COMPUTE_PROLOGUE; [_buffer set: 0.]; *(DATA_OF_BUF(_buffer) + _time - SAMPLETIME) = _amplitude; COMPUTE_EPILOGUE; } - (int) getTimeInterval: (double*)b : (double*)e { *b = _timeT; return (TI_BEG); } /* * archiving methods */ // - read:(TypedStream *)stream // { // [super read:stream]; // objc_read_types(stream, "[8c][4c]", &timeT, &litude); // return self; // } // - write:(TypedStream *)stream // { // [super write:stream]; // objc_write_types(stream, "[8c][4c]", &timeT, &litude); // return self; // } @end --- NEW FILE: FOOMReverbOutput.m --- /* -*-Mode:objc-*- */ /* * FOOMReverbOutput.m * * module reverb output * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReverbOutput.m,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #include "FOOMReverbOutput.h" #include "FOOMReverb.h" @implementation FOOMReverbOutput - initializeChannel: (int)chan { _channel = chan; return self; } - (BOOL)activate { if (INPUTS == 0) { return (_active = NO); } _active = [INPUT(0) activate]; return _active; } - (BOOL)compute { id m; COMPUTE_PROLOGUE; m = INPUT(0); [m compute]; [_buffer mov:[m getBuffer:_channel]]; COMPUTE_EPILOGUE; } /* * archiving methods */ #if 0 // to be done - read:(TypedStream *)stream { [super read:stream]; objc_read_type(stream, "i", &_channel); return self; } - write:(TypedStream *)stream { [super write:stream]; objc_write_type(stream, "i", &_channel); return self; } #endif @end --- NEW FILE: FOOMOscillator.h --- /* -*-Mode:objc-*- */ /* * FOOMOscillator.h * * module oscillator * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMOscillator.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMOSCILLATOR_H_INCLUDED #define FOOM_FOOMOSCILLATOR_H_INCLUDED #include "FOOModule.h" #include "FOOLookupTable.h" #include <Foundation/NSString.h> @interface FOOMOscillator : FOOModule { FOOLookupTable *_table; int _intPhase; double _fracPhase; double _phase; NSString *_filename; } - initializePhase: (double)p; - initializePhase: (double)p file: (NSString *)name; - resetPhase; @end #endif /* #ifndef FOOM_FOOMOSCILLATOR_H_INCLUDED */ --- NEW FILE: FOOMReverbOutput.h --- /* -*-Mode:objc-*- */ /* * FOOMReverbOutput.h * * module revout * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMReverbOutput.h,v 1.1 2004/07/31 03:05:30 rumori Exp $ */ #ifndef FOOM_FOOMREVERBOUTPUT_H_INCLUDED #define FOOM_FOOMREVERBOUTPUT_H_INCLUDED #include "FOOModule.h" @interface FOOMReverbOutput : FOOModule { int _channel; } - initializeChannel: (int)chan; @end #endif /* #ifndef FOOM_FOOMREVERBOUTPUT_H_INCLUDED */ --- NEW FILE: FOOMDirac.h --- /* -*-Mode:objc-*- */ /* * FOOMDirac.h * * module dirac * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMDirac.h,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #ifndef FOOM_FOOMDIRAC_H_INCLUDED #define FOOM_FOOMDIRAC_H_INCLUDED #include "FOOModule.h" @interface FOOMDirac : FOOModule { double _timeT; int _time; sample_t _amplitude; } - initialize: (double)value; @end #endif /* #ifndef #ifndef FOOM_FOOMDIRAC_H_INCLUDED */ --- NEW FILE: FOOMConstantTwoPoleTwoZero.m --- /* -*-Mode:objc-*- */ /* * FOOMConstantTwoPoleTwoZero.m * * module constant two pole two zero * */ /* * foo sound synthesis system * * (C)1993-2004 Gerhard Eckel, Ramon Gonzalez-Arroyo, IRCAM, ZKM * (C)2003-2004 Martin Rumori */ /* * This file is part of foo. * * foo is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * foo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with foo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id: FOOMConstantTwoPoleTwoZero.m,v 1.1 2004/07/31 03:05:29 rumori Exp $ */ #include <math.h> #include "FOOMConstantTwoPoleTwoZero.h" #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz @implementation FOOMConstantTwoPoleTwoZero - initializeParams: (double*)p { _c0 = p[... [truncated message content] |
From: Martin R. <ru...@us...> - 2004-07-31 03:05:13
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12307/orthodox Log Message: Directory /cvsroot/foo/foo/libfoo/modules/orthodox added to the repository |
From: Martin R. <ru...@us...> - 2004-07-31 02:16:39
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7776 Modified Files: bootstrap configure.ac Log Message: adopting build system to mac os x Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** configure.ac 30 Jul 2004 20:10:23 -0000 1.1.1.1 --- configure.ac 31 Jul 2004 02:16:30 -0000 1.2 *************** *** 24,28 **** AC_PROG_LIBTOOL ! # set dependencies for objc _AM_DEPENDENCIES([OBJC]) --- 24,28 ---- AC_PROG_LIBTOOL ! # set objc stuff _AM_DEPENDENCIES([OBJC]) *************** *** 98,102 **** # check for libsndfile ! PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.10) FOO_CFLAGS="${FOO_CFLAGS} ${SNDFILE_CFLAGS}" --- 98,110 ---- # check for libsndfile ! ! # pkgconfig does not work on that great OS called OS X ! # PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.10) ! ! # do it "haendisch" ! AC_CHECK_HEADERS(sndfile.h) ! AC_CHECK_LIB(sndfile, sf_open, ! [SNDFILE_LIBS="-lsndfile"], ! [AC_MSG_ERROR([cannot find libsndfile])]) FOO_CFLAGS="${FOO_CFLAGS} ${SNDFILE_CFLAGS}" *************** *** 104,138 **** FOO_LIBS="${FOO_LIBS} ${SNDFILE_LIBS}" - dnl # set foo version - dnl AC_MSG_CHECKING(for the version of foo we are compiling) - dnl if test -f "Version"; then - dnl . ./Version - dnl fi - dnl AC_MSG_RESULT($FOO_VERSION) - dnl AC_SUBST(FOO_VERSION) - dnl AC_SUBST(FOO_MAJOR_VERSION) - dnl AC_SUBST(FOO_MINOR_VERSION) - dnl AC_SUBST(FOO_SUBMINOR_VERSION) - - dnl # export paths - dnl AC_SUBST(FOO_INSTALL_ROOT) - dnl AC_SUBST(FOO_BIN_INSTALL_DIR) - dnl AC_SUBST(FOO_LIB_INSTALL_DIR) - dnl AC_SUBST(FOO_HEADER_INSTALL_DIR) - dnl AC_SUBST(FOO_SCM_INSTALL_DIR) - dnl AC_SUBST(FOO_DOC_INSTALL_DIR) - - dnl # export includes, libs etc. - dnl AC_SUBST(ADDITIONAL_INCLUDE_DIRS) - dnl AC_SUBST(ADDITIONAL_LIB_DIRS) - dnl AC_SUBST(ADDITIONAL_LIBS) - - dnl # configure - dnl AC_CONFIG_FILES([foo.make]) - INCLUDES="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include" AC_SUBST(INCLUDES) ! dnl Export variables AC_SUBST(FOO_CFLAGS) AC_SUBST(FOO_OBJCFLAGS) --- 112,122 ---- FOO_LIBS="${FOO_LIBS} ${SNDFILE_LIBS}" INCLUDES="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include" AC_SUBST(INCLUDES) ! # workaround for automake <= 1.6 ! AC_SUBST(OBJC) ! ! # Export variables AC_SUBST(FOO_CFLAGS) AC_SUBST(FOO_OBJCFLAGS) Index: bootstrap =================================================================== RCS file: /cvsroot/foo/foo/libfoo/bootstrap,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** bootstrap 30 Jul 2004 20:10:23 -0000 1.1.1.1 --- bootstrap 31 Jul 2004 02:16:30 -0000 1.2 *************** *** 6,12 **** ## $Id$ - # set -x - # set -e - # Get a sane environment, just in case LANG=C --- 6,9 ---- *************** *** 14,42 **** # Check for automake ! amvers="no" ! # if automake-1.8 --version >/dev/null 2>&1; then ! # amvers="-1.8" ! # elif automake-1.7 --version >/dev/null 2>&1; then ! if automake-1.7 --version >/dev/null 2>&1; then ! amvers="-1.7" ! elif automake-1.6 --version >/dev/null 2>&1; then ! amvers="-1.6" ! elif automake-1.5 --version >/dev/null 2>&1; then ! amvers="-1.5" ! elif automake --version > /dev/null 2>&1; then ! amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`" ! if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then ! amvers="no" ! else ! amvers="" fi - fi ! if test "$amvers" = "no"; then ! set +x ! echo "$0: you need automake version 1.5 or later" ! exit 1 fi # Check for libtool libtoolize="no" --- 11,45 ---- # Check for automake ! if test -z $1; then ! amvers="no" ! if automake-1.8 --version >/dev/null 2>&1; then ! amvers="-1.8" ! elif automake-1.7 --version >/dev/null 2>&1; then ! amvers="-1.7" ! elif automake-1.6 --version >/dev/null 2>&1; then ! amvers="-1.6" ! elif automake-1.5 --version >/dev/null 2>&1; then ! amvers="-1.5" ! elif automake --version > /dev/null 2>&1; then ! amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`" ! if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then ! amvers="no" ! else ! amvers="" ! fi fi ! if test "$amvers" = "no"; then ! set +x ! echo "$0: you need automake version 1.5 or later" ! exit 1 ! fi ! else ! amvers=$1 fi + set -x + set -e + # Check for libtool libtoolize="no" |
From: Martin R. <ru...@us...> - 2004-07-31 02:16:39
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7776/src Modified Files: Makefile.am Log Message: adopting build system to mac os x Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 30 Jul 2004 20:10:24 -0000 1.1.1.1 --- Makefile.am 31 Jul 2004 02:16:30 -0000 1.2 *************** *** 39,50 **** include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make ! FOO_OBJCFLAGS += $(GNUSTEP_HEADERS_FLAGS) $(FND_DEFINE) $(AUXILIARY_OBJCFLAGS) ! FOO_LDFLAGS += $(GNUSTEP_LIBRARIES_FLAGS) ! FOO_LIBS += $(FND_LIBS) endif lib_LTLIBRARIES = libfoo.la libfoo_la_CFLAGS = $(FOO_CFLAGS) ! libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) ! libfoo_la_LDFLAGS = $(FOO_LDFLAGS) ! libfoo_la_LIBADD = $(FOO_LIBS) --- 39,53 ---- include @GNUSTEP_MAKEFILES@/common.make include @GNUSTEP_MAKEFILES@/Additional/base.make ! # FOO_OBJCFLAGS += $(GNUSTEP_HEADERS_FLAGS) $(FND_DEFINE) $(AUXILIARY_OBJCFLAGS) ! # FOO_LDFLAGS += $(GNUSTEP_LIBRARIES_FLAGS) ! # FOO_LIBS += $(FND_LIBS) endif lib_LTLIBRARIES = libfoo.la libfoo_la_CFLAGS = $(FOO_CFLAGS) ! libfoo_la_OBJCFLAGS = $(FOO_OBJCFLAGS) \ ! $(GNUSTEP_HEADERS_FLAGS) \ ! $(FND_DEFINE) \ ! $(AUXILIARY_OBJCFLAGS) ! libfoo_la_LDFLAGS = $(FOO_LDFLAGS) $(GNUSTEP_LIBRARIES_FLAGS) ! libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) |
From: Martin R. <ru...@us...> - 2004-07-30 21:54:46
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2938 Removed Files: .in Log Message: removed file imported acidentally --- .in DELETED --- |
From: Martin R. <ru...@us...> - 2004-07-30 21:50:30
|
Update of /cvsroot/foo/foo/elkfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2357/elkfoo Log Message: Directory /cvsroot/foo/foo/elkfoo added to the repository |
From: Martin R. <ru...@us...> - 2004-07-30 21:41:36
|
Update of /cvsroot/foo/foo/libfoo/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv705/modules Log Message: Directory /cvsroot/foo/foo/libfoo/modules added to the repository |