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...> - 2009-03-22 01:11:53
|
Update of /cvsroot/foo/foo/libfoo/modules In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25010/modules Modified Files: FOOMReadBpf.h FOOMReadBpf.m Log Message: fixed bpf when starting calculation inside bpf (e.g. with ref/off) Index: FOOMReadBpf.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadBpf.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadBpf.m 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadBpf.m 22 Mar 2009 01:11:40 -0000 1.2 *************** *** 40,45 **** - #define FIRST_TIME -1 - @implementation FOOMReadBpf --- 40,43 ---- *************** *** 55,64 **** _substrate = substr; _beginT = TIMEFRAME; ! _lasttime = FIRST_TIME; _current = [_substrate segments]; ! for (sp = _current; sp->count != 0; sp++) ! { ! ; ! } _last = sp; --- 53,59 ---- _substrate = substr; _beginT = TIMEFRAME; ! _firsttime = YES; _current = [_substrate segments]; ! for (sp = _current; sp->count != 0; sp++); _last = sp; *************** *** 73,80 **** [super reset]; _current = [_substrate segments]; ! for (sp = _current; sp->count != 0; sp++) ! { ! ; ! } _last = sp; --- 68,73 ---- [super reset]; _current = [_substrate segments]; ! _firsttime = YES; ! for (sp = _current; sp->count != 0; sp++); _last = sp; *************** *** 116,129 **** 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) --- 109,148 ---- COMPUTE_PROLOGUE; p = DATA_OF_BUF(_buffer); ! if (_firsttime == YES) { ! _firsttime = NO; ! ! if (SAMPLETIME <= _begin) ! { /* start before or at our begin */ ! for (count = 0; count < _begin - SAMPLETIME; count++) ! { ! *p++ = 0; ! } ! _offset = 0; ! } ! else ! { /* find current segment */ ! lineseg_t *sp; ! int acc_count = _begin; ! ! for (sp = _current; acc_count + sp->count <= SAMPLETIME; acc_count += sp->count, ++sp); ! _current = sp; ! _offset = SAMPLETIME - acc_count; ! ! /* calculate current phase */ ! if (_current->alpha == 0) ! { ! _phase = _offset * _current->delta; ! } ! else ! { ! _factor = pow(exp(_current->alpha), 1. / (_current->count - 1)); ! _phase = 1. / _factor; ! _phase = _phase * pow(_factor, _offset); ! } } } ! ! while (count < BLOCKSIZE) { if (_current == _last) *************** *** 134,138 **** } } ! else { debut = _offset; --- 153,157 ---- } } ! else { debut = _offset; *************** *** 143,147 **** restSeg = curr_count - _offset; restBlk = BLOCKSIZE - count; ! if (_offset == 0) { if (alpha == 0) --- 162,166 ---- restSeg = curr_count - _offset; restBlk = BLOCKSIZE - count; ! if (_offset == 0) { if (alpha == 0) *************** *** 161,166 **** _offset += restBlk; } ! else ! { fin = _offset + restSeg; count += restSeg; --- 180,185 ---- _offset += restBlk; } ! else ! { fin = _offset + restSeg; count += restSeg; *************** *** 168,172 **** _current++; } ! if (alpha == 0) { double ph = _phase; --- 187,191 ---- _current++; } ! if (alpha == 0) { double ph = _phase; *************** *** 178,183 **** } _phase = ph; ! } ! else { double ph = _phase; --- 197,202 ---- } _phase = ph; ! } ! else { double ph = _phase; *************** *** 192,196 **** } } - _lasttime = SAMPLETIME + BLOCKSIZE; COMPUTE_EPILOGUE; } --- 211,214 ---- Index: FOOMReadBpf.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadBpf.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadBpf.h 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadBpf.h 22 Mar 2009 01:11:40 -0000 1.2 *************** *** 51,55 **** lineseg_t *_last; int _offset; ! int _lasttime; double _beginT; double _phase; --- 51,55 ---- lineseg_t *_last; int _offset; ! BOOL _firsttime; double _beginT; double _phase; |
|
From: Martin R. <ru...@us...> - 2009-03-09 01:13:19
|
Update of /cvsroot/foo/foo In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24023 Modified Files: README Log Message: added compile hints for mac os x Index: README =================================================================== RCS file: /cvsroot/foo/foo/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 7 Apr 2007 13:25:48 -0000 1.2 --- README 9 Mar 2009 01:13:15 -0000 1.3 *************** *** 4,8 **** -------------------------- ! last edited 2007-03-07 rumori this readme contains information about the requirements, installation --- 4,8 ---- -------------------------- ! last edited 2009-03-09 rumori this readme contains information about the requirements, installation *************** *** 86,89 **** --- 86,111 ---- + compiling on mac os x (tested on 10.5) + -------------------------------------- + + use macports (http://www.macports.org) in order to install libsndfile: + + sudo port install libsndfile + + usually, there is a variant for libsndfile for adding flac file support: + + sudo port install libsndfile +flac + + currently, however, the version of flac in macports seems to be + incompatible with libsndfile. + + for compiling foo, specify the library locations, for the standard + paths this would read: + + env LDFLAGS="-L/opt/local/lib" \ + CPPFLAGS="-I/opt/local/include" \ + ./configure [--enable-flac-support (optionally)] + + yet undocumented (new) features ------------------------------- *************** *** 92,95 **** --- 114,118 ---- which can't be documented right now: + scripting foo via the #! directive ---------------------------------- |
|
From: Martin R. <ru...@us...> - 2009-03-09 01:06:57
|
Update of /cvsroot/foo/fooelk In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22596 Modified Files: README.FOO Log Message: added hint to compile with readline support using macports Index: README.FOO =================================================================== RCS file: /cvsroot/foo/fooelk/README.FOO,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README.FOO 10 Aug 2004 19:57:08 -0000 1.4 --- README.FOO 9 Mar 2009 01:06:32 -0000 1.5 *************** *** 63,66 **** --- 63,80 ---- ./configure --enable-gnu-readline + readline extension and mac os x 10.5 + + on mac os x 10.5, the readline extension of fooelk does not seem to + work with the libreadline that comes with the system. use macports to + install another version of libreadline: + + sudo port install readline + + then compile fooelk + + env LDFLAGS="-L/opt/local/lib" \ + CPPFLAGS="-I/opt/local/include" \ + ./configure --enable-gnu-readline + if you want to create a statically linked readline extension (which contains the the readline library itself, so that the extension is *************** *** 107,109 **** ! 2004-08-09 martin rumori fo...@ru... --- 121,123 ---- ! last edited: 2009-03-09 martin rumori fo...@ru... |
|
From: Martin R. <ru...@us...> - 2009-03-09 00:55:03
|
Update of /cvsroot/foo/foo/elkfoo In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20261/elkfoo Modified Files: bootstrap Log Message: add compatability for automake-1.10 Index: bootstrap =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/bootstrap,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bootstrap 28 Apr 2006 10:44:21 -0000 1.4 --- bootstrap 9 Mar 2009 00:54:46 -0000 1.5 *************** *** 13,17 **** if test -z $1; then amvers="no" ! if automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then --- 13,19 ---- if test -z $1; then amvers="no" ! if automake-1.10 --version >/dev/null 2>&1; then ! amvers="-1.10" ! elif automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then |
|
From: Martin R. <ru...@us...> - 2009-03-09 00:55:02
|
Update of /cvsroot/foo/foo/libfoo In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20261/libfoo Modified Files: bootstrap Log Message: add compatability for automake-1.10 Index: bootstrap =================================================================== RCS file: /cvsroot/foo/foo/libfoo/bootstrap,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bootstrap 28 Apr 2006 10:44:21 -0000 1.6 --- bootstrap 9 Mar 2009 00:54:46 -0000 1.7 *************** *** 13,17 **** if test -z $1; then amvers="no" ! if automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then --- 13,19 ---- if test -z $1; then amvers="no" ! if automake-1.10 --version >/dev/null 2>&1; then ! amvers="-1.10" ! elif automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then |
|
From: Martin R. <ru...@us...> - 2009-03-09 00:54:56
|
Update of /cvsroot/foo/foo In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20261 Modified Files: bootstrap Log Message: add compatability for automake-1.10 Index: bootstrap =================================================================== RCS file: /cvsroot/foo/foo/bootstrap,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** bootstrap 28 Apr 2006 10:44:21 -0000 1.5 --- bootstrap 9 Mar 2009 00:54:46 -0000 1.6 *************** *** 16,20 **** if test -z $1; then amvers="no" ! if automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then --- 16,22 ---- if test -z $1; then amvers="no" ! if automake-1.10 --version >/dev/null 2>&1; then ! amvers="-1.10" ! elif automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then |
|
From: Martin R. <ru...@us...> - 2009-03-09 00:04:23
|
Update of /cvsroot/foo/fooelk In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13182 Modified Files: bootstrap Log Message: make bootstrap compatible for automake-1.10 Index: bootstrap =================================================================== RCS file: /cvsroot/foo/fooelk/bootstrap,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bootstrap 12 Nov 2005 19:09:12 -0000 1.3 --- bootstrap 9 Mar 2009 00:04:10 -0000 1.4 *************** *** 15,19 **** # Check for automake amvers="no" ! if automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then --- 15,21 ---- # Check for automake amvers="no" ! if automake-1.10 --version >/dev/null 2>&1; then ! amvers="-1.10" ! elif automake-1.9 --version >/dev/null 2>&1; then amvers="-1.9" elif automake-1.8 --version >/dev/null 2>&1; then |
|
From: Martin R. <ru...@us...> - 2008-01-07 21:20:05
|
Update of /cvsroot/foo/foo/elkfoo/scripts In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11430 Modified Files: Makefile.am Added Files: foojoin Log Message: added foojoin script Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/scripts/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 14 Dec 2007 19:55:42 -0000 1.2 --- Makefile.am 7 Jan 2008 21:20:02 -0000 1.3 *************** *** 17,19 **** --- 17,20 ---- foofold \ foodiary \ + foojoin \ $(NULL) --- NEW FILE: foojoin --- #!/usr/local/bin/foo -- --unload control ;; foojoin: make multichannel file out of mono files ;; (c) 2008 rumori (require 'cmdline) (let* ;; check commandline ;; single-opt or equiv-opts-list | mandatory? | with-params? | help-string ((option-list '((("--help" "-h") #f #f "this help screen") (("--outfile" "-o") #t #t "output file") (("--type" "-t") #f #t "output file type [guessed]") (("--sformat" "-s") #f #t "output file sample format [1st input file]") (("--srate" "-r") #f #t "output file sample rate [1st input file]") (("--channels" "-c") #f #t "output file channels [number of input files]") (("--duration" "-d") #f #t "output file duration [1st input file]") (("--quality" "-q") #f #t "resampling quality (2...50) [16]") (("--force" "-f") #f #f "overwrite output file if existing") (("--zick" "-z") #f #f "check for equal samplerate, length and mono of input files [false]"))) (help (lambda () (format #t "~a: make multichannel file out of mono files~%" (car (foo:script-args))) (format #t "usage: ~a [options] -o outfile infile [infile ...]~%options understood:~%" (car (foo:script-args))) (format #t "~a~%" (cmdline:help-message option-list)) (exit))) (error (lambda (error-msg . print-help) (display (format #t "~a: ~a~%" (car (foo:script-args)) error-msg)) (if (and (not (null? print-help)) (eq? (car print-help) #t)) (begin (newline) (help)) (exit)))) (infiles) (outfile) (type) (format) (srate) (channels) (duration) (c) ; context (t) ; task ) ;; help requested? (if (cmdline:option-given? (foo:script-args) option-list "--help") (help)) ;; validate cmdline (if (not (cmdline:cmdline-valid? (foo:script-args) option-list #t)) (help)) ;; get parameters (take in account just 1st param of each option) ;; input files (set! infiles (cmdline:get-arguments (cdr (foo:script-args)) option-list)) (if (null? infiles) (error "no input files given on commandline!") (letrec ((exists (lambda (files) (cond ((null? files) #f) ((file-exists? (car files)) (exists (cdr files))) (else (error (string-append "input file not found: " (car files)))))))) (exists infiles))) ;; outfile name (set! outfile (car (cmdline:get-option-param (foo:script-args) option-list "--outfile"))) ;; filetype (if (cmdline:option-given? (foo:script-args) option-list "--type") (set! type (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--type")))) (set! type ;; guess type from extension (let* ((rev (list->string (reverse! (string->list outfile)))) (guess (substring? "." rev)) (ext (if guess (foo:soundfile-extension-type (list->string (reverse! (string->list (substring rev 0 (1+ guess)))))) #f))) (if ext ext (soundfile-filetype (car infiles)))))) ;; sample format (if (cmdline:option-given? (foo:script-args) option-list "--sformat") (set! format (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--sformat")))) (set! format (soundfile-format (car infiles)))) ;; samplerate (if (cmdline:option-given? (foo:script-args) option-list "--srate") (set! srate (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--srate")))) (set! srate (soundfile-srate (car infiles)))) ;; channels (if (cmdline:option-given? (foo:script-args) option-list "--channels") (begin (set! channels (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--channels")))) (if (< channels (length infiles)) ;; truncate infiles list to number of channels (set! infiles (list-head infiles channels)))) (set! channels (length infiles))) ;; taps (if (cmdline:option-given? (foo:script-args) option-list "--quality") (let ((taps (* 2 (inexact->exact (/ (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--quality"))) 2))))) (cond ((< taps 4) (set! taps 4)) ((> taps 50) (set! taps 50))) (foo:set-default-taps! taps)) (foo:set-default-taps! 16)) ;; duration (if (cmdline:option-given? (foo:script-args) option-list "--duration") (set! duration (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--duration")))) (set! duration (soundfile-length (car infiles)))) ;; zick (if (cmdline:option-given? (foo:script-args) option-list "--zick") (letrec ((length (soundfile-length (car infiles))) (srate (soundfile-srate (car infiles))) (check (lambda (files) (cond ((null? files) #f) ((not (= 1 (soundfile-channels (car files)))) (error (string-append "input file not mono: " (car files)))) ((not (= length (soundfile-length (car files)))) (error (string-append "input file length mismatch: " (car files)))) ((not (= srate (soundfile-srate (car files)))) (error (string-append "input file samplerate mismatch: " (car files)))) (else (check (cdr files))))))) (check infiles))) ;; prepare context (set! c (context channels)) ;; process files (with-context c (lambda () (letrec ((cat-file (lambda (files chan) (if (not (null? files)) (begin (output~ chan (read-snd~ (open-snd (car files)))) (cat-file (cdr files) (1+ chan))))))) (cat-file infiles 1)))) ;; soundfile (if (cmdline:option-given? (foo:script-args) option-list "--force") (create-soundfile outfile type format srate channels) (make-soundfile outfile type format srate channels)) ;; task (set! t (make-task 0 0 outfile c 'punch srate)) ;; do it (run-task t duration)) (quit) ;; EOF |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:58:22
|
Update of /cvsroot/foo/foo/elkfoo In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4834 Modified Files: Makefile.am configure.ac Log Message: changes for script move Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/configure.ac,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** configure.ac 14 Oct 2007 20:31:10 -0000 1.17 --- configure.ac 14 Dec 2007 19:41:44 -0000 1.18 *************** *** 333,336 **** --- 333,337 ---- scm/control/tools/mixsnd/Makefile scm/control/tools/util/Makefile + scripts/Makefile examples/Makefile examples/kernel/Makefile Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 12 Aug 2004 23:43:49 -0000 1.4 --- Makefile.am 14 Dec 2007 19:41:44 -0000 1.5 *************** *** 6,10 **** NULL = ! SUBDIRS = include src scm examples DIST_SUBDIRS = $(SUBDIRS) m4 --- 6,10 ---- NULL = ! SUBDIRS = include src scm scripts examples DIST_SUBDIRS = $(SUBDIRS) m4 |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:58:16
|
Update of /cvsroot/foo/foo/elkfoo/scripts In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv1235 Added Files: Makefile.am foocat foodiary foofold foosine Log Message: initial checkin! --- NEW FILE: foosine --- #!/usr/local/bin/foo -- --unload control ;; foo scripting example ;; (c) 2004-2005 rumori (require 'cmdline) ;; checking command line (let* ;; single-opt or equiv-opts-list | mandatory? | with-params? | help-string ((option-list '(("--help" #f #f "this help screen") (("--freq" "-f") #t #t "frequency (hz)") (("--amp" "-a") #t #t "amplitude (0...1)") (("--dur" "-d") #t #t "duration (s)"))) (help (lambda () (format #t "usage: ~a [options]\noptions understood:\n" (car (foo:script-args))) (format #t "~a\n" (cmdline:help-message option-list)) (exit))) (number-check (lambda (arg description) (if (not (number? arg)) (begin (format #t "~a has to be number!\n" description) (help))))) (freq) (amp) (dur)) ;; help needed? (if (cmdline:option-given? (foo:script-args) option-list "--help") (help)) ;; validate cmdline (if (not (cmdline:cmdline-valid? (cdr (foo:script-args)) option-list #t)) (help)) ;; get parameters (take in account just 1st param of each option) (set! freq (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--freq")))) (set! amp (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--amp")))) (set! dur (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--dur")))) ;; check parameters (number-check freq "frequency") (number-check amp "amplitude") (number-check dur "duration") (format #t "~a script example~%" (car (foo:script-args))) (format #t "creating, playing and removing a test-file.~%") (format #t "frequency: ~a amplitude: ~a duration: ~a~%" freq amp dur) (format #t "synthesizing...~%") ;; here we do the major work (syn 1 dur (output~ 1 (mul~ (~ amp) (sine~ (~ freq))))) (format #t "~%playing using '~a'~%" foo-default-play-command) (play) (format #t "exiting (will remove temporary file as well)~%")) (quit) ;; done --- NEW FILE: foodiary --- #!/usr/local/bin/foo -- --unload control ;; foodiary: make your sound diary ;; (c) 2007 plessas, rumori (require 'cmdline) (let* ;; check commandline ;; single-opt or equiv-opts-list | mandatory? | with-params? | help-string ((option-list '((("--help" "-h") #f #f "this help screen") (("--outfile" "-o") #t #t "output file") (("--type" "-t") #f #t "output file type [guessed]") (("--sformat" "-s") #f #t "output file sample format [1st input file]") (("--srate" "-r") #f #t "output file sample rate [1st input file]") (("--channels" "-c") #f #t "output file channels [1st input file]") (("--quality" "-q") #f #t "resampling quality (2...50) [16]") (("--force" "-f") #f #f "overwrite output file if existing") (("--period" "-p") #t #t "period interval in source (s)") (("--duration" "-d") #f #t "slice duration in source (s) [period interval]") (("--xfadelength" "-l") #f #t "cross fade length (s) [0]") (("--xfadetype" "-x") #f #t "cross fade type (log|expon|line) [log]") (("--begin" "-b") #f #t "begin position in source (s) [0]") (("--end" "-e") #f #t "end position (s) [file end]"))) (help (lambda () (format #t "~a: make diary out of soundfile(s)~%" (car (foo:script-args))) (format #t "usage: ~a [options] -o outfile infile [infile ...]~%options understood:~%" (car (foo:script-args))) (format #t "~a~%" (cmdline:help-message option-list)) (exit))) (error (lambda (error-msg . print-help) (display (format #t "~a: ~a~%" (car (foo:script-args)) error-msg)) (if (and (not (null? print-help)) (eq? (car print-help) #t)) (begin (newline) (help)) (exit)))) (infiles) (outfile) (type) (format) (srate) (channels) (period) (duration) (xfadelength) (xfadeinalpha) ; encodes xfadetype (xfadeoutalpha) ; encodes xfadetype (begint) ; start offset in infile (endt) ; end offset in infile (curinpos) ; current infile position (curoutpos) ; current outfile position (outinc) ; outputfile increment (normenv~) ; slice envelope (startenv~) ; slice env (first slice) (endenv~) ; slice env (last slice) (noenv~) ; slice env (only slice: no env) (overalldur 0) (c) ; context (t) ; task ) ;; help requested? (if (cmdline:option-given? (foo:script-args) option-list "--help") (help)) ;; validate cmdline (if (not (cmdline:cmdline-valid? (foo:script-args) option-list #t)) (help)) ;; get parameters (take in account just 1st param of each option) ;; input files (set! infiles (cmdline:get-arguments (cdr (foo:script-args)) option-list)) (if (null? infiles) (error "no input files given on commandline!") (letrec ((exists (lambda (files) (cond ((null? files) #f) ((file-exists? (car files)) (exists (cdr files))) (else (error (string-append "input file not found: " (car files)))))))) (exists infiles))) ;; FIXME (if (> (length infiles) 1) (error "multiple input files not yet supported.")) ;; outfile name (set! outfile (car (cmdline:get-option-param (foo:script-args) option-list "--outfile"))) ;; filetype (if (cmdline:option-given? (foo:script-args) option-list "--type") (set! type (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--type")))) (set! type ;; guess type from extension (let* ((rev (list->string (reverse! (string->list outfile)))) (guess (substring? "." rev)) (ext (if guess (foo:soundfile-extension-type (list->string (reverse! (string->list (substring rev 0 (1+ guess)))))) #f))) (if ext ext (soundfile-filetype (car infiles)))))) ;; sample format (if (cmdline:option-given? (foo:script-args) option-list "--sformat") (set! format (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--sformat")))) (set! format (soundfile-format (car infiles)))) ;; samplerate (if (cmdline:option-given? (foo:script-args) option-list "--srate") (set! srate (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--srate")))) (set! srate (soundfile-srate (car infiles)))) ;; channels (if (cmdline:option-given? (foo:script-args) option-list "--channels") (set! channels (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--channels")))) (set! channels (soundfile-channels (car infiles)))) ;; taps (if (cmdline:option-given? (foo:script-args) option-list "--quality") (let ((taps (* 2 (inexact->exact (/ (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--quality"))) 2))))) (cond ((< taps 4) (set! taps 4)) ((> taps 50) (set! taps 50))) (foo:set-default-taps! taps)) (foo:set-default-taps! 16)) ;; period (set! period (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--period")))) (if (< period 0) (error "negative period not allowed!")) ;; duration (if (cmdline:option-given? (foo:script-args) option-list "--duration") (begin (set! duration (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--duration")))) (if (< duration 0) (error "negative duration not allowed!"))) (set! duration period)) ;; xfadelength (if (cmdline:option-given? (foo:script-args) option-list "--xfadelength") (begin (set! xfadelength (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--xfadelength")))) (cond ((< xfadelength 0) (error "negative xfadelength not allowed!")) ((> (* 2 xfadelength) duration) (error "xfadelength longer than half of duration!")))) (set! xfadelength 0)) ;; xfadetype (if (cmdline:option-given? (foo:script-args) option-list "--xfadetype") (let ((xfadetype (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--xfadetype"))))) (cond ((eq? xfadetype 'log) (set! xfadeinalpha 0.1) ;; FIXME (set! xfadeoutalpha 9.9)) ;; FIXME ((eq? xfadetype 'expon) (set! xfadeinalpha 9.9) ;; FIXME (set! xfadeoutalpha 0.1) ;; FIXME ((eq? xfadetype 'line) (set! xfadeinalpha 1) (set! xfadeoutalpha 1)) (else (error "xfadetype not valid!" #t))))) (begin (set! xfadeinalpha 0.1) ;; FIXME (set! xfadeoutalpha 9.9))) ;; FIXME ;; begint (if (cmdline:option-given? (foo:script-args) option-list "--begin") (set! begint (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--begin")))) (set! begint 0)) ;; endt (if (cmdline:option-given? (foo:script-args) option-list "--end") (begin (set! endt (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--end")))) (if (> endt (soundfile-length (car infiles))) (error "end position beyond end of input file!"))) (set! endt (soundfile-length (car infiles)))) ;; needs further attention (if (< (- endt begint) duration) (error "interval between begin and end positions shorter than one slice!")) ;; outfile increment (set! outinc (- duration xfadelength)) ;; prepare context (set! c (context channels)) ;; make envelope signals (cond ;; make-bpf needs strictly ascending time values ;; this is a workaround for zero-length-crossfades: FIXME! ((= xfadelength 0) (with-context c (lambda () (set! normenv~ (lambda () (~ 1))) (set! startenv~ (lambda () (~ 1))) (set! endenv~ (lambda () (~ 1))) (set! noenv~ (lambda () (~ 1)))))) ;; make-bpf needs strictly ascending time values ;; this is a workaround for a corner-case: no sustain phase ((= (* 2 xfadelength) duration) (with-context c (lambda () (set! normenv~ (lambda () (read-bpf~ (make-bpf `((0 0) (,xfadelength 1 ,xfadeinalpha) (,duration 0 ,xfadeoutalpha)))))) (set! startenv~ (lambda () (read-bpf~ (make-bpf `((0 1) (,outinc 1) (,duration 0 ,xfadeoutalpha)))))) (set! endenv~ (lambda () (read-bpf~ (make-bpf `((0 0) (,xfadelength 1 ,xfadeinalpha) (,duration 1)))))) (set! noenv~ (lambda () (~ 1)))))) ;; in a better foo world, this should be sufficient for all cases (else (with-context c (lambda () ;; (set! normenv~ (lambda () (read-bpf~ (make-bpf (list '(0 0) (list xfadelength 1 xfadeinalpha) (list outinc 1) (list duration 0 xfadeoutalpha)))))) (set! normenv~ (lambda () (read-bpf~ (make-bpf `((0 0) (,xfadelength 1 ,xfadeinalpha) (,outinc 1) (,duration 0 ,xfadeoutalpha)))))) (set! startenv~ (lambda () (read-bpf~ (make-bpf `((0 1) (,outinc 1) (,duration 0 ,xfadeoutalpha)))))) (set! endenv~ (lambda () (read-bpf~ (make-bpf `((0 0) (,xfadelength 1 ,xfadeinalpha) (,duration 1)))))) (set! noenv~ (lambda () (~ 1))))))) (letrec ;; process all channels for one slice ((cat-slice (lambda (slice chan off env~) (if (> chan 0) (begin (if (>= (snd-channels slice) chan) ;; do the actual work per channel (output~ chan (time off (gate~ (mul~ (env~) (read-snd~ (snd-extract slice chan))) (snd-length slice))))) (cat-slice slice (1- chan) off env~))))) ;; process all slices of input sound (cat-slices (lambda (snd curinpos curoutpos) (cond ;; corner case: first slice is the only slice ((and (= curoutpos 0) (>= (+ curinpos period) (snd-length snd))) (cat-slice (snd-region snd curinpos duration) channels curoutpos noenv~)) ;; first slice ((= curoutpos 0) ;; current slice (cat-slice (snd-region snd curinpos duration) channels curoutpos startenv~) ;; next slice(s) (cat-slices snd (+ curinpos period) (+ curoutpos outinc))) ;; last slice truncated ((>= (+ curinpos duration) (snd-length snd)) (cat-slice (snd-region snd curinpos (- (snd-length snd) curinpos)) channels curoutpos endenv~)) ;; last slice complete ((>= (+ curinpos period) (snd-length snd)) (cat-slice (snd-region snd curinpos duration) channels curoutpos endenv~)) ;; normal slice (else ;; current slice (cat-slice (snd-region snd curinpos duration) channels curoutpos normenv~) ;; next slice(s) (cat-slices snd (+ curinpos period) (+ curoutpos outinc))))))) ;; kick the ass off (with-context c (lambda () (let* ((snd (snd-region (open-snd (car infiles)) begint (- endt begint))) (numslices (/ (snd-length snd) period)) (lastslice (* (- numslices (trunc numslices)) (/ period duration))) (dur (+ (* (ceiling (1- numslices)) (- duration xfadelength)) ;; truc de malade (* (if (or (= lastslice 0) (>= lastslice 1)) duration (* lastslice duration)))))) (set! overalldur (+ overalldur dur)) (cat-slices snd 0 0))))) ;; soundfile (if (cmdline:option-given? (foo:script-args) option-list "--force") (create-soundfile outfile type format srate channels) (make-soundfile outfile type format srate channels)) ;; task (set! t (make-task 0 0 outfile c 'punch srate)) ;; do it (run-task t overalldur)) (quit) ;; EOF --- NEW FILE: foofold --- #!/usr/local/bin/foo -- --unload control ;; foofold: fold soundfiles ;; (c) 2006 rumori (require 'cmdline) (let* ;; check commandline ;; single-opt or equiv-opts-list | mandatory? | with-params? | help-string ((option-list '((("--help" "-h") #f #f "this help screen") (("--outfile" "-o") #t #t "output file") (("--type" "-t") #f #t "output file type [guessed]") (("--sformat" "-s") #f #t "output file sample format [input file]") (("--srate" "-r") #f #t "output file sample rate [input file]") (("--channels" "-c") #f #t "output file channels [input file]") (("--parts" "-p") #f #t "foldover factor [1]") (("--quality" "-q") #f #t "resampling quality (2...50) [16]") (("--force" "-f") #f #f "overwrite output file if existing"))) (help (lambda () (format #t "~a: fold soundfiles~%" (car (foo:script-args))) (format #t "usage: ~a [options] -o outfile infile~%options understood:~%" (car (foo:script-args))) (format #t "~a~%" (cmdline:help-message option-list)) (exit))) (infiles) (outfile) (type) (format) (srate) (channels) (numparts 1) (c) ; context (t) ; task (maxdur) ; overall duration ) ;; help requested? (if (cmdline:option-given? (foo:script-args) option-list "--help") (help)) ;; validate cmdline (if (not (cmdline:cmdline-valid? (foo:script-args) option-list #t)) (help)) ;; get parameters (take in account just 1st param of each option) ;; input files (set! infiles (cmdline:get-arguments (cdr (foo:script-args)) option-list)) (cond ((null? infiles) (begin (display "no input file given on commandline!") (newline) (help))) ((> (length infiles) 1) (begin (display "more than one input file given on commandline!") (newline) (help))) (else (letrec ((exists (lambda (files) (cond ((null? files) #f) ((file-exists? (car files)) (exists (cdr files))) (else (display (string-append "input file not found: " (car files))) (newline) (exit)))))) (exists infiles)))) ;; outfile name (set! outfile (car (cmdline:get-option-param (foo:script-args) option-list "--outfile"))) ;; filetype (if (cmdline:option-given? (foo:script-args) option-list "--type") (set! type (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--type")))) (set! type ;; guess type from extension (let* ((rev (list->string (reverse! (string->list outfile)))) (guess (substring? "." rev)) (ext (if guess (foo:soundfile-extension-type (list->string (reverse! (string->list (substring rev 0 (1+ guess)))))) #f))) (if ext ext (soundfile-filetype (car infiles)))))) ;; sample format (if (cmdline:option-given? (foo:script-args) option-list "--sformat") (set! format (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--sformat")))) (set! format (soundfile-format (car infiles)))) ;; samplerate (if (cmdline:option-given? (foo:script-args) option-list "--srate") (set! srate (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--srate")))) (set! srate (soundfile-srate (car infiles)))) ;; channels (if (cmdline:option-given? (foo:script-args) option-list "--channels") (set! channels (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--channels")))) (set! channels (soundfile-channels (car infiles)))) ;; taps (if (cmdline:option-given? (foo:script-args) option-list "--quality") (let ((taps (* 2 (inexact->exact (/ (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--quality"))) 2))))) (cond ((< taps 4) (set! taps 4)) ((> taps 50) (set! taps 50))) (foo:set-default-taps! taps)) (foo:set-default-taps! 16)) ;; numparts (if (cmdline:option-given? (foo:script-args) option-list "--parts") (set! numparts (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--parts"))))) ;; prepare context (set! c (context channels)) ;; part length (set! maxdur (/ (soundfile-length (car infiles)) numparts)) ;; parts (with-context c (lambda () (let loop ((i numparts) (c 0)) (if (> i 0) (let* ((snd (snd-region (open-snd (car infiles)) (* (1- i) maxdur) maxdur)) ;; (normfact (* (/ (/ 1 (cdr (snd-absolute-maximum snd))) numparts) channels))) (normfact (* (/ 1 numparts) channels))) (output~ (1+ c) (mul~ (~ normfact) (read-snd~ snd))) (loop (1- i) (modulo (1+ c) channels))))))) ;; soundfile (if (cmdline:option-given? (foo:script-args) option-list "--force") (create-soundfile outfile type format srate channels) (make-soundfile outfile type format srate channels)) ;; task (set! t (make-task 0 0 outfile c 'punch srate)) ;; do it (run-task t maxdur) (quit)) ;; EOF --- NEW FILE: Makefile.am --- # foo/elkfoo/scripts/Makefile.am # 2007 rumori # $Id: Makefile.am,v 1.1 2007/12/14 19:36:39 rumori Exp $ NULL = EXTRA_DIST = $(SCRIPTS_FILES) noinst_DATA = $(SCRIPTS_FILES) SCRIPTS_FILES = \ foosine \ foocat \ foofold \ foodiary \ $(NULL) --- NEW FILE: foocat --- #!/usr/local/bin/foo -- --unload control ;; foocat: concatenate soundfiles ;; (c) 2004-2005 rumori (require 'cmdline) (let* ;; check commandline ;; single-opt or equiv-opts-list | mandatory? | with-params? | help-string ((option-list '((("--help" "-h") #f #f "this help screen") (("--outfile" "-o") #t #t "output file") (("--type" "-t") #f #t "output file type [guessed]") (("--sformat" "-s") #f #t "output file sample format [1st input file]") (("--srate" "-r") #f #t "output file sample rate [1st input file]") (("--channels" "-c") #f #t "output file channels [1st input file]") (("--quality" "-q") #f #t "resampling quality (2...50) [16]") (("--gap" "-g") #f #t "gap between concatenated soundfiles [0s]") (("--force" "-f") #f #f "overwrite output file if existing"))) (help (lambda () (format #t "~a: concatenate soundfiles~%" (car (foo:script-args))) (format #t "usage: ~a [options] -o outfile infile [infile ...]~%options understood:~%" (car (foo:script-args))) (format #t "~a~%" (cmdline:help-message option-list)) (exit))) (infiles) (outfile) (type) (format) (srate) (channels) (gap 0) (c) ; context (t) ; task (maxdur) ; overall duration ) ;; help requested? (if (cmdline:option-given? (foo:script-args) option-list "--help") (help)) ;; validate cmdline (if (not (cmdline:cmdline-valid? (foo:script-args) option-list #t)) (help)) ;; get parameters (take in account just 1st param of each option) ;; input files (set! infiles (cmdline:get-arguments (cdr (foo:script-args)) option-list)) (if (null? infiles) (begin (display "no input files given on commandline!") (newline) (help)) (letrec ((exists (lambda (files) (cond ((null? files) #f) ((file-exists? (car files)) (exists (cdr files))) (else (display (string-append "input file not found: " (car files))) (newline) (exit)))))) (exists infiles))) ;; outfile name (set! outfile (car (cmdline:get-option-param (foo:script-args) option-list "--outfile"))) ;; filetype (if (cmdline:option-given? (foo:script-args) option-list "--type") (set! type (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--type")))) (set! type ;; guess type from extension (let* ((rev (list->string (reverse! (string->list outfile)))) (guess (substring? "." rev)) (ext (if guess (foo:soundfile-extension-type (list->string (reverse! (string->list (substring rev 0 (1+ guess)))))) #f))) (if ext ext (soundfile-filetype (car infiles)))))) ;; sample format (if (cmdline:option-given? (foo:script-args) option-list "--sformat") (set! format (string->symbol (car (cmdline:get-option-param (foo:script-args) option-list "--sformat")))) (set! format (soundfile-format (car infiles)))) ;; samplerate (if (cmdline:option-given? (foo:script-args) option-list "--srate") (set! srate (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--srate")))) (set! srate (soundfile-srate (car infiles)))) ;; channels (if (cmdline:option-given? (foo:script-args) option-list "--channels") (set! channels (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--channels")))) (set! channels (soundfile-channels (car infiles)))) ;; taps (if (cmdline:option-given? (foo:script-args) option-list "--quality") (let ((taps (* 2 (inexact->exact (/ (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--quality"))) 2))))) (cond ((< taps 4) (set! taps 4)) ((> taps 50) (set! taps 50))) (foo:set-default-taps! taps)) (foo:set-default-taps! 16)) ;; gap (if (cmdline:option-given? (foo:script-args) option-list "--gap") (set! gap (string->number (car (cmdline:get-option-param (foo:script-args) option-list "--gap"))))) (set! maxdur (- gap)) ;; gap gets added once more ;; prepare context (set! c (context channels)) (letrec ((cat-channel (lambda (snd chan off dur) (if (> chan 0) (begin (if (>= (snd-channels snd) chan) ;; do the actual work per channel (output~ chan (time off (gate~ (read-snd~ (snd-extract snd chan)) dur)))) (cat-channel snd (1- chan) off dur))))) (cat-file (lambda (files lastoff) (if (not (null? files)) (let* ((snd (open-snd (car files))) (dur (snd-length snd))) (set! maxdur (+ maxdur dur gap)) (cat-channel snd channels lastoff dur) (cat-file (cdr files) (+ lastoff dur gap))))))) (with-context c (lambda () (cat-file infiles 0)))) ;; soundfile (if (cmdline:option-given? (foo:script-args) option-list "--force") (create-soundfile outfile type format srate channels) (make-soundfile outfile type format srate channels)) ;; task (set! t (make-task 0 0 outfile c 'punch srate)) ;; do it (run-task t maxdur) (quit)) ;; EOF |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:57:57
|
Update of /cvsroot/foo/foo/elkfoo/examples/scripts In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv3115 Modified Files: Makefile.am Removed Files: fscat.foo fsdiary.foo fsfold.foo sine.foo Log Message: moved script files --- fsfold.foo DELETED --- --- fsdiary.foo DELETED --- --- fscat.foo DELETED --- --- sine.foo DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/examples/scripts/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 30 Sep 2007 12:35:59 -0000 1.3 --- Makefile.am 14 Dec 2007 19:39:04 -0000 1.4 *************** *** 11,18 **** EXAMPLE_SCRIPTS_FILES = \ - sine.foo \ stdin.foo \ - fscat.foo \ - fsfold.foo \ - fsdiary.foo \ $(NULL) --- 11,14 ---- |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:55:38
|
Update of /cvsroot/foo/foo/elkfoo/scripts In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13861 Modified Files: Makefile.am Log Message: install script files Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/scripts/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 14 Dec 2007 19:36:39 -0000 1.1 --- Makefile.am 14 Dec 2007 19:55:42 -0000 1.2 *************** *** 8,12 **** EXTRA_DIST = $(SCRIPTS_FILES) ! noinst_DATA = $(SCRIPTS_FILES) SCRIPTS_FILES = \ --- 8,14 ---- EXTRA_DIST = $(SCRIPTS_FILES) ! inst_SCRIPTS = $(SCRIPTS_FILES) ! ! instdir = $(prefix)/bin SCRIPTS_FILES = \ |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:47:55
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv9016/src Modified Files: Makefile.am modules.m Log Message: later changes Index: modules.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/modules.m,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** modules.m 26 Aug 2005 19:40:50 -0000 1.10 --- modules.m 14 Dec 2007 19:47:57 -0000 1.11 *************** *** 38,44 **** #include <FOO/FOOBreakpointFunction.h> ! // orthodox modules #include "FOOMAdd.h" #include "FOOMBandlimitedNoise.h" #include "FOOMConstantBiquad.h" #include "FOOMConstantTwoPole.h" --- 38,46 ---- #include <FOO/FOOBreakpointFunction.h> ! // modules #include "FOOMAdd.h" + #include "FOOMAllpass.h" #include "FOOMBandlimitedNoise.h" + #include "FOOMComb.h" #include "FOOMConstantBiquad.h" #include "FOOMConstantTwoPole.h" *************** *** 72,79 **** #include "FOOMVariableTwoPole.h" - // banff edition - #include "FOOMAllpass.h" - #include "FOOMComb.h" - #include <sys/types.h> #include <sys/timeb.h> --- 74,77 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.am 4 Apr 2007 14:36:04 -0000 1.10 --- Makefile.am 14 Dec 2007 19:47:57 -0000 1.11 *************** *** 49,54 **** elkfoo_la_OBJCFLAGS = $(ELKFOO_OBJCFLAGS) \ $(FND_DEFINE) \ ! -I../../libfoo/modules/orthodox \ ! -I../../libfoo/modules/banff \ $(NULL) elkfoo_la_LDFLAGS = $(ELKFOO_LDFLAGS) \ --- 49,53 ---- elkfoo_la_OBJCFLAGS = $(ELKFOO_OBJCFLAGS) \ $(FND_DEFINE) \ ! -I../../libfoo/modules \ $(NULL) elkfoo_la_LDFLAGS = $(ELKFOO_LDFLAGS) \ |
|
From: Martin R. <ru...@us...> - 2007-12-14 19:36:09
|
Update of /cvsroot/foo/foo/elkfoo/scripts In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv1118/scripts Log Message: Directory /cvsroot/foo/foo/elkfoo/scripts added to the repository |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:26:44
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11629/src Modified Files: FOOModule.m Makefile.am Log Message: changes for new module subdirs Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 4 Apr 2007 14:36:04 -0000 1.6 --- Makefile.am 14 Dec 2007 14:26:47 -0000 1.7 *************** *** 54,58 **** libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ ! ../modules/orthodox/libfoomorthodox.la \ ! ../modules/banff/libfoombanff.la \ $(NULL) --- 54,57 ---- libfoo_la_LIBADD = $(FOO_LIBS) $(FND_LIBS) \ -lobjc \ ! ../modules/libfoom.la \ $(NULL) Index: FOOModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOModule.m,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FOOModule.m 28 Feb 2005 16:37:22 -0000 1.9 --- FOOModule.m 14 Dec 2007 14:26:47 -0000 1.10 *************** *** 43,47 **** // for printing. not nice. ! #include "../modules/orthodox/FOOMConstant.h" // static FOONilModule *_nilModule = nil; --- 43,47 ---- // for printing. not nice. ! #include "../modules/FOOMConstant.h" // static FOONilModule *_nilModule = nil; |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:26:44
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11629 Modified Files: configure.ac Log Message: changes for new module subdirs Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** configure.ac 14 Oct 2007 20:31:11 -0000 1.17 --- configure.ac 14 Dec 2007 14:26:47 -0000 1.18 *************** *** 202,207 **** src/Makefile modules/Makefile - modules/orthodox/Makefile - modules/banff/Makefile tests/Makefile tests/foosine/Makefile --- 202,205 ---- |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:26:44
|
Update of /cvsroot/foo/foo/libfoo/tests/foosine In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv11629/tests/foosine Modified Files: foosine.m Log Message: changes for new module subdirs Index: foosine.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/tests/foosine/foosine.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** foosine.m 28 Feb 2005 16:37:23 -0000 1.5 --- foosine.m 14 Dec 2007 14:26:47 -0000 1.6 *************** *** 52,57 **** #include <FOO/FOOContext.h> #include <FOO/FOOOutput.h> ! #include <orthodox/FOOMOscillator.h> ! #include <orthodox/FOOMConstant.h> #define FOOSINE_BLOCKSIZE 1024 --- 52,57 ---- #include <FOO/FOOContext.h> #include <FOO/FOOOutput.h> ! #include <FOOMOscillator.h> ! #include <FOOMConstant.h> #define FOOSINE_BLOCKSIZE 1024 |
Update of /cvsroot/foo/foo/libfoo/modules In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7604 Modified Files: Makefile.am Added Files: FOOMAdd.h FOOMAdd.m FOOMAllpass.h FOOMAllpass.m FOOMBandlimitedNoise.h FOOMBandlimitedNoise.m FOOMComb.h FOOMComb.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 FOOMKillDC.h FOOMKillDC.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: relocated modules --- NEW FILE: FOOMLookup.h --- /* -*-Mode:objc-*- */ /* * FOOMLookup.h * * module lookup * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:12 rumori Exp $ */ #ifndef FOOM_FOOMLOOKUP_H_INCLUDED #define FOOM_FOOMLOOKUP_H_INCLUDED #include <FOO/FOOEagerModule.h> #include <FOO/FOOSubstrate.h> #include <FOO/FOOLookupTable.h> @interface FOOMLookup : FOOEagerModule <NSCoding> { /* Substrate *substrate; // statically typed */ id _substrate; sample_t *_samples; int _offset; int _count; int _taps; FOOLookupTable *_table; } - initializeWith: (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-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:12 rumori Exp $ */ #include "FOOMLookup.h" #include <FOO/FOOSoundFile.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOORegion.h> #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size @implementation FOOMLookup - initializeWith: (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]; memset(_samples, 0, _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 */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; if ([coder allowsKeyedCoding]) { [coder encodeObject: _substrate forKey: @"FOOMLookup:substrate"]; [coder encodeInt: _offset forKey: @"FOOMLookup:offset"]; [coder encodeInt: _count forKey: @"FOOMLookup:count"]; [coder encodeInt: _taps forKey: @"FOOMLookup:taps"]; } else { [coder encodeObject: _substrate]; [coder encodeValueOfObjCType: @encode(int) at: &_offset]; [coder encodeValueOfObjCType: @encode(int) at: &_count]; [coder encodeValueOfObjCType: @encode(int) at: &_taps]; } return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; if ([coder allowsKeyedCoding]) { _substrate = RETAIN([coder decodeObjectForKey: @"FOOMLookup:substrate"]); _offset = [coder decodeIntForKey: @"FOOMLookup:offset"]; _count = [coder decodeIntForKey: @"FOOMLookup:count"]; _taps = [coder decodeIntForKey: @"FOOMLookup:taps"]; } else { _substrate = RETAIN([coder decodeObject]); [coder decodeValueOfObjCType: @encode(int) at: &_offset]; [coder decodeValueOfObjCType: @encode(int) at: &_count]; [coder decodeValueOfObjCType: @encode(int) at: &_taps]; } _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [FOOGlobalsManager getSineXoverXTable: _taps]; return self; } @end --- NEW FILE: FOOMConstant.h --- /* -*-Mode:objc-*- */ /* * FOOMConstant.h * * module constant * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:08 rumori Exp $ */ #ifndef FOOM_FOOMCONSTANT_H_INCLUDED #define FOOM_FOOMCONSTANT_H_INCLUDED #include <FOO/FOOModule.h> @interface FOOMConstant : FOOModule <NSCoding> { sample_t _value; } - setValue: (sample_t)aValue; - (sample_t) getValue; @end #endif /* #ifndef FOOM_FOOMCONSTANT_H_INCLUDED */ --- NEW FILE: FOOMMul.m --- /* -*-Mode:objc-*- */ /* * FOOMMul.m * * modules mul * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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: FOOMMul.m,v 1.1 2007/12/14 14:16:13 rumori Exp $ */ #include "FOOMMul.h" @implementation FOOMMul - (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; ++i) { m = INPUT(i); [m compute]; [_buffer mul: [m getBuffer]]; } COMPUTE_EPILOGUE; } - (int) incrementBuffer { return 0; } /* * archiving methods */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; return self; } @end --- NEW FILE: FOOMDiv.m --- /* -*-Mode:objc-*- */ /* * FOOMDiv.m * * module div * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:11 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; } /* * archiving methods */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; return self; } @end --- NEW FILE: FOOMReadTranspSnd.h --- /* -*-Mode:objc-*- */ /* * FOOMReadTranspSnd.h * * module readtranspsnd * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:14 rumori Exp $ */ #ifndef FOOM_FOOMREADTRANSPSND_H_INCLUDED #define FOOM_FOOMREADTRANSPSND_H_INCLUDED #include <FOO/FOOEagerModule.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOOSoundFile.h> #include <FOO/FOORegion.h> #include <FOO/FOOLookupTable.h> @interface FOOMReadTranspSnd : FOOEagerModule <NSCoding> { 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-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:16 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 isKindOfClass: [FOOSoundFile class]] == NO && [substr isKindOfClass: [FOOSoundStream class]] == NO && [substr isKindOfClass: [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]; memset(_samples, 0, _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 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; memset(out, 0, 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 */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; if ([coder allowsKeyedCoding]) { [coder encodeObject: _substrate forKey: @"FOOMTransposeSnd:substrate"]; [coder encodeDouble: _beginT forKey: @"FOOMTransposeSnd:beginT"]; [coder encodeInt: _count forKey: @"FOOMTransposeSnd:count"]; [coder encodeInt: _taps forKey: @"FOOMTransposeSnd:taps"]; } else { [coder encodeObject: _substrate]; [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; [coder encodeValueOfObjCType: @encode(int) at: &_count]; [coder encodeValueOfObjCType: @encode(int) at: &_taps]; } return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; if ([coder allowsKeyedCoding]) { _substrate = RETAIN([coder decodeObjectForKey: @"FOOMTransposeSnd:substrate"]); _beginT = [coder decodeDoubleForKey: @"FOOMTransposeSnd:beginT"]; _count = [coder decodeIntForKey: @"FOOMTransposeSnd:count"]; _taps = [coder decodeIntForKey: @"FOOMTransposeSnd:taps"]; } else { _substrate = RETAIN([coder decodeObject]); [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; [coder decodeValueOfObjCType: @encode(int) at: &_count]; [coder decodeValueOfObjCType: @encode(int) at: &_taps]; } _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); _table = [FOOGlobalsManager getSineXoverXTable: _taps]; return [self initPos]; } @end --- NEW FILE: FOOMNeg.m --- /* -*-Mode:objc-*- */ /* * FOOMNeg.m * * modules neg * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:13 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; } /* * archiving methods */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; return self; } @end --- NEW FILE: FOOMReadTranspSnd.m --- /* -*-Mode:objc-*- */ /* * FOOMReadTranspSnd.m * * module reverb * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:14 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 isKindOfClass: [FOOSoundFile class]] == NO && [substr isKindOfClass: [FOOSoundStream class]] == NO && [substr isKindOfClass: [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) dealloc { if (_samples != NULL) { NSZoneFree([self zone], _samples); } [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; memset(p, 0, b * sizeof(sample_t)); } else { b = 0; } if (_end < BLOCKEND) { e = BLOCKSIZE - (BLOCKEND - _end); memset(p + e, 0, (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; memset(out, 0, 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 */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; if ([coder allowsKeyedCoding]) { [coder encodeObject: _substrate forKey: @"FOOMReadTranspSnd:substrate"]; [coder encodeDouble: _beginT forKey: @"FOOMReadTranspSnd:beginT"]; } else { [coder encodeObject: _substrate]; [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; } return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; if ([coder allowsKeyedCoding]) { _substrate = RETAIN([coder decodeObjectForKey: @"FOOMReadTranspSnd:substrate"]); _beginT = [coder decodeDoubleForKey: @"FOOMReadTranspSnd:beginT"]; } else { _substrate = RETAIN([coder decodeObject]); [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; } _samples = NULL; return self; } @end --- NEW FILE: FOOMDiv.h --- /* -*-Mode:objc-*- */ /* * FOOMDiv.h * * module dic * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:10 rumori Exp $ */ #ifndef FOOM_FOOMDIV_H_INCLUDED #define FOOM_FOOMDIV_H_INCLUDED #include <FOO/FOOModule.h> @interface FOOMDiv : FOOModule <NSCoding> { } @end #endif /* #ifndef FOOM_FOOMDIV_H_INCLUDED */ --- NEW FILE: FOOMTransposeSnd.h --- /* -*-Mode:objc-*- */ /* * FOOMTransposeSnd.h * * module transp-snd * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:16 rumori Exp $ */ #ifndef FOOM_FOOMTRANSPOSESND_H_INCLUDED #define FOOM_FOOMTRANSPOSESND_H_INCLUDED #include <FOO/FOOEagerModule.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOOSoundFile.h> #include <FOO/FOORegion.h> #include <FOO/FOOLookupTable.h> #include "FOOMMath.h" @interface FOOMTransposeSnd : FOOEagerModule <NSCoding> { /* 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-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:15 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 { memset([_buffer data], 0, sizeof(sample_t) * BLOCKSIZE); for (i = 0; i < _channels - 1; i++) { memset([[_buffers objectAtIndex: i] data], 0, 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 */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; if ([coder allowsKeyedCoding]) { [coder encodeInt: _channels forKey: @"FOOMReverb:channels"]; [coder encodeDouble: _tr0 forKey: @"FOOMReverb:tr0"]; [coder encodeDouble: _damp forKey: @"FOOMReverb:damp"]; } else { [coder encodeValueOfObjCType: @encode(int) at: &_channels]; [coder encodeValueOfObjCType: @encode(double) at: &_tr0]; [coder encodeValueOfObjCType: @encode(double) at: &_damp]; } return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; if ([coder allowsKeyedCoding]) { _channels = [coder decodeIntForKey: @"FOOMReverb:channels"]; _tr0 = [coder decodeDoubleForKey: @"FOOMReverb:tr0"]; _damp = [coder decodeDoubleForKey: @"FOOMReverb:damp"]; } else { [coder decodeValueOfObjCType: @encode(int) at: &_channels]; [coder decodeValueOfObjCType: @encode(double) at: &_tr0]; [coder decodeValueOfObjCType: @encode(double) at: &_damp]; } return self; } @end --- NEW FILE: FOOMComb.m --- /* -*-Mode:objc-*- */ /* * FOOMComb.m * * feedback delay line * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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: FOOMComb.m,v 1.1 2007/12/14 14:16:08 rumori Exp $ */ #include "FOOMComb.h" @implementation FOOMComb - (id) initWithTaps: (int)taps maxDelay: (double)maxDelay { _taps = taps; _table = [FOOGlobalsManager getSineXoverXTable: _taps]; _line = NULL; _maxDelayT = maxDelay; return self; } - (void) dealloc { NSZoneFree([self zone], _line); _line = NULL; [super dealloc]; } - reset { [super reset]; if (_line) { NSZoneFree([self zone], _line); _line = NULL; } _ptr = 0; return self; } - startUp { [super startUp]; _maxDelay = SEC_TO_SAM(_maxDelayT); _line = NSZoneCalloc([self zone], _maxDelay, sizeof(sample_t)); _ptr = 0; return self; } - (BOOL) activate { // if (INPUTS < 2 || [INPUT(0) activate] == NO || [INPUT(1) activate] == NO) // { // _active = NO; // } // else // { // _active = YES; // } // take feedback in account [INPUT(0) activate]; [INPUT(1) activate]; [INPUT(2) activate]; return (_active = YES); } - (BOOL) compute { FOOModule *m0, *m1, *m2; sample_t *input, *delay, *feedback, *output; int i, n, dpos, ipos; double tap, sr, fpos, fti, tdelta; int tot, tinc, ti1, ti2; // total of taps, tap increment sample_t *base, *delta; // lookup table, delta table COMPUTE_PROLOGUE; m0 = INPUT(0); m1 = INPUT(1); m2 = INPUT(2); [m0 compute]; [m1 compute]; [m2 compute]; input = DATA_OF_MOD(m0); delay = DATA_OF_MOD(m1); feedback = DATA_OF_MOD(m2); output = DATA_OF_BUF(_buffer); n = BLOCKSIZE; sr = SAMPLERATE; tot = _taps / 2; tinc = [_table getSize] / tot; base = [_table getBase]; delta = [_table getDelta]; while (n--) { // interpolate tap = 0; fpos = *delay++ * sr; ipos = (int)fpos; // shorter delay than samples for interpolation? if (ipos < tot) { FOO_ERROR(NO, YES); ipos = tot; } fti = (fpos - ipos) * tinc; ti1 = (int)fti; ti2 = tinc - ti1 - 1; tdelta = fti - ti1; dpos = _ptr + ipos; while (dpos > _maxDelay - 1) { // wrap around dpos -= _maxDelay; } for (i = tot; i > 0; --i, ti1 += tinc) { tap += _line[dpos--] * (base[ti1] + delta[ti1] * tdelta); if (dpos < 0) { dpos = _maxDelay - 1; } } tdelta = 1 - tdelta; dpos = _ptr + ipos + 1; while (dpos > _maxDelay - 1) { // wrap around dpos -= _maxDelay; } for (i = tot; i > 0; --i, ti2 += tinc) { tap += _line[dpos++] * (base[ti2] + delta[ti2] * tdelta); if (dpos > _maxDelay - 1) { dpos = 0; } } // copy + feedback to delay line _line[_ptr] = tap * *feedback++ + *input; --_ptr; if (_ptr < 0) { // wrap around _ptr = _maxDelay - 1; } // output *output++ = tap; } COMPUTE_EPILOGUE; } /* * archiving methods */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; return self; } @end --- NEW FILE: FOOMInteg.h --- /* -*-Mode:objc-*- */ /* * FOOMInteg.h * * module integ * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:12 rumori Exp $ */ #ifndef FOOM_FOOMINTEG_H_INCLUDED #define FOOM_FOOMINTEG_H_INCLUDED #include <FOO/FOOModule.h> @interface FOOMInteg : FOOModule <NSCoding> { double _last; } @end #endif /* #ifndef FOOM_FOOMINTEG_H_INCLUDED */ --- NEW FILE: FOOMLine.m --- /* -*-Mode:objc-*- */ /* * FOOMLine.m * * module line * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:12 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; memset(p, 0, b * sizeof(sample_t)); } else { b = 0; } if (_end < BLOCKEND) { e = BLOCKSIZE - (BLOCKEND - _end); memset(p + e, 0, (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 */ - (void) encodeWithCoder: (NSCoder *)coder { [super encodeWithCoder: coder]; if ([coder allowsKeyedCoding]) { [coder encodeDouble: _origin forKey: @"FOOMLine:origin"]; [coder encodeDouble: _incr forKey: @"FOOMLine:incr"]; [coder encodeDouble: _beginT forKey: @"FOOMLine:beginT"]; [coder encodeDouble: _endT forKey: @"FOOMLine:endT"]; [coder encodeDouble: _range forKey: @"FOOMLine:range"]; } else { [coder encodeValueOfObjCType: @encode(double) at: &_origin]; [coder encodeValueOfObjCType: @encode(double) at: &_incr]; [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; [coder encodeValueOfObjCType: @encode(double) at: &_endT]; [coder encodeValueOfObjCType: @encode(double) at: &_range]; } return; } - (id) initWithCoder: (NSCoder *)coder { self = [super initWithCoder: coder]; if ([coder allowsKeyedCoding]) { _origin = [coder decodeDoubleForKey: @"FOOMLine:origin"]; _incr = [coder decodeDoubleForKey: @"FOOMLine:incr"]; _beginT = [coder decodeDoubleForKey: @"FOOMLine:beginT"]; _endT = [coder decodeDoubleForKey: @"FOOMLine:endT"]; _range = [coder decodeDoubleForKey: @"FOOMLine:range"]; } else { [coder decodeValueOfObjCType: @encode(double) at: &_origin]; [coder decodeValueOfObjCType: @encode(double) at: &_incr]; [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; [coder decodeValueOfObjCType: @encode(double) at: &_endT]; [coder decodeValueOfObjCType: @encode(double) at: &_range]; } return self; } @end --- NEW FILE: FOOMComb.h --- /* -*-Mode:objc-*- */ /* * FOOMComb.h * * feedback delay line * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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: FOOMComb.h,v 1.1 2007/12/14 14:16:08 rumori Exp $ */ #ifndef FOOM_FOOMCOMB_H_INCLUDED #define FOOM_FOOMCOMB_H_INCLUDED #include <FOO/FOOModule.h> #include <FOO/FOOLookupTable.h> @interface FOOMComb : FOOModule <NSCoding> { int _maxDelay; // maximum delay in samples = size of delay line double _maxDelayT; // maximum delay in seconds sample_t *_line; // delay line int _ptr; // write index in delay line int _taps; // num of taps for resampling FOOLookupTable *_table; // sinc table for resampling } - (id) initWithTaps: (int)taps maxDelay: (double)maxDelay; @end #endif /* #ifndef FOOM_FOOMALLPASS_H_INCLUDED */ --- NEW FILE: FOOMReverb.h --- /* -*-Mode:objc-*- */ /* * FOOMReverb.h * * module reverb * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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 2007/12/14 14:16:15 rumori Exp $ */ #ifndef FOOM_FOOMREVERB_H_INCLUDED #define FOOM_FOOMREVERB_H_INCLUDED #include <FOO/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 <NSCoding> { 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: FOOMReadBpf.m --- /* -*-Mode:objc-*- */ /* * FOOMReadBpf.m * * module read bpf * */ /* * foo sound synthesis system * * (C) 1993-2005 Gerhard Eckel, Ramon Gonzalez-Arroyo * (C) 2003-2005 Martin Rumori * (C) 1993-1996 IRCAM, ZKM */ /* * 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... [truncated message content] |
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6443 Removed 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 FOOMKillDC.h FOOMKillDC.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 Makefile.am Log Message: removed orthodox files --- FOOMLookup.h DELETED --- --- FOOMLookup.m DELETED --- --- FOOMConstant.h DELETED --- --- FOOMMul.m DELETED --- --- FOOMDiv.m DELETED --- --- FOOMReadTranspSnd.h DELETED --- --- FOOMTransposeSnd.m DELETED --- --- FOOMNeg.m DELETED --- --- FOOMReadTranspSnd.m DELETED --- --- FOOMDiv.h DELETED --- --- FOOMTransposeSnd.h DELETED --- --- FOOMReverb.m DELETED --- --- FOOMInteg.h DELETED --- --- FOOMLine.m DELETED --- --- FOOMReverb.h DELETED --- --- FOOMReadBpf.m DELETED --- --- FOOMDirac.m DELETED --- --- FOOMReverbOutput.m DELETED --- --- FOOMReadBpf.h DELETED --- --- FOOMReverbOutput.h DELETED --- --- FOOMDirac.h DELETED --- --- FOOMConstantTwoPoleTwoZero.m DELETED --- --- FOOMAdd.h DELETED --- --- FOOMConstantBiquad.m DELETED --- --- FOOMOscillator.m DELETED --- --- FOOMMath.m DELETED --- --- FOOMNoise.h DELETED --- --- FOOMConstantBiquad.h DELETED --- --- FOOMMath.h DELETED --- --- FOOMGate.h DELETED --- --- FOOMKillDC.h DELETED --- --- Makefile.am DELETED --- --- FOOMGate.m DELETED --- --- FOOMVariableTwoPole.m DELETED --- --- FOOMFiltreVariableEtat.h DELETED --- --- FOOMVariableTwoPole.h DELETED --- --- FOOMConstantTwoPole.m DELETED --- --- FOOMConstantTwoPole.h DELETED --- --- FOOMDiff.m DELETED --- --- FOOMTransposeBpf.m DELETED --- --- FOOMDiff.h DELETED --- --- FOOMTransposeBpf.h DELETED --- --- FOOMExpon.h DELETED --- --- FOOMReverb8.m DELETED --- --- FOOMReverb8.h DELETED --- --- FOOMExpon.m DELETED --- --- FOOMKillDC.m DELETED --- --- FOOMReadSnd.h DELETED --- --- FOOMReadSnd.m DELETED --- --- FOOMInteg.m DELETED --- --- FOOMConstant.m DELETED --- --- FOOMFof.h DELETED --- --- FOOMSub.m DELETED --- --- FOOMFof.m DELETED --- --- FOOMSub.h DELETED --- --- FOOMLine.h DELETED --- --- FOOMNeg.h DELETED --- --- FOOMOscillator.h DELETED --- --- FOOMBandlimitedNoise.m DELETED --- --- FOOMAdd.m DELETED --- --- FOOMMul.h DELETED --- --- FOOMNoise.m DELETED --- --- FOOMBandlimitedNoise.h DELETED --- --- FOOMConstantTwoPoleTwoZero.h DELETED --- --- FOOMFiltreVariableEtat.m DELETED --- |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:10:32
|
Update of /cvsroot/foo/foo/libfoo/modules/banff In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv5255/banff Removed Files: FOOMAllpass.h FOOMAllpass.m FOOMComb.h FOOMComb.m Log Message: removed banff subdir --- FOOMAllpass.h DELETED --- --- FOOMComb.m DELETED --- --- FOOMComb.h DELETED --- --- FOOMAllpass.m DELETED --- |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:10:30
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv5255/orthodox Modified Files: Makefile.am Log Message: removed banff subdir Index: Makefile.am =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 4 Apr 2007 14:36:04 -0000 1.3 --- Makefile.am 14 Dec 2007 14:10:33 -0000 1.4 *************** *** 11,16 **** --- 11,20 ---- FOOMAdd.h \ FOOMAdd.m \ + FOOMAllpass.h \ + FOOMAllpass.m \ FOOMBandlimitedNoise.h \ FOOMBandlimitedNoise.m \ + FOOMComb.h \ + FOOMComb.m \ FOOMConstant.h \ FOOMConstant.m \ |
|
From: Martin R. <ru...@us...> - 2007-12-14 14:09:52
|
Update of /cvsroot/foo/foo/libfoo/modules/banff In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv4832 Removed Files: Makefile.am Log Message: removed banff subdir --- Makefile.am DELETED --- |
|
From: Martin R. <ru...@us...> - 2007-11-07 20:28:18
|
Update of /cvsroot/foo/foo/libfoo/src
In directory sc8-pr-cvs17:/tmp/cvs-serv27344
Modified Files:
FOOSoundFile.m
Log Message:
fixed soundfile open bug when not using flac support
Index: FOOSoundFile.m
===================================================================
RCS file: /cvsroot/foo/foo/libfoo/src/FOOSoundFile.m,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** FOOSoundFile.m 4 Apr 2007 14:36:04 -0000 1.9
--- FOOSoundFile.m 7 Nov 2007 20:28:13 -0000 1.10
***************
*** 137,167 ****
cache handling needs read access to file */
#ifdef HAVE_SNDFILE_FLAC_SUPPORT
! if (! (_file = sf_open([_fileName cString], SFM_READ, &_fileInfo)))
! {
! fprintf(stderr, "libsndfile: %s\n", sf_strerror(_file));
! FOO_ERROR(YES, NO);
! }
! // flac ahead?
! if ((_fileInfo.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_FLAC)
! {
! mode = SFM_WRITE;
! }
! else
! {
! mode = SFM_RDWR;
! _fileInfo.format = 0; // reset
! }
! if (sf_close(_file))
! {
! fprintf(stderr, "libsndfile: %s\n", sf_strerror(_file));
! FOO_ERROR(YES, NO);
! }
! _file = NULL;
! break;
#else // #ifdef HAVE_SNDFILE_FLAC_SUPPORT
! // mode = SFM_WRITE;
! break;
#endif // #ifdef HAVE_SNDFILE_FLAC_SUPPORT
--- 137,167 ----
cache handling needs read access to file */
#ifdef HAVE_SNDFILE_FLAC_SUPPORT
! if (! (_file = sf_open([_fileName cString], SFM_READ, &_fileInfo)))
! {
! fprintf(stderr, "libsndfile: %s\n", sf_strerror(_file));
! FOO_ERROR(YES, NO);
! }
! // flac ahead?
! if ((_fileInfo.format & SF_FORMAT_TYPEMASK) == SF_FORMAT_FLAC)
! {
! mode = SFM_WRITE;
! }
! else
! {
! mode = SFM_RDWR;
! _fileInfo.format = 0; // reset
! }
! if (sf_close(_file))
! {
! fprintf(stderr, "libsndfile: %s\n", sf_strerror(_file));
! FOO_ERROR(YES, NO);
! }
! _file = NULL;
! break;
#else // #ifdef HAVE_SNDFILE_FLAC_SUPPORT
! mode = SFM_RDWR;
! break;
#endif // #ifdef HAVE_SNDFILE_FLAC_SUPPORT
|
|
From: Martin R. <ru...@us...> - 2007-10-14 20:31:11
|
Update of /cvsroot/foo/foo/libfoo
In directory sc8-pr-cvs17:/tmp/cvs-serv9533/libfoo
Modified Files:
configure.ac
Log Message:
adopted build system for supporting gnustep-make >= 2.0.0
Index: configure.ac
===================================================================
RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** configure.ac 4 Apr 2007 14:36:04 -0000 1.16
--- configure.ac 14 Oct 2007 20:31:11 -0000 1.17
***************
*** 102,135 ****
if test ${enable_gnustep} = yes; then
- # check for gnustep
- AC_MSG_CHECKING([for GNUstep installation])
! # check for GNUSTEP_SYSTEM_ROOT
! if test -z "$GNUSTEP_SYSTEM_ROOT"; then
! AC_MSG_RESULT([no])
! AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT not defined. Probably you forgot to run the GNUstep initialization script first.])
else
! AC_MSG_RESULT([yes])
! fi
! # 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)])
! # target specific stuff
! case "$target_os" in
! freebsd* | openbsd* )
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib";;
! netbsd*)
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
! esac
use_foundation="GNUstep"
! AC_DEFINE(FOO_GNUSTEP, 1, Define whether we are using GNUstep)
! FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)"
! FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)"
# get rid of warnings regarding #import
--- 102,144 ----
if test ${enable_gnustep} = yes; then
! AC_CHECK_PROG(use_gnustep_config, gnustep-config, yes, no)
!
! if test ${use_gnustep_config} = "yes"; then
! FOO_GNUSTEP_OBJCFLAGS=`gnustep-config --objc-flags`
! FOO_GNUSTEP_LDFLAGS=`gnustep-config --base-libs`
else
! # check for oldish gnustep installation with sourced variables
! AC_MSG_CHECKING([for gnustep-make << 2.0.0 installation])
! # check for GNUSTEP_SYSTEM_ROOT
! if test -z "$GNUSTEP_SYSTEM_ROOT"; then
! AC_MSG_RESULT([no])
! AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT not defined. Probably you forgot to run the GNUstep initialization script first.])
! else
! AC_MSG_RESULT([yes])
! fi
! # 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)])
!
! # target specific stuff
! case "$target_os" in
! freebsd* | openbsd* )
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib";;
! netbsd*)
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
! esac
!
! FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)"
! FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)"
! fi
use_foundation="GNUstep"
! AC_DEFINE(FOO_GNUSTEP, 1, Define whether we are using oldish GNUstep)
# get rid of warnings regarding #import
|
|
From: Martin R. <ru...@us...> - 2007-10-14 20:31:11
|
Update of /cvsroot/foo/foo/elkfoo
In directory sc8-pr-cvs17:/tmp/cvs-serv9533/elkfoo
Modified Files:
configure.ac
Log Message:
adopted build system for supporting gnustep-make >= 2.0.0
Index: configure.ac
===================================================================
RCS file: /cvsroot/foo/foo/elkfoo/configure.ac,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** configure.ac 10 Apr 2007 14:05:41 -0000 1.16
--- configure.ac 14 Oct 2007 20:31:10 -0000 1.17
***************
*** 66,103 ****
use_gnustep_base=no
FOO_GNUSTEP_OBJCFLAGS=""
FOO_GNUSTEP_LDFLAGS=""
if test ${enable_gnustep} = yes; then
! # check for gnustep
! AC_MSG_CHECKING([for GNUstep installation])
! # check for GNUSTEP_SYSTEM_ROOT
! if test -z "$GNUSTEP_SYSTEM_ROOT"; then
! AC_MSG_RESULT([no])
! AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT not defined. Probably you forgot to run the GNUstep initialization script first.])
else
! AC_MSG_RESULT([yes])
! fi
! # 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)])
! # target specific stuff
! case "$target_os" in
! freebsd* | openbsd* )
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib";;
! netbsd*)
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
! esac
use_foundation="GNUstep"
! AC_DEFINE(FOO_GNUSTEP, 1, Define if we are using GNUstep)
! FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)"
! FOO_GNUSTEP_INCLUDES="\$(GNUSTEP_HEADERS_FLAGS)"
! FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)"
# get rid of warnings regarding #import
--- 66,115 ----
use_gnustep_base=no
FOO_GNUSTEP_OBJCFLAGS=""
+ FOO_GNUSTEP_INCLUDES=""
FOO_GNUSTEP_LDFLAGS=""
if test ${enable_gnustep} = yes; then
! AC_CHECK_PROG(use_gnustep_config, gnustep-config, yes, no)
! if test ${use_gnustep_config} = "yes"; then
! FOO_GNUSTEP_OBJCFLAGS=`gnustep-config --objc-flags`
! FOO_GNUSTEP_LDFLAGS=`gnustep-config --base-libs`
! # this feels rather hacky: is this valid for all gnustep installs?
! # for src/main.c: #include <GSConfig.h>
! FOO_GNUSTEP_INCLUDES="-I`gnustep-config --variable=GNUSTEP_SYSTEM_HEADERS`/GNUstepBase"
else
! # check for oldish gnustep installation with sourced variables
! AC_MSG_CHECKING([for gnustep-make << 2.0.0 installation])
! # check for GNUSTEP_SYSTEM_ROOT
! if test -z "$GNUSTEP_SYSTEM_ROOT"; then
! AC_MSG_RESULT([no])
! AC_MSG_ERROR([GNUSTEP_SYSTEM_ROOT not defined. Probably you forgot to run the GNUstep initialization script first.])
! else
! AC_MSG_RESULT([yes])
! fi
! # 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)])
!
! # target specific stuff
! case "$target_os" in
! freebsd* | openbsd* )
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib";;
! netbsd*)
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
! esac
!
! FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)"
! FOO_GNUSTEP_INCLUDES="\$(GNUSTEP_HEADERS_FLAGS)"
! FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)"
! fi
use_foundation="GNUstep"
! AC_DEFINE(FOO_GNUSTEP, 1, Define whether we are using oldish GNUstep)
# get rid of warnings regarding #import
|