creb-0.9.2+darcs20151027/0000755000000000000000000000000012613674327012550 5ustar0000000000000000creb-0.9.2+darcs20151027/configure.ac0000644000000000000000000000154712613674326015044 0ustar0000000000000000AC_INIT(modules/setup.c) AC_PROG_CC AC_HEADER_STDC echo -n "checking architecture... " ARCH=`uname -s` if test $ARCH == Linux; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_linux LIBFLAGS="-rdynamic -shared" echo "Linux" elif test $ARCH == Darwin; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_darwin LIBFLAGS="-bundle -bundle_loader $prefix/pd/bin/pd" echo "Darwin" else echo WARNING: Architecture `uname -s` not supported. exit; fi CPPFLAGS="$CPPFLAGS -I$prefix/pd/src" AC_CHECK_HEADER(m_pd.h,, echo "WARNING: m_pd.h not found in the standard include path." echo " If PD_DIR in Makefile.config.in is set correctly you can ignore this warning." ) AC_CHECK_LIB(m,sin,, echo "Math library not found. sorry..." || exit) AC_SUBST(PD_INCLUDE_DIR) AC_SUBST(LIBNAME) AC_SUBST(LIBFLAGS) AC_CONFIG_FILES(Makefile.config) AC_OUTPUT creb-0.9.2+darcs20151027/.header.html0000644000000000000000000000073312613674326014746 0ustar0000000000000000
This is a darcs archive for the Creb project.

To make a local copy of the repositiory do:

  darcs get http://zwizwa.be/darcs/creb
  cd creb
  . bootstrap
  ./configure && make 

And optionally (as root), install the library. By default this is
in the pd tree in /usr/local

  make install

To get updates later, cd to the creb directory and do:

  darcs pull -a
  . bootstrap
  ./configure && make

creb-0.9.2+darcs20151027/configure0000755000000000000000000037560612613674327014500 0ustar0000000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="modules/setup.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS LIBFLAGS LIBNAME PD_INCLUDE_DIR EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi echo -n "checking architecture... " ARCH=`uname -s` if test $ARCH == Linux; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_linux LIBFLAGS="-rdynamic -shared" echo "Linux" elif test $ARCH == Darwin; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_darwin LIBFLAGS="-bundle -bundle_loader $prefix/pd/bin/pd" echo "Darwin" else echo WARNING: Architecture `uname -s` not supported. exit; fi CPPFLAGS="$CPPFLAGS -I$prefix/pd/src" # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "m_pd.h" "ac_cv_header_m_pd_h" "$ac_includes_default" if test "x$ac_cv_header_m_pd_h" = xyes; then : else echo "WARNING: m_pd.h not found in the standard include path." echo " If PD_DIR in Makefile.config.in is set correctly you can ignore this warning." fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else echo "Math library not found. sorry..." || exit fi ac_config_files="$ac_config_files Makefile.config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi creb-0.9.2+darcs20151027/bootstrap0000644000000000000000000000004412613674326014505 0ustar0000000000000000#!/bin/bash autoconf chmod +x bin/* creb-0.9.2+darcs20151027/Makefile.config.in0000644000000000000000000000074612613674326016067 0ustar0000000000000000PD_INCLUDE_DIR = @PD_INCLUDE_DIR@ LIBNAME = @LIBNAME@ LIBFLAGS = @LIBFLAGS@ prefix=@prefix@ CREB_VERSION = 0.9.2 DEFS = -DPD -DCREB_VERSION=\"$(CREB_VERSION)\" CFLAGS = $(DEFS) -fPIC -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch # -Wshadow INCLUDE = -I$(PD_INCLUDE_DIR) -I../include -I../include/dspi .c.o: $(CC) $(CFLAGS) $(INCLUDE) -o $*.o -c $*.c .cc.o: $(CXX) $(CFLAGS) $(INCLUDE) -o $*.o -c $*.cc creb-0.9.2+darcs20151027/bugs.txt0000644000000000000000000000264512613674326014257 0ustar0000000000000000Bugs item #3597556, was opened at 2012-12-19 13:36 Message generated for change (Settings changed) made by eighthave You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3597556&group_id=55736 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: externals Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) > Assigned to: Tom Schouten (doelie) Summary: creb documentation bugs Initial Comment: the following objects need examples in the help patch: creb/64k creb/bhip~ creb/blop~ creb/bpm creb/cadd~ creb/ccmap~ creb/cconj~ creb/cep~ creb/cexp~ creb/cinv~ creb/clog~ creb/cmul~ creb/cosc~ creb/csub~ creb/diag~ creb/dsfosc~ creb/eadh~ creb/eadsrh~ creb/expmap~ creb/fblock creb/fmod creb/fmop~ creb/frequor~ creb/icep~ creb/idsfosc~ creb/inv creb/lattice3 creb/lpifft~ creb/pdynwav~ creb/ramp~ creb/scale7 creb/statwav~ creb/tblock creb/ti_hihat creb/ucmod~ creb/ucnorm~ creb/diag~ (the example patch just shows the messages accepted by the inlet but doesn't do anything with the object) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=3597556&group_id=55736 creb-0.9.2+darcs20151027/CHANGES.LOG0000644000000000000000000000325312613674326014165 0ustar00000000000000000.1-0.7: the dark ages 0.8: 2003/02/18 fixed makefiles, added window~ (0.8.1) some bugfixes + gcc 3 compilation problems 0.9: lots of bugfixes and new objects & abstractions bugfixes: exponential envelopes no longer have a 'hold feature' (use eadsr~ or ear~ combined with a del obj to get a hold) fdn~ blowup fixed lattice~ blowup fixed new objects: blocknorm~: normalizes a set of blocks to rms = 1 sbosc~: smallband pitched complex oscillator (i.e. for formant synth) bitsplit~: splits a signal into a binary representation clog~/cexp~: complex log and exp (clib functions) nfft~/nifft~: normalized versions of the fft~/ifft~ objects blosc~: minimum phase filtered bandlimited oscillators + comparator resofilt~: some vintage filters with all-signal input and proper interpolation scrollgrid1D~: chaotic scroll grid oscillator new abstractions: step_*: some array readers/writers (for step sequencer) cstate~/cstate+~: complex dynwav state read & write pulsor~: pulse with duty cycle for dynwav spectral filtering frequor~: a phasor for frequencies (fft traversal) dsfosc~: complex discrete summation formula oscillator idsfosc~: infinite series version (cheaper, but aliased) cosc~: complex oscillator (complex phasor) ucnorm~: complex unit circle normalization ucmod~: complex unit circle modulation lattice3: expand a (3d) harmonic lattice vector to a frequency ratio ccmap~: complex conformal map of the unit disk cinv~: complex inverse cmul~: complex multipy cadd~/csub~: complex add/sub cconj~: complex conjugate fmop~: fm operator cep~/icep~: cepstrum transform and inverse sin~: sine creb-0.9.2+darcs20151027/README.darcs0000644000000000000000000000022112613674326014515 0ustar0000000000000000to update type darcs pull after getting/pulling, do . bootstrap this will generate the configure scripts, so you can ./configure && make creb-0.9.2+darcs20151027/project.mk0000644000000000000000000000400112613674326014541 0ustar0000000000000000#!/usr/bin/make -f # Faster alternative makefile, for development only. SRC_C:= \ ./modules/dwt.c \ ./modules/scrollgrid1D~.c \ ./modules/diag~.c \ ./modules/statwav~.c \ ./modules/xfm~.c \ ./modules/junction~.c \ ./modules/permut~.c \ ./modules/dynwav~.c \ ./modules/dist~.c \ ./modules/setup.c \ ./modules/qmult~.c \ ./modules/ffpoly.c \ ./modules/dt_ms.c \ ./modules/sawtooth~.c \ ./modules/sbosc~.c \ ./modules/ratio.c \ ./modules/bitsplit~.c \ ./modules/fdn~.c \ ./modules/eblosc~.c \ ./modules/bwin~.c \ ./modules/fwarp.c \ ./modules/cmath.c \ ./modules/cheby~.c \ ./modules/blocknorm~.c \ ./modules/bdiag~.c \ ./modules/ramp~.c \ ./modules/tabreadmix~.c \ ./modules/ead~.c \ ./modules/matrix~.c \ ./modules/abs~.c \ ./modules/lattice~.c \ ./modules/resofilt~.c \ ./modules/ear~.c \ ./modules/qnorm~.c \ ./modules/eadsr~.c \ ./modules/bfft~.c \ SRC_CC := \ ./modules++/blosc~.cc \ ./modules++/biquadseries~.cc \ ./modules++/filterortho~.cc \ GCC_CFLAGS := -funroll-loops CC := gcc $(GCC_CFLAGS) CPLUSPLUS := g++ $(GCC_CFLAGS) # CC := clang # CPLUSPLUS := clang++ CFLAGS := -DPD -DCREB_VERSION=\"0.9.2\" -fPIC -O3 -fomit-frame-pointer -Wall -W -Wno-unused -Wno-parentheses -Wno-switch BUILD := build ARCH := pd_linux LDFLAGS := -rdynamic -shared OUT := $(BUILD)/creb.$(ARCH) O := \ $(patsubst %.c,$(BUILD)/%.o,$(SRC_C)) \ $(patsubst %.cc,$(BUILD)/%.o,$(SRC_CC)) D := $(O:.o=.d) .SECONDARY: .DELETE_ON_ERROR: .PHONY: all all: $(OUT) .PHONY: clean clean: rm -rf build $(BUILD)/%.d: %.c @echo [d] $(notdir $@) @mkdir -p $(dir $@) @$(CC) -MT $(basename $@).o -MM $(CFLAGS) $< >$@ $(BUILD)/%.d: %.cc @echo [d] $(notdir $@) @mkdir -p $(dir $@) @$(CPLUSPLUS) -MT $(basename $@).o -MM $(CFLAGS) $< >$@ $(BUILD)/%.o: %.c $(BUILD)/%.d @echo [o] $(notdir $@) @mkdir -p $(dir $@) @$(CC) $(CFLAGS) -c $< -o $@ $(BUILD)/%.o: %.cc $(BUILD)/%.d @echo [o] $(notdir $@) @mkdir -p $(dir $@) @$(CPLUSPLUS) $(CFLAGS) -c $< -o $@ $(OUT): $(O) @echo [pd_linux] $(notdir $@) @$(CPLUSPLUS) $(LDFLAGS) -o $@ $(O) $(LIBS) -include $(D) creb-0.9.2+darcs20151027/README0000644000000000000000000000234312613674326013431 0ustar0000000000000000CREB - compl. red. ext. blk. some externals for pure data Copyright (c) by Tom Schouten This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The GNU Public Licence can be found in the file COPYING ------------------------------------------------------------------ This is a collection of pd externals. My bag of tricks. To build: ./configure make To run: add the library to the pd startup line, and specify the path for the included abstractions (/abs) To figure out how it works: Documentation patches in doc/ See doc/reference.txt for a list of objects Should build on linux and darwin (OSX). Enjoy, Tom creb-0.9.2+darcs20151027/Makefile0000644000000000000000000000146012613674326014210 0ustar0000000000000000include Makefile.config all: make -C modules make -C modules++ rm -f $(LIBNAME) $(CXX) $(LIBFLAGS) -o $(LIBNAME) modules/*.o modules++/*.o -lm clean: make -C modules clean make -C modules++ clean rm -f $(LIBNAME) rm -f *~ tags: etags --language=auto */*.c */*.h */*.cpp tagsclean: rm -f TAGS install: test -d $(prefix)/lib/pd install -d $(prefix)/lib/pd/extra install -m 755 $(LIBNAME) $(prefix)/lib/pd/extra install -m 644 abs/*.pd $(prefix)/lib/pd/extra install -m 644 doc/*.pd $(prefix)/lib/pd/doc/5.reference install -d $(prefix)/lib/pd/doc/creb install -m 644 doc/examples/*.pd $(prefix)/lib/pd/doc/creb bootstrap: . bootstrap # snapshot after release snapshot: bootstrap bin/dist-snapshot -d # to make a release, increment the version number in darcs and run # bin/dist-snapshot creb-0.9.2+darcs20151027/TODO0000644000000000000000000000016112613674326013235 0ustar0000000000000000* rename or remove matrix~ * fix nan/denorm problems in recursive filters * rewrite iir (c++) stuff -> filters.h creb-0.9.2+darcs20151027/COPYING0000644000000000000000000004310312613674326013603 0ustar0000000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR PDP.LICENSE, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. creb-0.9.2+darcs20151027/README.extcvs0000644000000000000000000000062212613674326014742 0ustar0000000000000000 NOTE FOR THE PURE DATA EXTERNALS CVS if you need to change anything to the source files here, let me know at to prevent i overwrite your changes when i update the CVS from my darcs archive at: http://zwizwa.be/darcs/creb i update like this: * update from darcs tree * update from sourceforge cvs * briefly look over changes, take mine as master * commit darcs + sourceforge creb-0.9.2+darcs20151027/modules++/0000755000000000000000000000000012613674326014345 5ustar0000000000000000creb-0.9.2+darcs20151027/modules++/DSPIcomplex.h0000644000000000000000000001307112613674326016647 0ustar0000000000000000/* * DSPIcomplex.h - Quick and dirty inline class for complex numbers * (mainly to compute filter poles/zeros, not to be used inside loops) * Copyright (c) 2000 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef DSPIcomplex_h #define DSPIcomplex_h #include #include class DSPIcomplex { public: inline DSPIcomplex() {_r = _i = 0;} inline DSPIcomplex(const t_float &a, const t_float &b) {setCart(a, b);} inline DSPIcomplex(const t_float &phasor) {setAngle(phasor);} inline void setAngle(const t_float &angle) {_r = cos(angle); _i = sin(angle);} inline void setPolar(const t_float &phasor, const t_float &norm) {_r = norm * cos(phasor); _i = norm * sin(phasor);} inline void setCart(const t_float &a, const t_float &b) {_r = a; _i = b;} inline const t_float& r() const {return _r;} inline const t_float& i() const {return _i;} inline t_float norm2() const {return _r*_r+_i*_i;} inline t_float norm() const {return sqrt(norm2());} inline void normalize() {t_float n = 1.0f / norm(); _r *= n; _i *= n;} inline DSPIcomplex conj() const {return DSPIcomplex(_r, -_i);} inline t_float angle() const {return atan2(_i, _r);} inline DSPIcomplex operator+ (const DSPIcomplex &a) const { return DSPIcomplex(_r + a.r(), _i + a.i()); } inline DSPIcomplex operator+ (t_float f) const { return DSPIcomplex(_r + f, _i); } inline DSPIcomplex operator- (const DSPIcomplex &a) const { return DSPIcomplex(_r - a.r(), _i - a.i()); } inline DSPIcomplex operator- (t_float f) const { return DSPIcomplex(_r - f, _i); } inline DSPIcomplex operator* (const DSPIcomplex &a) const { return DSPIcomplex(_r * a.r() - _i * a.i(), _i * a.r() + _r * a.i()); } inline DSPIcomplex operator* (t_float f) const { return DSPIcomplex(_r * f, _i * f); } inline DSPIcomplex operator/ (const DSPIcomplex &a) const { t_float n_t = 1.0f / a.norm2(); return DSPIcomplex(n_t * (_r * a.r() + _i * a.i()), n_t * (_i * a.r() - _r * a.i())); } inline DSPIcomplex operator/ (t_float f) const { t_float n_t = 1.0f / f; return DSPIcomplex(n_t * _r, n_t * _i); } inline friend std::ostream& operator<< (std::ostream& o, DSPIcomplex& a) { return o << "(" << a.r() << "," << a.i() << ")"; } inline friend DSPIcomplex operator+ (t_float f, DSPIcomplex& a) { return(DSPIcomplex(a.r() + f, a.i())); } inline friend DSPIcomplex operator- (t_float f, DSPIcomplex& a) { return(DSPIcomplex(f - a.r(), - a.i())); } inline friend DSPIcomplex operator/ (t_float f, DSPIcomplex& a) { return(DSPIcomplex(f,0) / a); } // ???? inline friend DSPIcomplex operator* (t_float f, DSPIcomplex& a) { return(DSPIcomplex(f*a.r(), f*a.i())); } inline DSPIcomplex& operator *= (t_float f) { _r *= f; _i *= f; return *this; } inline DSPIcomplex& operator /= (t_float f) { _r /= f; _i /= f; return *this; } inline DSPIcomplex& operator *= (DSPIcomplex& a) { t_float r_t = _r * a.r() - _i * a.i(); _i = _r * a.i() + _i * a.r(); _r = r_t; return *this; } inline DSPIcomplex& operator /= (DSPIcomplex& a) { t_float n_t = a.norm2(); t_float r_t = n_t * (_r * a.r() + _i * a.i()); _i = n_t * (_i * a.r() - _r * a.i()); _r = r_t; return *this; } t_float _r; t_float _i; }; // COMPLEX LOG inline DSPIcomplex dspilog(DSPIcomplex a) /* complex log */ { t_float r_t = log(a.norm()); t_float i_t = a.angle(); return DSPIcomplex(r_t, i_t); } // COMPLEX EXP inline DSPIcomplex dspiexp(DSPIcomplex a) /* complex exp */ { return (DSPIcomplex(a.i()) * exp(a.r())); } // BILINEAR TRANSFORM analog -> digital inline DSPIcomplex bilin_stoz(DSPIcomplex a) { DSPIcomplex a2 = a * 0.5; return((1.0 + a2)/(1.0 - a2)); } // BILINEAR TRANSFORM digital -> analog inline DSPIcomplex bilin_ztos(DSPIcomplex a) { return ((a - 1.0) / (a + 1.0))*2.0; } // not really a complex function but a nice complement to the bilinear routines inline t_float bilin_prewarp(t_float freq) { return 2.0 * tan(M_PI * freq); } #endif //DSPIcomplex_h creb-0.9.2+darcs20151027/modules++/Makefile0000644000000000000000000000016512613674326016007 0ustar0000000000000000include ../Makefile.config current: all all: biquadseries~.o filterortho~.o blosc~.o clean: rm -f *~ rm -f *.o creb-0.9.2+darcs20151027/modules++/DSPIfilters.h0000644000000000000000000003632412613674326016656 0ustar0000000000000000/* * DSPIfilters.h - Inline classes for biquad filters * Copyright (c) 2000 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef DSPIfilters_h #define DSPIfilters_h #include "DSPIcomplex.h" #include "DSPI.h" //#include /* orthogonal biquad */ class DSPIfilterOrtho { public: inline DSPIfilterOrtho(){resetState();resetCoef();resetSCoef();} inline ~DSPIfilterOrtho(){} inline void resetState(){d1A = d1B = d2A = d2B = 0.0;} inline void resetCoef(){ai = ar = c0 = c1 = c2 = 0.0;} inline void resetSCoef(){s_ai = s_ar = s_c0 = s_c1 = s_c2 = 0.0;} /* * Biquad filters remarks * * Q is defined with reference to the analog prototype: * poles/zeros = w0 * (1/Q +- sqrt(1 - 1/Q^2)) * * the num/den polynomial then has the form: * 1 + 2s/Qw0 + (s/w0)^2 * * if Q < 1 => real valued poles/zeros * if Q > 1 => complex values poles/zeros * if Q = inf => imaginary poles/zeros * if Q = sqrt(2) => 'maximally flat' poles/zeros * * the analog prototypes are converted to the digital domain * using the bilinear transform. hence the prewarping. */ // make sure freq and Q are positive and within bounds inline void checkBounds(t_float &freq, t_float &Q) { freq = fabs(freq); Q = fabs(Q); t_float epsilon = .0001; // stability guard t_float fmin = 0.0 + epsilon; t_float fmax = 0.5 - epsilon; t_float Qmin = 1.1; if (freq < fmin) freq = fmin; if (freq > fmax) freq = fmax; if (Q < Qmin) Q = Qmin; } inline void setAP(t_float freq, t_float Q) // allpass { // prototype: H(s) = (1 - 2s/Qw0 + (s/w0)^2) / (1 + 2s/Qw0 + (s/w0)^2) // s_p = - s_z (analog: symmetric wrt. im axis) // z_p = 1/z_z (digiatl: summ wrt. unit circle) checkBounds(freq, Q); // prewarp for bilin transfo freq = bilin_prewarp(freq); t_float zeta = 1.0/Q; DSPIcomplex p = bilin_stoz(DSPIcomplex(-zeta, (1.0-zeta*zeta))*freq); DSPIcomplex z = 1.0 / p; setPoleZeroNormalized(p, z, DSPIcomplex(1,0)); } inline void setLP(t_float freq, t_float Q) // low pass { // prototype: H(s) = 1 / (1 + 2s/Qw0 + (s/w0)^2) // the bilinear transform has 2 zeros at NY checkBounds(freq, Q); freq = bilin_prewarp(freq); t_float zeta = 1/Q; DSPIcomplex p = bilin_stoz(DSPIcomplex(-zeta, (1.0-zeta*zeta))*freq); setPoleZeroNormalized(p, DSPIcomplex(-1, 0), DSPIcomplex(1, 0)); } inline void setHP(t_float freq, t_float Q) // hi pass { // prototype: H(s) = (s/w0)^2 / (1 + 2s/Qw0 + (s/w0)^2) // the bilinear transform has 2 zeros at DC checkBounds(freq, Q); freq = bilin_prewarp(freq); t_float zeta = 1/Q; DSPIcomplex p = bilin_stoz(DSPIcomplex(-zeta, (1.0-zeta*zeta))*freq); setPoleZeroNormalized(p, DSPIcomplex(1, 0), DSPIcomplex(-1, 0)); } inline void setBP(t_float freq, t_float Q) // band pass (1-allpass) { // prototype: 1/2 * (1 - H_allpass(z)) setAP(freq, Q); t_float h = -0.5; c0 *= h; c1 *= h; c2 *= h; c0 -= h; } inline void setBR(t_float freq, t_float Q) // band reject { // prototype: H(s) = (1 - (s/w0)^2) / (1 + 2s/Qw0 + (s/w0)^2) checkBounds(freq, Q); // pole phasor DSPIcomplex z = DSPIcomplex(2.0 * M_PI * freq); // prewarp for bilin transfo freq = bilin_prewarp(freq); t_float zeta = 1/Q; DSPIcomplex p = bilin_stoz(DSPIcomplex(-zeta, (1.0-zeta*zeta))*freq); setPoleZeroNormalized(p, z, DSPIcomplex(1,0)); } inline void setHS(t_float freq, t_float gain) // low shelf { // hi shelf = LP - g(LP-1) t_float Q = M_SQRT2; setLP(freq, Q); c0 -= gain * (c0 - 1.0); c1 -= gain * (c1); c2 -= gain * (c2); } inline void setLS(t_float freq, t_float gain) // low shelf { // hi shelf = HP - g(HP-1) t_float Q = M_SQRT2; setHP(freq, Q); c0 -= gain * (c0 - 1.0); c1 -= gain * (c1); c2 -= gain * (c2); } inline void setEQ(t_float freq, t_float Q, t_float gain)// param EQ { // EQ = (1+A)/2 + (1-A)/2 AP t_float a0 = 0.5 * (1.0 + gain); t_float a1 = 0.5 * (1.0 - gain); setAP(freq, Q); c0 *= a1; c1 *= a1; c2 *= a1; c0 += a0; } inline void setPoleZero ( const DSPIcomplex& a, // pole const DSPIcomplex& b // zero ) { ar = a.r(); ai = a.i(); c0 = 1.0; c1 = 2.0 * (a.r() - b.r()); c2 = (a.norm2() - b.norm2() - c1 * a.r()) / a.i(); } inline void setPoleZeroNormalized ( const DSPIcomplex& a, // pole const DSPIcomplex& b, // zero const DSPIcomplex& c // gain = 1 at this freq ) { setPoleZero(a, b); DSPIcomplex invComplexGain = ((c-a)*(c-a.conj()))/((c-b)*(c-b.conj())); t_float invGain = invComplexGain.norm(); c0 *= invGain; c1 *= invGain; c2 *= invGain; } // one channel bang inline void Bang ( t_float &input, t_float &output ) { t_float d1t = ar * d1A + ai * d2A + input; t_float d2t = ar * d2A - ai * d1A; output = c0 * input + c1 * d1A + c2 * d2A; d1A = d1t; d2A = d2t; } // one channel bang smooth // a default s could be s = (1 - (.1)^(1/n)) inline void BangSmooth ( t_float &input, // input ref t_float &output, // output ref t_float s // smooth pole ) { t_float d1t = s_ar * d1A + s_ai * d2A + input; t_float d2t = s_ar * d2A - s_ai * d1A; s_ar += s * (ar - s_ar); s_ai += s * (ai - s_ai); output = s_c0 * input + s_c1 * d1A + s_c2 * d2A; d1A = d1t; d2A = d2t; s_c0 += s * (c0 - s_c0); s_c1 += s * (c1 - s_c1); s_c2 += s * (c2 - s_c2); } // two channel bang inline void Bang2 ( t_float &input1, t_float &input2, t_float &output1, t_float &output2 ) { t_float d1tA = ar * d1A + ai * d2A + input1; t_float d1tB = ar * d1B + ai * d2B + input2; t_float d2tA = ar * d2A - ai * d1A; t_float d2tB = ar * d2B - ai * d1B; output1 = c0 * input1 + d1A * c1 + d2A * c2; output2 = c0 * input2 + d1B * c1 + d2B * c2; d1A = d1tA; d2A = d2tA; d1B = d1tB; d2B = d2tB; } // two channel bang smooth inline void Bang2Smooth ( t_float &input1, t_float &input2, t_float &output1, t_float &output2, t_float s ) { t_float d1tA = s_ar * d1A + s_ai * d2A + input1; t_float d1tB = s_ar * d1B + s_ai * d2B + input2; t_float d2tA = s_ar * d2A - s_ai * d1A; t_float d2tB = s_ar * d2B - s_ai * d1B; s_ar += s * (ar - s_ar); s_ai += s * (ai - s_ai); output1 = s_c0 * input1 + d1A * s_c1 + d2A * s_c2; output2 = s_c0 * input2 + d1B * s_c1 + d2B * s_c2; d1A = d1tA; d2A = d2tA; d1B = d1tB; d2B = d2tB; s_c0 += s * (c0 - s_c0); s_c1 += s * (c1 - s_c1); s_c2 += s * (c2 - s_c2); } inline void killDenormals() { // state data t_float zero = 0.0; d1A = DSPI_IS_DENORMAL(d1A) ? zero : d1A; d2A = DSPI_IS_DENORMAL(d2A) ? zero : d2A; d1B = DSPI_IS_DENORMAL(d1B) ? zero : d1B; d2B = DSPI_IS_DENORMAL(d2B) ? zero : d2B; /* test on athlon showed nuking smooth data does not * present a noticable difference in performance however * nuking state data is really necessary // smooth data t_float dai = ai - s_ai; t_float dar = ar - s_ar; t_float dc0 = c0 - s_c0; t_float dc1 = c1 - s_c1; t_float dc2 = c2 - s_c2; s_ai = DSPI_IS_DENORMAL(dai) ? ai : s_ai; s_ar = DSPI_IS_DENORMAL(dar) ? ar : s_ar; s_c0 = DSPI_IS_DENORMAL(dc0) ? c0 : s_c0; s_c1 = DSPI_IS_DENORMAL(dc0) ? c1 : s_c1; s_c2 = DSPI_IS_DENORMAL(dc0) ? c2 : s_c2; */ } private: // state data t_float d1A; t_float d2A; t_float d1B; t_float d2B; // pole data t_float ai; t_float s_ai; t_float ar; t_float s_ar; // zero data t_float c0; t_float s_c0; t_float c1; t_float s_c1; t_float c2; t_float s_c2; }; class DSPIfilterSeries{ public: inline DSPIfilterSeries() {DSPIfilterSeries(1);} inline ~DSPIfilterSeries() {delete [] biquad;}; inline DSPIfilterSeries(int numberOfSections) { // create a set of biquads sections = numberOfSections; biquad = new DSPIfilterOrtho[numberOfSections]; } inline void setButterHP(t_float freq) { /* This member function computes the poles for a highpass butterworth filter. * The filter is transformed to the digital domain using a bilinear transform. * Every biquad section is normalized at NY. */ t_float epsilon = .0001; // stability guard t_float min = 0.0 + epsilon; t_float max = 0.5 - epsilon; if (freq < min) freq = min; if (freq > max) freq = max; // prewarp cutoff frequency t_float omega = bilin_prewarp(freq); DSPIcomplex NY(-1,0); //normalize at NY DSPIcomplex DC(1,0); //all zeros will be at DC DSPIcomplex pole( (2*sections + 1) * M_PI / (4*sections)); // first pole of lowpass filter with omega == 1 DSPIcomplex pole_inc(M_PI / (2*sections)); // phasor to get to next pole, see Porat p. 331 for (int i=0; i HP -> digital transfo DC, // all zeros at DC NY); // normalized (gain == 1) at NY pole *= pole_inc; // compe next (lowpass) pole } } inline void setButterLP(t_float freq) { /* This member function computes the poles for a lowpass butterworth filter. * The filter is transformed to the digital domain using a bilinear transform. * Every biquad section is normalized at DC. * Doing it this way, only the pole locations need to be transformed. * The constant gain factor can be computed by setting the DC gain of every section to 1. * An analog butterworth is all-pole, meaning the bilinear transform has all zeros at -1 */ t_float epsilon = .0001; // stability guard t_float min = 0.0 + epsilon; t_float max = 0.5 - epsilon; if (freq < min) freq = min; if (freq > max) freq = max; // prewarp cutoff frequency t_float omega = bilin_prewarp(freq); DSPIcomplex DC(1,0); //normalize at DC DSPIcomplex NY(-1,0); //all zeros will be at NY DSPIcomplex pole( (2*sections + 1) * M_PI / (4*sections)); pole *= omega; // first pole, see Porat p. 331 DSPIcomplex pole_inc(M_PI / (2*sections)); // phasor to get to next pole, see Porat p. 331 for (int i=0; i #include "DSPIcomplex.h" #include "DSPIfilters.h" typedef struct biquadseries_struct { t_object x_obj; t_float x_f; DSPIfilterSeries* biquadseries; } t_biquadseries; void biquadseries_bang(t_biquadseries *x) { } void biquadseries_butterLP(t_biquadseries *x, t_floatarg f) { x->biquadseries->setButterLP(f / sys_getsr()); } void biquadseries_butterHP(t_biquadseries *x, t_floatarg f) { x->biquadseries->setButterHP(f / sys_getsr()); } static t_int *biquadseries_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); DSPIfilterSeries* biquadseries = (DSPIfilterSeries *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float x; // dit kan beter t_float smooth = .01; //1.0f - pow(.9f,1.0f/(float)(n)); for (i = 0; i < n; i++) { x = *in++; biquadseries->BangSmooth(x, x, smooth); *out++ = x; } return (w+5); } static void biquadseries_dsp(t_biquadseries *x, t_signal **sp) { dsp_add(biquadseries_perform, 4, x->biquadseries, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } void biquadseries_free(void) { } t_class *biquadseries_class; void *biquadseries_new(t_floatarg fsections) { t_biquadseries *x = (t_biquadseries *)pd_new(biquadseries_class); int sections = (int)fsections; if (sections < 1) sections = 1; // post("biquadseries~: %d sections", sections); x->biquadseries = new DSPIfilterSeries(sections); // inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("freq")); outlet_new(&x->x_obj, gensym("signal")); biquadseries_butterLP(x, 10000); return (void *)x; } extern "C" { void biquadseries_tilde_setup(void) { //post("biquadseries~ v0.1"); biquadseries_class = class_new(gensym("biquadseries~"), (t_newmethod)biquadseries_new, (t_method)biquadseries_free, sizeof(t_biquadseries), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(biquadseries_class, t_biquadseries, x_f); class_addmethod(biquadseries_class, (t_method)biquadseries_bang, gensym("bang"), (t_atomtype)0); class_addmethod(biquadseries_class, (t_method)biquadseries_dsp, gensym("dsp"), (t_atomtype)0); class_addmethod(biquadseries_class, (t_method)biquadseries_butterLP, gensym("butterLP"), A_FLOAT, A_NULL); class_addmethod(biquadseries_class, (t_method)biquadseries_butterHP, gensym("butterHP"), A_FLOAT, A_NULL); } } creb-0.9.2+darcs20151027/modules++/DSPI.h0000644000000000000000000000267112613674326015263 0ustar0000000000000000 #include "m_pd.h" #ifndef DSPI_h #define DSPI_h #define DSPImin(x,y) (((x)<(y)) ? (x) : (y)) #define DSPImax(x,y) (((x)>(y)) ? (x) : (y)) #define DSPIclip(min, x, max) (DSPImin(DSPImax((min), (x)), max)) // test if floating point number is denormal #if defined(__i386__) || defined(__x86_64__) // Type punning code: #ifndef PD_FLOAT_PRECISION #define PD_FLOAT_PRECISION 32 #endif #if PD_FLOAT_PRECISION == 32 typedef union { unsigned int i; t_float f; } t_dspiflint; static inline int DSPI_IS_DENORMAL(t_float f) { t_dspiflint pun; pun.f = f; return ((pun.i & 0x7f800000) == 0); } // test if almost denormal, choose whichever is fastest static inline int DSPI_IS_ALMOST_DENORMAL(t_float f) { t_dspiflint pun; pun.f = f; return ((pun.i & 0x7f800000) < 0x08000000); } #elif PD_FLOAT_PRECISION == 64 typedef union { unsigned int i[2]; t_float f; } t_dspiflint; static inline int DSPI_IS_DENORMAL(t_float f) { t_dspiflint pun; pun.f = f; return ((pun.i[1] & 0x7ff00000) == 0); } static inline int DSPI_IS_ALMOST_DENORMAL(t_float f) { t_dspiflint pun; pun.f = f; return ((pun.i[1] & 0x7ff00000) < 0x10000000); } #endif // endif PD_FLOAT_PRECISION #else // if not defined(__i386__) || defined(__x86_64__) #define DSPI_IS_DENORMAL(f) 0 #endif // end if defined(__i386__) || defined(__x86_64__) //#define DSPI_IS_ALMOST_DENORMAL(f) (fabs(f) < 3.e-34) #endif // end ifndef DSPI_h creb-0.9.2+darcs20151027/modules++/blosc~.cc0000644000000000000000000004626512613674326016171 0ustar0000000000000000/* * blosc.c - bandlimited oscillators * using minimum phase impulse, step & ramp * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #include "../modules/extlib_util.h" #include "DSPIcomplex.h" #include "DSPIfilters.h" #define LPHASOR (8*sizeof(u32)) // the phasor logsize #define VOICES 8 // the number of waveform voices #define LLENGTH 6 // the loglength of a fractional delayed basic waveform #define LOVERSAMPLE 6 // the log of the oversampling factor (nb of fract delayed waveforms) #define LPAD 1 // the log of the time padding factor (to reduce time aliasing) #define LTABLE (LLENGTH+LOVERSAMPLE) #define N (1< 1 = rect) #define CUTOFF 0.8 // fraction of nyquist for impulse cutoff #define NBPERIODS ((t_float)(L) * CUTOFF / 2.0) /* sample buffers */ static t_float bli[N]; // band limited impulse static t_float bls[N]; // band limited step static t_float blr[N]; // band limited ramp typedef struct bloscctl { t_int c_index[VOICES]; // array of indices in sample table t_float c_frac[VOICES]; // array of fractional indices t_float c_vscale[VOICES]; // array of scale factors t_int c_next_voice; // next voice to steal (round robin) u32 c_phase; // phase of main oscillator u32 c_phase2; // phase of secondairy oscillator t_float c_state; // state of the square wave t_float c_prev_amp; // previous input of comparator t_float c_phase_inc_scale; t_float c_scale; t_float c_scale_update; DSPIfilterSeries* c_butter; // the series filter t_symbol *c_waveform; } t_bloscctl; typedef struct blosc { t_object x_obj; t_float x_f; t_bloscctl x_ctl; } t_blosc; /* phase converters */ static inline t_float _phase_to_float(u32 p){return ((t_float)p) * (1.0 / 4294967296.0);} static inline u32 _float_to_phase(t_float f){return ((u32)(f * 4294967296.0)) & ~(S-1);} /* flat table: better for linear interpolation */ static inline t_float _play_voice_lint(t_float *table, t_int *index, t_float frac, t_float scale) { int i = *index; /* perform linear interpolation */ t_float f = (((1.0 - frac) * table[i]) + (table[i+1] * frac)) * scale; /* increment phase index if next 2 elements will still be inside table if not there's no increment and the voice will keep playing the same sample */ i += (((i+S+1) >> LTABLE) ^ 1) << LOVERSAMPLE; *index = i; return f; } /* get one sample from the bandlimited discontinuity wavetable playback syth */ static inline t_float _get_bandlimited_discontinuity(t_bloscctl *ctl, t_float *table) { t_float sum = 0.0; int i; /* sum all voices */ for (i=0; ic_index+i, ctl->c_frac[i], ctl->c_vscale[i]); } return sum; } /* update waveplayers on zero cross */ static void _bang_comparator(t_bloscctl *ctl, t_float prev, t_float curr) { /* check for sign change */ if ((prev * curr) < 0.0){ int voice; /* determine the location of the discontinuity (in oversampled coordiates using linear interpolation */ t_float f = (t_float)S * curr / (curr - prev); /* get the offset in the oversample table */ u32 table_index = (u32)f; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ t_float table_frac_index = f - (t_float)table_index; /* set state (+ or -) */ ctl->c_state = (curr > 0.0) ? 0.5 : -0.5; /* steal the oldest voice */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* initialize the new voice index and interpolation fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = table_frac_index; ctl->c_vscale[voice] = -ctl->c_scale * 2.0 * ctl->c_state; } } /* advance phasor and update waveplayers on phase wrap */ static void _bang_phasor(t_bloscctl *ctl, t_float freq) { u32 phase = ctl->c_phase; u32 phase_inc; u32 oldphase; int voice; t_float scale = ctl->c_scale; /* get increment */ t_float inc = freq * ctl->c_phase_inc_scale; /* calculate new phase the increment (and the phase) should be a multiple of S */ if (inc < 0.0) inc = -inc; phase_inc = ((u32)inc) & ~(S-1); oldphase = phase; phase += phase_inc; /* check for phase wrap */ if (phase < oldphase){ u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; u32 table_index; u32 table_phase; /* steal the oldest voice if we have a phase wrap */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* determine the location of the discontinuity (in oversampled coordinates) which is S * (new phase) / (increment) */ table_index = phase / phase_inc_decimated; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ table_phase = phase - (table_index * phase_inc_decimated); /* use it to initialize the new voice index and interpolation fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = (t_float)table_phase / (t_float)phase_inc_decimated; ctl->c_vscale[voice] = scale; scale = scale * ctl->c_scale_update; } /* save state */ ctl->c_phase = phase; ctl->c_scale = scale; } /* the 2 oscillator version: the second osc can reset the first osc's phase (hence it determines the pitch) the first osc determines the waveform */ static void _bang_hardsync_phasor(t_bloscctl *ctl, t_float freq, t_float freq2) { u32 phase = ctl->c_phase; u32 phase2 = ctl->c_phase2; u32 phase_inc; u32 phase_inc2; u32 oldphase; u32 oldphase2; int voice; t_float scale = ctl->c_scale; /* get increment */ t_float inc = freq * ctl->c_phase_inc_scale; t_float inc2 = freq2 * ctl->c_phase_inc_scale; /* calculate new phases the increment (and the phase) should be a multiple of S */ /* save previous phases */ oldphase = phase; oldphase2 = phase2; /* update second osc */ if (inc2 < 0.0) inc2 = -inc2; phase_inc2 = ((u32)inc2) & ~(S-1); phase2 += phase_inc2; /* update first osc (freq should be >= freq of sync osc */ if (inc < 0.0) inc = -inc; phase_inc = ((u32)inc) & ~(S-1); if (phase_inc < phase_inc2) phase_inc = phase_inc2; phase += phase_inc; /* check for sync discontinuity (osc 2) */ if (phase2 < oldphase2) { /* adjust phase depending on the location of the discontinuity in phase2: phase/phase_inc == phase2/phase_inc2 */ u64 pi = phase_inc >> LOVERSAMPLE; u64 pi2 = phase_inc2 >> LOVERSAMPLE; u64 lphase = ((u64)phase2 * pi) / pi2; phase = lphase & ~(S-1); } /* check for phase discontinuity (osc 1) */ if (phase < oldphase){ u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; u32 table_index; u32 table_phase; t_float stepsize; /* steal the oldest voice if we have a phase wrap */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* determine the location of the discontinuity (in oversampled coordinates) which is S * (new phase) / (increment) */ table_index = phase / phase_inc_decimated; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ table_phase = phase - (table_index * phase_inc_decimated); /* determine the step size as opposed to saw/impulse waveforms, the step is not always equal to one. it is: oldphase - phase + phase_inc but for the unit step this will overflow to zero, so we reduce the bit depth to prevent overflow */ stepsize = _phase_to_float(((oldphase-phase) >> LOVERSAMPLE) + phase_inc_decimated) * (t_float)S; /* use it to initialize the new voice index and interpolation fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = (t_float)table_phase / (t_float)phase_inc_decimated; ctl->c_vscale[voice] = scale * stepsize; scale = scale * ctl->c_scale_update; } /* save state */ ctl->c_phase = phase; ctl->c_phase2 = phase2; ctl->c_scale = scale; } static t_int *blosc_perform_hardsync_saw(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *freq2 = (t_float *)(w[4]); t_float *out = (t_float *)(w[5]); t_bloscctl *ctl = (t_bloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; /* set postfilter cutoff */ ctl->c_butter->setButterHP(0.85 * (*freq / sys_getsr())); while (n--) { t_float frequency = *freq++; t_float frequency2 = *freq2++; /* get the bandlimited discontinuity */ t_float sample = _get_bandlimited_discontinuity(ctl, bls); /* add aliased sawtooth wave */ sample += _phase_to_float(ctl->c_phase) - 0.5; /* highpass filter output to remove DC offset and low frequency aliasing */ ctl->c_butter->BangSmooth(sample, sample, 0.05); /* send to output */ *out++ = sample; /* advance phasor */ _bang_hardsync_phasor(ctl, frequency2, frequency); } return (w+6); } static t_int *blosc_perform_saw(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bloscctl *ctl = (t_bloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; while (n--) { t_float frequency = *freq++; /* get the bandlimited discontinuity */ t_float sample = _get_bandlimited_discontinuity(ctl, bls); /* add aliased sawtooth wave */ sample += _phase_to_float(ctl->c_phase) - 0.5; /* send to output */ *out++ = sample; /* advance phasor */ _bang_phasor(ctl, frequency); } return (w+5); } static t_int *blosc_perform_pulse(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bloscctl *ctl = (t_bloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; /* set postfilter cutoff */ ctl->c_butter->setButterHP(0.85 * (*freq / sys_getsr())); while (n--) { t_float frequency = *freq++; /* get the bandlimited discontinuity */ t_float sample = _get_bandlimited_discontinuity(ctl, bli); /* highpass filter output to remove DC offset and low frequency aliasing */ ctl->c_butter->BangSmooth(sample, sample, 0.05); /* send to output */ *out++ = sample; /* advance phasor */ _bang_phasor(ctl, frequency); } return (w+5); } static t_int *blosc_perform_comparator(t_int *w) { t_float *amp = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bloscctl *ctl = (t_bloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float prev_amp = ctl->c_prev_amp; while (n--) { t_float curr_amp = *amp++; /* exact zero won't work for zero detection (sic) */ if (curr_amp == 0.0) curr_amp = 0.0000001; /* get the bandlimited discontinuity */ t_float sample = _get_bandlimited_discontinuity(ctl, bls); /* add the block wave state */ sample += ctl->c_state; /* send to output */ *out++ = sample; /* advance phasor */ _bang_comparator(ctl, prev_amp, curr_amp); prev_amp = curr_amp; } ctl->c_prev_amp = prev_amp; return (w+5); } static void blosc_phase(t_blosc *x, t_float f) { x->x_ctl.c_phase = _float_to_phase(f); x->x_ctl.c_phase2 = _float_to_phase(f); } static void blosc_phase1(t_blosc *x, t_float f) { x->x_ctl.c_phase = _float_to_phase(f); } static void blosc_phase2(t_blosc *x, t_float f) { x->x_ctl.c_phase2 = _float_to_phase(f); } static void blosc_dsp(t_blosc *x, t_signal **sp) { int n = sp[0]->s_n; /* set sampling rate scaling for phasors */ x->x_ctl.c_phase_inc_scale = 4.0 * ((t_float)(1<<(LPHASOR-2))) / sys_getsr(); /* setup & register the correct process routine depending on the waveform */ /* 2 osc */ if (x->x_ctl.c_waveform == gensym("syncsaw")){ x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = 1.0; dsp_add(blosc_perform_hardsync_saw, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); } /* 1 osc */ else if (x->x_ctl.c_waveform == gensym("pulse")){ x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = 1.0; dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else if (x->x_ctl.c_waveform == gensym("pulse2")){ x->x_ctl.c_phase_inc_scale *= 2; x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = -1.0; dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else if (x->x_ctl.c_waveform == gensym("comparator")){ x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = 1.0; dsp_add(blosc_perform_comparator, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else{ x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = 1.0; dsp_add(blosc_perform_saw, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } } static void blosc_free(t_blosc *x) { delete x->x_ctl.c_butter; } t_class *blosc_class; static void *blosc_new(t_symbol *s) { t_blosc *x = (t_blosc *)pd_new(blosc_class); int i; /* out 1 */ outlet_new(&x->x_obj, gensym("signal")); /* optional signal inlets */ if (s == gensym("syncsaw")){ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); } /* optional phase inlet */ if (s != gensym("comparator")){ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("phase")); } /* create the postfilter */ x->x_ctl.c_butter = new DSPIfilterSeries(3); /* init oscillators */ for (i=0; ix_ctl.c_index[i] = N-2; x->x_ctl.c_frac[i] = 0.0; } /* init rest of state data */ blosc_phase(x, 0); blosc_phase2(x, 0); x->x_ctl.c_state = 0.0; x->x_ctl.c_prev_amp = 0.0; x->x_ctl.c_next_voice = 0; x->x_ctl.c_scale = 1.0; x->x_ctl.c_scale_update = 1.0; x->x_ctl.c_waveform = s; return (void *)x; } /* CLASS DATA INIT (tables) */ /* some vector ops */ /* clear a buffer */ static inline void _clear(t_float *array, int size) { memset(array, 0, sizeof(t_float)*size); } /* compute complex log */ static inline void _clog(t_float *real, t_float *imag, int size) { int k; for (k=0; k pi, -pi -> 0] */ static inline t_float _i2theta(int i, int size){ t_float p = 2.0 * M_PI * (t_float)i / (t_float)size; if (p >= M_PI) p -= 2.0 * M_PI; return p; } /* print matlab array */ static void _printm(t_float *array, char *name, int size) { int i; fprintf(stderr, "%s = [", name); for (i=0; i=N (time padding to reduce time aliasing) */ /* we work in the complex domain to eliminate the need to avoid negative spectral components */ t_float real[M]; t_float imag[M]; t_float sum,scale; int i,j; /* create windowed sinc */ _clear(imag, M); real[0] = 1.0; for (i=1; iM-1] and work with the first N samples */ /* normalize impulse (integral = 1) */ sum = 0.0; for (i=0; i0 */ sum = 0.0; for (i=0; i #include "DSPIcomplex.h" #include "DSPIfilters.h" typedef struct filterortho_struct { t_object x_obj; t_float x_f; DSPIfilterOrtho *filterortho; } t_filterortho; void filterortho_bang(t_filterortho *x) { } static t_int *filterortho_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); DSPIfilterOrtho* filterortho = (DSPIfilterOrtho *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float x; // dit kan beter t_float smooth = 1.0 - pow(.05,1.0/(t_float)(n)); for (i = 0; i < n; i++) { x = *in++; filterortho->BangSmooth(x, x, smooth); *out++ = x; } filterortho->killDenormals(); return (w+5); } static void filterortho_dsp(t_filterortho *x, t_signal **sp) { dsp_add(filterortho_perform, 4, x->filterortho, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } void filterortho_free(t_filterortho *x) { delete x->filterortho; } t_class *filterortho_class; void setLP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setLP(f / sys_getsr(), Q);} void setHP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setHP(f / sys_getsr(), Q);} void setBP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBP(f / sys_getsr(), Q);} void setBR(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBR(f / sys_getsr(), Q);} void setAP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setAP(f / sys_getsr(), Q);} void setLS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setLS(f / sys_getsr(), A);} void setHS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setHS(f / sys_getsr(), A);} void setEQ(t_filterortho *x, t_floatarg f, t_floatarg Q, t_floatarg A) {x->filterortho->setEQ(f / sys_getsr(), Q, A);} void *filterortho_new() { t_filterortho *x = (t_filterortho *)pd_new(filterortho_class); x->filterortho = new DSPIfilterOrtho(); outlet_new(&x->x_obj, gensym("signal")); setLP(x, 10000, 2); return (void *)x; } extern "C" { void filterortho_tilde_setup(void) { //post("filterortho~ v0.1"); filterortho_class = class_new(gensym("filterortho~"), (t_newmethod)filterortho_new, (t_method)filterortho_free, sizeof(t_filterortho), 0, A_NULL); CLASS_MAINSIGNALIN(filterortho_class, t_filterortho, x_f); class_addmethod(filterortho_class, (t_method)filterortho_bang, gensym("bang"), A_NULL); class_addmethod(filterortho_class, (t_method)filterortho_dsp, gensym("dsp"), A_NULL); class_addmethod(filterortho_class, (t_method)setLP, gensym("setLP"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setHP, gensym("setHP"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setBP, gensym("setBP"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setBR, gensym("setBR"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setAP, gensym("setAP"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setLS, gensym("setLS"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setHS, gensym("setHS"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(filterortho_class, (t_method)setEQ, gensym("setEQ"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL); } } creb-0.9.2+darcs20151027/doc/0000755000000000000000000000000012613674326013314 5ustar0000000000000000creb-0.9.2+darcs20151027/doc/ti_snare-help.pd0000644000000000000000000000133112613674326016371 0ustar0000000000000000#N canvas 1 26 449 391 10; #N canvas 200 78 494 332 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal abstraction GUI needs_work (example patch) ; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION snare drum gop object; #X text 12 65 INLET_0 bang; #X text 12 85 INLET_1 float; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 395 359 pd META; #X obj 77 59 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 77 92 ti_snare; #X obj 76 159 output~; #X text 132 16 snare drum gop object; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 0 3 1; #X coords 0 0 1 1 270 50 0; creb-0.9.2+darcs20151027/doc/lattice~-help.pd0000644000000000000000000000432412613674326016415 0ustar0000000000000000#N canvas 0 26 433 557 10; #X obj 57 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 12500 1; #X msg 57 223 rc 0 \$1; #X obj 88 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 6432 1; #X obj 119 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 3732 1; #X obj 149 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 4332 1; #X obj 179 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 21232 1; #X obj 210 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 24900 1; #X obj 241 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 18232 1; #X obj 271 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 -1 -1 16932 1; #X msg 86 199 rc 1 \$1; #X msg 118 224 rc 2 \$1; #X msg 147 200 rc 3 \$1; #X msg 179 223 rc 4 \$1; #X msg 208 199 rc 5 \$1; #X msg 240 224 rc 6 \$1; #X msg 269 200 rc 7 \$1; #X floatatom 154 -125 5 -1 1 0 - - -; #X obj 64 302 lattice~ 8; #X obj 6 254 noise~; #X obj 63 363 vol~; #X obj 63 397 dac~; #X floatatom 85 333 5 0 0 0 - - -; #X text 159 298 lattice~ a lattice filter; #X text 139 333 [rc ] sets reflection coefficient; #X text 159 311 creation argument sets order; #X obj 27 330 dist~ 1; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE; #X text 12 45 DESCRIPTION a lattic filter; #X text 12 5 KEYWORDS signal filter; #X text 12 65 INLET_0 signal rc; #X text 12 85 OUTLET_0 signal; #X text 12 105 AUTHOR Tom Schouten ; #X restore 383 409 pd META; #X connect 0 0 1 0; #X connect 1 0 17 0; #X connect 2 0 9 0; #X connect 3 0 10 0; #X connect 4 0 11 0; #X connect 5 0 12 0; #X connect 6 0 13 0; #X connect 7 0 14 0; #X connect 8 0 15 0; #X connect 9 0 17 0; #X connect 10 0 17 0; #X connect 11 0 17 0; #X connect 12 0 17 0; #X connect 13 0 17 0; #X connect 14 0 17 0; #X connect 15 0 17 0; #X connect 16 0 0 0; #X connect 16 0 2 0; #X connect 16 0 3 0; #X connect 16 0 4 0; #X connect 16 0 5 0; #X connect 16 0 6 0; #X connect 16 0 7 0; #X connect 16 0 8 0; #X connect 17 0 25 0; #X connect 18 0 17 0; #X connect 19 0 20 1; #X connect 19 0 20 0; #X connect 21 0 19 1; #X connect 25 0 19 0; creb-0.9.2+darcs20151027/doc/cinv~-help.pd0000644000000000000000000000111012613674326015715 0ustar0000000000000000#N canvas 0 26 381 297 10; #X text 49 5 complex inverse; #N canvas 331 92 494 345 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION complex inverse; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 125 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 145 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X text 12 145 comment; #X restore 332 275 pd META; #X obj 81 56 cinv~; creb-0.9.2+darcs20151027/doc/tabreadmix~-help.pd0000644000000000000000000000344012613674326017106 0ustar0000000000000000#N canvas 0 26 513 405 10; #X floatatom 199 254 5 0 0 0 - - -; #X obj 48 315 dac~; #X floatatom 38 40 5 0 0 0 - - -; #X text 135 7 tabreadmix~ an overlap add tabread clone; #X obj 288 362 soundfiler; #X text 203 236 right inlet: window hop size; #X text 249 247 (window size = 2x hop size); #X obj 38 77 phasor~; #X obj 38 124 *~; #X text 136 40 usage analogous to tabread~; #X text 136 58 only sample adressing is modulo length; #X obj 288 311 openpanel; #X obj 288 291 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 171 97 bang; #X text 219 97 reset windowing; #X msg 171 150 pitch \$1; #X floatatom 171 132 5 0 0 0 - - -; #X text 245 151 set window hop size corresponding to pitch; #X floatatom 172 178 5 0 0 0 - - -; #X msg 172 196 chunks \$1; #X text 246 196 set hop size to 1/xth of length; #X obj 374 304 table sample123; #X msg 288 338 read -resize \$1 sample123; #X obj 288 386 s length; #X obj 54 100 r length; #X obj 57 275 tabreadmix~ sample123; #X text 136 24 simple (sample rate synchronous) playback; #N canvas 379 254 494 344 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal array; #X text 12 65 INLET_0 bang signal pitch chunks; #X text 12 85 INLET_1 float; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION an overlap add tabread~ clone; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 464 386 pd META; #X connect 0 0 25 1; #X connect 2 0 7 0; #X connect 4 0 23 0; #X connect 7 0 8 0; #X connect 8 0 25 0; #X connect 11 0 22 0; #X connect 12 0 11 0; #X connect 13 0 25 0; #X connect 15 0 25 0; #X connect 16 0 15 0; #X connect 18 0 19 0; #X connect 19 0 25 0; #X connect 22 0 4 0; #X connect 24 0 8 1; #X connect 25 0 1 0; #X connect 25 0 1 1; creb-0.9.2+darcs20151027/doc/ratio-help.pd0000644000000000000000000000154612613674326015713 0ustar0000000000000000#N canvas 0 26 414 244 10; #X obj 75 99 ratio; #X obj 103 192 osc~; #X floatatom 131 122 5 0 0 0 - - -; #X obj 103 150 *; #X obj 103 223 dac~; #X floatatom 75 51 5 0 0 0 - - -; #X floatatom 35 135 5 0 0 0 - - -; #X text 189 32 ratio is an octave shifter.; #X text 188 46 output is between 1 and 2; #X text 189 62 it computes 2^(log2(x)-int(log2(x))); #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION octave shifter; #X text 12 65 INLET_0 float; #X text 12 85 OUTLET_0 float; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 364 223 pd META; #X connect 0 0 3 0; #X connect 0 0 6 0; #X connect 1 0 4 0; #X connect 1 0 4 1; #X connect 2 0 3 1; #X connect 3 0 1 0; #X connect 5 0 0 0; creb-0.9.2+darcs20151027/doc/vol~-help.pd0000644000000000000000000000117612613674326015572 0ustar0000000000000000#N canvas 0 26 450 300 10; #N canvas 379 254 494 344 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION volume for a mono signal; #X text 12 5 KEYWORDS signal filter; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 float; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 392 273 pd META; #X obj 172 144 vol~; #X obj 171 83 osc~ 880; #X floatatom 193 118 5 0 100 0 - - -; #X obj 172 212 dac~; #X connect 1 0 4 0; #X connect 1 0 4 1; #X connect 2 0 1 0; #X connect 3 0 1 1; creb-0.9.2+darcs20151027/doc/dwt~-help.pd0000644000000000000000000000532012613674326015563 0ustar0000000000000000#N canvas 0 26 952 611 10; #X obj 17 62 osc~ 500; #X msg 83 -115 predict 0.5 0.5 \, update 0.25 0.25; #X msg 83 -76 predict -0.0625 0.5625 0.5625 -0.0625 \, update -0.03125 0.28125 0.28125 -0.03125; #X floatatom 24 10 5 0 0 0 - - -; #X msg 201 144 mask -1 9 9 -1; #X obj 67 279 r coef; #X obj 82 -30 s coef; #X obj 195 337 s coef; #X msg 201 167 mask 3 -25 150 150 -25 3; #X msg 216 189 mask -5 49 -245 1225 1225 -245 49 -5; #X obj 196 39 pack; #X floatatom 222 8 5 0 0 0 - - -; #X floatatom 166 -4 5 0 0 0 - - -; #X msg 171 64 coef \$1 \$2; #X msg 191 120 mask 1 1; #X msg 228 212 mask 35 -405 2268 -8820 39690 39690 -8820 2268 -405 35; #X msg 244 246 mask -63 847 -5445 22869 -76230 320166 320166 -76230 22869 -5445 847 -63; #X msg 245 306 predict 1 0 \, update 0 0.5; #X obj 36 31 * 187.5; #X obj 26 341 dwt~ 1; #X obj 80 343 idwt~ 1; #X msg 469 376 mask 0 0 0 35 140 -70 28 -5; #X msg 469 352 mask 7 -45 126 -210 315 63 0 0 0 0; #X msg 469 328 mask -21 154 -495 924 -1155 1386 231 0 0 0 0 0; #X obj 26 443 tabsend~ scope; #N canvas 0 0 450 300 (subpatch) 0; #X array scope 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 718 -98 graph; #X text 61 165 print out coefs; #X msg 100 184 print; #X text 315 -24 dwt~ performs a discrete wavelet transform; #X text 315 -10 idwt~ performs the inverse transform; #X text 309 105 mask sets the predict mask \, and uses the corresponding update mask; #X text 266 63 coef sets half of a symmetric predict mask; #X text 243 286 predict and update masks can be specified explicitly ; #X text 433 307 haar wavelet; #X msg 672 189 even \$1; #X floatatom 672 167 5 0 0 0 - - -; #X text 570 134 even is the order symmetric interpolating biorthogonal wavelet with n vanishing moments.; #N canvas 379 254 494 344 META 0; #X text 12 155 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 KEYWORDS signal; #X text 12 65 DESCRIPTION dwt~ performas a descrete wavelet transform/ idwt~ performs the inverse transform; #X text 12 95 INLET_0 signal print mask predict update even; #X text 12 5 NAME dwt~ idwt~; #X text 12 115 OUTLET_0 signal; #X text 12 45 LICENSE GPL v2; #X text 12 135 AUTHOR Tom Schouten ; #X restore 884 465 pd META; #X connect 0 0 19 0; #X connect 1 0 6 0; #X connect 2 0 6 0; #X connect 3 0 18 0; #X connect 4 0 7 0; #X connect 5 0 20 0; #X connect 5 0 19 0; #X connect 8 0 7 0; #X connect 9 0 7 0; #X connect 10 0 13 0; #X connect 11 0 10 1; #X connect 12 0 10 0; #X connect 13 0 7 0; #X connect 14 0 7 0; #X connect 15 0 7 0; #X connect 16 0 7 0; #X connect 17 0 7 0; #X connect 18 0 0 0; #X connect 19 0 24 0; #X connect 21 0 7 0; #X connect 22 0 7 0; #X connect 23 0 7 0; #X connect 27 0 7 0; #X connect 34 0 7 0; #X connect 35 0 34 0; creb-0.9.2+darcs20151027/doc/bpm-help.pd0000644000000000000000000000107412613674326015347 0ustar0000000000000000#N canvas 0 0 450 300 10; #N canvas 331 92 494 398 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION convert bpm to metro time and phasor freq ; #X text 12 65 INLET_0 float; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X text 12 125 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS control conversion needs_work (example); #X restore 398 277 pd META; #X text 150 50 convert bpm to metro time and phasor freq; #X obj 105 52 bpm; creb-0.9.2+darcs20151027/doc/qmult~-help.pd0000644000000000000000000000437712613674326016142 0ustar0000000000000000#N canvas 0 26 658 342 10; #X obj 111 145 qnorm~; #X obj 38 71 osc~ 30; #X obj 101 71 osc~ 40; #X obj 163 70 osc~ 50; #X obj 229 71 osc~ 60; #X obj 143 319 dac~; #X obj 123 244 vol~; #X obj 163 244 vol~; #X floatatom 230 230 5 0 0 0 - - -; #X floatatom 58 36 5 0 0 0 - - -; #X floatatom 107 36 5 0 0 0 - - -; #X floatatom 159 36 5 0 0 0 - - -; #X floatatom 208 36 5 0 0 0 - - -; #X obj 167 282 hip~ 10; #X obj 103 281 hip~ 10; #X text 402 190 qmult multiplies 2 quaternion signals; #X floatatom 347 35 5 0 0 0 - - -; #X floatatom 396 35 5 0 0 0 - - -; #X floatatom 448 35 5 0 0 0 - - -; #X floatatom 497 35 5 0 0 0 - - -; #X obj 327 70 osc~ 70; #X obj 390 70 osc~ 80; #X obj 452 69 osc~ 90; #X obj 518 70 osc~ 100; #X obj 410 136 qnorm~; #X obj 106 195 qmult~ 0 0 0 0 0; #X text 410 208 "quaternion ring modulation"; #X text 403 245 the inlets are in 1 x real 3 x imag form; #N canvas 375 135 494 397 META 0; #X text 12 325 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION multiply 2 quarternion signals; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 INLET_4 signal; #X text 12 165 INLET_5 signal; #X text 12 185 INLET_6 signal; #X text 12 205 INLET_7 signal; #X text 12 225 OUTLET_0 signal; #X text 12 245 OUTLET_1 signal; #X text 12 265 OUTLET_2 signal; #X text 12 285 OUTLET_3 signal; #X text 12 25 LICENSE GPL v2; #X text 12 305 AUTHOR Tom Schouten ; #X restore 598 319 pd META; #X connect 0 0 25 0; #X connect 0 1 25 1; #X connect 0 2 25 2; #X connect 0 3 25 3; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 3 0 0 2; #X connect 4 0 0 3; #X connect 6 0 14 0; #X connect 7 0 13 0; #X connect 8 0 7 1; #X connect 8 0 6 1; #X connect 9 0 1 0; #X connect 10 0 2 0; #X connect 11 0 3 0; #X connect 12 0 4 0; #X connect 13 0 5 1; #X connect 14 0 5 0; #X connect 16 0 20 0; #X connect 17 0 21 0; #X connect 18 0 22 0; #X connect 19 0 23 0; #X connect 20 0 24 0; #X connect 21 0 24 1; #X connect 22 0 24 2; #X connect 23 0 24 3; #X connect 24 0 25 4; #X connect 24 1 25 5; #X connect 24 2 25 6; #X connect 24 3 25 7; #X connect 25 0 6 0; #X connect 25 1 6 0; #X connect 25 2 7 0; #X connect 25 3 7 0; creb-0.9.2+darcs20151027/doc/bwin~-help.pd0000644000000000000000000000371412613674326015731 0ustar0000000000000000#N canvas 0 26 450 300 10; #N canvas 5 5 639 472 windowing 0; #X obj 62 441 outlet~; #X obj 62 65 inlet~; #X obj 62 142 bfft~; #X obj 62 365 ibfft~; #X floatatom 85 173 5 0 0 0 - - -; #X obj 62 199 vol~; #X text 60 6 bwin~ multiplies a signal block with a window; #X text 211 310 after maximizing the spectrum is multiplied by a pink noise envelope; #X obj 62 250 dist~ 1; #X text 211 105 apply analysis window; #X text 211 172 set drive; #X text 212 251 soft clip spectral data; #X text 212 133 transform block to freq domain; #X text 210 360 transform block back to time domain; #X text 212 401 undo analysis window + apply synthesis window; #X text 212 39 this example is a poor man's spectral maximizer using bwin~ bfft~ bifft~ and dist~; #X obj 62 225 bwin~ bfft_blue; #X obj 62 327 bwin~ bfft_pink; #X obj 62 401 bwin~ hann/hamming; #X obj 62 106 bwin~ hamming; #X msg 344 207 type bfft_db/octave \$1; #X floatatom 517 172 5 0 0 0 - - -; #X msg 345 277 type bfft_db/octave \$1; #X floatatom 519 244 5 0 0 0 - - -; #X obj 554 437 block~ 1024 2; #X connect 1 0 19 0; #X connect 2 0 5 0; #X connect 3 0 18 0; #X connect 4 0 5 1; #X connect 5 0 16 0; #X connect 8 0 17 0; #X connect 16 0 8 0; #X connect 17 0 3 0; #X connect 18 0 0 0; #X connect 19 0 2 0; #X connect 20 0 16 0; #X connect 21 0 20 0; #X connect 22 0 17 0; #X connect 23 0 22 0; #X restore 53 88 pd windowing; #X obj 41 219 dac~; #X obj 53 150 vol~; #X floatatom 76 124 5 0 0 0 - - -; #X obj 53 41 adc~ 1; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal block_oriented; #X text 12 45 DESCRIPTION multiply a signal block with a window; #X text 12 65 INLET_0 signal type; #X text 12 85 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 400 279 pd META; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 0 0; creb-0.9.2+darcs20151027/doc/ramp~-help.pd0000644000000000000000000000112112613674326015717 0ustar0000000000000000#N canvas 0 26 450 300 10; #X obj 29 19 ramp~; #X obj 153 21 blockramp~; #N canvas 107 51 494 364 META 0; #X text 12 5 ALIAS blockramp~; #X text 12 95 INLET_0 bang; #X text 12 75 DESCRIPTION retriggerable counter for dsp signals; #X text 12 135 LIBRARY external creb; #X text 12 115 OUTLET_0 signal; #X text 12 175 HELP_PATCH_AUTHORS Jonathan Wilkes for PDDP.; #X text 12 25 KEYWORDS signal conversion ramp block_oriented needs_work (example patch); #X text 12 55 LICENSE GPL v2; #X text 12 155 AUTHOR Tom Schouten ; #X restore 395 276 pd META; #X text 95 121 needs an example; creb-0.9.2+darcs20151027/doc/ucmod~-help.pd0000644000000000000000000000116212613674326016074 0ustar0000000000000000#N canvas 0 0 404 300 10; #X text 84 18 unit circle modulator. (1+r conj(z)/(1+rz); #N canvas 331 92 494 366 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 145 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 45 DESCRIPTION unit circle modulator; #X text 12 105 INLET_2 signal; #X text 12 125 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 165 AUTHOR Tom Schouten ; #X restore 352 275 pd META; #X obj 95 121 ucmod~; creb-0.9.2+darcs20151027/doc/bdiag~-help.pd0000644000000000000000000000667012613674326016044 0ustar0000000000000000#N canvas 0 26 650 407 10; #X obj 34 45 metro; #X msg 34 20 bang; #X floatatom 76 20 5 0 0 0 - - -; #X obj 34 327 dist~ 1; #X obj 24 359 dac~; #N canvas 11 6 262 403 systemparams 0; #X floatatom 81 47 5 0 0 0 - - -; #X floatatom 125 47 5 0 0 0 - - -; #X floatatom 81 74 5 0 0 0 - - -; #X floatatom 125 74 5 0 0 0 - - -; #X floatatom 81 102 5 0 0 0 - - -; #X floatatom 125 102 5 0 0 0 - - -; #X floatatom 81 129 5 0 0 0 - - -; #X floatatom 125 129 5 0 0 0 - - -; #X floatatom 81 157 5 0 0 0 - - -; #X floatatom 125 157 5 0 0 0 - - -; #X floatatom 81 184 5 0 0 0 - - -; #X floatatom 125 184 5 0 0 0 - - -; #X floatatom 81 212 5 0 0 0 - - -; #X floatatom 125 212 5 0 0 0 - - -; #X floatatom 81 239 5 0 0 0 - - -; #X floatatom 125 239 5 0 0 0 - - -; #X obj 28 65 bdft 1; #X obj 27 93 bdft 2; #X obj 28 120 bdft 3; #X obj 28 175 bdft 7; #X obj 28 202 bdft 11; #X obj 28 230 bdft 17; #X obj 28 257 bdft 30; #X obj 28 319 outlet; #X text 20 23 frequency detune and damping; #X text 49 283 bdft argument = harmonic; #X obj 28 147 bdft 5; #X connect 0 0 16 0; #X connect 1 0 16 1; #X connect 2 0 17 0; #X connect 3 0 17 1; #X connect 4 0 18 0; #X connect 5 0 18 1; #X connect 6 0 26 0; #X connect 7 0 26 1; #X connect 8 0 19 0; #X connect 9 0 19 1; #X connect 10 0 20 0; #X connect 11 0 20 1; #X connect 12 0 21 0; #X connect 13 0 21 1; #X connect 14 0 22 0; #X connect 15 0 22 1; #X connect 16 0 23 0; #X connect 17 0 23 0; #X connect 18 0 23 0; #X connect 19 0 23 0; #X connect 20 0 23 0; #X connect 21 0 23 0; #X connect 22 0 23 0; #X connect 26 0 23 0; #X restore 89 76 pd systemparams; #X obj 34 93 bdiag~; #X obj 34 232 dynwav~; #X obj 34 283 vol~; #X floatatom 57 257 5 0 0 0 - - -; #X floatatom 78 168 5 0 0 0 - - -; #X obj 78 196 phasor~; #X text 258 168 the [eig ] message sets the eigenvalue for the corresponding block. there are n/2 blocks \, with n the dsp blocksize.; #X text 259 223 you can use [timefreq <60dB time> ] for a more appropriate initialization of the eigenvalues using decay time in milliseconds and oscillation frequency in Hz.; #X text 256 18 bdiag~: parallel block diagonal state space model (parallel 2d rotations) see bdiag.c for more info. the state equations for one block are:; #X text 300 70 state1 = real * state1 - imag * state2 + input1; #X text 300 85 state2 = real * state2 + imag * state1 + input2; #X text 258 121 this module is intended to "filter" spectral data produced by bfft or other short time spectral transforms like dwt.; #X text 256 279 [bang] or [random] set the state vector to a random value. [reset] sets it to 0; #X text 256 327 this patch uses of bdiag~ \, ibfft~ and dynwav~ to build a 32 voice harmonic modal synth \, with the state excited with white noise on bang.; #N canvas 379 254 494 344 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION parallel block diagonal state space model (parallel 2d rotations); #X text 12 75 INLET_0 bang signal random reset timefreq eig; #X text 12 95 OUTLET_0 signal; #X text 11 5 KEYWORDS signal; #X text 12 25 LICENSE GPL v2; #X text 12 115 AUTHOR Tom Schouten ; #X restore 600 386 pd META; #X obj 34 129 ibfft~; #X connect 0 0 6 0; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 3 0 4 0; #X connect 3 0 4 1; #X connect 5 0 6 0; #X connect 6 0 21 0; #X connect 7 0 8 0; #X connect 8 0 3 0; #X connect 9 0 8 1; #X connect 10 0 11 0; #X connect 11 0 7 1; #X connect 21 0 7 0; creb-0.9.2+darcs20151027/doc/lpifft~-help.pd0000644000000000000000000000132512613674326016252 0ustar0000000000000000#N canvas 0 26 463 346 10; #X text 18 7 ifft with rectangular lowpass for anti-aliased dynwav ; #X text 9 18 creation arg = fft size \, right inlet = dynwav cutoff freq; #N canvas 331 92 494 386 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 125 OUTLET_0 signal; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 145 OUTLET_1 signal; #X text 12 105 INLET_2 float; #X text 12 45 DESCRIPTION ifft + lowpass (for anti-aliased dynwav) ; #X text 12 25 LICENSE GPL v2; #X text 12 165 AUTHOR Tom Schouten ; #X text 12 5 KEYWORDS signal abstraction needs_work (example); #X restore 412 324 pd META; #X obj 57 112 lpifft~; creb-0.9.2+darcs20151027/doc/scale7-help.pd0000644000000000000000000000077112613674326015752 0ustar0000000000000000#N canvas 0 26 450 373 10; #N canvas 331 92 494 323 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 list; #X text 12 105 OUTLET_0 float; #X text 12 5 KEYWORDS control abstraction needs_work (example patch) ; #X text 12 45 DESCRIPTION arbitrary 7 tone scale; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 398 347 pd META; #X obj 151 152 scale7; creb-0.9.2+darcs20151027/doc/pdynwav~-help.pd0000644000000000000000000000074412613674326016462 0ustar0000000000000000#N canvas 0 26 194 151 10; #X obj 35 15 pdynwav~; #N canvas 80 80 494 326 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 125 AUTHOR Tom Shouten; #X text 12 105 OUTLET_0 signal; #X text 12 65 INLET_0 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 85 INLET_1 float; #X text 12 45 DESCRIPTION phasor~ + dynwav~; #X text 12 25 LICENSE GPL v2; #X restore 143 129 pd META; creb-0.9.2+darcs20151027/doc/dynwav~-help.pd0000644000000000000000000000214112613674326016273 0ustar0000000000000000#N canvas 0 26 450 300 10; #X text 96 6 dynwav~: dynamic wavetable oscillator; #X obj 61 98 osc~; #X floatatom 60 56 5 0 0 0 - - -; #X obj 60 151 dynwav~; #X obj 60 214 vol~; #X floatatom 85 190 5 0 0 0 - - -; #X obj 50 256 dac~; #X obj 172 105 phasor~; #X floatatom 172 80 5 0 0 0 - - -; #X obj 107 54 bang~; #X text 171 22 (scanned synthesis); #X text 165 143 left inlet's dsp block = wavetable; #X msg 107 78 0.25; #X text 242 157 right inlet = phase (0-1); #N canvas 379 254 494 344 META 0; #X text 12 155 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 75 INLET_0 signal; #X text 12 95 INLET_1 signal; #X text 12 115 OUTLET_0 signal; #X text 12 45 DESCRIPTION dynamic wavetable oscillator ( scanned synthesis ); #X text 12 5 KEYWORDS signal oscillator; #X text 12 25 LICENSE GPL v2; #X text 12 135 AUTHOR Tom Schouten ; #X restore 400 279 pd META; #X connect 1 0 3 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 6 1; #X connect 4 0 6 0; #X connect 5 0 4 1; #X connect 7 0 3 1; #X connect 8 0 7 0; #X connect 9 0 12 0; #X connect 12 0 1 1; creb-0.9.2+darcs20151027/doc/blocknorm~-help.pd0000644000000000000000000000503412613674326016755 0ustar0000000000000000#N canvas 3 0 565 484 10; #X text 62 14 blocknorm~: normalize a dsp block to RMS = 1; #X text 144 33 creation argument = nb channels; #X obj 96 349 lop~; #X obj 95 410 tabsend~ state; #X obj 95 384 blocknorm~ 1; #X obj 95 320 hip~; #X obj 134 298 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 3800 1; #X obj 93 131 tabreceive~ state; #X obj 138 222 fblock 64; #X obj 352 388 pdynwav~; #X obj 351 429 vol~; #X obj 350 458 dac~; #X floatatom 389 408 5 0 0 0 - - -; #X floatatom 406 365 5 0 0 0 - - -; #X obj 13 144 ead~ 0 20; #X obj 30 168 noise~; #X obj 14 191 *~; #X obj 13 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 237 134 1; #X floatatom 237 157 5 0 0 0 - - -; #X floatatom 138 202 5 0 0 0 - - -; #X text 11 64 example: a waveform folding oscillator: power is shifted up or down in frequency by contraction/dilatation \, and filtered \, but normalized to preserve total state energy.; #X obj 466 281 table state 64; #X obj 94 270 dynwav~; #X obj 138 245 phasor~; #X obj 310 181 bang~; #X msg 268 133 2; #X obj 310 205 f; #X floatatom 358 200 5 0 0 0 - - -; #X msg 357 179 0; #X msg 387 179 0.03; #X msg 425 179 0.17; #X obj 310 241 spigot; #X obj 348 223 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X text 403 201 phase offset; #X text 182 201 mod freq; #X text 366 222 phase sync; #X obj 134 326 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 8100 1; #X text 282 157 relative formant shift; #N canvas 379 254 494 344 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 LIBRARY external creb; #X text 12 5 KEYWORDS signal block_oriented; #X text 12 45 DESCRIPTION normalize a dsp block to RMS = 1; #X text 12 65 INLET_0 signal; #X text 12 85 OUTLET_0 signal; #X text 12 125 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 514 462 pd META; #X connect 2 0 4 0; #X connect 2 0 9 0; #X connect 4 0 3 0; #X connect 5 0 2 0; #X connect 6 0 5 1; #X connect 7 0 23 0; #X connect 8 0 24 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 10 0 11 1; #X connect 12 0 10 1; #X connect 13 0 9 1; #X connect 14 0 16 0; #X connect 15 0 16 1; #X connect 16 0 5 0; #X connect 17 0 14 0; #X connect 18 0 19 0; #X connect 19 0 8 1; #X connect 20 0 8 0; #X connect 23 0 5 0; #X connect 24 0 23 1; #X connect 25 0 27 0; #X connect 26 0 19 0; #X connect 27 0 32 0; #X connect 28 0 27 1; #X connect 29 0 28 0; #X connect 30 0 28 0; #X connect 31 0 28 0; #X connect 32 0 24 1; #X connect 33 0 32 1; #X connect 37 0 2 1; creb-0.9.2+darcs20151027/doc/junction~-help.pd0000644000000000000000000000440012613674326016614 0ustar0000000000000000#N canvas 0 26 390 300 10; #X obj 181 138 junction~ 4; #X obj 253 167 delwrite~ del1 1000; #X obj 123 51 vd~ del1; #X obj 183 51 vd~ del2; #X obj 244 51 vd~ del3; #X obj 304 51 vd~ del4; #X obj 123 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 183 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 245 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 305 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 63 262 dac~; #X obj 13 121 ead~; #X obj 30 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 90 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X obj 4 97 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 ; #X obj 229 189 delwrite~ del2 1000; #X obj 205 210 delwrite~ del3 1000; #X obj 181 232 delwrite~ del4 1000; #X msg 313 111 random \$1; #X obj 314 85 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #X text 61 5 junction~: a circular lossless signal junction; #X obj 58 238 vols~; #X obj 105 221 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 256; #N canvas 379 250 494 421 META 0; #X text 12 245 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION a circular lossless signal junction; #X text 12 65 INLET_0 signal random; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 OUTLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 185 OUTLET_2 signal; #X text 12 205 OUTLET_3 signal; #X text 12 5 KEYWORDS signal; #X text 12 25 LICENSE GPL v2; #X text 12 225 AUTHOR Tom Schouten ; #X restore 341 280 pd META; #X connect 0 0 17 0; #X connect 0 0 21 0; #X connect 0 1 16 0; #X connect 0 1 21 1; #X connect 0 2 15 0; #X connect 0 3 1 0; #X connect 2 0 0 0; #X connect 3 0 0 1; #X connect 4 0 0 2; #X connect 5 0 0 3; #X connect 6 0 2 0; #X connect 7 0 3 0; #X connect 8 0 4 0; #X connect 9 0 5 0; #X connect 11 0 0 0; #X connect 12 0 11 1; #X connect 13 0 11 2; #X connect 14 0 11 0; #X connect 18 0 0 0; #X connect 19 0 18 0; #X connect 21 0 10 0; #X connect 21 1 10 1; #X connect 22 0 21 2; creb-0.9.2+darcs20151027/doc/statwav~-help.pd0000644000000000000000000000111712613674326016456 0ustar0000000000000000#N canvas 0 0 450 300 10; #X obj 52 29 statwav~; #X text 124 29 static wavetable oscillator; #N canvas 127 170 494 344 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 LIBRARY external creb; #X text 12 85 OUTLET_0 signal; #X text 12 45 DESCRIPTION static wavetable oscillator; #X text 12 65 INLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS signal array needs_work (example patch); #X text 12 125 AUTHOR Tom Schouten ; #X restore 398 276 pd META; #X text 135 120 needs an example; creb-0.9.2+darcs20151027/doc/blop~-help.pd0000644000000000000000000000105712613674326015724 0ustar0000000000000000#N canvas 0 0 450 300 10; #N canvas 331 92 494 327 META 0; #X text 12 155 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 95 INLET_1 float; #X text 12 115 OUTLET_0 signal; #X text 12 5 KEYWORDS signal abstraction filter needs_work (example patch); #X text 12 75 INLET_0 signal; #X text 12 55 DESCRIPTION butterworth low pass filter; #X text 12 135 AUTHOR Tom Schouten ; #X text 12 35 LICENSE GPL v2; #X restore 398 277 pd META; #X obj 130 55 blop~; #X text 175 53 butterworth low pass filter; creb-0.9.2+darcs20151027/doc/blosc~-help.pd0000644000000000000000000000665512613674326016103 0ustar0000000000000000#N canvas 0 26 763 649 10; #X obj 80 243 dac~; #X obj 80 219 vol~; #X floatatom 103 195 5 0 0 0 - - -; #X obj 80 158 blosc~ pulse; #X floatatom 80 128 5 0 0 0 - - -; #X text 59 106 one-sided impulse; #X obj 255 243 dac~; #X obj 255 219 vol~; #X floatatom 278 195 5 0 0 0 - - -; #X floatatom 255 128 5 0 0 0 - - -; #X text 234 106 two-sided impulse; #X obj 255 158 blosc~ pulse2; #X obj 433 241 dac~; #X obj 433 217 vol~; #X floatatom 456 193 5 0 0 0 - - -; #X floatatom 433 126 5 0 0 0 - - -; #X text 442 105 sawtooth; #X obj 596 245 dac~; #X obj 596 221 vol~; #X floatatom 619 197 5 0 0 0 - - -; #X floatatom 596 130 5 0 0 0 - - -; #X text 571 106 hard synced sawtooth; #X text 53 18 blosc~ - some bandlimited oscillators based on minimal phase impulse and step functions. (inspired by Eli Brandt's paper "Hard Sync Without Aliasing".); #X obj 433 156 blosc~ saw; #X obj 596 160 blosc~ syncsaw; #X floatatom 642 130 5 0 0 0 - - -; #X obj 416 625 dac~; #X obj 416 590 vol~; #X floatatom 439 566 5 0 0 0 - - -; #X text 255 284 bandlimited comparator; #X obj 416 529 blosc~ comparator; #X obj 416 415 phasor~; #X obj 416 499 -~; #X floatatom 416 360 5 0 0 0 - - -; #X floatatom 416 335 5 0 0 0 - - -; #X obj 80 371 phasor~; #X floatatom 80 347 5 0 0 0 - - -; #X obj 80 428 blosc~ comparator; #X obj 80 518 dac~; #X obj 80 483 vol~; #X floatatom 103 459 5 0 0 0 - - -; #X obj 80 400 -~ 0.5; #X text 75 321 (square - pulse wave); #X floatatom 150 382 5 0 0 0 - - -; #X obj 153 364 hsl 50 15 0.01 0.99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X msg 150 343 0.5; #X text 411 312 (pwm); #X obj 511 396 osc~; #X floatatom 511 363 5 0 0 0 - - -; #X obj 511 426 *~; #X floatatom 561 408 5 0 0 0 - - -; #X obj 564 386 hsl 50 15 0 0.99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 626 386 depth; #X obj 514 342 hsl 50 15 0.1 10 1 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 578 342 mod freq; #X obj 416 440 *~ 2; #X obj 416 465 -~ 1; #N canvas 379 254 494 344 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION bandlimited oscillators based on minimal phase impulse and step functions.; #X text 12 5 KEYWORDS signal bandlimited; #X text 12 75 INLET_0 float signal; #X text 12 95 INLET_1 float signal; #X text 12 115 INLET_2 float; #X text 12 135 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 155 AUTHOR Tom Schouten ; #X restore 714 628 pd META; #X connect 1 0 0 0; #X connect 1 0 0 1; #X connect 2 0 1 1; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 7 0 6 0; #X connect 7 0 6 1; #X connect 8 0 7 1; #X connect 9 0 11 0; #X connect 11 0 7 0; #X connect 13 0 12 0; #X connect 13 0 12 1; #X connect 14 0 13 1; #X connect 15 0 23 0; #X connect 18 0 17 0; #X connect 18 0 17 1; #X connect 19 0 18 1; #X connect 20 0 24 0; #X connect 23 0 13 0; #X connect 24 0 18 0; #X connect 25 0 24 1; #X connect 27 0 26 0; #X connect 27 0 26 1; #X connect 28 0 27 1; #X connect 30 0 27 0; #X connect 31 0 55 0; #X connect 32 0 30 0; #X connect 33 0 31 0; #X connect 34 0 33 0; #X connect 35 0 41 0; #X connect 36 0 35 0; #X connect 37 0 39 0; #X connect 39 0 38 0; #X connect 39 0 38 1; #X connect 40 0 39 1; #X connect 41 0 37 0; #X connect 43 0 41 1; #X connect 44 0 43 0; #X connect 45 0 44 0; #X connect 47 0 49 0; #X connect 48 0 47 0; #X connect 49 0 32 1; #X connect 50 0 49 1; #X connect 51 0 50 0; #X connect 53 0 48 0; #X connect 55 0 56 0; #X connect 56 0 32 0; creb-0.9.2+darcs20151027/doc/cconj~-help.pd0000644000000000000000000000106512613674326016063 0ustar0000000000000000#N canvas 0 26 285 166 10; #X text 49 5 complex conjugate; #N canvas 331 92 494 353 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION complex conjugate; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 125 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 145 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 236 144 pd META; #X obj 49 55 cconj~; creb-0.9.2+darcs20151027/doc/xfm~-help.pd0000644000000000000000000000671012613674326015563 0ustar0000000000000000#N canvas 0 26 604 604 10; #X text 298 24 xfm~ cross frequency modulation; #X msg 180 308 reset; #X floatatom 231 255 5 0 0 0 - - -; #X floatatom 282 255 5 0 0 0 - - -; #X floatatom 332 255 5 0 0 0 - - -; #X floatatom 382 255 5 0 0 0 - - -; #X obj 287 514 dac~; #X obj 231 282 lop~ 1; #X obj 282 282 lop~ 1; #X obj 332 282 lop~ 1; #X obj 382 282 lop~ 1; #X floatatom 444 268 5 0 0 0 - - -; #X text 228 232 freq1; #X text 279 232 freq2; #X text 337 233 fb1; #X text 381 234 fb2; #X text 297 43 freq_osc1 = freq1 + wave_out2*fb1; #X text 297 58 freq_osc2 = freq2 + wave_out1*fb2; #X obj 275 99 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 15200 1; #X obj 275 121 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 14400 1; #X obj 276 146 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 18938 1; #X obj 276 171 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 21000 1; #X floatatom 487 377 5 0 0 0 - - -; #X floatatom 534 375 5 0 0 0 - - -; #X obj 462 348 metro; #X floatatom 534 335 5 0 0 0 - - -; #X obj 463 324 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 534 306 500; #X msg 565 305 125; #X msg 444 241 0.1; #X msg 495 306 1000; #X msg 150 223 type 0; #X msg 151 263 type 1; #X text 42 213 square phasor; #X text 45 158 algo type; #X text 37 257 circular phasor; #X text 7 371 remark: all frequencies are warped; #X text 8 388 (f_real = arctan(2pi*f_in)/2pi); #X obj 288 485 vols~; #X floatatom 352 453 5 0 0 0 - - -; #X text 7 416 for frequencies under 1000Hz; #X text 8 430 this effect is minimal; #X text 9 465 use the fwarp to convert from; #X text 9 478 real to warped; #X text 9 505 the square phasor type is warped too; #X text 9 520 but not in such a nice way as the; #X text 9 534 circular phasor; #X text 36 229 (chaotic 4DOF); #X text 5 272 (quasiperiodic 2DOF); #X obj 462 411 ead~ 0 0; #X obj 442 517 dac~; #X obj 435 451 *~; #X obj 472 451 *~; #X obj 443 488 vols~; #X floatatom 507 456 5 0 0 0 - - -; #X text 2 173 (can be set by creation argument); #N canvas 515 145 494 383 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION cross frequency modulation; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 OUTLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 65 INLET_0 signal type reset; #X text 12 25 LICENSE GPL v2; #X text 12 185 AUTHOR Tom Schouten ; #X restore 552 582 pd META; #X obj 277 325 xfm~; #X connect 1 0 57 0; #X connect 2 0 7 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 10 0; #X connect 7 0 57 0; #X connect 8 0 57 1; #X connect 9 0 57 2; #X connect 10 0 57 3; #X connect 11 0 10 1; #X connect 11 0 9 1; #X connect 11 0 7 1; #X connect 11 0 8 1; #X connect 18 0 2 0; #X connect 19 0 3 0; #X connect 20 0 4 0; #X connect 21 0 5 0; #X connect 22 0 49 1; #X connect 23 0 49 2; #X connect 24 0 49 0; #X connect 25 0 24 1; #X connect 25 0 23 0; #X connect 26 0 24 0; #X connect 27 0 25 0; #X connect 28 0 25 0; #X connect 29 0 11 0; #X connect 30 0 25 0; #X connect 31 0 57 0; #X connect 32 0 57 0; #X connect 38 0 6 0; #X connect 38 1 6 1; #X connect 39 0 38 2; #X connect 49 0 51 1; #X connect 49 0 52 1; #X connect 51 0 53 0; #X connect 52 0 53 1; #X connect 53 0 50 0; #X connect 53 1 50 1; #X connect 54 0 53 2; #X connect 57 0 51 0; #X connect 57 0 38 0; #X connect 57 1 52 0; #X connect 57 1 38 1; creb-0.9.2+darcs20151027/doc/bitsplit~-help.pd0000644000000000000000000000311212613674326016614 0ustar0000000000000000#N canvas 0 26 536 243 10; #X obj 111 51 osc~; #X floatatom 111 29 5 0 0 0 - - -; #X obj 112 93 bitsplit~ 4; #X obj 81 177 dac~; #X obj 81 153 vol~; #X floatatom 110 136 5 0 0 0 - - -; #X obj 183 178 dac~; #X obj 183 154 vol~; #X floatatom 212 137 5 0 0 0 - - -; #X floatatom 178 50 5 0 0 0 - - -; #X obj 112 72 *~ 1; #X text 267 25 split a signal into a parallel binary word.; #X text 267 43 MSB = left \, LSB = right.; #X obj 339 127 *~; #X obj 367 127 / 2; #X obj 402 127 *~; #X obj 430 127 / 2; #N canvas 0 0 450 300 s 0; #X obj 152 123 *~; #X obj 152 89 inlet~; #X obj 206 90 inlet; #X obj 206 121 / 2; #X obj 152 150 outlet~; #X obj 206 151 outlet; #X connect 0 0 4 0; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X restore 383 178 pd s; #N canvas 379 254 494 400 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 165 LIBRARY external creb; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION split a signal into a parallel binary word ; #X text 12 65 INLET_0 signal; #X text 12 85 OUTLET_0 signal; #X text 12 105 OUTLET_1 signal; #X text 12 125 OUTLET_2 signal; #X text 12 145 OUTLET_3 signal; #X text 12 185 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 485 221 pd META; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 2 3 7 0; #X connect 4 0 3 0; #X connect 4 0 3 1; #X connect 5 0 4 1; #X connect 7 0 6 0; #X connect 7 0 6 1; #X connect 8 0 7 1; #X connect 9 0 10 1; #X connect 10 0 2 0; #X connect 14 0 15 1; #X connect 14 0 16 0; creb-0.9.2+darcs20151027/doc/fdn~-help.pd0000644000000000000000000000443612613674326015543 0ustar0000000000000000#N canvas 4 4 680 586 10; #X obj 146 529 vols~; #X floatatom 203 509 5 0 0 0 - - -; #X obj 143 562 dac~; #X obj 128 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 10 415 print; #X floatatom 216 431 5 0 0 0 - - -; #X floatatom 267 432 5 0 0 0 - - -; #X obj 54 144 noise~; #X obj 94 190 *~; #X floatatom 203 111 5 0 0 0 - - -; #X obj 146 157 ead~; #X msg 360 119 lines 501 752 5003 7504 105 206 307 408; #X floatatom 152 110 5 0 0 0 - - -; #X msg 361 248 linear 32 100 105; #X msg 360 271 linear 32 1000 1005; #X msg 12 465 reset; #X obj 142 463 fdn~ 64 40000; #X msg 358 327 exponential 32 10 5000; #X msg 360 292 linear 32 100 2015; #X msg 361 224 linear 8 75 100; #X msg 361 201 linear 32 50 2175; #X msg 360 374 exponential 8 50 175; #X text 186 20 fdn~ a feedback delay network; #X text 316 468 creation arguments: ; #X text 3 396 print delay lengths; #X text 2 448 reset state; #X text 316 512 nb delay lines is always a multiple of 4; #X text 358 96 specify delay line lengths manually; #X text 359 152 specify a linear/exponential delay length range; #X text 361 170 ; #X text 359 430 inlets: low/high frequency reverb time (60dB time) ; #X msg 358 351 exponential 64 1000 10; #N canvas 379 254 494 359 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION a feedback delay network; #X text 12 85 INLET_1 float; #X text 12 65 INLET_0 signal lines linear exponential; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 signal; #X text 12 145 OUTLET_1 signal; #X text 12 165 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 622 562 pd META; #X connect 0 0 2 0; #X connect 0 1 2 1; #X connect 1 0 0 2; #X connect 3 0 10 0; #X connect 4 0 16 0; #X connect 5 0 16 1; #X connect 6 0 16 2; #X connect 7 0 8 0; #X connect 8 0 16 0; #X connect 9 0 10 2; #X connect 10 0 8 1; #X connect 10 0 16 0; #X connect 11 0 16 0; #X connect 12 0 10 1; #X connect 13 0 16 0; #X connect 14 0 16 0; #X connect 15 0 16 0; #X connect 16 0 0 0; #X connect 16 1 0 1; #X connect 17 0 16 0; #X connect 18 0 16 0; #X connect 19 0 16 0; #X connect 20 0 16 0; #X connect 21 0 16 0; #X connect 31 0 16 0; creb-0.9.2+darcs20151027/doc/eadh~-help.pd0000644000000000000000000000120112613674326015660 0ustar0000000000000000#N canvas 0 26 319 228 10; #N canvas 36 104 494 367 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 INLET_1 float; #X text 12 165 AUTHOR Tom Shouten; #X text 12 105 INLET_2 float; #X text 12 145 OUTLET_0 signal; #X text 12 45 DESCRIPTION exponential attack decay (with hold == duration) ; #X text 12 65 INLET_0 bang; #X text 12 125 INLET_3 float; #X text 12 5 KEYWORDS signal abstraction ramp needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X restore 268 207 pd META; #X obj 63 81 eadh~; #X text 12 31 exponential attack decay (with hold == duration); creb-0.9.2+darcs20151027/doc/cmul~-help.pd0000644000000000000000000000117412613674326015730 0ustar0000000000000000#N canvas 0 26 381 197 10; #X text 49 5 complex multiplication; #N canvas 331 92 494 393 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 145 OUTLET_0 signal; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 165 OUTLET_1 signal; #X text 12 45 DESCRIPTION complex multiplication; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 185 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 331 175 pd META; #X obj 92 78 cmul~; creb-0.9.2+darcs20151027/doc/fmop~-help.pd0000644000000000000000000000107312613674326015727 0ustar0000000000000000#N canvas 0 26 344 223 10; #X text 76 12 fm operator; #N canvas 21 119 494 354 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 45 DESCRIPTION frequency modulation operator; #X text 12 105 INLET_2 signal; #X text 12 125 OUTLET_0 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 288 197 pd META; #X obj 79 101 fmop~; creb-0.9.2+darcs20151027/doc/cep~-help.pd0000644000000000000000000000112512613674326015533 0ustar0000000000000000#N canvas 0 26 521 228 10; #X text 229 45 forward cepstrum; #X text 229 64 using normalized fft/ifft objects; #N canvas 21 119 494 354 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 OUTLET_0 signal; #X text 12 125 OUTLET_1 signal; #X text 12 145 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X text 12 45 DESCRIPTION complex cepstrum; #X text 12 5 KEYWORDS signal abstraction needs_work; #X restore 448 207 pd META; #X obj 72 111 cep~; creb-0.9.2+darcs20151027/doc/dsfosc~-help.pd0000644000000000000000000000132312613674326016245 0ustar0000000000000000#N canvas 0 26 447 341 10; #X text 59 21 complex form of the discrete summation oscillator; #X text 62 38 (1-az^n)/(1-az) \, with z = e^(jw); #N canvas 331 92 494 393 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 INLET_1 float; #X text 12 125 INLET_2 float; #X text 12 145 OUTLET_0 signal; #X text 12 85 INLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction oscillator needs_work (example patch); #X text 12 185 AUTHOR Tom Schouten ; #X text 12 35 LICENSE GPL v2; #X text 12 55 DESCRIPTION complex form of the discrete summation oscillator ; #X restore 394 317 pd META; #X obj 72 104 dsfosc~; creb-0.9.2+darcs20151027/doc/count-help.pd0000644000000000000000000000152112613674326015716 0ustar0000000000000000#N canvas 0 26 450 300 10; #N canvas 331 92 494 345 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS control storage; #X text 12 45 DESCRIPTION modulo counter; #X text 12 85 INLET_1 float; #X text 12 65 INLET_0 bang reset; #X text 12 105 OUTLET_0 float; #X text 12 125 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 392 275 pd META; #X obj 164 162 count; #X text 157 32 modulo counter; #X floatatom 164 189 5 0 0 0 - - -; #X obj 106 85 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X floatatom 191 136 5 0 0 0 - - -; #X obj 106 110 metro 275; #X floatatom 106 189 5 0 0 0 - - -; #X obj 106 162 count 5; #X connect 1 0 3 0; #X connect 4 0 6 0; #X connect 5 0 1 1; #X connect 6 0 1 0; #X connect 6 0 8 0; #X connect 8 0 7 0; creb-0.9.2+darcs20151027/doc/inv-help.pd0000644000000000000000000000071212613674326015363 0ustar0000000000000000#N canvas 0 26 450 300 10; #N canvas 331 92 494 307 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION inverse; #X text 12 65 INLET_0 float; #X text 12 85 OUTLET_0 float; #X text 12 5 KEYWORDS control abstraction needs_work (example patch) ; #X text 12 105 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 391 275 pd META; #X obj 139 143 inv; creb-0.9.2+darcs20151027/doc/creb-dev.txt0000644000000000000000000000124212613674326015543 0ustar0000000000000000Creb dev log Entry: A full synth Date: Sun Nov 11 17:55:47 EST 2012 So, time to make some things come together. I'd like to wrap up some of the experiments with dynwav~ into a single, MIDI-controlled synth, which is somewhat hard to do in Pd + it's not so easy to port to a simple device / small code size. Anyways, I'd like to go through the motions once and what is better than bootstrapping it inside Pd. The product is a virtual analog (of course) using oversampled modules, with no distinction between control or data signals. It's also supposed to be a playground for code generated with [1], but I'm probably going for C first. [1] http://zwizwa.be/-/meta/ creb-0.9.2+darcs20151027/doc/filterortho~-help.pd0000644000000000000000000000350012613674326017324 0ustar0000000000000000#N canvas 0 26 525 473 10; #X obj 146 452 dac~; #X floatatom 255 83 7 0 0 0 - - -; #X floatatom 194 83 7 0 0 0 - - -; #X obj 158 405 filterortho~; #X obj 194 123 t b f; #X floatatom 29 31 5 0 0 0 - - -; #X obj 13 9 noise~; #X floatatom 133 83 7 0 0 0 - - -; #X obj 150 123 t b f; #X obj 13 52 *~; #X text 333 9 orthogonal biquad object; #X obj 157 330 pack s 0 0 0; #X obj 237 122 t b f; #X text 137 61 freq; #X text 213 61 Q; #X msg 335 126 setEQ; #X msg 335 150 setLP; #X msg 158 363 \$1 \$2 \$3 \$4; #X msg 336 175 setHP; #X msg 336 201 setBP; #X msg 336 225 setBR; #X msg 336 251 setHS; #X msg 337 275 setLS; #X msg 338 299 setAP; #X text 391 127 parametric equalizer; #X text 390 150 lowpass; #X text 391 175 highpass; #X text 391 201 bandpass; #X text 391 224 bandreject; #X text 390 252 highshelf; #X text 390 277 lowshelf; #X text 391 300 allpass; #X text 265 62 gain (only for EQ \, LS \, HS); #N canvas 379 254 494 344 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal filter; #X text 12 45 DESCRIPTION orthogonal biquad object; #X text 12 65 INLET_0 signal setEQ setLP setHP setBP setBR setHS setLS setAP; #X text 12 95 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 115 AUTHOR Tom Schouten ; #X restore 472 453 pd META; #X connect 1 0 12 0; #X connect 2 0 4 0; #X connect 3 0 0 0; #X connect 3 0 0 1; #X connect 4 0 11 0; #X connect 4 1 11 2; #X connect 5 0 9 1; #X connect 6 0 9 0; #X connect 7 0 8 0; #X connect 8 0 11 0; #X connect 8 1 11 1; #X connect 9 0 3 0; #X connect 11 0 17 0; #X connect 12 0 11 0; #X connect 12 1 11 3; #X connect 15 0 11 0; #X connect 16 0 11 0; #X connect 17 0 3 0; #X connect 18 0 11 0; #X connect 19 0 11 0; #X connect 20 0 11 0; #X connect 21 0 11 0; #X connect 22 0 11 0; #X connect 23 0 11 0; creb-0.9.2+darcs20151027/doc/fblock-help.pd0000644000000000000000000000145012613674326016027 0ustar0000000000000000#N canvas 0 26 551 236 10; #X text 200 79 right inlet is also "active"; #X text 201 119 main usage is to compute block synchronous frequencies ; #X text 200 134 for spectral domain processing; #X text 201 49 out = left + right * (sys samplerate / blocksize); #X text 200 35 fblock: compute block relative frequencies; #N canvas 198 157 494 345 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 float; #X text 12 105 OUTLET_0 float; #X text 12 45 DESCRIPTION compute block relative frequencies; #X text 12 5 KEYWORDS control abstraction needs_work (example patch) ; #X text 12 125 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 502 215 pd META; #X obj 40 67 fblock; creb-0.9.2+darcs20151027/doc/vols~-help.pd0000644000000000000000000000142412613674326015751 0ustar0000000000000000#N canvas 0 26 450 300 10; #N canvas 248 148 494 372 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 125 OUTLET_0 signal; #X text 12 65 INLET_0 signal; #X text 12 165 AUTHOR Tom Shouten; #X text 12 45 DESCRIPTION volume for a stereo signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 float; #X text 12 145 OUTLET_1 signal; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS signal filter abstraction; #X restore 393 274 pd META; #X obj 152 129 vols~; #X obj 137 36 osc~ 440; #X floatatom 176 95 5 0 100 0 - - -; #X obj 153 165 dac~; #X obj 156 66 osc~ 440.1; #X text 210 126 volume for a stereo signal; #X connect 1 0 4 0; #X connect 1 1 4 1; #X connect 2 0 1 0; #X connect 3 0 1 2; #X connect 5 0 1 1; creb-0.9.2+darcs20151027/doc/expmap~-help.pd0000644000000000000000000000115712613674326016263 0ustar0000000000000000#N canvas 0 26 352 368 10; #X text 80 9 exponential map from (-1 \, 1) to (min \, max); #N canvas 331 92 494 345 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 INLET_1 float; #X text 12 45 DESCRIPTION exponential map from (-1 \, 1) to (min \, max); #X text 12 65 INLET_0 signal; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 302 347 pd META; #X obj 103 141 expmap~; creb-0.9.2+darcs20151027/doc/cexp~-help.pd0000644000000000000000000000130412613674326015722 0ustar0000000000000000#N canvas 0 26 475 207 10; #X obj 85 82 clog~; #X obj 145 82 cexp~; #X text 235 81 complex log and exp.; #X text 237 105 see also; #X obj 309 104 cep~; #X text 351 103 and; #X obj 384 105 icep~; #N canvas 379 254 494 344 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 INLET_0 signal; #X text 12 105 INLET_1 signal; #X text 12 125 OUTLET_0 signal; #X text 12 145 OUTLET_1 signal; #X text 12 5 NAME clog~ cexp~; #X text 12 165 AUTHOR Tom Schouten ; #X text 12 45 LICENSE GPL v2; #X text 12 25 KEYWORDS signal needs_work needs_work (example); #X text 12 65 DESCRIPTION complex log and exp; #X restore 424 185 pd META; creb-0.9.2+darcs20151027/doc/scrollgrid1D~-help.pd0000644000000000000000000001000312613674326017310 0ustar0000000000000000#N canvas 0 26 659 650 10; #X obj 116 111 scrollgrid1D~; #X msg 36 87 reset; #X floatatom 111 82 5 0 0 0 - - -; #X floatatom 187 82 5 0 0 0 - - -; #X floatatom 237 81 5 0 0 0 - - -; #X floatatom 290 80 5 0 0 0 - - -; #X obj 401 190 tabwrite~ t; #X obj 401 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 504 196 table t 10000; #X obj 123 217 vol~; #X floatatom 146 191 5 0 0 0 - - -; #X text 103 42 frequency; #X text 197 40 T1; #X text 249 40 T2; #X text 301 41 N; #X msg 111 61 350; #X msg 235 61 1; #X msg 291 60 3; #X msg 188 60 12; #X obj 379 212 tabwrite~ t; #X obj 379 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 353 233 tabwrite~ t; #X obj 353 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 253 255 parameters:; #X text 286 322 N = number of scrolls or unstable rotation centers in attractor; #X text 253 357 outputs:; #X text 250 407 some remarks; #X text 286 375 the first output is alongside the scoll centers \, the other two are orthogonal to this line.; #X text 368 125 X Y Z; #X obj 178 217 vol~; #X floatatom 201 191 5 0 0 0 - - -; #X obj 64 218 vol~; #X floatatom 87 192 5 0 0 0 - - -; #X obj 63 277 hip~ 10; #X floatatom 133 281 5 0 0 0 - - -; #X obj 63 300 blop~ 4; #X msg 132 258 500; #X msg 163 258 5000; #X text 285 288 T1 = unstable time constant in ms ("attack" time); #X text 285 305 T2 = stable time constant in ms ("release" time); #X text 285 572 the entire circuit is clipped \, which means that for some parameter values that would normally cause a blowup \, its behaviour is limited to that of an oscillator.; #X obj 4 278 hip~ 10; #X obj 4 301 blop~ 4; #X floatatom 180 165 5 0 0 0 - - -; #X obj 4 397 tabwrite~ t; #X obj 21 375 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 142 61 5000; #X text 284 272 freq = spiral frequency in Hz; #X text 45 11 stabilized scroll grid chaotic oscillator with scroll centers located on a line.; #X msg 204 257 17000; #X text 285 427 this chaotic system is a switched unstable linear system. it consists of N scrolls (outward spirals). when the amplitude of the spiral has reached a certain threshold \, it is switched to be attracted by a neighbouring scroll. the freq parameter determines the frequency of the outward spiralling motion on a scroll. T1 is the outward spiralling time constant. T1 large means slow buildup or mild chaotic motion \, T1 small means fast buildup or turbulent chaotic motion. T2 is the time constant with which a trajectory is attracted to the plane of a scroll. T2 small means fast attraction \, T2 large means slow attraction. ; #X obj 94 373 dac~ 4; #N canvas 375 235 494 405 META 0; #X text 12 235 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION stabilized scroll grid chaotic oscillator with scroll centers located on a line; #X text 12 75 INLET_0 signal reset; #X text 12 95 INLET_1 signal; #X text 12 115 INLET_2 signal; #X text 12 135 INLET_3 signal; #X text 12 155 OUTLET_0 signal; #X text 12 175 OUTLET_1 signal; #X text 12 195 OUTLET_2 signal; #X text 12 5 KEYWORDS signal; #X text 12 25 LICENSE GPL v2; #X text 12 215 AUTHOR Tom Schouten ; #X restore 589 623 pd META; #X connect 0 0 21 0; #X connect 0 0 31 0; #X connect 0 1 9 0; #X connect 0 1 19 0; #X connect 0 2 6 0; #X connect 0 2 29 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 1; #X connect 4 0 0 2; #X connect 5 0 0 3; #X connect 7 0 6 0; #X connect 9 0 41 0; #X connect 10 0 9 1; #X connect 15 0 2 0; #X connect 16 0 4 0; #X connect 17 0 5 0; #X connect 18 0 3 0; #X connect 20 0 19 0; #X connect 22 0 21 0; #X connect 29 0 33 0; #X connect 30 0 29 1; #X connect 31 0 33 0; #X connect 31 0 41 0; #X connect 32 0 31 1; #X connect 33 0 35 0; #X connect 34 0 35 1; #X connect 34 0 42 1; #X connect 35 0 44 0; #X connect 35 0 51 0; #X connect 36 0 34 0; #X connect 37 0 34 0; #X connect 41 0 42 0; #X connect 42 0 44 0; #X connect 42 0 51 0; #X connect 43 0 10 0; #X connect 43 0 30 0; #X connect 45 0 44 0; #X connect 46 0 2 0; #X connect 49 0 34 0; creb-0.9.2+darcs20151027/doc/icep~-help.pd0000644000000000000000000000115112613674326015703 0ustar0000000000000000#N canvas 0 26 488 228 10; #X text 229 45 backward cepstrum; #X text 229 64 using normalized fft/ifft objects; #N canvas 331 92 494 506 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 105 OUTLET_0 signal; #X text 12 45 DESCRIPTION backward cepstrum; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 125 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 438 207 pd META; #X obj 151 51 icep~; creb-0.9.2+darcs20151027/doc/bfft~-help.pd0000644000000000000000000000171612613674326015713 0ustar0000000000000000#N canvas 0 26 480 309 10; #X obj 17 62 osc~ 500; #X floatatom 17 -11 5 0 0 0 - - -; #X obj 17 23 * 187.5; #N canvas 0 0 450 300 (subpatch) 0; #X array \$0-scope 64 float 0; #X coords 0 1 63 -1 200 140 1 0 0; #X restore 233 16 graph; #X obj 18 113 bfft~; #X obj 71 112 ibfft~; #X text 13 -74 like fft~ but normalized and; #N canvas 379 254 494 344 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal block_oriented; #X text 12 45 DESCRIPTION like fft~ but normalized and spectrum: (DC \, NY) \, (R1 \, I1) \, ...(RN-1 \, IN-1); #X text 12 75 INLET_0 signal; #X text 12 95 OUTLET_0 signal; #X text 12 115 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 428 216 pd META; #X text 12 -60 spectrum: (DC \, NY) \, (R1 \, I1) \, ...(RN-1 \, IN-1) ; #X obj 17 180 tabsend~ \$0-scope; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 4 0 9 0; creb-0.9.2+darcs20151027/doc/biquadseries~-help.pd0000644000000000000000000000210112613674326017437 0ustar0000000000000000#N canvas 0 26 533 299 10; #X obj 37 246 dac~; #X msg 81 132 butterLP \$1; #X msg 173 131 butterHP \$1; #X floatatom 81 105 5 0 0 0 - - -; #X floatatom 173 104 5 0 0 0 - - -; #X obj 48 78 *~; #X floatatom 82 55 5 0 0 0 - - -; #X obj 48 35 noise~; #X text 269 132 butterworth lowpass and highpass; #X text 181 178 creation argument: number of 2nd order sections; #X obj 48 178 biquadseries~ 4; #X text 173 22 biquadseries~ second order iir series section; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal block_oriented filter; #X text 12 45 DESCRIPTION biquadseries~ 2nd order iir series section ; #X text 12 65 INLET_0 signal butterLP butterHP; #X text 12 85 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 482 277 pd META; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 5 0 10 0; #X connect 6 0 5 1; #X connect 7 0 5 0; #X connect 10 0 0 0; #X connect 10 0 0 1; creb-0.9.2+darcs20151027/doc/ead~-help.pd0000644000000000000000000000276412613674326015527 0ustar0000000000000000#N canvas 0 26 413 265 10; #X obj 105 111 ead~ 0 0; #X obj 89 179 *~; #X obj 105 40 metro; #X obj 41 144 osc~; #X floatatom 41 112 5 0 0 0 - - -; #X floatatom 135 12 5 0 0 0 - - -; #X floatatom 130 64 5 0 0 0 - - -; #X floatatom 156 86 5 0 0 0 - - -; #X obj 78 242 dac~; #X text 202 71 60db attack and decay time; #X obj 70 76 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 58 12 stop; #X text 201 51 exponential attack/decay envelope; #X obj 89 212 vol~; #X floatatom 117 193 5 0 0 0 - - -; #X obj 265 119 table t 5000; #X obj 265 176 tabwrite~ t; #X obj 265 152 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 105 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #N canvas 379 254 494 344 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION exponential attack/decay envelope; #X text 12 5 KEYWORDS signal ramp; #X text 12 85 INLET_1 float; #X text 12 65 INLET_0 bang; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 362 242 pd META; #X connect 0 0 1 1; #X connect 0 0 16 0; #X connect 1 0 13 0; #X connect 2 0 0 0; #X connect 3 0 1 0; #X connect 4 0 3 0; #X connect 5 0 2 1; #X connect 6 0 0 1; #X connect 7 0 0 2; #X connect 10 0 0 0; #X connect 11 0 2 0; #X connect 13 0 8 0; #X connect 13 0 8 1; #X connect 14 0 13 1; #X connect 17 0 16 0; #X connect 17 0 0 0; #X connect 18 0 2 0; creb-0.9.2+darcs20151027/doc/tblock-help.pd0000644000000000000000000000143512613674326016050 0ustar0000000000000000#N canvas 0 26 467 246 10; #X text 95 58 right inlet is also "active"; #X text 95 113 for spectral domain processing; #X text 95 14 tblock: compute block relative time delays; #X text 96 28 out = left + right * (blocksize / sys_samplerate); #X text 96 98 main usage is to compute block synchronous time delays ; #X obj 22 20 tblock; #N canvas 200 78 494 325 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 float; #X text 12 105 OUTLET_0 float; #X text 12 45 DESCRIPTION block relative time conversion; #X text 12 5 KEYWORDS control abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 416 225 pd META; creb-0.9.2+darcs20151027/doc/fmod-help.pd0000644000000000000000000000106112613674326015512 0ustar0000000000000000#N canvas 0 26 418 289 10; #X text 175 90 floating point version of; #X text 361 91 [mod]; #N canvas 45 93 494 329 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 INLET_1 float; #X text 12 45 DESCRIPTION floating point version of [mod]; #X text 12 65 INLET_0 float; #X text 12 105 OUTLET_0 float; #X text 12 5 KEYWORDS control needs_work (example patch); #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 368 267 pd META; #X obj 67 87 fmod; creb-0.9.2+darcs20151027/doc/sbosc~-help.pd0000644000000000000000000000273512613674326016105 0ustar0000000000000000#N canvas 0 26 349 360 10; #X obj 70 158 sbosc~; #X floatatom 101 285 5 0 0 0 - - -; #X obj 70 308 vol~; #X obj 58 340 dac~; #X floatatom 70 68 5 0 0 0 - - -; #X floatatom 136 106 5 0 0 0 - - -; #X msg 129 139 0; #X text 171 139 phase; #X text 56 44 pitch; #X text 119 84 center freq; #X text 38 14 sbosc~: smallband periodic complex oscillator.; #X obj 134 53 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 213 91 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 85 228 idsfosc~; #X obj 70 256 *~; #X floatatom 136 206 5 0 0 0 - - -; #X obj 194 191 hsl 128 15 -0.99 0.99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 136 188 bw; #N canvas 379 254 494 366 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION smallband periodic complex oscillator; #X text 12 5 KEYWORDS signal oscillator; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 signal; #X text 12 145 OUTLET_1 signal; #X text 12 25 LICENSE GPL v2; #X text 12 165 AUTHOR Tom Schouten ; #X restore 299 340 pd META; #X connect 0 0 14 0; #X connect 1 0 2 1; #X connect 2 0 3 0; #X connect 2 0 3 1; #X connect 4 0 0 0; #X connect 4 0 13 0; #X connect 5 0 0 1; #X connect 6 0 0 2; #X connect 11 0 4 0; #X connect 12 0 5 0; #X connect 13 0 14 1; #X connect 14 0 2 0; #X connect 15 0 13 1; #X connect 16 0 15 0; creb-0.9.2+darcs20151027/doc/ear~-help.pd0000644000000000000000000000252012613674326015533 0ustar0000000000000000#N canvas 0 26 421 306 10; #X obj 89 227 *~; #X obj 105 40 metro; #X obj 105 12 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 41 192 osc~; #X floatatom 41 160 5 0 0 0 - - -; #X floatatom 135 12 5 0 0 0 - - -; #X floatatom 130 112 5 0 0 0 - - -; #X floatatom 157 134 5 0 0 0 - - -; #X obj 77 265 dac~; #X msg 58 12 stop; #X msg 26 124 start; #X msg 71 123 stop; #X obj 105 159 ear~ 0 0; #X obj 105 77 del; #X floatatom 159 50 5 0 0 0 - - -; #X text 201 99 exponential attack/release envelope; #X text 202 119 60db attack and release time; #N canvas 379 254 494 344 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION exponential attack/release envelope; #X text 12 5 KEYWORDS signal ramp; #X text 12 125 OUTLET_0 signal; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 65 INLET_0 start stop; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 372 286 pd META; #X connect 0 0 8 0; #X connect 0 0 8 1; #X connect 1 0 10 0; #X connect 1 0 13 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 3 0; #X connect 5 0 1 1; #X connect 6 0 12 1; #X connect 7 0 12 2; #X connect 9 0 1 0; #X connect 10 0 12 0; #X connect 11 0 12 0; #X connect 12 0 0 1; #X connect 13 0 11 0; #X connect 14 0 13 1; creb-0.9.2+darcs20151027/doc/ucnorm~-help.pd0000644000000000000000000000115312613674326016270 0ustar0000000000000000#N canvas 0 0 450 300 10; #X text 59 21 normalize complex number to unit magnitude; #N canvas 200 78 494 353 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION normalize complex number to unit magnitude ; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 OUTLET_0 signal; #X text 12 125 OUTLET_1 signal; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Tom Schouten ; #X restore 398 277 pd META; #X obj 183 126 ucnorm~; creb-0.9.2+darcs20151027/doc/ffpoly-help.pd0000644000000000000000000000266112613674326016073 0ustar0000000000000000#N canvas 0 26 461 404 10; #X text 85 14 ffpoly - compute a finite field polynomial; #X msg 103 89 coef 0 \$1; #X floatatom 103 65 5 0 0 0 - - -; #X floatatom 181 65 5 0 0 0 - - -; #X floatatom 257 65 5 0 0 0 - - -; #X floatatom 334 64 5 0 0 0 - - -; #X msg 181 89 coef 1 \$1; #X msg 257 89 coef 2 \$1; #X msg 334 89 coef 3 \$1; #X floatatom 38 106 5 0 0 0 - - -; #X obj 38 350 ffpoly 3 5; #X text 125 350 creation args: ; #X floatatom 38 384 5 0 0 0 - - -; #X msg 334 150 order \$1; #X floatatom 334 125 5 0 0 0 - - -; #X text 332 174 finite field order; #X floatatom 335 217 5 0 0 0 - - -; #X msg 335 242 coefficients \$1; #X text 271 279 set coefs in packed form; #X text 203 292 digit representation in base = field order; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION compute a finite field polynomial; #X text 12 65 INLET_0 float coef order; #X text 12 85 OUTLET_0 float; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 412 384 pd META; #X connect 1 0 10 0; #X connect 2 0 1 0; #X connect 3 0 6 0; #X connect 4 0 7 0; #X connect 5 0 8 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 10 0; #X connect 9 0 10 0; #X connect 10 0 12 0; #X connect 13 0 10 0; #X connect 14 0 13 0; #X connect 16 0 17 0; #X connect 17 0 10 0; creb-0.9.2+darcs20151027/doc/clog~-help.pd0000644000000000000000000000130512613674326015710 0ustar0000000000000000#N canvas 0 26 475 207 10; #X obj 85 82 clog~; #X obj 145 82 cexp~; #X text 235 81 complex log and exp.; #X text 237 105 see also; #X obj 309 104 cep~; #X text 351 103 and; #X obj 384 105 icep~; #N canvas 379 254 494 344 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 DESCRIPTION complex log and exp.; #X text 12 85 INLET_0 signal; #X text 12 105 INLET_1 signal; #X text 12 125 OUTLET_0 signal; #X text 12 145 OUTLET_1 signal; #X text 12 5 NAME clog~ cexp~; #X text 12 165 AUTHOR Tom Schouten ; #X text 12 45 LICENSE GPL v2; #X text 12 25 KEYWORDS signal needs_work needs_work (example); #X restore 424 185 pd META; creb-0.9.2+darcs20151027/doc/lattice3-help.pd0000644000000000000000000000106712613674326016303 0ustar0000000000000000#N canvas 0 26 450 300 10; #X text 22 4 expand harmonic lattice vector in the (2 \, 3/2 \, 5/4) basis; #N canvas 331 92 494 345 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 OUTLET_0 signal; #X text 12 65 INLET_0 signal; #X text 12 45 DESCRIPTION expand a 3D harmonic lattice vector; #X text 12 5 KEYWORDS control abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 391 275 pd META; #X obj 74 93 lattice3; creb-0.9.2+darcs20151027/doc/cadd~-help.pd0000644000000000000000000000113712613674326015662 0ustar0000000000000000#N canvas 0 0 450 300 10; #N canvas 331 92 494 398 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION complex addition; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 OUTLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 185 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS signal needs_work (example); #X restore 398 277 pd META; #X obj 105 52 cadd~; #X text 150 50 complex addition; creb-0.9.2+darcs20151027/doc/ccmap~-help.pd0000644000000000000000000000125412613674326016052 0ustar0000000000000000#N canvas 0 26 450 300 10; #X text 23 10 conformal self map of the unit disk (z-a)/(1-conj(a)z) ; #N canvas 331 92 494 392 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 145 OUTLET_0 signal; #X text 12 45 DESCRIPTION conformal self map of the unit disk; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 165 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 185 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 398 277 pd META; #X obj 24 90 ccmap~; creb-0.9.2+darcs20151027/doc/cheby~-help.pd0000644000000000000000000000301112613674326016052 0ustar0000000000000000#N canvas 1 0 494 348 10; #X obj 130 230 cheby~ 4; #X msg 147 149 coef 1 \$1; #X floatatom 147 93 5 0 0 0 - - -; #X obj 147 117 dbtorms; #X obj 124 313 dac~; #X obj 130 281 vol~; #X floatatom 156 261 5 0 0 0 - - -; #X obj 40 113 osc~; #X floatatom 40 88 5 0 0 0 - - -; #X floatatom 226 94 5 0 0 0 - - -; #X obj 226 118 dbtorms; #X floatatom 305 94 5 0 0 0 - - -; #X obj 305 118 dbtorms; #X floatatom 384 93 5 0 0 0 - - -; #X obj 384 117 dbtorms; #X msg 226 150 coef 2 \$1; #X msg 305 150 coef 3 \$1; #X msg 384 150 coef 4 \$1; #X text 96 3 chebyshev waveshaper; #X text 207 229 creation argument: order of polynomial; #X text 135 47 coef n x sets coefficient of nth order cheby poly to x; #X text 135 60 if the input is a sine wave \, these are the amplitudes for the harmonics.; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION Chebyshev waveshaper; #X text 12 65 INLET_0 signal coef; #X text 12 85 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 444 327 pd META; #X connect 0 0 5 0; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 4 1; #X connect 5 0 4 0; #X connect 6 0 5 1; #X connect 7 0 0 0; #X connect 8 0 7 0; #X connect 9 0 10 0; #X connect 10 0 15 0; #X connect 11 0 12 0; #X connect 12 0 16 0; #X connect 13 0 14 0; #X connect 14 0 17 0; #X connect 15 0 0 0; #X connect 16 0 0 0; #X connect 17 0 0 0; creb-0.9.2+darcs20151027/doc/64k-help.pd0000644000000000000000000000137512613674326015201 0ustar0000000000000000#N canvas 0 0 450 300 10; #X text 102 32 a beat shuffler using raw 64k/break sample banks; #N canvas 331 92 494 506 META 0; #X text 12 265 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 85 INLET_1 float; #X text 12 45 DESCRIPTION an overlap add tabread~ clone; #X text 12 65 INLET_0 float; #X text 12 105 INLET_2 float; #X text 12 125 INLET_3 bang; #X text 12 145 INLET_4 float; #X text 12 165 INLET_5 float; #X text 12 185 OUTLET_0 signal; #X text 12 205 OUTLET_1 float; #X text 12 225 OUTLET_2 float; #X text 12 5 KEYWORDS signal abstraction array needs_work (example patch); #X text 12 245 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 398 277 pd META; #X obj 33 32 64k ------; creb-0.9.2+darcs20151027/doc/resofilt~-help.pd0000644000000000000000000000534012613674326016616 0ustar0000000000000000#N canvas 0 26 638 489 10; #X floatatom 50 203 5 0 0 0 - - -; #X obj 118 433 vol~; #X floatatom 157 409 5 0 0 0 - - -; #X obj 110 468 dac~; #X floatatom 291 252 5 0 0 0 - - -; #X floatatom 290 301 5 0 0 0 - - -; #X obj 119 341 vol~; #X floatatom 142 318 5 0 0 0 - - -; #X obj 295 232 hsl 128 15 20 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 7900 1; #X obj 294 282 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 -1 -1 5600 1; #X obj 242 225 ead~; #X obj 243 268 *~; #X obj 235 203 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 259 203 5 0 0 0 - - -; #X floatatom 305 202 5 0 0 0 - - -; #X obj 19 170 ead~; #X obj 20 273 *~; #X obj 19 102 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 35 147 5 0 0 0 - - -; #X floatatom 76 147 5 0 0 0 - - -; #X obj 86 71 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 87 44 metro 125; #X obj 88 20 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 147 16 5 0 0 0 - - -; #X msg 34 126 10; #X msg 76 126 400; #X msg 268 180 20; #X obj 36 225 blosc~ saw; #X obj 37 248 -~; #X msg 141 297 70; #X text 281 96 all inputs are signal inlets. frequency and reso are interpolated from their average (rms) value.; #X msg 305 181 500; #X text 279 28 resofilt~: high-quality implementations of the moog 4-pole and tb303 3-pole reso ladder filter. state-limited which means it distorts on high reso input \, and can go into self oscillation when reso > 1; #X msg 53 182 70; #X obj 119 377 resofilt~ 4; #X text 222 378 creation argument 4 = 4pole \, 3 = 3pole; #N canvas 379 254 494 344 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal filter; #X text 12 45 DESCRIPTION high-quality implementations of the moog 4-pole and tb303 3-pole res ladder filter; #X text 12 75 INLET_0 signal; #X text 12 95 INLET_1 signal; #X text 12 115 INLET_2 signal; #X text 12 135 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 155 AUTHOR Tom Schouten ; #X restore 588 468 pd META; #X connect 0 0 27 0; #X connect 1 0 3 0; #X connect 1 0 3 1; #X connect 2 0 1 1; #X connect 4 0 11 1; #X connect 6 0 34 0; #X connect 7 0 6 1; #X connect 8 0 4 0; #X connect 9 0 5 0; #X connect 10 0 11 0; #X connect 12 0 10 0; #X connect 13 0 10 1; #X connect 14 0 10 2; #X connect 15 0 16 0; #X connect 16 0 6 0; #X connect 17 0 15 0; #X connect 18 0 15 1; #X connect 19 0 15 2; #X connect 20 0 12 0; #X connect 20 0 17 0; #X connect 21 0 20 0; #X connect 22 0 21 0; #X connect 23 0 21 1; #X connect 24 0 18 0; #X connect 25 0 19 0; #X connect 26 0 13 0; #X connect 27 0 28 0; #X connect 28 0 16 1; #X connect 29 0 7 0; #X connect 31 0 14 0; #X connect 33 0 0 0; #X connect 34 0 1 0; creb-0.9.2+darcs20151027/doc/bdft-help.pd0000644000000000000000000000075512613674326015515 0ustar0000000000000000#N canvas 0 0 450 300 10; #N canvas 145 112 494 314 META 0; #X text 12 145 HELP_PATCH_AUTHORS Added by Jonathan Wilkes.; #X text 12 5 KEYWORDS control abstraction; #X text 12 45 DESCRIPTION set decay time for [bdiag~]; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 float; #X text 12 105 OUTLET_0 anything; #X text 12 125 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 398 279 pd META; #X text 114 58 set decay time (ms/sec) for [bdiag~]; #X obj 71 58 bdft; creb-0.9.2+darcs20151027/doc/diag~-help.pd0000644000000000000000000000156112613674326015674 0ustar0000000000000000#N canvas 3 26 450 300 10; #X obj 36 29 diag~; #X text 83 31 diagonal state space system; #X text 38 67 treats input dsp block as n parallel signals; #X text 40 92 s1 = (a * s1) + (b * s2) + u1; #X text 41 109 s2 = (a * s2) - (b * s1) + u2; #N canvas 145 112 494 314 META 0; #X text 12 5 KEYWORDS signal needs_work (example patch); #X text 12 45 DESCRIPTION diagonal state space system; #X text 12 65 INLET_0 signal bang reset random time eigen; #X text 12 85 OUTLET_0 signal; #X text 12 125 HELP_PATCH_AUTHORS Added by Jonathan Wilkes.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 395 275 pd META; #X msg 108 140 reset; #X obj 108 262 diag~; #X msg 118 163 random; #X msg 127 184 bang; #X msg 144 232 eigen; #X msg 137 206 time; #X connect 6 0 7 0; #X connect 8 0 7 0; #X connect 9 0 7 0; #X connect 10 0 7 0; #X connect 11 0 7 0; creb-0.9.2+darcs20151027/doc/reference.txt0000644000000000000000000000560112613674326016015 0ustar0000000000000000abstractions 64k a beat shuffler using raw 64k/break sample banks bdft,bdfts set decay time (ms/sec) and osc frequency (for bdiag~) bhip~ butterworth high pass filter blop~ butterworth low pass filter bpm convert bpm to metro time and phasor freq cadd~ complex add ccmap~ conformal self map of the unit disk cconj~ complex conjugate cep~/icep~ complex cepstrum and inverse cinv~ complex inverse cmul~ complex multiplication count modulo counter cosc~ complex oscillator csub~ complex subtraction dsfosc~ (finite) discrete summation formula oscillator eadh~ exponential attack decay (with hold == duration) eadsrh~ exponential attack decay sustain release (..) expmap~ exponential map fblock block relative frequency conversion fmod floating point modulo fmop~ fm operator frequor~ like phasor, but for block spectra idsfosc~ infinite discrete summation formula inv inverse lattice3 expand a 3D harmonic lattice vector lpfft~ ifft + lowpass (for anti-aliased dynwav) pdynwav~ phasor~ + dynwav~ scale7 arbitrary 7 tone scale ti_hihat hihat gop object ti_snare snare drum gop object tblock block relative time conversion ucnorm~ normalize a complex signal to unit norm ucmod~ unit circle modulator vols~ volume for a stereo signal vol~ volume for a mono signal externs ffpoly finite field polynomial fwarp tangent warp frequency ratio multiply by 2^k so result is 1<=r<2 (transposer) tilde externs abs~ absolute value bdiag~ block diagonal state space system (spectral processor) bfft~ reordered fft bitsplit~ convert signal to binary vector bwin~ several windowing functions and spectral envelopes biquadseries~ biquad second order sections (i.e. butterworth) bitsplit~ convert a signal to binary representation blocknorm~ normalize a (set of) dsp block(s) (i.e. for spectral processing) blosc~ several bandlimited oscillators cheby~ chebyshev polynomial waveshaper clog~ complex log diag~ diagonal state space system (spectral processor) dist~ several distortions & waveshaping functions dwt~ discrete wavelet transform idwt~ inverse dynwav~ dynamic wavetable: use a signal block as wavetable ead~ exp. attack decay eadsr~ exp. attack decay sustain release ear~ exp. attack release filterortho~ several biquad filters, orthogonal implementation fdn~ a feedback delay network junction~ a circulant lossless signal junction lattice~ lattice filter matrix~ multiply a signal block with an arbitrary matrix permut~ random permute a signal block qmult~ multiply 2 quaternion signals qnorm~ normalize a quaternion signal (or any 4 channel sig) ramp~ generates an integer ramp resofilt~ a reso filter (4pole, 3pole) sbosc~ smallband oscillator (i.e. for formant synthesis) statwav~ a tabread4~ clone with 8 point interpolation scrollgrid1D~ a stabilized scroll grid chaotic oscillator tabreadmix~ a tabread~ clone with overlap add (for smooth time stretch) xfm~ coupled frequency modulation creb-0.9.2+darcs20151027/doc/frequor~-help.pd0000644000000000000000000000123712613674326016453 0ustar0000000000000000#N canvas 0 26 405 288 10; #X text 28 4 frequor~: frequency domain phasor~ (for traversing spectra) ; #X text 102 25 output: (0 \, N/2-1) -> (0 \, 1); #X text 152 41 (N/2 \, N-1) -> (-1 \, 0); #N canvas 331 92 494 345 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 95 OUTLET_0 signal; #X text 12 45 DESCRIPTION frequency domain phasor~ (for traversing spectra); #X text 12 75 INLET_0 float; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 115 AUTHOR Tom Schouten ; #X restore 352 267 pd META; #X obj 128 131 frequor~; creb-0.9.2+darcs20151027/doc/bdfts-help.pd0000644000000000000000000000102112613674326015663 0ustar0000000000000000#N canvas 0 0 450 300 10; #N canvas 145 112 494 314 META 0; #X text 12 165 HELP_PATCH_AUTHORS Added by Jonathan Wilkes.; #X text 12 125 LIBRARY external creb; #X text 12 5 KEYWORDS control abstraction; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 float; #X text 12 105 OUTLET_0 anything; #X text 12 45 DESCRIPTION set osc frequency for [bdiag~]; #X text 12 145 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 398 279 pd META; #X text 114 58 set osc frequency for [bdiag~]; #X obj 71 58 bdfts; creb-0.9.2+darcs20151027/doc/fwarp-help.pd0000644000000000000000000000260712613674326015713 0ustar0000000000000000#N canvas 0 26 448 408 10; #X obj 18 85 fwarp; #X floatatom 18 53 5 0 0 0 - - -; #X floatatom 18 121 7 0 0 0 - - -; #X text 112 49 fwarp - warps a frequency using the formula; #X obj 173 261 xfm~ 0 0 0 0; #X obj 173 218 fwarp; #X floatatom 173 186 5 0 0 0 - - -; #X obj 117 260 osc~; #X obj 152 324 vol~; #X obj 152 350 dac~; #X floatatom 212 298 5 0 0 0 - - -; #X obj 351 263 xfm~ 0 0 0 0; #X floatatom 351 188 5 0 0 0 - - -; #X obj 295 262 osc~; #X obj 330 326 vol~; #X obj 330 352 dac~; #X floatatom 390 300 5 0 0 0 - - -; #X text 132 126 example: xfm~ uses warped frequencies; #X text 112 67 out = tan(2pi*in/sr) * (sr/2pi); #N canvas 482 199 494 344 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION warp a frequency using the formula out = tan(2pi*in/sr) * (sr/2pi); #X text 12 75 INLET_0 float; #X text 12 95 OUTLET_0 float; #X text 12 25 LICENSE GPL v2; #X text 12 115 AUTHOR Tom Schouten ; #X restore 399 388 pd META; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 4 0 8 0; #X connect 5 0 4 0; #X connect 6 0 5 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 0 9 1; #X connect 10 0 8 1; #X connect 11 0 14 0; #X connect 12 0 13 0; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 14 0 15 1; #X connect 16 0 14 1; creb-0.9.2+darcs20151027/doc/bhip~-help.pd0000644000000000000000000000112712613674326015710 0ustar0000000000000000#N canvas 0 0 450 300 10; #X obj 130 55 bhip~; #X text 175 53 butterworth high pass filter; #N canvas 331 92 494 327 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 135 LIBRARY external creb; #X text 12 95 INLET_1 float; #X text 12 115 OUTLET_0 signal; #X text 12 5 KEYWORDS signal abstraction filter needs_work (example patch); #X text 12 55 DESCRIPTION butterworth high pass filter; #X text 12 75 INLET_0 signal; #X text 12 155 AUTHOR Tom Schouten ; #X text 12 35 LICENSE GPL v2; #X restore 398 277 pd META; creb-0.9.2+darcs20151027/doc/ti_hihat-help.pd0000644000000000000000000000130012613674326016352 0ustar0000000000000000#N canvas 0 26 333 350 10; #N canvas 200 78 494 529 META 0; #X text 12 245 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION hihat gop object; #X text 12 5 KEYWORDS signal abstraction GUI needs_work (example patch) ; #X text 12 65 INLET_0 float; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 125 INLET_3 float; #X text 12 145 INLET_4 float; #X text 12 165 INLET_5 float; #X text 12 185 INLET_6 float; #X text 12 205 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 225 AUTHOR Tom Schouten ; #X restore 278 327 pd META; #X obj 9 52 ti_hihat ----; #X coords 0 0 0.00245098 0.00260417 200 50 0; creb-0.9.2+darcs20151027/doc/qnorm~-help.pd0000644000000000000000000000266112613674326016126 0ustar0000000000000000#N canvas 0 26 352 287 10; #X obj 119 137 qnorm~; #X obj 96 68 osc~ 30; #X obj 159 68 osc~ 40; #X obj 221 67 osc~ 50; #X obj 287 68 osc~ 60; #X obj 131 265 dac~; #X obj 111 190 vol~; #X obj 151 190 vol~; #X floatatom 185 154 5 0 0 0 - - -; #X floatatom 116 33 5 0 0 0 - - -; #X floatatom 165 33 5 0 0 0 - - -; #X floatatom 217 33 5 0 0 0 - - -; #X floatatom 266 33 5 0 0 0 - - -; #X obj 155 228 hip~ 10; #X obj 91 227 hip~ 10; #X text 45 -2 qnorm normalizes a quaternion signal to unit norm; #N canvas 350 117 494 537 META 0; #X text 12 245 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION normalize a quaternion signal to unit norm ; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 OUTLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 185 OUTLET_2 signal; #X text 12 205 OUTLET_3 signal; #X text 12 25 LICENSE GPL v2; #X text 12 225 AUTHOR Tom Schouten ; #X restore 301 265 pd META; #X connect 0 0 6 0; #X connect 0 1 6 0; #X connect 0 2 7 0; #X connect 0 3 7 0; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 3 0 0 2; #X connect 4 0 0 3; #X connect 6 0 14 0; #X connect 7 0 13 0; #X connect 8 0 7 1; #X connect 8 0 6 1; #X connect 9 0 1 0; #X connect 10 0 2 0; #X connect 11 0 3 0; #X connect 12 0 4 0; #X connect 13 0 5 1; #X connect 14 0 5 0; creb-0.9.2+darcs20151027/doc/csub~-help.pd0000644000000000000000000000116612613674326015725 0ustar0000000000000000#N canvas 0 26 381 197 10; #X text 49 5 complex subtraction; #N canvas 162 93 494 386 META 0; #X text 12 205 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION complex subtraction; #X text 12 65 INLET_0 signal; #X text 12 85 INLET_1 signal; #X text 12 105 INLET_2 signal; #X text 12 125 INLET_3 signal; #X text 12 145 OUTLET_0 signal; #X text 12 165 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 185 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 331 175 pd META; #X obj 54 96 csub~; creb-0.9.2+darcs20151027/doc/eadsr~-help.pd0000644000000000000000000000377612613674326016100 0ustar0000000000000000#N canvas 0 26 581 306 10; #X obj 89 227 *~; #X obj 105 40 metro; #X obj 26 203 osc~; #X floatatom 26 171 5 0 0 0 - - -; #X floatatom 135 12 5 0 0 0 - - -; #X floatatom 209 117 5 0 0 0 - - -; #X floatatom 208 139 5 0 0 0 - - -; #X obj 81 277 dac~; #X msg 58 12 stop; #X msg 26 124 start; #X msg 71 123 stop; #X obj 105 77 del; #X floatatom 159 50 5 0 0 0 - - -; #X obj 105 197 eadsr~ 0 0; #X text 191 81 exponential attack/decay/sustain/release envelope; #X text 265 125 60db attack and decay time; #X floatatom 209 160 5 0 0 0 - - -; #X floatatom 209 180 5 0 0 0 - - -; #X text 264 159 sustain level; #X obj 88 253 vol~; #X floatatom 132 238 5 0 0 0 - - -; #X obj 343 228 table t 10000; #X obj 343 267 tabwrite~ t; #X obj 343 247 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 103 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 262 276 del; #X floatatom 276 225 5 0 0 0 - - -; #X text 265 182 60db release time; #N canvas 379 254 494 372 META 0; #X text 12 215 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 45 DESCRIPTION exponential attack/decay/sustain/release envelope; #X text 12 5 KEYWORDS signal ramp; #X text 12 175 OUTLET_0 signal; #X text 12 95 INLET_1 float; #X text 12 115 INLET_2 float; #X text 12 135 INLET_3 float; #X text 12 155 INLET_4 float; #X text 12 75 INLET_0 start stop; #X text 12 25 LICENSE GPL v2; #X text 12 195 AUTHOR Tom Schouten ; #X restore 531 285 pd META; #X connect 0 0 19 0; #X connect 1 0 9 0; #X connect 1 0 11 0; #X connect 2 0 0 0; #X connect 3 0 2 0; #X connect 4 0 1 1; #X connect 5 0 13 1; #X connect 6 0 13 2; #X connect 8 0 1 0; #X connect 9 0 13 0; #X connect 10 0 13 0; #X connect 11 0 10 0; #X connect 12 0 11 1; #X connect 13 0 0 1; #X connect 13 0 22 0; #X connect 16 0 13 3; #X connect 17 0 13 4; #X connect 19 0 7 1; #X connect 19 0 7 0; #X connect 20 0 19 1; #X connect 23 0 22 0; #X connect 23 0 25 0; #X connect 23 0 9 0; #X connect 24 0 1 0; #X connect 25 0 10 0; #X connect 26 0 25 1; creb-0.9.2+darcs20151027/doc/dist~-help.pd0000644000000000000000000000157512613674326015740 0ustar0000000000000000#N canvas 3 4 450 300 10; #X text 156 35 dist~ waveshaper; #X text 154 53 creation argument: type (see dist.c); #X floatatom 136 120 5 0 0 0 - - -; #X obj 64 121 osc~; #X obj 66 206 dac~; #X floatatom 63 84 5 0 0 0 - - -; #X text 189 119 right inlet: pre gain; #X obj 148 95 hsl 128 15 0.5 20 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 64 157 dist~ 1; #N canvas 379 254 494 344 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION waveshaper; #X text 12 85 INLET_1 float; #X text 12 65 INLET_0 signal; #X text 12 105 OUTLET_0 signal; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Tom Schouten ; #X restore 400 279 pd META; #X connect 2 0 8 1; #X connect 3 0 8 0; #X connect 5 0 3 0; #X connect 7 0 2 0; #X connect 8 0 4 0; #X connect 8 0 4 1; creb-0.9.2+darcs20151027/doc/eadsrh~-help.pd0000644000000000000000000000132212613674326016231 0ustar0000000000000000#N canvas 0 26 430 230 10; #N canvas 331 92 494 388 META 0; #X text 12 215 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 95 INLET_1 float; #X text 12 115 INLET_2 float; #X text 12 155 INLET_4 float; #X text 12 175 OUTLET_0 signal; #X text 12 45 DESCRIPTION exponential attack decay sustain release (with hold == duration); #X text 12 75 INLET_0 bang; #X text 12 135 INLET_3 float; #X text 12 5 KEYWORDS signal abstraction ramp needs_work (example patch) ; #X text 12 25 LICENSE GPL v2; #X text 12 195 AUTHOR Tom Schouten ; #X restore 378 207 pd META; #X obj 105 92 eadsrh~; #X text 22 15 exponential attack decay sustain release (with hold == duration); creb-0.9.2+darcs20151027/doc/permut~-help.pd0000644000000000000000000000171512613674326016305 0ustar0000000000000000#N canvas 0 26 443 234 10; #X text 29 10 permut~ performs a random permutation on a signal block ; #X text 30 27 mainly intended for shuffling spectral data (dynwav) ; #X obj 73 127 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 96 126 random; #X text 154 124 bang or random create a new random permutation; #X obj 30 91 osc~; #X obj 30 166 permut~; #X obj 29 210 dac~; #X floatatom 30 61 5 0 0 0 - - -; #N canvas 379 254 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal random; #X text 12 45 DESCRIPTION perform a random permutation on a signal block; #X text 12 85 OUTLET_0 signal; #X text 12 65 INLET_0 signal bang random; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 385 210 pd META; #X connect 2 0 6 0; #X connect 3 0 6 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 6 0 7 1; #X connect 8 0 5 0; creb-0.9.2+darcs20151027/doc/idsfosc~-help.pd0000644000000000000000000000130612613674326016417 0ustar0000000000000000#N canvas 0 26 454 368 10; #X text 59 21 complex form of the (infinite) discrete summation oscillator ; #X text 62 38 1/(1-az) \, with z = e^(jw); #N canvas 331 92 494 345 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 125 OUTLET_0 signal; #X text 12 85 INLET_0 signal; #X text 12 105 INLET_1 signal; #X text 12 145 OUTLET_1 signal; #X text 12 55 DESCRIPTION complex form of the (infinite) discrete summation oscillator; #X text 12 5 KEYWORDS signal abstraction oscillator needs_work (example patch); #X text 12 35 LICENSE GPL v2; #X text 12 165 AUTHOR Tom Schouten ; #X restore 401 345 pd META; #X obj 80 110 idsfosc~; creb-0.9.2+darcs20151027/doc/cosc~-help.pd0000644000000000000000000000115312613674326015714 0ustar0000000000000000#N canvas 0 31 381 197 10; #X text 49 5 complex oscillator (unit norm exponential); #N canvas 331 92 494 369 META 0; #X text 12 185 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 signal; #X text 12 45 DESCRIPTION complex oscillator; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 signal; #X text 12 145 OUTLET_1 signal; #X text 12 5 KEYWORDS signal abstraction needs_work (example patch) ; #X text 12 165 AUTHOR Tom Schouten ; #X text 12 25 LICENSE GPL v2; #X restore 331 176 pd META; #X obj 63 64 cosc~; creb-0.9.2+darcs20151027/doc/bmatrix~-help.pd0000644000000000000000000000135512613674326016437 0ustar0000000000000000#N canvas 0 26 418 231 10; #X msg 69 127 load matrix.bin; #X text 27 39 added for completeness. mainly intended for spectral transfos; #X text 26 73 the file format is binary floating point \, column encoded. ; #X obj 46 174 bmatrix~; #X text 29 23 bmatrix multiplies a signal block with an arbitrary matrix ; #N canvas 200 154 494 344 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 5 KEYWORDS signal; #X text 12 45 DESCRIPTION multiply a signal block with an arbitrary matrix; #X text 12 85 OUTLET_0 signal; #X text 12 65 INLET_0 signal load; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Tom Schouten ; #X restore 369 209 pd META; #X connect 0 0 3 0; creb-0.9.2+darcs20151027/doc/examples/0000755000000000000000000000000012613674326015132 5ustar0000000000000000creb-0.9.2+darcs20151027/doc/examples/xfmdelay.pd0000644000000000000000000000634012613674326017273 0ustar0000000000000000#N canvas 25 206 921 653 10; #X obj 289 329 xfm~ 0 0 0 0; #X obj 279 280 *~; #X obj 398 233 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 862.744 256; #X obj 306 279 *~; #X obj 398 250 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 795.103 256; #X obj 332 279 *~; #X obj 399 266 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 23.7527 256; #X obj 359 278 *~; #X obj 398 284 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 224.294 256; #X obj 251 170 xfm~ 0 0 0 0; #X obj 392 111 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 703.454 256; #X obj 392 132 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 675.315 256; #X obj 304 138 *~; #X obj 393 148 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 51.5902 256; #X obj 331 137 *~; #X obj 392 166 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 49.5265 256; #X obj 191 403 vols~; #X floatatom 233 374 5 0 0; #X obj 195 525 dac~; #X obj 274 51 vd~ del1; #X obj 274 24 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 73 256; #X obj 339 23 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 339 256; #X obj 339 50 vd~ del2; #X obj 296 393 delwrite~ del1 1000; #X obj 448 393 delwrite~ del2 1000; #X msg 136 125 type 0; #X msg 137 146 type 1; #X obj 464 110 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 21700 1; #X obj 464 130 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 21600 1; #X obj 463 150 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 15300 1; #X obj 464 168 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 15200 1; #X obj 465 232 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 22200 1; #X obj 465 252 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 22000 1; #X obj 464 271 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 13400 1; #X obj 465 289 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 18900 1; #X text 479 29 2 xfm oscillators coupled by 2 delay lines; #X obj 188 475 *~; #X obj 217 474 *~; #X obj 270 458 osc~; #X obj 269 433 hsl 300 15 0.1 20000 1 1 empty empty empty -2 -6 0 8 -262144 -1 -1 18900 1; #X connect 0 0 23 0; #X connect 0 1 24 0; #X connect 1 0 0 0; #X connect 2 0 1 1; #X connect 3 0 0 1; #X connect 4 0 3 1; #X connect 5 0 0 2; #X connect 6 0 5 1; #X connect 7 0 0 3; #X connect 8 0 7 1; #X connect 9 0 3 0; #X connect 9 0 5 0; #X connect 9 0 16 0; #X connect 9 1 1 0; #X connect 9 1 7 0; #X connect 9 1 16 1; #X connect 10 0 9 0; #X connect 11 0 9 1; #X connect 12 0 9 2; #X connect 13 0 12 1; #X connect 14 0 9 3; #X connect 15 0 14 1; #X connect 16 0 36 0; #X connect 16 1 37 0; #X connect 17 0 16 2; #X connect 19 0 12 0; #X connect 20 0 19 0; #X connect 21 0 22 0; #X connect 22 0 14 0; #X connect 25 0 9 0; #X connect 25 0 0 0; #X connect 26 0 9 0; #X connect 26 0 0 0; #X connect 27 0 10 0; #X connect 28 0 11 0; #X connect 29 0 13 0; #X connect 30 0 15 0; #X connect 31 0 2 0; #X connect 32 0 4 0; #X connect 33 0 6 0; #X connect 34 0 8 0; #X connect 36 0 18 0; #X connect 37 0 18 1; #X connect 38 0 37 1; #X connect 38 0 36 1; #X connect 39 0 38 0; creb-0.9.2+darcs20151027/doc/examples/formantdynwav.pd0000644000000000000000000001056612613674326020366 0ustar0000000000000000#N canvas 131 302 276 242 10; #N canvas 342 154 748 636 stuff 1; #X obj 59 376 outlet~; #X obj 59 348 vol~; #X floatatom 176 317 5 0 0; #X obj 197 29 bang~; #X obj 59 290 pdynwav~; #X floatatom 189 221 5 0 0; #X obj 46 103 osc~; #X obj 91 103 osc~; #X obj 135 102 osc~; #X obj 104 223 *~; #X obj 345 87 phasor~; #X obj 277 185 *~; #X obj 346 136 *~; #X obj 346 108 onecomp~; #X obj 346 164 *~; #X text 38 33 formant frequencies; #N canvas 139 0 533 326 to_formant 0; #X obj 339 217 /; #X obj 391 149 t b f; #X obj 291 182 samplerate~; #X floatatom 335 243 5 0 0; #X obj 369 47 inlet; #X obj 405 126 * 1024; #X obj 30 158 *~; #X obj 88 159 *~; #X obj 150 156 *~; #X obj 30 192 outlet~; #X obj 88 193 outlet~; #X obj 150 190 outlet~; #X obj 150 100 inlet~; #X obj 88 103 inlet~; #X obj 30 102 inlet~; #X connect 0 0 3 0; #X connect 0 0 8 1; #X connect 0 0 7 1; #X connect 0 0 6 1; #X connect 1 0 2 0; #X connect 1 1 0 1; #X connect 2 0 0 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 9 0; #X connect 7 0 10 0; #X connect 8 0 11 0; #X connect 12 0 8 0; #X connect 13 0 7 0; #X connect 14 0 6 0; #X restore 45 71 pd to_formant; #X obj 189 260 +; #X obj 227 261 -; #X obj 136 374 outlet~; #X obj 136 346 vol~; #X obj 127 290 pdynwav~; #X floatatom 244 210 5 0 0; #X obj 253 237 t b f; #X obj 520 332 block~ 1024; #X obj 277 28 fblock 1024; #X obj 469 163 random 120; #X obj 469 191 - 60; #X obj 466 139 metro 750; #X obj 470 111 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 43 -75 *~; #X floatatom 59 -99 5 0 0; #X obj 43 -121 osc~; #X floatatom 43 -151 5 0 0; #X obj 113 -75 *~; #X floatatom 129 -99 5 0 0; #X obj 113 -121 osc~; #X floatatom 113 -151 5 0 0; #X obj 180 -74 *~; #X floatatom 196 -98 5 0 0; #X obj 180 -120 osc~; #X floatatom 180 -150 5 0 0; #X floatatom 531 106 5 0 0; #X floatatom 84 128 5 0 0; #X obj 44 157 vol~; #X floatatom 125 128 5 0 0; #X obj 85 157 vol~; #X floatatom 173 129 5 0 0; #X obj 133 158 vol~; #X floatatom 304 -126 5 0 0; #X msg 349 6 1; #X obj 277 159 phasor~; #X obj 94 199 *~ 1; #X msg 389 58 0; #X msg 197 60 0.25; #X obj 346 189 *~; #X msg 194 92 100; #X obj 374 242 tabsend~ period; #X obj 494 213 table period 1024; #X floatatom 298 322 5 0 0; #X obj 343 -83 loadbang; #X floatatom 198 -52 5 0 0; #X obj 182 -28 +~; #X floatatom 125 -49 5 0 0; #X obj 109 -25 +~; #X floatatom 65 -45 5 0 0; #X obj 49 -21 +~; #X connect 1 0 0 0; #X connect 2 0 1 1; #X connect 2 0 20 1; #X connect 3 0 54 0; #X connect 3 0 53 0; #X connect 4 0 1 0; #X connect 5 0 16 3; #X connect 5 0 17 0; #X connect 5 0 18 0; #X connect 6 0 44 0; #X connect 7 0 46 0; #X connect 8 0 48 0; #X connect 9 0 4 0; #X connect 9 0 21 0; #X connect 9 0 57 0; #X connect 10 0 13 0; #X connect 11 0 9 1; #X connect 12 0 14 0; #X connect 12 0 14 1; #X connect 13 0 12 1; #X connect 13 0 12 0; #X connect 14 0 55 0; #X connect 14 0 55 1; #X connect 14 0 11 1; #X connect 16 0 6 0; #X connect 16 1 7 0; #X connect 16 2 8 0; #X connect 17 0 4 1; #X connect 18 0 21 1; #X connect 20 0 19 0; #X connect 21 0 20 0; #X connect 22 0 17 1; #X connect 22 0 23 0; #X connect 23 0 18 0; #X connect 23 0 17 0; #X connect 23 1 18 1; #X connect 23 1 17 1; #X connect 25 0 10 0; #X connect 25 0 51 0; #X connect 26 0 27 0; #X connect 27 0 5 0; #X connect 28 0 26 0; #X connect 29 0 28 0; #X connect 30 0 66 0; #X connect 31 0 30 1; #X connect 32 0 30 0; #X connect 33 0 32 0; #X connect 34 0 64 0; #X connect 35 0 34 1; #X connect 36 0 34 0; #X connect 37 0 36 0; #X connect 38 0 62 0; #X connect 39 0 38 1; #X connect 40 0 38 0; #X connect 41 0 40 0; #X connect 42 0 28 1; #X connect 43 0 44 1; #X connect 44 0 52 0; #X connect 45 0 46 1; #X connect 46 0 52 0; #X connect 47 0 48 1; #X connect 48 0 52 0; #X connect 50 0 25 1; #X connect 51 0 11 0; #X connect 52 0 9 0; #X connect 53 0 10 1; #X connect 54 0 8 1; #X connect 54 0 7 1; #X connect 54 0 6 1; #X connect 56 0 47 0; #X connect 56 0 45 0; #X connect 56 0 43 0; #X connect 60 0 50 0; #X connect 61 0 62 1; #X connect 62 0 16 2; #X connect 63 0 64 1; #X connect 64 0 16 1; #X connect 65 0 66 1; #X connect 66 0 16 0; #X restore 18 14 pd stuff; #X obj 19 75 dac~; #X obj 94 79 vols~; #X obj 96 54 fdn~; #X floatatom 140 53 5 0 0; #X floatatom 108 24 5 0 0; #X floatatom 154 24 5 0 0; #X connect 0 0 1 0; #X connect 0 0 3 0; #X connect 0 1 1 1; #X connect 0 1 3 0; #X connect 2 0 1 0; #X connect 2 1 1 1; #X connect 3 0 2 0; #X connect 3 1 2 1; #X connect 4 0 2 2; #X connect 5 0 3 1; #X connect 6 0 3 2; creb-0.9.2+darcs20151027/bin/0000755000000000000000000000000012613674327013320 5ustar0000000000000000creb-0.9.2+darcs20151027/bin/version0000755000000000000000000000010312613674326014724 0ustar0000000000000000#!/bin/bash grep -e ^CREB_VERSION Makefile.config|awk '{print $3}' creb-0.9.2+darcs20151027/www/0000755000000000000000000000000012613674326013373 5ustar0000000000000000creb-0.9.2+darcs20151027/www/index.html0000644000000000000000000000105712613674326015373 0ustar0000000000000000 CREB

CREB

About

CREB is an extension library for the computer music program of Pure Data by Miller Puckette. CREB is released to the general public under the terms of the GPL version 2. For more information see the README file. CREB is written by Tom Schouten.

Download

The authoritative source for CREB is the darcs archive. creb-0.9.2+darcs20151027/autom4te.cache/0000755000000000000000000000000012613674327015354 5ustar0000000000000000creb-0.9.2+darcs20151027/autom4te.cache/requests0000644000000000000000000000644312613674327017161 0ustar0000000000000000# This file was generated by Autom4te Sat Aug 22 17:39:33 UTC 2015. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'configure.ac' ], { 'm4_pattern_allow' => 1, 'AH_OUTPUT' => 1, 'm4_include' => 1, 'AC_FC_PP_SRCEXT' => 1, 'AC_LIBSOURCE' => 1, 'AM_SILENT_RULES' => 1, 'AM_PROG_F77_C_O' => 1, 'AM_AUTOMAKE_VERSION' => 1, '_AM_COND_IF' => 1, 'm4_pattern_forbid' => 1, 'AM_NLS' => 1, 'AM_PROG_CXX_C_O' => 1, '_AM_MAKEFILE_INCLUDE' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_CANONICAL_TARGET' => 1, '_LT_AC_TAGCONFIG' => 1, 'AC_CONFIG_FILES' => 1, 'AC_FC_FREEFORM' => 1, 'm4_sinclude' => 1, 'sinclude' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, 'AM_PROG_AR' => 1, 'AM_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, '_m4_warn' => 1, 'AC_SUBST_TRACE' => 1, '_AM_COND_ENDIF' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_FC_PP_DEFINE' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_INIT' => 1, 'AM_MAKEFILE_INCLUDE' => 1, '_AM_COND_ELSE' => 1, 'AM_POT_TOOLS' => 1, 'AM_PATH_GUILE' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_HEADERS' => 1, 'AM_XGETTEXT_OPTION' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'LT_SUPPORTED_TAG' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_PROG_MOC' => 1, 'AM_CONDITIONAL' => 1, 'AC_SUBST' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AC_FC_SRCEXT' => 1, 'include' => 1, 'AM_PROG_FC_C_O' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AM_ENABLE_MULTILIB' => 1, 'LT_INIT' => 1 } ], 'Autom4te::Request' ) ); creb-0.9.2+darcs20151027/autom4te.cache/output.00000644000000000000000000037673612613674327017023 0ustar0000000000000000@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="modules/setup.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIB@&t@OBJS LIBFLAGS LIBNAME PD_INCLUDE_DIR EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi echo -n "checking architecture... " ARCH=`uname -s` if test $ARCH == Linux; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_linux LIBFLAGS="-rdynamic -shared" echo "Linux" elif test $ARCH == Darwin; then PD_INCLUDE_DIR=$prefix/pd/src LIBNAME=creb.pd_darwin LIBFLAGS="-bundle -bundle_loader $prefix/pd/bin/pd" echo "Darwin" else echo WARNING: Architecture `uname -s` not supported. exit; fi CPPFLAGS="$CPPFLAGS -I$prefix/pd/src" # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "m_pd.h" "ac_cv_header_m_pd_h" "$ac_includes_default" if test "x$ac_cv_header_m_pd_h" = xyes; then : else echo "WARNING: m_pd.h not found in the standard include path." echo " If PD_DIR in Makefile.config.in is set correctly you can ignore this warning." fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else echo "Math library not found. sorry..." || exit fi ac_config_files="$ac_config_files Makefile.config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi creb-0.9.2+darcs20151027/autom4te.cache/traces.00000644000000000000000000003632112613674327016723 0ustar0000000000000000m4trace:configure.ac:1: -1- AC_INIT([modules/setup.c]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:1: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:1: -1- AC_SUBST([SHELL]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:1: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.ac:1: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:1: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.ac:1: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:1: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.ac:1: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:1: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:1: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:1: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:1: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:1: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:1: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:1: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:1: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:1: -1- AC_SUBST([runstatedir], ['${localstatedir}/run']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([runstatedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^runstatedir$]) m4trace:configure.ac:1: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:1: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:1: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:1: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:1: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:1: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:1: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:1: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:1: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:1: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:1: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.ac:1: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.ac:1: -1- AC_SUBST([DEFS]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.ac:1: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:1: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:1: -1- AC_SUBST([LIBS]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:1: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:1: -1- AC_SUBST([build_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:1: -1- AC_SUBST([host_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:1: -1- AC_SUBST([target_alias]) m4trace:configure.ac:1: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:1: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:2: -1- AC_SUBST([CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:2: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:2: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:2: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:2: -1- AC_SUBST([LIBS]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:2: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:2: -1- AC_SUBST([CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:2: -1- AC_SUBST([CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:2: -1- AC_SUBST([CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:2: -1- AC_SUBST([CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:2: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:2: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:2: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.ac:2: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:2: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:2: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:2: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:3: -1- AC_SUBST([CPP]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:3: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:3: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:3: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:3: -1- AC_SUBST([CPP]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:3: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:3: -1- AC_SUBST([GREP]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.ac:3: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:3: -1- AC_SUBST([EGREP]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.ac:3: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:3: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:3: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:34: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ @%:@undef HAVE_LIBM]) m4trace:configure.ac:34: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) m4trace:configure.ac:34: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:38: -1- AC_SUBST([PD_INCLUDE_DIR]) m4trace:configure.ac:38: -1- AC_SUBST_TRACE([PD_INCLUDE_DIR]) m4trace:configure.ac:38: -1- m4_pattern_allow([^PD_INCLUDE_DIR$]) m4trace:configure.ac:39: -1- AC_SUBST([LIBNAME]) m4trace:configure.ac:39: -1- AC_SUBST_TRACE([LIBNAME]) m4trace:configure.ac:39: -1- m4_pattern_allow([^LIBNAME$]) m4trace:configure.ac:40: -1- AC_SUBST([LIBFLAGS]) m4trace:configure.ac:40: -1- AC_SUBST_TRACE([LIBFLAGS]) m4trace:configure.ac:40: -1- m4_pattern_allow([^LIBFLAGS$]) m4trace:configure.ac:41: -1- AC_CONFIG_FILES([Makefile.config]) m4trace:configure.ac:42: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:42: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([abs_top_builddir]) creb-0.9.2+darcs20151027/modules/0000755000000000000000000000000012613674326014217 5ustar0000000000000000creb-0.9.2+darcs20151027/modules/fwarp.c0000644000000000000000000000306112613674326015502 0ustar0000000000000000/* * fwarp.c - converts a frequency to a "standard" tangent warped freq * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #define SEQL 16 typedef struct fwarp { t_object t_ob; t_outlet *x_out; } t_fwarp; static void fwarp_float(t_fwarp *x, t_floatarg f) { t_float twopi = 2.0f * M_PI; t_float sr = sys_getsr(); f /= sr; f = tan(twopi * f) / twopi; outlet_float(x->x_out, f * sr); } static void fwarp_free(void) { } t_class *fwarp_class; static void *fwarp_new(void) { t_fwarp *x = (t_fwarp *)pd_new(fwarp_class); x->x_out = outlet_new(&x->t_ob, gensym("float")); return (void *)x; } void fwarp_setup(void) { fwarp_class = class_new(gensym("fwarp"), (t_newmethod)fwarp_new, (t_method)fwarp_free, sizeof(t_fwarp), 0, 0); class_addfloat(fwarp_class, fwarp_float); } creb-0.9.2+darcs20151027/modules/ear~.c0000644000000000000000000000674512613674326015344 0ustar0000000000000000/* * ear.c - exponential attack release envelope * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "extlib_util.h" typedef struct earctl { t_float c_attack; t_float c_release; t_float c_state; t_float c_target; } t_earctl; typedef struct ear { t_object x_obj; t_float x_sr; t_earctl x_ctl; } t_ear; void ear_attack(t_ear *x, t_floatarg f) { x->x_ctl.c_attack = milliseconds_2_one_minus_realpole(f); } void ear_release(t_ear *x, t_floatarg f) { x->x_ctl.c_release = milliseconds_2_one_minus_realpole(f); } void ear_start(t_ear *x) { x->x_ctl.c_target = 1; x->x_ctl.c_state = 0.0f; } void ear_stop(t_ear *x) { x->x_ctl.c_target = 0; } void ear_float(t_ear *x, t_floatarg f) { if (f == 0.0f) ear_stop(x); else ear_start(x); } static t_int *ear_perform(t_int *w) { t_float *out = (t_float *)(w[3]); t_earctl *ctl = (t_earctl *)(w[1]); t_float attack = ctl->c_attack; t_float release = ctl->c_release; t_float state = ctl->c_state; t_float target = ctl->c_target; t_int n = (t_int)(w[2]); t_int i; if (target) /* attack phase */ for (i = 0; i < n; i++) { *out++ = state; state += attack*(1 - state); } else /* release phase */ for (i = 0; i < n; i++) { *out++ = state; state -= release*state; } ctl->c_state = IS_DENORMAL(state) ? 0 : state; return (w+4); } static void ear_dsp(t_ear *x, t_signal **sp) { x->x_sr = sp[0]->s_sr; dsp_add(ear_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec); } void ear_free(void) { } t_class *ear_class; /* attack - release */ void *ear_new(t_floatarg attack, t_floatarg release) { t_ear *x = (t_ear *)pd_new(ear_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("attack")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("release")); outlet_new(&x->x_obj, gensym("signal")); ear_attack(x,attack); ear_release(x,release); x->x_ctl.c_state = 0; x->x_ctl.c_target = 0; return (void *)x; } void ear_tilde_setup(void) { //post("ear~ v0.1"); ear_class = class_new(gensym("ear~"), (t_newmethod)ear_new, (t_method)ear_free, sizeof(t_ear), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(ear_class, (t_method)ear_float, gensym("float"), A_FLOAT, 0); class_addmethod(ear_class, (t_method)ear_start, gensym("start"), 0); class_addmethod(ear_class, (t_method)ear_start, gensym("bang"), 0); class_addmethod(ear_class, (t_method)ear_stop, gensym("stop"), 0); class_addmethod(ear_class, (t_method)ear_dsp, gensym("dsp"), 0); class_addmethod(ear_class, (t_method)ear_attack, gensym("attack"), A_FLOAT, 0); class_addmethod(ear_class, (t_method)ear_release, gensym("release"), A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/resofilt~.c0000644000000000000000000002503512613674326016415 0ustar0000000000000000/* * resofilt.c - some high quality time variant filters * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* some (expensive) time variant iir filters, i.e. moog 4-pole transfer function using the impulse invariant transform with self osc and signal freq and reso inputs */ #include "m_pd.h" #include #include #include #include #include "filters.h" typedef struct resofiltctl { t_float c_state[4]; /* filter state */ t_float c_f_prev; t_float c_r_prev; } t_resofiltctl; typedef struct resofilt { t_object x_obj; t_float x_f; t_resofiltctl x_ctl; t_perfroutine x_dsp; } t_resofilt; static inline void _sat_state(t_float *x) { const t_float norm_squared_max = 1.0; t_float norm_squared = x[0] * x[0] + x[1] * x[1]; if (norm_squared > norm_squared_max){ t_float scale = 1.0 / sqrt(norm_squared); x[0] *= scale; x[1] *= scale; } } /* the moog vcf discretized with an impulse invariant transform */ static t_int *resofilt_perform_fourpole(t_int *w) { t_resofiltctl *ctl = (t_resofiltctl *)(w[1]); t_int n = (t_int)(w[2]); t_float *in = (t_float *)(w[3]); t_float *freq = (t_float *)(w[4]); t_float *reso = (t_float *)(w[5]); t_float *out = (t_float *)(w[6]); int i; t_float inv_n = 1.0 / ((t_float)n); t_float inv_sr = 1.0 / sys_getsr(); t_float phasor[2], phasor_rot[2]; t_float radior[2], radior_rot[2]; t_float scalor, scalor_inc; t_float f,r,freq_rms,reso_rms; t_float f_prev = ctl->c_f_prev; t_float r_prev = ctl->c_r_prev; /* use rms of input to drive freq and reso. this is such that connecting a dsp signal to the inlets has a reasonable result, even if the inputs are oscillatory. the rms values will be interpolated linearly (that is, linearly in the "analog" domain, so exponentially in the z-domain) */ reso_rms = freq_rms = 0.0; for (i=0; i1), >1 == self osc */ t_float _reso = *reso++; freq_rms += _freq * _freq; reso_rms += _reso * _reso; } freq_rms = sqrt(freq_rms * inv_n) * inv_sr; reso_rms = sqrt(reso_rms * inv_n); f = (freq_rms > 0.5) ? 0.5 : freq_rms; r = sqrt(sqrt(reso_rms)); /* calculate the new pole locations. we use an impulse invariant transform: the moog vcf poles are located at s_p = (-1 +- r \sqrt{+- j}, with r = (k/4)^(1/4) \in [0,1] the poles are always complex, so we can use an orthogonal implementation both conj pole pairs have the same angle, so we can use one phasor and 2 radii */ /* compute phasor, radius and update eqs since these are at k-rate, the expense is justifyable */ phasor[0] = cos(2.0 * M_PI * r_prev * f_prev); phasor[1] = sin(2.0 * M_PI * r_prev * f_prev); phasor_rot[0] = cos(2.0 * M_PI * (r*f - r_prev*f_prev) * inv_n); phasor_rot[1] = sin(2.0 * M_PI * (r*f - r_prev*f_prev) * inv_n); radior[0] = exp(f_prev * (-1.0 + r_prev)); /* dominant radius */ radior[1] = exp(f_prev * (-1.0 - r_prev)); radior_rot[0] = exp((f*(-1.0f + r) - f_prev * (-1.0 + r_prev)) * inv_n); radior_rot[1] = exp((f*(-1.0f - r) - f_prev * (-1.0 - r_prev)) * inv_n); /* moog like scaling */ if (1){ t_float r2 = r_prev * r_prev; t_float r4 = r2 * r2; scalor = 1.0f + (1.0 + 4.0 * r4); r2 = r * r; r4 = r2 * r2; scalor_inc = ((1.0 + (1.0 + 4.0 * r4)) - scalor) * inv_n; } /* no scaling */ else{ scalor = 1.0; scalor_inc = 0.0; } ctl->c_f_prev = f; ctl->c_r_prev = r; /* perform filtering */ for (i=0; ic_state; t_float *stateB = ctl->c_state+2; t_float x; /* compute poles */ poleA[0] = radior[0] * phasor[0]; poleA[1] = radior[0] * phasor[1]; poleB[0] = radior[1] * phasor[0]; poleB[1] = radior[1] * phasor[1]; /* perform filtering: use 2 DC normalized complex one-poles: y[k] = x[k] + a(y[k-1] - x[k]) or y(z) = (1-a)/(1-az^{-1}) x(z) */ x = *in++ * scalor; /* nondominant pole first */ stateB[0] -= x; vcmul2(stateB, poleB); x = stateB[0] += x; /* dominant pole second */ stateA[0] -= x; vcmul2(stateA, poleA); x = stateA[0] += x; *out++ = x; /* saturate (normalize if pow > 1) state to prevent explosion * and to allow self-osc */ _sat_state(stateA); _sat_state(stateB); /* interpolate filter coefficients */ vcmul2(phasor, phasor_rot); radior[0] *= radior_rot[0]; radior[1] *= radior_rot[1]; scalor += scalor_inc; } return (w+7); } /* 303-style modified moog vcf (3-pole) */ static t_int *resofilt_perform_threepole(t_int *w) { t_resofiltctl *ctl = (t_resofiltctl *)(w[1]); t_int n = (t_int)(w[2]); t_float *in = (t_float *)(w[3]); t_float *freq = (t_float *)(w[4]); t_float *reso = (t_float *)(w[5]); t_float *out = (t_float *)(w[6]); int i; t_float inv_n = 1.0f / ((t_float)n); t_float inv_sr = 1.0f / sys_getsr(); t_float phasor[2], phasor_rot[2]; t_float radior[2], radior_rot[2]; t_float scalor, scalor_inc; t_float f,r,freq_rms,reso_rms; t_float f_prev = ctl->c_f_prev; t_float r_prev = ctl->c_r_prev; t_float sqrt5 = sqrt(5.0); /* use rms of input to drive freq and reso */ reso_rms = freq_rms = 0.0; for (i=0; i1), >1 == self osc */ t_float _reso = *reso++; freq_rms += _freq * _freq; reso_rms += _reso * _reso; } freq_rms = sqrt(freq_rms * inv_n) * inv_sr; reso_rms = sqrt(reso_rms * inv_n); f = (freq_rms > 0.5) ? 0.25 : freq_rms * 0.5; r = cbrt(reso_rms); /* calculate the new pole locations. we use an impulse invariant transform: the 303 vcf poles are located at s_p = omega(-1 + r sqrt(5) e^{pi/3(1+2p)}) real pole: omega * (-1 -r) complex pole: real = omega (-1 + r) imag = omega (+- 2 r) this is a strange beast. legend goes it was "invented" by taking the moog vcf and moving one cap up, such that the not-so controllable 3-pole that emerged would avoid the moog patent.. so, the sound is not so much the locations of the poles, but how the filter reacts to time varying controls. i.e. the pole movement with constant reso, used in the tb-303. */ /* compute phasor, radius and update eqs */ phasor[0] = cos(2.0 * M_PI * r_prev * f_prev * 2.0); phasor[1] = sin(2.0 * M_PI * r_prev * f_prev * 2.0); phasor_rot[0] = cos(2.0 * M_PI * (r*f - r_prev*f_prev) * 2.0 * inv_n); phasor_rot[1] = sin(2.0 * M_PI * (r*f - r_prev*f_prev) * 2.0 * inv_n); radior[0] = exp(f_prev * (-1.0 + r_prev)); /* dominant radius */ radior[1] = exp(f_prev * (-1.0 - sqrt5 * r_prev)); radior_rot[0] = exp((f*(-1.0 + r) - f_prev * (-1.0 + r_prev)) * inv_n); radior_rot[1] = exp((f*(-1.0 - r) - f_prev * (-1.0 - sqrt5 * r_prev)) * inv_n); /* 303 like scaling */ if (1){ t_float r3 = r_prev * r_prev * r_prev; scalor = 1.0 + (1.0 + 3.0 * r_prev); r3 = r * r * r; scalor_inc = ((1.0f + (1.0f + 3.0 * r3)) - scalor) * inv_n; } /* no scaling */ else{ scalor = 1.0; scalor_inc = 0.0; } ctl->c_f_prev = f; ctl->c_r_prev = r; ctl->c_state[3] = 0.0; /* perform filtering */ for (i=0; ic_state; t_float *stateB = ctl->c_state+2; t_float x; /* compute poles */ poleA[0] = radior[0] * phasor[0]; poleA[1] = radior[0] * phasor[1]; poleB[0] = radior[1]; /* perform filtering: use (real part of) 2 DC normalized complex one-poles: y[k] = x[k] + a(y[k-1] - x[k]) or y(z) = (1-a)/(1-az^{-1}) x(z) */ x = *in++ * scalor; /* nondominant pole first */ stateB[0] -= x; stateB[0] *= poleB[0]; x = stateB[0] += x; /* dominant pole second */ stateA[0] -= x; vcmul2(stateA, poleA); x = stateA[0] += x; *out++ = x; /* saturate (normalize if pow > 1) state to prevent explosion * and to allow self-osc */ _sat_state(stateA); _sat_state(stateB); /* interpolate filter coefficients */ vcmul2(phasor, phasor_rot); radior[0] *= radior_rot[0]; radior[1] *= radior_rot[1]; scalor += scalor_inc; } return (w+7); } static void resofilt_dsp(t_resofilt *x, t_signal **sp) { int n = sp[0]->s_n; dsp_add(x->x_dsp, 6, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec); } static void resofilt_free(t_resofilt *x) { } t_class *resofilt_class; static void *resofilt_new(t_floatarg algotype) { t_resofilt *x = (t_resofilt *)pd_new(resofilt_class); /* in */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); /* out */ outlet_new(&x->x_obj, gensym("signal")); /* set algo type */ if (algotype == 3.0){ post("resofilt~: 3-pole lowpass ladder vcf"); x->x_dsp = resofilt_perform_threepole; } else { post("resofilt~: 4-pole lowpass ladder vcf"); x->x_dsp = resofilt_perform_fourpole; } return (void *)x; } void resofilt_tilde_setup(void) { resofilt_class = class_new(gensym("resofilt~"), (t_newmethod)resofilt_new, (t_method)resofilt_free, sizeof(t_resofilt), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(resofilt_class, t_resofilt, x_f); class_addmethod(resofilt_class, (t_method)resofilt_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/blocknorm~.c0000644000000000000000000000622412613674326016553 0ustar0000000000000000/* * blocknorm.c - Normalize an array of dsp blocks. (spectral * processing primitive) * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define MAXCHANNELS 32 typedef struct blocknormctl { t_int c_channels; t_float **c_input; t_float **c_output; } t_blocknormctl; typedef struct blocknorm { t_object x_obj; t_float x_f; t_blocknormctl x_ctl; } t_blocknorm; static t_int *blocknorm_perform(t_int *word) { t_blocknormctl *ctl = (t_blocknormctl *)(word[1]); t_int n = (t_int)(word[2]); t_float **in = ctl->c_input; t_float **out = ctl->c_output; t_int c = ctl->c_channels; t_int i,j; t_float p = 0.0f; t_float x, s; /* get power */ for (j=0;jx_ctl.c_channels; for (i=0;ix_ctl.c_input[i] = sp[i]->s_vec; x->x_ctl.c_output[i] = sp[c+i]->s_vec; } dsp_add(blocknorm_perform, 2, &x->x_ctl, sp[0]->s_n); } static void blocknorm_free(t_blocknorm *x) { free (x->x_ctl.c_output); free (x->x_ctl.c_input); } t_class *blocknorm_class; static void *blocknorm_new(t_floatarg channels) { int i = (int)channels; int j; t_blocknorm *x = (t_blocknorm *)pd_new(blocknorm_class); if (i<1) i = 1; if (i>MAXCHANNELS) i = MAXCHANNELS; x->x_ctl.c_channels = i; x->x_ctl.c_input = malloc(sizeof(t_float)*i); x->x_ctl.c_output = malloc(sizeof(t_float)*i); j = i; while (--j) inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); while (i--) outlet_new(&x->x_obj, gensym("signal")); return (void *)x; } void blocknorm_tilde_setup(void) { blocknorm_class = class_new(gensym("blocknorm~"), (t_newmethod)blocknorm_new, (t_method)blocknorm_free, sizeof(t_blocknorm), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(blocknorm_class, t_blocknorm, x_f); class_addmethod(blocknorm_class, (t_method)blocknorm_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/eadsr~.c0000644000000000000000000001115112613674326015656 0ustar0000000000000000/* * eadsr.c - exponential attack decay sustain release envelope * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "extlib_util.h" typedef struct eadsrctl { t_float c_attack; t_float c_decay; t_float c_sustain; t_float c_release; t_float c_state; t_float c_target; } t_eadsrctl; typedef struct eadsr { t_object x_obj; t_float x_sr; t_eadsrctl x_ctl; } t_eadsr; void eadsr_attack(t_eadsr *x, t_floatarg f) { x->x_ctl.c_attack = milliseconds_2_one_minus_realpole(f); } void eadsr_decay(t_eadsr *x, t_floatarg f) { x->x_ctl.c_decay = milliseconds_2_one_minus_realpole(f); } void eadsr_sustain(t_eadsr *x, t_floatarg f) { if (f>ENVELOPE_MAX) f = ENVELOPE_MAX; if (fx_ctl.c_sustain = f; } void eadsr_release(t_eadsr *x, t_floatarg f) { x->x_ctl.c_release = milliseconds_2_one_minus_realpole(f); } void eadsr_start(t_eadsr *x) { x->x_ctl.c_target = 1; x->x_ctl.c_state = 0.0f; } void eadsr_stop(t_eadsr *x) { x->x_ctl.c_target = 0; } void eadsr_float(t_eadsr *x, t_floatarg f) { if (f == 0.0f) eadsr_stop(x); else eadsr_start(x); } static t_int *eadsr_perform(t_int *w) { t_float *out = (t_float *)(w[3]); t_eadsrctl *ctl = (t_eadsrctl *)(w[1]); t_float attack = ctl->c_attack; t_float decay = ctl->c_decay; t_float sustain = ctl->c_sustain; t_float release = ctl->c_release; t_float state = ctl->c_state; t_float target = ctl->c_target; t_int n = (t_int)(w[2]); t_int i; for (i = 0; i < n; i++){ if (target == 1.0f){ /* attack */ *out++ = state; state += attack*(1 - state); target = (state > ENVELOPE_MAX) ? sustain : 1.0f; } else if (target == 0.0f){ /* release */ *out++ = state; state -= release*state; } else{ /* decay */ *out++ = state; state -= decay*(state-sustain); } } /* save state */ ctl->c_state = IS_DENORMAL(state) ? 0 : state; ctl->c_target = target; return (w+4); } static void eadsr_dsp(t_eadsr *x, t_signal **sp) { x->x_sr = sp[0]->s_sr; dsp_add(eadsr_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec); } void eadsr_free(void) { } t_class *eadsr_class; void *eadsr_new(t_floatarg attack, t_floatarg decay, t_floatarg sustain, t_floatarg release) { t_eadsr *x = (t_eadsr *)pd_new(eadsr_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("attack")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("decay")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("sustain")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("release")); outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_state = 0; x->x_ctl.c_target = 0; eadsr_attack(x, attack); eadsr_decay(x, decay); eadsr_sustain(x, sustain); eadsr_release(x, release); return (void *)x; } void eadsr_tilde_setup(void) { //post("eadsr~ v0.1"); eadsr_class = class_new(gensym("eadsr~"), (t_newmethod)eadsr_new, (t_method)eadsr_free, sizeof(t_eadsr), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(eadsr_class, (t_method)eadsr_float, gensym("float"), A_FLOAT, 0); class_addmethod(eadsr_class, (t_method)eadsr_start, gensym("start"), 0); class_addmethod(eadsr_class, (t_method)eadsr_start, gensym("bang"), 0); class_addmethod(eadsr_class, (t_method)eadsr_stop, gensym("stop"), 0); class_addmethod(eadsr_class, (t_method)eadsr_dsp, gensym("dsp"), 0); class_addmethod(eadsr_class, (t_method)eadsr_attack, gensym("attack"), A_FLOAT, 0); class_addmethod(eadsr_class, (t_method)eadsr_decay, gensym("decay"), A_FLOAT, 0); class_addmethod(eadsr_class, (t_method)eadsr_sustain, gensym("sustain"), A_FLOAT, 0); class_addmethod(eadsr_class, (t_method)eadsr_release, gensym("release"), A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/cheby~.c0000644000000000000000000000636112613674326015661 0ustar0000000000000000/* * cheby.c - chebyshev polynomial evaluation * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #define MAX_ORDER 1024 #define DEFAULT_ORDER 4 typedef struct chebyctl { t_float c_gain[MAX_ORDER]; t_int c_order; } t_chebyctl; typedef struct cheby { t_object x_obj; t_float x_f; t_chebyctl x_ctl; } t_cheby; static void cheby_bang(t_cheby *x) { } static void cheby_coef(t_cheby *x, t_floatarg coef, t_floatarg f) { int i = (int)coef; if ((i > 0) && (i < x->x_ctl.c_order + 1)){ x->x_ctl.c_gain[i-1] = f; /* post("cheby: harmonic %d set to %f", i, f); */ } } static t_int *cheby_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_chebyctl *ctl = (t_chebyctl *)(w[1]); t_float *gain = ctl->c_gain; t_int i; t_int n = (t_int)(w[2]), k; t_float x,y,t1,t2,t,acc; for (i = 0; i < n; i++) { x = *in++; gain = ctl->c_gain; t2 = 1; /* T_0 */ t1 = x; /* T_1 */ acc = *gain++ * x; /* a_1 T_1 */ for (k=2; k<=ctl->c_order; k++){ t = 2*x*t1 - t2; /* T_k = 2 x T_{k-1} - T_{k-2} */ acc += *gain++ * t; /* a_k T_k */ t2 = t1; t1 = t; } *out++ = acc; } return (w+5); } static void cheby_dsp(t_cheby *x, t_signal **sp) { dsp_add(cheby_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } static void cheby_free(void) { } t_class *cheby_class; static void *cheby_new(t_floatarg order_f) { int i; int order = (int)order_f; t_cheby *x = (t_cheby *)pd_new(cheby_class); outlet_new(&x->x_obj, gensym("signal")); if (order < 1) order = DEFAULT_ORDER; /* default */ if (order > MAX_ORDER) order = MAX_ORDER; /* maximum */ //post("cheby: order = %d", order); x->x_ctl.c_order = order; cheby_coef(x, 1, 1); for (i=2; i #include #include #include typedef struct qnormctl { t_float *c_input[4]; t_float *c_output[4]; } t_qnormctl; typedef struct qnorm { t_object x_obj; t_float x_f; t_qnormctl x_ctl; } t_qnorm; static t_int *qnorm_perform(t_int *word) { t_qnormctl *ctl = (t_qnormctl *)(word[1]); t_int n = (t_int)(word[2]); t_int i; t_float *in0 = ctl->c_input[0]; t_float *in1 = ctl->c_input[1]; t_float *in2 = ctl->c_input[2]; t_float *in3 = ctl->c_input[3]; t_float *out0 = ctl->c_output[0]; t_float *out1 = ctl->c_output[1]; t_float *out2 = ctl->c_output[2]; t_float *out3 = ctl->c_output[3]; t_float w, x, y, z; t_float norm; t_float inorm; for (i=0;ix_ctl.c_input[i] = sp[i]->s_vec; x->x_ctl.c_output[i] = sp[i+4]->s_vec; } dsp_add(qnorm_perform, 2, &x->x_ctl, sp[0]->s_n); } static void qnorm_free(t_qnorm *x) { } t_class *qnorm_class; static void *qnorm_new(t_floatarg channels) { int i; t_qnorm *x = (t_qnorm *)pd_new(qnorm_class); for (i=1;i<4;i++) inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); for (i=0;i<4;i++) outlet_new(&x->x_obj, gensym("signal")); return (void *)x; } void qnorm_tilde_setup(void) { //post("qnorm~ v0.1"); qnorm_class = class_new(gensym("qnorm~"), (t_newmethod)qnorm_new, (t_method)qnorm_free, sizeof(t_qnorm), 0, 0); CLASS_MAINSIGNALIN(qnorm_class, t_qnorm, x_f); class_addmethod(qnorm_class, (t_method)qnorm_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/bitsplit~.c0000644000000000000000000000523012613674326016413 0ustar0000000000000000/* * bitsplit.c - Convert a signal to a binary vector. * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define MAXCHANNELS 24 typedef struct bitsplitctl { t_int c_outputs; t_float *c_input; t_float **c_output; } t_bitsplitctl; typedef struct bitsplit { t_object x_obj; t_float x_f; t_bitsplitctl x_ctl; } t_bitsplit; static t_int *bitsplit_perform(t_int *word) { t_bitsplitctl *ctl = (t_bitsplitctl *)(word[1]); t_int n = (t_int)(word[2]); t_float *in = ctl->c_input; t_int outputs = ctl->c_outputs; t_float **out = ctl->c_output; t_int i,j; for (i=0;i> 31) & 1); word <<= 1; } } return (word+3); } static void bitsplit_dsp(t_bitsplit *x, t_signal **sp) { int i; x->x_ctl.c_input = sp[0]->s_vec; for (i=0;ix_ctl.c_outputs;i++){ x->x_ctl.c_output[i] = sp[i+1]->s_vec; } dsp_add(bitsplit_perform, 2, &x->x_ctl, sp[0]->s_n); } static void bitsplit_free(t_bitsplit *x) { free (x->x_ctl.c_output); } t_class *bitsplit_class; static void *bitsplit_new(t_floatarg channels) { int i = (int)channels; t_bitsplit *x = (t_bitsplit *)pd_new(bitsplit_class); if (i<1) i = 1; if (i>MAXCHANNELS) i = MAXCHANNELS; x->x_ctl.c_outputs = i; x->x_ctl.c_output = malloc(sizeof(t_float)*i); while (i--) outlet_new(&x->x_obj, gensym("signal")); return (void *)x; } void bitsplit_tilde_setup(void) { bitsplit_class = class_new(gensym("bitsplit~"), (t_newmethod)bitsplit_new, (t_method)bitsplit_free, sizeof(t_bitsplit), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(bitsplit_class, t_bitsplit, x_f); class_addmethod(bitsplit_class, (t_method)bitsplit_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/cmath.c0000644000000000000000000001040212613674326015454 0ustar0000000000000000/* * cmath.c - some complex math dsp objects * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #define MINNORM 0.0000000001 typedef struct cmath { t_object x_obj; t_float x_f; t_perfroutine x_perf; } t_cmath; static t_int *cmath_perform_clog(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); t_float *outx = (float *)(w[5]); // clockwize addressing t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; while (n--){ float x = *inx++; float y = *iny++; float norm = sqrt(x*x + y*y); float arg = atan2(y, x); if (norm < MINNORM){ norm = MINNORM; } *outx++ = log(norm); *outy++ = arg; } return (w+6); } static t_int *cmath_perform_cexp(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); t_float *outx = (float *)(w[5]); // clockwize addressing t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; while (n--){ float x = *inx++; float y = *iny++; float norm = exp(x); *outx++ = norm * cos(y); *outy++ = norm * sin(y); } return (w+6); } static t_int *cmath_perform_nfft(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); t_float *outx = (float *)(w[5]); // clockwize addressing t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; t_float scale = 1.0f / (sqrt((float)n)); mayer_fft(n, inx, outx); while (n--){ float x = *inx++; float y = *iny++; *outx++ = scale * x; *outy++ = scale * y; } return (w+6); } static t_int *cmath_perform_nifft(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); t_float *outx = (float *)(w[5]); // clockwize addressing t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; t_float scale = 1.0f / (sqrt((float)n)); mayer_ifft(n, inx, outx); while (n--){ float x = *inx++; float y = *iny++; *outx++ = scale * x; *outy++ = scale * y; } return (w+6); } static void cmath_dsp(t_cmath *x, t_signal **sp) { dsp_add(x->x_perf, 5, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec); } void cmath_free(void) { } t_class *cmath_class; t_cmath *cmath_new_common(void) { t_cmath *x = (t_cmath *)pd_new(cmath_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); return x; } #define DEFNEWCMATH(name, perfmethod) \ void * name (void) \ { \ t_cmath *x = cmath_new_common(); \ x->x_perf = perfmethod ; \ return (void*)x; \ } DEFNEWCMATH(cmath_new_clog, cmath_perform_clog) DEFNEWCMATH(cmath_new_cexp, cmath_perform_cexp) DEFNEWCMATH(cmath_new_nfft, cmath_perform_nfft) DEFNEWCMATH(cmath_new_nifft, cmath_perform_nifft) void cmath_tilde_setup(void) { //post("cmath~ v0.1"); cmath_class = class_new(gensym("clog~"), (t_newmethod)cmath_new_clog, (t_method)cmath_free, sizeof(t_cmath), 0, 0); class_addcreator((t_newmethod)cmath_new_cexp, gensym("cexp~"), A_NULL); class_addcreator((t_newmethod)cmath_new_nfft, gensym("nfft~"), A_NULL); class_addcreator((t_newmethod)cmath_new_nifft, gensym("nifft~"), A_NULL); CLASS_MAINSIGNALIN(cmath_class, t_cmath, x_f); class_addmethod(cmath_class, (t_method)cmath_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/fdn~.c0000644000000000000000000002740012613674326015333 0ustar0000000000000000/* * fdn.c - a feedback delay network (reverb tail) * using a housholder reflection feedback matrix (In - 2/n 11T) * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* TODO: CLEAN UP THIS MESS add delay time generation code add prime calculation routine (for prime delay line lengths) add more diffuse feedback matrix (hadamard) check filtering code */ #include "extlib_util.h" #include #include #include #define FDN_MIN_DECAY_TIME .01 /* #define NBPRIMES int prime[NBPRIMES]; static int isprime(int n) { int i=1; int d,m,p; while(1){ p = prime[i++]; m = n % p; if (m == 0) return 0; // it is a prime d = n / p; if (d < p) return 1; // it is not a prime } } static int initprimes(void) { int i, curprime; prime[0] = 1; prime[1] = 2; curprime = 3; for(i=2; i x->x_ctl.c_maxorder) { post("fdn: this should not happen (panic!) order %d " "is larger than maxorder %d:", order, x->x_ctl.c_maxorder ); exit(1); } x->x_ctl.c_order = order; x->x_ctl.c_leak = -2./ order; x->x_ctl.c_input = 1./ sqrt(order); //???????????????? } static void fdn_print(t_fdn *x) { int i; fprintf(stderr, "fdn: delay coefficients (ms)\n"); for (i=0;ix_ctl.c_order;i++) { fprintf(stderr, "%f ", x->x_ctl.c_length[i]); } fprintf(stderr, "\n"); } static void fdn_reset(t_fdn *x) { int i; if (x->x_ctl.c_buf) memset(x->x_ctl.c_buf, 0, x->x_ctl.c_bufsize * sizeof(t_float)); if (x->x_ctl.c_vectorbuffer) memset(x->x_ctl.c_vectorbuffer, 0, x->x_ctl.c_maxorder * 2 * sizeof(t_float)); } static t_int *fdn_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *outr = (t_float *)(w[4]); t_float *outl = (t_float *)(w[5]); t_fdnctl *ctl = (t_fdnctl *)(w[1]); t_int n = (t_int)(w[2]); t_float input = ctl->c_input; t_float output = ctl->c_output; t_float *gain_in = ctl->c_gain_in; t_float *gain_state = ctl->c_gain_state; t_int order = ctl->c_order; t_int *tap = ctl->c_tap; t_float *buf = ctl->c_buf; t_int mask = ctl->c_bufsize - 1; t_int i,j; t_float x,y,v,left,right,z; t_float filt_in, filt_last; t_float *cvec, *lvec; t_float save; for(i=0;ic_vector[ctl->c_curvector]; lvec = ctl->c_vector[ctl->c_curvector ^ 1]; ctl->c_curvector ^= 1; /* read input vector + get sum and left/right output*/ for(j=0;jc_leak; /* perform feedback */ /* todo: decouple feedback & permutation */ save = cvec[0]; for (j=0; jx_ctl.c_fsample = sp[0]->s_sr; dsp_add(fdn_perform, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); } static void fdn_free(t_fdn *x) { if ( x->x_ctl.c_tap) free( x->x_ctl.c_tap); if ( x->x_ctl.c_length) free( x->x_ctl.c_length); if ( x->x_ctl.c_gain_in) free( x->x_ctl.c_gain_in); if ( x->x_ctl.c_gain_state) free( x->x_ctl.c_gain_state); if ( x->x_ctl.c_buf) free ( x->x_ctl.c_buf); if ( x->x_ctl.c_vectorbuffer) free ( x->x_ctl.c_vectorbuffer ); } /* each delay line is filtered with a first order iir filter: (gl: dc gain, gh: ny gain) H(z) = 2 gl gh / (gl + gh - z^-1 (gl - gh)) this results in the difference equation yk = (2 gl gh ) / (gl + gh) x + (gl - gh) / (gl + gh) yk-1 */ static void fdn_time(t_fdn *x, t_float timelow, t_float timehigh){ t_float elow, ehigh; t_int i; t_float gainlow, gainhigh, gainscale; if (timelow < FDN_MIN_DECAY_TIME) timelow = FDN_MIN_DECAY_TIME; if (timehigh < FDN_MIN_DECAY_TIME) timehigh = FDN_MIN_DECAY_TIME; elow = -.003 / (timelow); ehigh = -.003 / (timehigh); /* setup gains */ for(i=0;ix_ctl.c_order;i++){ gainlow = pow(10, elow * (x->x_ctl.c_length[i])); gainhigh = pow(10, ehigh * (x->x_ctl.c_length[i])); gainscale = 1.0f / (gainlow + gainhigh); x->x_ctl.c_gain_in[i] = 2.0f * gainlow * gainhigh * gainscale; x->x_ctl.c_gain_state[i] = (gainlow - gainhigh) * gainscale; } x->x_ctl.c_timehigh = timehigh; x->x_ctl.c_timelow = timelow; } static void fdn_updatedamping(t_fdn *x) { fdn_time(x, x->x_ctl.c_timelow, x->x_ctl.c_timehigh); } static void fdn_timelow(t_fdn *x, t_float f){ x->x_ctl.c_timelow = fabs(f); fdn_updatedamping(x); } static void fdn_timehigh(t_fdn *x, t_float f){ x->x_ctl.c_timehigh = fabs(f); fdn_updatedamping(x); } static void fdn_setupdelayline(t_fdn *x){ int sum, t, n; int mask = x->x_ctl.c_bufsize - 1; int start = x->x_ctl.c_tap[0]; t_int *tap = x->x_ctl.c_tap; t_float *length = x->x_ctl.c_length; t_float scale = sys_getsr() * .001f; sum = 0; tap[0] = (start & mask); for (t=1; t<= x->x_ctl.c_order; t++){ sum += (int)(length[t-1] * scale); tap[t]=(start+sum)&mask; } if (sum > mask){ post("fdn: warning: not enough delay memory, behaviour " "is undefined (this could lead to instability...)"); } } static void fdn_list (t_fdn *x, t_symbol *s, int argc, t_atom *argv){ int i; t_float l; int sum=0; int order = argc & 0xfffffffc; if (order < 4) return; if (order > x->x_ctl.c_maxorder) return; fdn_order(x, order); for(i=0; ix_ctl.c_length[i] = argv[i].a_w.w_float; fdn_setupdelayline(x); fdn_updatedamping(x); } static void fdn_linear(t_fdn *x, t_float forder, t_float min, t_float max) { t_int order = ((int)forder) & 0xfffffffc; t_float length, inc; t_int i; if (order < 4) return; if (order > x->x_ctl.c_maxorder) return; if (min <= 0) return; if (max <= 0) return; inc = (max - min) / (t_float)(order - 1); length = min; for (i=0; ix_ctl.c_length[i] = length; length += inc; } fdn_order(x, order); fdn_setupdelayline(x); fdn_updatedamping(x); } static void fdn_exponential(t_fdn *x, t_float forder, t_float min, t_float max) { t_int order = ((int)forder) & 0xfffffffc; t_float length, inc; t_int i; if (order < 4) return; if (order > x->x_ctl.c_maxorder) return; if (min <= 0) return; if (max <= 0) return; inc = pow (max / min, 1.0f / ((t_float)(order - 1))); length = min; for (i=0; ix_ctl.c_length[i] = length; length *= inc; } fdn_order(x, order); fdn_setupdelayline(x); fdn_updatedamping(x); } t_class *fdn_class; static void *fdn_new(t_floatarg maxiorder, t_floatarg maxibufsize) { t_int order = maxiorder; t_int bufround; t_fdn *x = (t_fdn *)pd_new(fdn_class); t_float scale = sys_getsr() * .001f; t_int bufsize = (t_int)(scale * maxibufsize); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("timelow")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("timehigh")); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); /* init data */ if (order < 4) order = 8; if (bufsize < 64) bufsize = 65536; bufround = 1; while (bufround < bufsize) bufround *= 2; bufsize = bufround; post("fdn: maximum nb of delay lines %d, total buffer " "size %d samples (%f seconds)", order, bufsize, ((t_float)bufsize) / sys_getsr()); x->x_ctl.c_maxorder = order; x->x_ctl.c_buf = (t_float *)malloc(sizeof(t_float) * bufsize); x->x_ctl.c_bufsize = bufsize; x->x_ctl.c_fsample = sys_getsr(); x->x_ctl.c_tap = (t_int *)malloc((order + 1) * sizeof(t_int)); x->x_ctl.c_length = (t_float *)malloc(order * sizeof(t_int)); x->x_ctl.c_gain_in = (t_float *)malloc(order * sizeof(t_float)); x->x_ctl.c_gain_state = (t_float *)malloc(order * sizeof(t_float)); x->x_ctl.c_vectorbuffer = (t_float *)malloc(order * 2 * sizeof(t_float)); memset(x->x_ctl.c_vectorbuffer, 0, order * 2 * sizeof(t_float)); x->x_ctl.c_curvector = 0; x->x_ctl.c_vector[0] = &x->x_ctl.c_vectorbuffer[0]; x->x_ctl.c_vector[1] = &x->x_ctl.c_vectorbuffer[order]; /* preset */ fdn_order(x,8); x->x_ctl.c_length[0]= 29.0f; x->x_ctl.c_length[1]= 31.0f; x->x_ctl.c_length[2]= 37.0f; x->x_ctl.c_length[3]= 67.0f; x->x_ctl.c_length[4]= 82.0f; x->x_ctl.c_length[5]= 110.0f; x->x_ctl.c_length[6]= 172.0f; x->x_ctl.c_length[7]= 211.0f; fdn_setupdelayline(x); fdn_time(x, 4, 1); /* reset delay memory to zero */ fdn_reset(x); return (void *)x; } void fdn_tilde_setup(void) { //post("fdn~ v0.1"); fdn_class = class_new(gensym("fdn~"), (t_newmethod)fdn_new, (t_method)fdn_free, sizeof(t_fdn), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(fdn_class, t_fdn, x_f); class_addmethod(fdn_class, (t_method)fdn_print, gensym("print"), 0); class_addmethod(fdn_class, (t_method)fdn_reset, gensym("reset"), 0); class_addmethod(fdn_class, (t_method)fdn_timehigh, gensym("timehigh"), A_DEFFLOAT, 0); class_addmethod(fdn_class, (t_method)fdn_timelow, gensym("timelow"), A_DEFFLOAT, 0); class_addmethod(fdn_class, (t_method)fdn_list, gensym("lines"), A_GIMME, 0); class_addmethod(fdn_class, (t_method)fdn_dsp, gensym("dsp"), 0); class_addmethod(fdn_class, (t_method)fdn_linear, gensym("linear"), A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(fdn_class, (t_method)fdn_exponential, gensym("exponential"), A_FLOAT, A_FLOAT, A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/setup.c0000644000000000000000000000434112613674326015525 0ustar0000000000000000#include "m_pd.h" void ead_tilde_setup(void); void ear_tilde_setup(void); void eadsr_tilde_setup(void); void dist_tilde_setup(void); void tabreadmix_tilde_setup(void); void xfm_tilde_setup(void); void biquadseries_tilde_setup(void); void filterortho_tilde_setup(void); void qmult_tilde_setup(void); void qnorm_tilde_setup(void); void cheby_tilde_setup(void); void abs_tilde_setup(void); void ramp_tilde_setup(void); void dwt_tilde_setup(void); void bfft_tilde_setup(void); void dynwav_tilde_setup(void); void statwav_tilde_setup(void); void bdiag_tilde_setup(void); void diag_tilde_setup(void); void bmatrix_tilde_setup(void); void permut_tilde_setup(void); void lattice_tilde_setup(void); void ratio_setup(void); void ffpoly_setup(void); void dt_ms_setup(void); void fwarp_setup(void); void junction_tilde_setup(void); void fdn_tilde_setup(void); void bwin_tilde_setup(void); void blosc_tilde_setup(void); void cmath_tilde_setup(void); void bitsplit_tilde_setup(void); void sbosc_tilde_setup(void); void blocknorm_tilde_setup(void); void resofilt_tilde_setup(void); void scrollgrid1D_tilde_setup(void); void sawtooth_tilde_setup(void); #ifndef CREB_VERSION #define CREB_VERSION "externals cvs" #endif void creb_setup(void) { post("CREB: version " CREB_VERSION); /* setup tilde objects */ ead_tilde_setup(); ear_tilde_setup(); eadsr_tilde_setup(); dist_tilde_setup(); tabreadmix_tilde_setup(); xfm_tilde_setup(); qmult_tilde_setup(); qnorm_tilde_setup(); cheby_tilde_setup(); ramp_tilde_setup(); dwt_tilde_setup(); bfft_tilde_setup(); dynwav_tilde_setup(); statwav_tilde_setup(); bdiag_tilde_setup(); diag_tilde_setup(); bmatrix_tilde_setup(); permut_tilde_setup(); lattice_tilde_setup(); junction_tilde_setup(); fdn_tilde_setup(); bwin_tilde_setup(); blosc_tilde_setup(); cmath_tilde_setup(); bitsplit_tilde_setup(); sbosc_tilde_setup(); blocknorm_tilde_setup(); resofilt_tilde_setup(); scrollgrid1D_tilde_setup(); sawtooth_tilde_setup(); /* setup other objects */ ratio_setup(); ffpoly_setup(); dt_ms_setup(); fwarp_setup(); /* setup c++ modules */ biquadseries_tilde_setup(); filterortho_tilde_setup(); /* optional modules */ #ifdef HAVE_ABS_TILDE abs_tilde_setup(); #endif } creb-0.9.2+darcs20151027/modules/statwav~.c0000644000000000000000000000776612613674326016272 0ustar0000000000000000/* * statwav.c - static wavetable oscillator (scale + tabread) * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include static t_class *statwav_tilde_class; typedef struct _statwav_tilde { t_object x_obj; int x_npoints; t_float *x_vec; t_symbol *x_arrayname; t_float x_f; } t_statwav_tilde; static void *statwav_tilde_new(t_symbol *s) { t_statwav_tilde *x = (t_statwav_tilde *)pd_new(statwav_tilde_class); x->x_arrayname = s; x->x_vec = 0; outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *statwav_tilde_perform(t_int *w) { t_statwav_tilde *x = (t_statwav_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); t_float maxindex; int imaxindex; t_float *buf = x->x_vec, *fp; int i; maxindex = x->x_npoints; imaxindex = x->x_npoints; if (!buf) goto zero; for (i = 0; i < n; i++) { t_float phase = *in++; t_float modphase = phase - (int)phase; t_float findex; int index; int ia, ib, ic, id; t_float frac, a, b, c, d, cminusb; static int count; if (modphase < 0.0) modphase += 1.0; findex = modphase * maxindex; index = findex; frac = findex - index; ia = (imaxindex+index-1) % imaxindex; ib = index; ic = (index+1) % imaxindex; id = (index+2) % imaxindex; a = buf[ia]; b = buf[ib]; c = buf[ic]; d = buf[id]; /* if (!i && !(count++ & 1023)) post("fp = %lx, shit = %lx, b = %f", fp, buf->b_shit, b); */ cminusb = c-b; *out++ = b + frac * ( cminusb - 0.5 * (frac-1.) * ( (a - d + 3.0 * cminusb) * frac + (b - a - cminusb) ) ); } return (w+5); zero: while (n--) *out++ = 0; return (w+5); } static void statwav_tilde_set(t_statwav_tilde *x, t_symbol *s) { t_garray *a; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) error("statwav~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!garray_getfloatarray(a, &x->x_npoints, &x->x_vec)) { error("%s: bad template for statwav~", x->x_arrayname->s_name); x->x_vec = 0; } else garray_usedindsp(a); } static void statwav_tilde_dsp(t_statwav_tilde *x, t_signal **sp) { statwav_tilde_set(x, x->x_arrayname); dsp_add(statwav_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void statwav_tilde_free(t_statwav_tilde *x) { } void statwav_tilde_setup(void) { //post("statwav~ v0.1"); statwav_tilde_class = class_new(gensym("statwav~"), (t_newmethod)statwav_tilde_new, (t_method)statwav_tilde_free, sizeof(t_statwav_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(statwav_tilde_class, t_statwav_tilde, x_f); class_addmethod(statwav_tilde_class, (t_method)statwav_tilde_dsp, gensym("dsp"), 0); class_addmethod(statwav_tilde_class, (t_method)statwav_tilde_set, gensym("set"), A_SYMBOL, 0); } creb-0.9.2+darcs20151027/modules/eblosc~.c0000644000000000000000000003532712613674326016042 0ustar0000000000000000/* * eblosc.c - bandlimited oscillators with infinite support discontinuities * using minimum phase impulse, step & ramp * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #include "filters.h" typedef unsigned long long u64; typedef unsigned long u32; #define LPHASOR (8*sizeof(u32)) // the phasor logsize #define VOICES 8 // the number of oscillators #define CUTOFF 0.8f // fraction of nyquist for impulse cutoff typedef struct ebloscctl { t_float c_pole[VOICES*2]; // complex poles t_float c_gain[VOICES*2]; // complex gains (waveform specific constants) t_float c_state[VOICES*2]; // complex state u32 c_phase; // phase of main oscillator u32 c_phase2; // phase of secondairy oscillator t_float c_prev_amp; // previous input of comparator t_float c_phase_inc_scale; t_float c_scale; t_float c_scale_update; t_symbol *c_waveform; } t_ebloscctl; typedef struct eblosc { t_object x_obj; t_float x_f; t_ebloscctl x_ctl; } t_eblosc; /* phase converters */ static inline float _phase_to_float(u32 p){ return ((t_float)p) * (1.0f / 4294967296.0f); } static inline u32 _float_to_phase(t_float f){ return (u32)(f * 4294967296.0f); } /* get one sample from the oscillator bank and perform time tick */ static inline t_float _osc_tick(t_ebloscctl *ctl) { float sum = 0.0f; int i; /* sum all voices */ for (i=0; ic_state+i, ctl->c_pole+i); /* get real part and add to output */ sum += ctl->c_state[0]; } return sum; } /* add shifted impulse */ static inline void _add_impulse(t_ebloscctl *ctl, t_float t0) { int i; for (i=0; ic_state[0] += real; ctl->c_state[1] += imag; } } /* add step */ static inline void _add_step(t_ebloscctl *ctl) { int i; for (i=0; ic_state[0] += real; ctl->c_state[1] += imag; } } /* add shifted step */ static inline void _add_shifted_step(t_ebloscctl *ctl, t_float t0) { int i; for (i=0; ic_state[0] += real; ctl->c_state[1] += imag; } } #if 0 /* update waveplayers on zero cross */ static void _bang_comparator(t_ebloscctl *ctl, float prev, float curr) { /* check for sign change */ if ((prev * curr) < 0.0f){ int voice; /* determine the location of the discontinuity (in oversampled coordiates using linear interpolation */ float f = (t_float)S * curr / (curr - prev); /* get the offset in the oversample table */ u32 table_index = (u32)f; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ float table_frac_index = f - (t_float)table_index; /* set state (+ or -) */ ctl->c_state = (curr > 0.0f) ? 0.5f : -0.5f; /* steal the oldest voice */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* initialize the new voice index and interpolation fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = table_frac_index; ctl->c_vscale[voice] = -ctl->c_scale * 2.0f * ctl->c_state; } } /* advance phasor and update waveplayers on phase wrap */ static void _bang_phasor(t_ebloscctl *ctl, float freq) { u32 phase = ctl->c_phase; u32 phase_inc; u32 oldphase; int voice; float scale = ctl->c_scale; /* get increment */ float inc = freq * ctl->c_phase_inc_scale; /* calculate new phase the increment (and the phase) should be a multiple of S */ if (inc < 0.0f) inc = -inc; phase_inc = ((u32)inc) & ~(S-1); oldphase = phase; phase += phase_inc; /* check for phase wrap */ if (phase < oldphase){ u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; u32 table_index; u32 table_phase; /* steal the oldest voice if we have a phase wrap */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* determine the location of the discontinuity (in oversampled coordinates) which is S * (new phase) / (increment) */ table_index = phase / phase_inc_decimated; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ table_phase = phase - (table_index * phase_inc_decimated); /* use it to initialize the new voice index and interpolation * fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = (t_float)table_phase / (t_float)phase_inc_decimated; ctl->c_vscale[voice] = scale; scale = scale * ctl->c_scale_update; } /* save state */ ctl->c_phase = phase; ctl->c_scale = scale; } /* the 2 oscillator version: the second osc can reset the first osc's phase (hence it determines the pitch) the first osc determines the waveform */ static void _bang_hardsync_phasor(t_ebloscctl *ctl, float freq, float freq2) { u32 phase = ctl->c_phase; u32 phase2 = ctl->c_phase2; u32 phase_inc; u32 phase_inc2; u32 oldphase; u32 oldphase2; int voice; float scale = ctl->c_scale; /* get increment */ float inc = freq * ctl->c_phase_inc_scale; float inc2 = freq2 * ctl->c_phase_inc_scale; /* calculate new phases the increment (and the phase) should be a multiple of S */ /* save previous phases */ oldphase = phase; oldphase2 = phase2; /* update second osc */ if (inc2 < 0.0f) inc2 = -inc2; phase_inc2 = ((u32)inc2) & ~(S-1); phase2 += phase_inc2; /* update first osc (freq should be >= freq of sync osc */ if (inc < 0.0f) inc = -inc; phase_inc = ((u32)inc) & ~(S-1); if (phase_inc < phase_inc2) phase_inc = phase_inc2; phase += phase_inc; /* check for sync discontinuity (osc 2) */ if (phase2 < oldphase2) { /* adjust phase depending on the location of the discontinuity in phase2: phase/phase_inc == phase2/phase_inc2 */ u64 pi = phase_inc >> LOVERSAMPLE; u64 pi2 = phase_inc2 >> LOVERSAMPLE; u64 lphase = ((u64)phase2 * pi) / pi2; phase = lphase & ~(S-1); } /* check for phase discontinuity (osc 1) */ if (phase < oldphase){ u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; u32 table_index; u32 table_phase; float stepsize; /* steal the oldest voice if we have a phase wrap */ voice = ctl->c_next_voice++; ctl->c_next_voice &= VOICES-1; /* determine the location of the discontinuity (in oversampled coordinates) which is S * (new phase) / (increment) */ table_index = phase / phase_inc_decimated; /* determine the fractional part (in oversampled coordinates) for linear interpolation */ table_phase = phase - (table_index * phase_inc_decimated); /* determine the step size. as opposed to saw/impulse waveforms, the step is not always equal to one. it is: oldphase - phase + phase_inc but for the unit step this will overflow to zero, so we reduce the bit depth to prevent overflow */ stepsize = _phase_to_float(((oldphase-phase) >> LOVERSAMPLE) + phase_inc_decimated) * (t_float)S; /* use it to initialize the new voice index and interpolation fraction */ ctl->c_index[voice] = table_index; ctl->c_frac[voice] = (t_float)table_phase / (t_float)phase_inc_decimated; ctl->c_vscale[voice] = scale * stepsize; scale = scale * ctl->c_scale_update; } /* save state */ ctl->c_phase = phase; ctl->c_phase2 = phase2; ctl->c_scale = scale; } static t_int *eblosc_perform_hardsync_saw(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *freq2 = (t_float *)(w[4]); t_float *out = (t_float *)(w[5]); t_ebloscctl *ctl = (t_ebloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; /* set postfilter cutoff */ ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); while (n--) { float frequency = *freq++; float frequency2 = *freq2++; /* get the bandlimited discontinuity */ float sample = _get_bandlimited_discontinuity(ctl, bls); /* add aliased sawtooth wave */ sample += _phase_to_float(ctl->c_phase) - 0.5f; /* highpass filter output to remove DC offset and low * frequency aliasing */ ctl->c_butter->BangSmooth(sample, sample, 0.05f); /* send to output */ *out++ = sample; /* advance phasor */ _bang_hardsync_phasor(ctl, frequency2, frequency); } return (w+6); } static t_int *eblosc_perform_saw(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_ebloscctl *ctl = (t_ebloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; while (n--) { float frequency = *freq++; /* get the bandlimited discontinuity */ float sample = _get_bandlimited_discontinuity(ctl, bls); /* add aliased sawtooth wave */ sample += _phase_to_float(ctl->c_phase) - 0.5f; /* send to output */ *out++ = sample; /* advance phasor */ _bang_phasor(ctl, frequency); } return (w+5); } static t_int *eblosc_perform_pulse(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_ebloscctl *ctl = (t_ebloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; /* set postfilter cutoff */ ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); while (n--) { float frequency = *freq++; /* get the bandlimited discontinuity */ float sample = _get_bandlimited_discontinuity(ctl, bli); /* highpass filter output to remove DC offset and low * frequency aliasing */ ctl->c_butter->BangSmooth(sample, sample, 0.05f); /* send to output */ *out++ = sample; /* advance phasor */ _bang_phasor(ctl, frequency); } return (w+5); } static t_int *eblosc_perform_comparator(t_int *w) { t_float *amp = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_ebloscctl *ctl = (t_ebloscctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float prev_amp = ctl->c_prev_amp; while (n--) { float curr_amp = *amp++; /* exact zero won't work for zero detection (sic) */ if (curr_amp == 0.0f) curr_amp = 0.0000001f; /* get the bandlimited discontinuity */ float sample = _get_bandlimited_discontinuity(ctl, bls); /* add the block wave state */ sample += ctl->c_state; /* send to output */ *out++ = sample; /* advance phasor */ _bang_comparator(ctl, prev_amp, curr_amp); prev_amp = curr_amp; } ctl->c_prev_amp = prev_amp; return (w+5); } static void eblosc_phase(t_eblosc *x, t_float f) { x->x_ctl.c_phase = _float_to_phase(f); x->x_ctl.c_phase2 = _float_to_phase(f); } static void eblosc_phase1(t_eblosc *x, t_float f) { x->x_ctl.c_phase = _float_to_phase(f); } static void eblosc_phase2(t_eblosc *x, t_float f) { x->x_ctl.c_phase2 = _float_to_phase(f); } static void eblosc_dsp(t_eblosc *x, t_signal **sp) { int n = sp[0]->s_n; /* set sampling rate scaling for phasors */ x->x_ctl.c_phase_inc_scale = 4.0f * (t_float)(1<<(LPHASOR-2)) / sys_getsr(); /* setup & register the correct process routine depending on the waveform */ /* 2 osc */ if (x->x_ctl.c_waveform == gensym("syncsaw")){ x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = 1.0f; dsp_add(eblosc_perform_hardsync_saw, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); } /* 1 osc */ else if (x->x_ctl.c_waveform == gensym("pulse")){ x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = 1.0f; dsp_add(eblosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else if (x->x_ctl.c_waveform == gensym("pulse2")){ x->x_ctl.c_phase_inc_scale *= 2; x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = -1.0f; dsp_add(eblosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else if (x->x_ctl.c_waveform == gensym("comparator")){ x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = 1.0f; dsp_add(eblosc_perform_comparator, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } else{ x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = 1.0f; dsp_add(eblosc_perform_saw, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } } static void eblosc_free(t_eblosc *x) { delete x->x_ctl.c_butter; } t_class *eblosc_class; static void *eblosc_new(t_symbol *s) { t_eblosc *x = (t_eblosc *)pd_new(eblosc_class); int i; /* out 1 */ outlet_new(&x->x_obj, gensym("signal")); /* optional signal inlets */ if (s == gensym("syncsaw")){ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); } /* optional phase inlet */ if (s != gensym("comparator")){ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("phase")); } /* create the postfilter */ x->x_ctl.c_butter = new DSPIfilterSeries(3); /* init oscillators */ for (i=0; ix_ctl.c_index[i] = N-2; x->x_ctl.c_frac[i] = 0.0f; } /* init rest of state data */ eblosc_phase(x, 0); eblosc_phase2(x, 0); x->x_ctl.c_state = 0.0; x->x_ctl.c_prev_amp = 0.0; x->x_ctl.c_next_voice = 0; x->x_ctl.c_scale = 1.0f; x->x_ctl.c_scale_update = 1.0f; x->x_ctl.c_waveform = s; return (void *)x; } extern "C" { void eblosc_tilde_setup(void) { //post("eblosc~ v0.1"); build_tables(); eblosc_class = class_new(gensym("eblosc~"), (t_newmethod)eblosc_new, (t_method)eblosc_free, sizeof(t_eblosc), 0, A_DEFSYMBOL, A_NULL); CLASS_MAINSIGNALIN(eblosc_class, t_eblosc, x_f); class_addmethod(eblosc_class, (t_method)eblosc_dsp, gensym("dsp"), A_NULL); class_addmethod(eblosc_class, (t_method)eblosc_phase, gensym("phase"), A_FLOAT, A_NULL); class_addmethod(eblosc_class, (t_method)eblosc_phase2, gensym("phase2"), A_FLOAT, A_NULL); } } #endif creb-0.9.2+darcs20151027/modules/extlib_util.h0000644000000000000000000000573512613674326016726 0ustar0000000000000000/* * Prototypes for utility functions used in pd externals * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef CREB_EXTLIB_UTIL_H #define CREB_EXTLIB_UTIL_H #include #include "m_pd.h" // __COUNTER__ is a CPP extension enabled in gcc >= 4.3 #if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ >= 3 #define HAVE_COUNTER #endif #if defined __GNUC__ && __GNUC__ >= 5 #define HAVE_COUNTER #endif #ifdef __clang__ // Should we check version here? #define HAVE_COUNTER #endif #ifndef HAVE_COUNTER #warning CT_ASSERT() disabled #define CT_ASSERT(...) #else #define CT_NAMED_ASSERT(name,x) \ typedef int _GENSYM(name ## _ctassert_)[-((x)==0)] #define CT_ASSERT(x) CT_NAMED_ASSERT(,x) #define _GENSYM(x) _CONCAT(x,__COUNTER__) #define _CONCAT1(x,y) x##y #define _CONCAT(x,y) _CONCAT1(x,y) #endif /* Only defined in pd-extended. */ #ifndef PD_FLOAT_PRECISION #define PD_FLOAT_PRECISION 32 #endif /* http://www.unix.org/version2/whatsnew/lp64_wp.html */ typedef unsigned long long u64; typedef unsigned int u32; CT_ASSERT(sizeof(u32)==4); CT_ASSERT(sizeof(u64)==8); /* envelope stuff */ /* exponential range for envelopes is 60dB */ #define ENVELOPE_RANGE 0.001 #define ENVELOPE_MAX (1.0 - ENVELOPE_RANGE) #define ENVELOPE_MIN ENVELOPE_RANGE /* convert milliseconds to 1-p, with p a real pole */ static inline t_float milliseconds_2_one_minus_realpole(t_float time) { t_float r; if (time < 0.0) time = 0.0; r = -expm1(1000.0 * log(ENVELOPE_RANGE) / (sys_getsr() * time)); if (!(r < 1.0)) r = 1.0; //post("%f",r); return r; } #if defined(__i386__) || defined(__x86_64__) // type punning code: #if PD_FLOAT_PRECISION == 32 typedef union { unsigned int i; t_float f; } t_flint; /* check if floating point number is denormal */ //#define IS_DENORMAL(f) (((*(unsigned int *)&(f))&0x7f800000) == 0) #define IS_DENORMAL(f) (((((t_flint)(f)).i) & 0x7f800000) == 0) #elif PD_FLOAT_PRECISION == 64 typedef union { unsigned int i[2]; t_float f; } t_flint; #define IS_DENORMAL(f) (((((t_flint)(f)).i[1]) & 0x7ff00000) == 0) #endif // endif PD_FLOAT_PRECISION #else // if not defined(__i386__) || defined(__x86_64__) #define IS_DENORMAL(f) 0 #endif // end if defined(__i386__) || defined(__x86_64__) #endif /* CREB_EXTLIB_UTIL_H */ creb-0.9.2+darcs20151027/modules/filters.h0000644000000000000000000001101012613674326016031 0ustar0000000000000000/* this file contains a 37th attempt to write a general purpose iir filter toolset */ /* defined as inline functions with call by reference to enable compiler ref/deref optim */ /* the typedef */ #ifndef T #define T t_float #endif /* the prototype for a word */ #define P static inline void #define PP static void /* the 'reference' arguments */ #define A *a #define B *b #define C *c #define D *d #define X *x #define Y *y #define S *s /* the opcodes */ /* add */ P cadd (T X, T Y, T A, T B, T C, T D) { X = A + C; Y = B + D;} P cadd2 (T A, T B, T C, T D) { A += C; B += D;} P vcadd (T X, T A, T C) { cadd(x,x+1,a,a+1,c,c+1); } P vcadd2 (T A, T C) { cadd2(a,a+1,c,c+1); } /* mul */ P cmul_r (T X, T A, T B, T C, T D) { X = A * C - B * D;} P cmul_i (T Y, T A, T B, T C, T D) { Y = A * D + B * C;} P cmul (T X, T Y, T A, T B, T C, T D) { cmul_r (x, a, b, c, d); cmul_i (y, a, b, c, d); } P cmul2 (T A, T B, T C, T D) { T x = A; T y = B; cmul (&x, &y, a, b, c, d); A = x; B = y; } P vcmul (T X, T A, T C) { cmul(x,x+1,a,a+1,c,c+1); } P vcmul2 (T A, T C) { cmul2(a,a+1,c,c+1); } /* norm */ static inline t_float vcnorm(T X) { return hypot(x[0], x[1]); } /* swap */ P vcswap(T Y, T X) { t_float t[2] = {x[0], x[1]}; x[0] = y[0]; x[1] = y[1]; y[0] = t[0]; y[1] = t[1]; } /* inverse */ P vcinv(T Y, T X) { t_float scale = 1.0 / vcnorm(x); y[0] = scale * x[0]; y[1] = scale * x[1]; } P vcinv1(T X) { t_float scale = 1.0 / vcnorm(x); x[0] *= scale; x[1] *= scale; } /* exp */ /* X = exp(Y) */ P vcexp2 (T Y, T X) { T r = exp(x[0]); y[0] = cos (x[1]); y[1] = sin (x[1]); y[0] *= r; y[1] *= r; } P vcexp1 (T X) { T y[2]; vcexp2(y,x); x[0] = y[0]; x[1] = y[1]; } /* FILTERS the transfer function is defined in terms of the "engineering" bilateral z-transform of the discrete impulse response h[n]. H(z) = Sum{n = -inf -> inf} h[n] z^(-n) a unit delay operating on a singnal S(z) is therefore represented as z^(-1) S(z) */ /* biquads */ /* biquad, orthogonal (poles & zeros), real in, out, state, pole, output */ P biq_orth_r (T X, T Y, T S, T A, T C) { Y = X + c[0] * s[0] - c[1] * s[1]; /* mind sign of c[1] */ vcmul2(s, a); S += X; } /* biquad, orthogonal, complex one-pole, with scaling */ /* complex one pole: (output = s[0] + is[1]): C / (1-A z^(-1)) */ P one_pole_complex (T X, T Y, T S, T A, T C) { vcmul(y, s, a); vcadd2(y, x); s[0] = y[0]; s[1] = y[1]; vcmul(y, s, c); } /* complex conj two pole: (output = s[0] : (Re(C) - Re(C*Conj(A))) / (1 - A z^(-1)) (1 - Conj(A) z^(-1)) */ P two_pole_complex_conj (T X, T Y, T S, T A, T C) { vcmul2(s, a); s[0] += x[0]; y[0] = s[0] * c[0] - s[1] * c[1]; } /* support functions for IIR filter design */ /* evaluate pole and allzero TF in z^-1 given the complex zeros/poles: p(z) (or p(z)^-1) = \product (1-z_i z^-1) */ PP eval_zero_poly(t_float *val, t_float *arg, t_float *zeros, int nb_zeros) { int i; t_float a[2] = {arg[0], arg[1]}; vcinv1(a); val[0] = 1.0; val[1] = 0.0; a[0] *= -1; a[1] *= -1; for (i=0; ix_currpos > x->x_wrap_end ) x->x_currpos -= x->x_wrap_length; while ( x->x_prevpos > x->x_wrap_end ) x->x_prevpos -= x->x_wrap_length; /* make sure 0<=..x_npoints */ //if (x->x_currpos < 0) x->x_currpos += x->x_npoints; //if (x->x_prevpos < 0) x->x_prevpos += x->x_npoints; x->x_currpos += (x->x_currpos < 0) * x->x_npoints; x->x_prevpos += (x->x_prevpos < 0) * x->x_npoints; } #define min(x,y) ((x)<(y)?(x):(y)) static t_int *tabreadmix_tilde_perform(t_int *w) { t_tabreadmix_tilde *x = (t_tabreadmix_tilde *)(w[1]); t_float *pos = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int maxxindex; t_float *buf = x->x_vec; int i; t_float currgain, prevgain; t_float c,s; int chunk; int leftover; int newpos = (int)*pos; // maxxindex = x->x_npoints; maxxindex = x->x_wrap_end; if (!buf) goto zero; if (maxxindex <= 0) goto zero; while (n){ /* process as much data as possible */ leftover = x->x_xfade_size - x->x_xfade_phase; chunk = min(n, leftover); for (i = 0; i < chunk; i++){ /* compute crossfade gains from oscillator state */ currgain = 0.5 - x->x_xfade_state_c; prevgain = 0.5 + x->x_xfade_state_c; /* check indices & wrap */ tabreadmix_tilde_wrapindices(x); /* mix and write */ newpos = (int)(*pos++); *out++ = currgain * buf[(int)x->x_currpos] + prevgain * buf[(int)x->x_prevpos]; x->x_currpos += x->x_posinc; x->x_prevpos += x->x_posinc; /* advance oscillator */ c = x->x_xfade_state_c * x->x_xfade_cos - x->x_xfade_state_s * x->x_xfade_sin; s = x->x_xfade_state_c * x->x_xfade_sin + x->x_xfade_state_s * x->x_xfade_cos; x->x_xfade_state_c = c; x->x_xfade_state_s = s; } /* update indices */ x->x_xfade_phase += chunk; n -= chunk; //pos += chunk; /* check if prev chunk is finished */ if (x->x_xfade_size == x->x_xfade_phase){ x->x_prevpos = x->x_currpos; x->x_currpos = newpos; x->x_xfade_state_c = 0.5; x->x_xfade_state_s = 0.0; x->x_xfade_phase = 0; } } /* return if we ran out of data */ return (w+5); zero: while (n--) *out++ = 0; return (w+5); } static void tabreadmix_tilde_blocksize(t_tabreadmix_tilde *x, t_float size) { double prev_phase; int max; t_float fmax = (t_float)x->x_wrap_length * 0.5; if (size < 1.0) size = 1.0; // post( "got input size %f\n", size ); prev_phase = (double)x->x_xfade_phase; prev_phase *= size; prev_phase /= (double)x->x_xfade_size; /* preserve the crossfader state */ x->x_xfade_phase = (int)prev_phase; x->x_xfade_size = (int)size; x->x_xfade_cos = cos(M_PI / (t_float)x->x_xfade_size); x->x_xfade_sin = sin(M_PI / (t_float)x->x_xfade_size); /* make sure indices are inside array */ if (x->x_npoints == 0){ x->x_currpos = 0; x->x_prevpos = 0; } //else tabreadmix_tilde_wrapindices(x); } void tabreadmix_tilde_wrap(t_tabreadmix_tilde *x, t_float start, t_float end ) { if ( start > end ) error( "tabreadmix~: wrap: start %i must be lower than end %i", (int)start, (int)end ); else if ( 0 > start || start > x->x_npoints ) error( "tabreadmix~: wrap: start %i must be between 0 and bufsize (%d)", (int)start, (int)x->x_npoints ); else if ( 0 > end || end > x->x_npoints ) error( "tabreadmix~: wrap: end %i must be between 0 and bufsize (%d)", (int)end, (int)x->x_npoints ); else { x->x_wrap_start = start; x->x_wrap_end = end; x->x_wrap_length = end - start; } } void tabreadmix_tilde_pitch(t_tabreadmix_tilde *x, t_float f) { if (f < 1) f = 1; tabreadmix_tilde_blocksize(x, sys_getsr() / f); } void tabreadmix_tilde_audiorate(t_tabreadmix_tilde *x, t_float f) { if ( f<0.001 ) f = 0.001; x->x_posinc = f; } void tabreadmix_tilde_chunks(t_tabreadmix_tilde *x, t_float f) { if (f < 1.0) f = 1.0; tabreadmix_tilde_blocksize(x, (t_float)x->x_npoints / f); } void tabreadmix_tilde_bang(t_tabreadmix_tilde *x, t_float f) { //trigger a chunk reset on next dsp call x->x_xfade_phase = x->x_xfade_size; } void tabreadmix_tilde_set(t_tabreadmix_tilde *x, t_symbol *s) { t_garray *a; int old_npoints = x->x_npoints; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) error("tabreadmix~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!garray_getfloatarray(a, &x->x_npoints, &x->x_vec)) { error("%s: bad template for tabreadmix~", x->x_arrayname->s_name); x->x_vec = 0; } else garray_usedindsp(a); // reset wrappage if ( old_npoints != x->x_npoints ) { x->x_wrap_start = 0; x->x_wrap_end = x->x_npoints; x->x_wrap_length = x->x_npoints; } /* make sure indices are inside array */ if (x->x_npoints == 0){ x->x_currpos = 0; x->x_prevpos = 0; } //else tabreadmix_tilde_wrapindices(x); } static void tabreadmix_tilde_dsp(t_tabreadmix_tilde *x, t_signal **sp) { tabreadmix_tilde_set(x, x->x_arrayname); dsp_add(tabreadmix_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void tabreadmix_tilde_free(t_tabreadmix_tilde *x) { } static void *tabreadmix_tilde_new(t_symbol *s) { t_tabreadmix_tilde *x = (t_tabreadmix_tilde *)pd_new(tabreadmix_tilde_class); x->x_arrayname = s; x->x_vec = 0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("blocksize")); outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; x->x_xfade_phase = 0; x->x_xfade_size = 1024; x->x_currpos = 0; x->x_prevpos = 0; x->x_posinc = 1.0; x->x_xfade_state_c = 0.5; x->x_xfade_state_s = 0.0; tabreadmix_tilde_blocksize(x, 1024); return (x); } void tabreadmix_tilde_setup(void) { tabreadmix_tilde_class = class_new(gensym("tabreadmix~"), (t_newmethod)tabreadmix_tilde_new, (t_method)tabreadmix_tilde_free, sizeof(t_tabreadmix_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabreadmix_tilde_class, t_tabreadmix_tilde, x_f); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_dsp, gensym("dsp"), 0); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_set, gensym("set"), A_SYMBOL, 0); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_blocksize, gensym("blocksize"), A_FLOAT, 0); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_pitch, gensym("pitch"), A_FLOAT, 0); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_chunks, gensym("chunks"), A_FLOAT, 0); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_audiorate, gensym("audiorate"), A_FLOAT, 0 ); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_wrap, gensym("wrap"), A_FLOAT, A_FLOAT, 0 ); class_addmethod(tabreadmix_tilde_class, (t_method)tabreadmix_tilde_bang, gensym("bang"), 0); } creb-0.9.2+darcs20151027/modules/ead~.c0000644000000000000000000000737512613674326015326 0ustar0000000000000000/* * ead.c - exponential attack decay envelope * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "extlib_util.h" /* pointer to */ t_class *ead_class; /* state data fpr attack/decay dsp plugin */ typedef struct eadctl { t_float c_attack; t_float c_decay; t_float c_state; t_int c_target; } t_eadctl; /* object data structure */ typedef struct ead { t_object x_obj; t_eadctl x_ctl; } t_ead; static void ead_attack(t_ead *x, t_floatarg f) { x->x_ctl.c_attack = milliseconds_2_one_minus_realpole(f); } static void ead_decay(t_ead *x, t_floatarg f) { x->x_ctl.c_decay = milliseconds_2_one_minus_realpole(f); } static void ead_start(t_ead *x) { /* reset state if necessary to prevent skipping */ // always reset, seems to be safest //if (x->x_ctl.c_target == 1) x->x_ctl.c_state = 0.0f; x->x_ctl.c_target = 1; } /* dsp callback function, not a method */ static t_int *ead_perform(t_int *w) { /* interprete arguments */ t_float *out = (t_float *)(w[3]); t_eadctl *ctl = (t_eadctl *)(w[1]); t_float attack = ctl->c_attack; t_float decay = ctl->c_decay; t_float state = ctl->c_state; t_int n = (t_int)(w[2]); t_int i; /* A/D code */ for (i = 0; i < n; i++){ switch(ctl->c_target){ case 1: /* attack phase */ *out++ = state; state += attack*(1 - state); ctl->c_target = (state <= ENVELOPE_MAX); break; default: /* decay phase */ *out++ = state; state -= decay*state; break; } } /* save state */ ctl->c_state = IS_DENORMAL(state) ? 0 : state; return (w+4); } static void ead_dsp(t_ead *x, t_signal **sp) { dsp_add(ead_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec); } /* destructor */ static void ead_free(void) { } /* constructor */ static void *ead_new(t_floatarg attack, t_floatarg decay, t_floatarg sustain, t_floatarg release) { /* create instance */ t_ead *x = (t_ead *)pd_new(ead_class); /* create new inlets, convert incoming message float to attack/decay */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("attack")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("decay")); /* create a dsp outlet */ outlet_new(&x->x_obj, gensym("signal")); /* initialize */ x->x_ctl.c_state = 0; x->x_ctl.c_target = 0; ead_attack(x, attack); ead_decay(x, decay); /* return instance */ return (void *)x; } void ead_tilde_setup(void) { //post("ead~ v0.1"); ead_class = class_new(gensym("ead~"), (t_newmethod)ead_new, (t_method)ead_free, sizeof(t_ead), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(ead_class, (t_method)ead_start, gensym("start"), 0); class_addmethod(ead_class, (t_method)ead_start, gensym("bang"), 0); class_addmethod(ead_class, (t_method)ead_dsp, gensym("dsp"), 0); class_addmethod(ead_class, (t_method)ead_attack, gensym("attack"), A_FLOAT, 0); class_addmethod(ead_class, (t_method)ead_decay, gensym("decay"), A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/ffpoly.c0000644000000000000000000000717212613674326015671 0ustar0000000000000000/* * ffpoly.c - compute a finite field polynomial * Copyright (c) by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "m_pd.h" #include typedef struct ffpoly_struct { t_object x_obj; t_float x_f; t_outlet *x_outlet; t_int *x_coef; t_int x_poly_order; t_int x_field_order; t_int x_lastpackedcoef; } t_ffpoly; static void ffpoly_compute(t_ffpoly *x, t_floatarg fcoef) { int in = (int)fcoef; int fo = x->x_field_order; int po = x->x_poly_order; t_int* c = x->x_coef; int i, out; in %= fo; if (in < 0) in += fo; out = c[po]; for (i=po-1; i>=0; i--){ out *= in; out += c[i]; out %= fo; } outlet_float(x->x_outlet, (t_float)out); } /* this sets all coefficients given one float */ static void ffpoly_coefficients(t_ffpoly *x, t_floatarg fcoef) { int coef = (int)fcoef; int i; if (coef < 0) coef = -coef; x->x_lastpackedcoef = coef; for (i=0; ix_poly_order + 1; i++){ x->x_coef[i] = coef % x->x_field_order; coef = coef / x->x_field_order; } } /* this sets one coefficient */ static void ffpoly_coef(t_ffpoly *x, t_floatarg index, t_floatarg val) { int i = (int)index; int v = (int)val; if (i<0) return; if (i>x->x_poly_order) return; v %= x->x_field_order; if (v<0) v += x->x_field_order; x->x_coef[i] = v; } static void ffpoly_fieldorder(t_ffpoly *x, t_floatarg ffieldorder) { int i; int order = (int)ffieldorder; if (order < 2) order = 2; x->x_field_order = order; for (i=0; ix_poly_order+1; i++) x->x_coef[i] %= x->x_field_order; //ffpoly_coefficients(x, x->x_lastpackedcoef); } static void ffpoly_free(t_ffpoly *x) { free (x->x_coef); } t_class *ffpoly_class; static void *ffpoly_new(t_floatarg fpolyorder, t_floatarg ffieldorder) { t_int polyorder = (int)fpolyorder; t_int fieldorder = (int)ffieldorder; t_ffpoly *x = (t_ffpoly *)pd_new(ffpoly_class); if (polyorder < 1) polyorder = 1; if (fieldorder < 2) fieldorder = 2; x->x_poly_order = polyorder; x->x_field_order = fieldorder; x->x_coef = (t_int *)malloc((x->x_poly_order + 1) * sizeof(int)); /* set poly to f(x) = x */ ffpoly_coefficients(x, x->x_field_order); x->x_outlet = outlet_new(&x->x_obj, &s_float); return (void *)x; } #ifdef __cplusplus extern "C" { #endif void ffpoly_setup(void) { ffpoly_class = class_new(gensym("ffpoly"), (t_newmethod)ffpoly_new, (t_method)ffpoly_free, sizeof(t_ffpoly), 0, A_DEFFLOAT, A_DEFFLOAT, A_NULL); class_addmethod(ffpoly_class, (t_method)ffpoly_coefficients, gensym("coefficients"), A_FLOAT, A_NULL); class_addmethod(ffpoly_class, (t_method)ffpoly_coef, gensym("coef"), A_FLOAT, A_FLOAT, A_NULL); class_addmethod(ffpoly_class, (t_method)ffpoly_fieldorder, gensym("order"), A_FLOAT, A_NULL); class_addfloat(ffpoly_class, (t_method)ffpoly_compute); } #ifdef __cplusplus } #endif creb-0.9.2+darcs20151027/modules/dt_ms.c0000644000000000000000000000415512613674326015476 0ustar0000000000000000/* * dt_ms.c - compute time it takes to propagate a message * Copyright (c) by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "m_pd.h" #include #include typedef struct dt_ms_struct { t_object x_obj; t_float x_f; t_outlet *x_outlet_dt; t_outlet *x_outlet_bang; } t_dt_ms; static void dt_ms_bang(t_dt_ms *x) { struct timeval tv_1; gettimeofday(&tv_1, NULL); /* Measure time it takes to execute this subtree. */ outlet_bang(x->x_outlet_bang); struct timeval tv_2; gettimeofday(&tv_2, NULL); suseconds_t us = tv_2.tv_usec - tv_1.tv_usec; time_t s = tv_2.tv_sec - tv_1.tv_sec; if (us < 0) { us += 1000000; s--; } t_float f_us = us; t_float f_s = s; f_s *= 10000000.0; f_us += f_s; t_float f_ms = f_us / 1000.0f; outlet_float(x->x_outlet_dt, f_ms); } static void dt_ms_free(t_dt_ms *x) { } t_class *dt_ms_class; static void *dt_ms_new(void ) { t_dt_ms *x = (t_dt_ms *)pd_new(dt_ms_class); x->x_outlet_dt = outlet_new(&x->x_obj, &s_float); x->x_outlet_bang = outlet_new(&x->x_obj, &s_float); return (void *)x; } #ifdef __cplusplus extern "C" { #endif void dt_ms_setup(void) { dt_ms_class = class_new(gensym("dt_ms"), (t_newmethod)dt_ms_new, (t_method)dt_ms_free, sizeof(t_dt_ms), 0, A_NULL); class_addbang(dt_ms_class, (t_method)dt_ms_bang); } #ifdef __cplusplus } #endif creb-0.9.2+darcs20151027/modules/bwin~.c0000644000000000000000000001033112613674326015516 0ustar0000000000000000/* * window.c - window generation abstraction * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include static t_class *window_class; typedef struct _window { t_object x_obj; t_float x_f; t_float *x_window; t_int x_size; t_symbol *x_type; t_float x_typearg; } t_window; static t_int *window_perform(t_int *w) { t_window *x = (t_window *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); t_float *window = x->x_window; int n = (int)(w[4]); while (n--) { *out++ = (*in++) * (*window++); } return (w+5); } static void window_size(t_window *x, t_int n) { if (x->x_size != n){ if (x->x_window) free(x->x_window); x->x_window = malloc(sizeof(t_float)*n); x->x_size = n; } } static void window_type(t_window *x, t_symbol *s, t_float f) { int i; t_float a = 0; t_float a_inc = 2 * M_PI / (t_float)(x->x_size); if (!s) s = gensym("hamming"); if (s == gensym("hamming")){ for (i=0; ix_size; i++){ t_float c = cos(a); x->x_window[i] = (0.54 - 0.46 * c); a += a_inc; } } else if (s == gensym("hann")){ for (i=0; ix_size; i++){ t_float c = cos(a); x->x_window[i] = (0.5 - 0.5 * c); a += a_inc; } } else if (s == gensym("hann/hamming")){ for (i=0; ix_size; i++) { t_float c = cos(a); x->x_window[i] = (0.5 - 0.5 * c) / (0.54 - 0.46 * c); a += a_inc; } } else if (s == gensym("bfft_pink")){ x->x_window[0] = 1.0f; //DC x->x_window[1] = 1.0f / sqrt((double)(x->x_size>>1)); //NY for (i=2; ix_size; i+=2) { double freq = (double)(i>>1); t_float amp = sqrt(1.0 / freq); x->x_window[i] = amp; x->x_window[i+1] = amp; } } else if (s == gensym("bfft_blue")){ x->x_window[0] = 1.0f; //DC x->x_window[1] = sqrt((double)(x->x_size>>1)); //NY for (i=2; ix_size; i+=2) { double freq = (double)(i>>1); t_float amp = sqrt(freq); x->x_window[i] = amp; x->x_window[i+1] = amp; } } else if (s == gensym("bfft_db/octave")){ t_float power = f/6.0; x->x_window[0] = 1.0f; //DC x->x_window[1] = pow((double)(x->x_size>>1), power); //NY for (i=2; ix_size; i+=2) { double freq = (double)(i>>1); t_float amp = pow(freq, power); x->x_window[i] = amp; x->x_window[i+1] = amp; } } /* default is no window */ else{ post("bwin~: unknown window type, using rectangular"); for (i=0; ix_size; i++) x->x_window[i] = 1.0f; } x->x_type = s; x->x_typearg = f; } static void window_dsp(t_window *x, t_signal **sp) { int n = sp[0]->s_n; if (x->x_size != n){ window_size(x, n); window_type(x, x->x_type, x->x_typearg); } dsp_add(window_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, n); } static void window_free(t_window *x) { free(x->x_window); } static void *window_new(t_symbol *s) { t_window *x = (t_window *)pd_new(window_class); outlet_new(&x->x_obj, &s_signal); x->x_window = 0; window_size(x, 64); window_type(x, s, 0); return (x); } void bwin_tilde_setup(void) { window_class = class_new(gensym("bwin~"), (t_newmethod)window_new, (t_method)window_free, sizeof(t_window), 0, A_DEFSYMBOL, A_NULL); CLASS_MAINSIGNALIN(window_class, t_window, x_f); class_addmethod(window_class, (t_method)window_dsp, gensym("dsp"), A_NULL); class_addmethod(window_class, (t_method)window_type, gensym("type"), A_SYMBOL, A_DEFFLOAT, A_NULL); } creb-0.9.2+darcs20151027/modules/ramp~.c0000644000000000000000000000500112613674326015514 0ustar0000000000000000/* * ramp.c - retriggerable counter for dsp signals * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include typedef struct rampctl { t_float c_offset; t_int c_blockscale; } t_rampctl; typedef struct ramp { t_object x_obj; t_float x_f; t_rampctl x_ctl; } t_ramp; void ramp_offset(t_ramp *x, t_floatarg f) { x->x_ctl.c_offset = f; } void ramp_bang(t_ramp *x) { ramp_offset(x, 0); } static t_int *ramp_perform(t_int *w) { t_float *out = (t_float *)(w[3]); t_rampctl *ctl = (t_rampctl *)(w[1]); t_int i; t_int n = (t_int)(w[2]); t_float x; t_float scale = ctl->c_blockscale ? 1.0 / (t_float)n : 1.0; x = ctl->c_offset; for (i = 0; i < n; i++) { *out++ = ((t_float)x++) * scale; } ctl->c_offset = x; /* save state */ return (w+4); } static void ramp_dsp(t_ramp *x, t_signal **sp) { dsp_add(ramp_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec); } void ramp_free(void) { } t_class *ramp_class; void *ramp_new(void) { t_ramp *x = (t_ramp *)pd_new(ramp_class); outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_blockscale = 0; ramp_bang(x); return (void *)x; } void *blockramp_new(void) { t_ramp *x = (t_ramp *)ramp_new(); x->x_ctl.c_blockscale = 1; return (void *)x; } void ramp_tilde_setup(void) { //post("ramp~ v0.1"); ramp_class = class_new(gensym("ramp~"), (t_newmethod)ramp_new, (t_method)ramp_free, sizeof(t_ramp), 0, 0); class_addcreator((t_newmethod)blockramp_new, gensym("blockramp~"), A_NULL); class_addmethod(ramp_class, (t_method)ramp_bang, gensym("bang"), 0); class_addmethod(ramp_class, (t_method)ramp_dsp, gensym("dsp"), 0); class_addfloat(ramp_class, (t_method)ramp_offset); } creb-0.9.2+darcs20151027/modules/junction~.c0000644000000000000000000001066712613674326016424 0ustar0000000000000000/* * junction.c - computes a lossless circulant junction * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include typedef struct junctionctl { t_int c_channels; t_float **c_in; t_float **c_out; t_float *c_buffer; t_float *c_coef; t_float c_norm; } t_junctionctl; typedef struct junction { t_object x_obj; t_float x_f; t_junctionctl x_ctl; } t_junction; void junction_bang(t_junction *x) { int i, n = x->x_ctl.c_channels; t_float *coef = x->x_ctl.c_coef; t_float r; for (i=1; ic_channels; t_float **in = ctl->c_in; t_float **out = ctl->c_out; t_float *buf = ctl->c_buffer; t_float *coef = ctl->c_coef; t_float norm = ctl->c_norm; for (i=0;ix_ctl.c_channels; t_float norm; for (i=0;ix_ctl.c_in[i] = sp[i]->s_vec; x->x_ctl.c_out[i] = sp[i+c]->s_vec; } norm = c; norm = 1. / (norm); x->x_ctl.c_norm = norm; dsp_add(junction_perform, 2, &x->x_ctl, sp[0]->s_n); /* dsp_add(junction_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec);*/ } void junction_free(t_junction *x) { if (x->x_ctl.c_in) free (x->x_ctl.c_in); if (x->x_ctl.c_out) free (x->x_ctl.c_out); if (x->x_ctl.c_buffer) free (x->x_ctl.c_buffer); if (x->x_ctl.c_coef) free (x->x_ctl.c_coef); } t_class *junction_class; void *junction_new(t_floatarg channels) { int l = ilog2(channels); int i,n; t_junction *x = (t_junction *)pd_new(junction_class); if (l<2) l = 2; if (l>4) l = 4; n=1; while (l--) n *= 2; for (i=1;ix_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); for (i=0;ix_obj, gensym("signal")); x->x_ctl.c_in = (t_float **)malloc(n*sizeof(t_float *)); x->x_ctl.c_out = (t_float **)malloc(n*sizeof(t_float *)); x->x_ctl.c_buffer = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_coef = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_channels = n; junction_bang(x); return (void *)x; } void junction_tilde_setup(void) { //post("junction~ v0.1"); junction_class = class_new(gensym("junction~"), (t_newmethod)junction_new, (t_method)junction_free, sizeof(t_junction), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(junction_class, t_junction, x_f); class_addmethod(junction_class, (t_method)junction_bang, gensym("bang"), 0); class_addmethod(junction_class, (t_method)junction_random, gensym("random"), A_FLOAT, 0); class_addmethod(junction_class, (t_method)junction_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/dynwav~.c0000644000000000000000000001601712613674326016076 0ustar0000000000000000/* * dynwav~.c - dynamic wavetable oscillators * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define MAXORDER 1024 typedef struct dynwavctl { t_float *c_buf1; /* current */ t_float *c_buf2; /* old */ t_int c_order; } t_dynwavctl; typedef struct dynwav { t_object x_obj; t_float x_f; t_dynwavctl x_ctl; } t_dynwav; static t_int *dynwav_perform(t_int *w) { t_float *wave = (t_float *)(w[3]); t_float *freq = (t_float *)(w[4]); t_float *out = (t_float *)(w[5]); t_dynwavctl *ctl = (t_dynwavctl *)(w[1]); t_int n = (t_int)(w[2]); t_float *buf, *dbuf, *swap; int i; int mask = n-1; /* swap buffer pointers */ swap = ctl->c_buf1; /* this is the last one stored */ buf = ctl->c_buf1 = ctl->c_buf2; /* put oldest in newest to overwrite */ dbuf = ctl->c_buf2 = swap; /* put last one in oldest */ if (buf && dbuf) { /* store input wavetable in buffer */ memcpy(buf, wave, n*sizeof(t_float)); for (i = 0; i < n; i++) { t_float findex = *freq++ * (t_float)n; int index = findex; t_float frac, a, b, c, d, cminusb, q, r; int ia, ib, ic, id; frac = findex - index; ia = (index-1) & mask; ib = (index ) & mask; ic = (index+1) & mask; id = (index+2) & mask; q = i+1; q /= n; r = n-1-i; r /= n; /* get 4 points, wrap index */ a = q * buf[ia] + r * dbuf[ia]; b = q * buf[ib] + r * dbuf[ib]; c = q * buf[ic] + r * dbuf[ic]; d = q * buf[id] + r * dbuf[id]; cminusb = c-b; *out++ = b + frac * (cminusb - 0.5f * (frac-1.) * ((a - d + 3.0f * cminusb) * frac + (b - a - cminusb))); } } return (w+6); } static t_int *dynwav_perform_8point(t_int *w) /* FIXME: i thought this was broken. */ { t_float *wave = (t_float *)(w[3]); t_float *freq = (t_float *)(w[4]); t_float *out = (t_float *)(w[5]); t_dynwavctl *ctl = (t_dynwavctl *)(w[1]); t_int n = (t_int)(w[2]); t_float *buf, *dbuf, *swap; int i; int mask = n-1; /* swap buffer pointers */ swap = ctl->c_buf1; /* this is the last one stored */ buf = ctl->c_buf1 = ctl->c_buf2; /* put oldest in newest to overwrite */ dbuf = ctl->c_buf2 = swap; /* put last one in oldest */ if (buf && dbuf) { /* const t_float N1 = 1 / ( 2 * (1-(1/9)) * (1-(1/25)) * (1-(1/49)) ); ** const t_float N2 = 1 / ( (1-(9)) * 2 * (1-(9/25)) * (1-(9/49)) ); ** const t_float N3 = 1 / ( (1-(25)) * (1-(25/9)) * 2 * (1-(25/49)) ); ** const t_float N4 = 1 / ( (1-(49)) * (1-(49/9)) * (1-(49/25)) * 2 ); */ const t_float N1 = 0.59814453125; const t_float N2 = -0.11962890625; const t_float N3 = 0.02392578125; const t_float N4 = -0.00244140625; /* store input wavetable in buffer */ memcpy(buf, wave, n*sizeof(t_float)); for (i = 0; i < n; i++) { t_float findex = *freq++ * (t_float)n; int index = findex; t_float frac, q, r, fm, fp, fe, fo; t_float x1, x2, x3, x4; t_float g1, g2, g3, g4; t_float gg, g2g3g4, g1g3g4, g1g2g4, g1g2g3; t_float acc; int im, ip; frac = 2 *(findex - index) - 1; x1 = frac; x2 = frac/3; x3 = frac/5; x4 = frac/7; g1 = 1 - x1*x1; g2 = 1 - x2*x2; g3 = 1 - x3*x3; g4 = 1 - x4*x4; gg = g3 * g4; g2g3g4 = g2 * gg; /* 1 */ g1g3g4 = g1 * gg; /* 2 */ gg = g1 * g2; g1g2g4 = g4 * gg; /* 3 */ g1g2g3 = g3 * gg; /* 4 */ /* triangle interpolation between current and past wavetable*/ q = i+1; q /= n; r = n-1-i; r /= n; /* 1, -1*/ im = (index ) & mask; ip = (index+1) & mask; fm = q * buf[im] + r * dbuf[im]; fp = q * buf[ip] + r * dbuf[ip]; fe = fp + fm; fo = fp - fm; acc = N1 * g2g3g4 * (fe + x1*fo); /* 2, -2 */ im = (index-1) & mask; ip = (index+2) & mask; fm = q * buf[im] + r * dbuf[im]; fp = q * buf[ip] + r * dbuf[ip]; fe = fp + fm; fo = fp - fm; acc += N2 * g1g3g4 * (fe + x2*fo); /* 3, -3 */ im = (index-2) & mask; ip = (index+3) & mask; fm = q * buf[im] + r * dbuf[im]; fp = q * buf[ip] + r * dbuf[ip]; fe = fp + fm; fo = fp - fm; acc += N3 * g1g2g4 * (fe + x3*fo); /* 4, -4 */ im = (index-3) & mask; ip = (index+4) & mask; fm = q * buf[im] + r * dbuf[im]; fp = q * buf[ip] + r * dbuf[ip]; fe = fp + fm; fo = fp - fm; acc += N4 * g1g2g3 * (fe + x4*fo); *out++ = acc; } } return (w+6); } static void dynwav_dsp(t_dynwav *x, t_signal **sp) { int n = sp[0]->s_n; int k; if (x->x_ctl.c_order != n) { if (x->x_ctl.c_buf1) free (x->x_ctl.c_buf1); if (x->x_ctl.c_buf2) free (x->x_ctl.c_buf2); x->x_ctl.c_buf1 = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_buf2 = (t_float *)malloc(n*sizeof(t_float)); for(k=0; kx_ctl.c_buf1[k] = 0; x->x_ctl.c_buf2[k] = 0; } x->x_ctl.c_order = n; } dsp_add(dynwav_perform_8point, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); } static void dynwav_free(t_dynwav *x) { if (x->x_ctl.c_buf1) free (x->x_ctl.c_buf1); if (x->x_ctl.c_buf2) free (x->x_ctl.c_buf2); } t_class *dynwav_class; static void *dynwav_new(t_floatarg order) { t_dynwav *x = (t_dynwav *)pd_new(dynwav_class); int iorder = (int)order; int i, n=64, k; /* in 2 */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); /* out 1 */ outlet_new(&x->x_obj, gensym("signal")); /* init data */ x->x_ctl.c_buf1 = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_buf2 = (t_float *)malloc(n*sizeof(t_float)); for(k=0; kx_ctl.c_buf1[k] = 0; x->x_ctl.c_buf2[k] = 0; } x->x_ctl.c_order = n; return (void *)x; } void dynwav_tilde_setup(void) { //post("dynwav~ v0.1"); dynwav_class = class_new(gensym("dynwav~"), (t_newmethod)dynwav_new, (t_method)dynwav_free, sizeof(t_dynwav), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(dynwav_class, t_dynwav, x_f); class_addmethod(dynwav_class, (t_method)dynwav_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/Makefile0000644000000000000000000000071012613674326015655 0ustar0000000000000000include ../Makefile.config current: ead~.o ear~.o eadsr~.o dist~.o \ tabreadmix~.o xfm~.o qmult~.o qnorm~.o \ cheby~.o abs~.o ramp~.o \ bfft~.o dynwav~.o statwav~.o bdiag~.o \ diag~.o matrix~.o permut~.o lattice~.o ratio.o ffpoly.o fwarp.o \ junction~.o fdn~.o bwin~.o eblosc~.o bitsplit~.o sbosc~.o \ blocknorm~.o resofilt~.o scrollgrid1D~.o \ \ dwt.o cmath.o \ sawtooth~.o \ \ dt_ms.o \ setup.o clean: rm -f *.o rm -f *~ creb-0.9.2+darcs20151027/modules/abs~.c0000644000000000000000000000211212613674326015322 0ustar0000000000000000 // since this is present in a lot of libs, it is conditionally compiled #ifdef HAVE_ABS_TILDE #include "m_pd.h" #include /* ------------------------- abs~ -------------------------- */ static t_class *abs_class; typedef struct _abs { t_object x_obj; } t_abs; static t_int *abs_perform(t_int *w) { t_abs *x = (t_abs *)(w[1]); t_sample *in = (t_sample *)(w[2]); t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); while (n--) { t_sample f = *in++; if (f < 0) f = -f; *out++ = f; } return (w+5); } static void abs_dsp(t_abs *x, t_signal **sp) { dsp_add(abs_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void *abs_new(void) { t_abs *x = (t_abs *)pd_new(abs_class); outlet_new(&x->x_obj, &s_signal); return (x); } void abs_tilde_setup(void) { abs_class = class_new(gensym("abs~"), (t_newmethod)abs_new, 0, sizeof(t_abs), 0, A_NULL); class_addmethod(abs_class, (t_method)nullfn, &s_signal, A_NULL); class_addmethod(abs_class, (t_method)abs_dsp, gensym("dsp"), A_NULL); } #endif creb-0.9.2+darcs20151027/modules/bfft~.c0000644000000000000000000001433112613674326015504 0ustar0000000000000000/* * bfft.c - Code for some fourrier transform variants and utility * functions. Data organization is in (real, imag) pairs the first 2 * components are (DC, NY) * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #define MAXORDER 64 typedef struct bfftctl { t_int c_levels; char c_name[16]; t_int *c_clutter; t_int *c_unclutter; t_int c_kill_DC; t_int c_kill_NY; } t_bfftctl; typedef struct bfft { t_object x_obj; t_float x_f; t_bfftctl x_ctl; } t_bfft; t_class *bfft_class, *ibfft_class, *fht_class; static inline void bfft_perform_permutation(t_float *S, int n, t_int *f) { t_int k,l; t_float swap; for(k=0; kx_ctl; int i; if (ctl->c_clutter) free(ctl->c_clutter); if (ctl->c_unclutter) free(ctl->c_unclutter); ctl->c_clutter = (t_int *)malloc(n*sizeof(t_int)); ctl->c_unclutter = (t_int *)malloc(n*sizeof(t_int)); ctl->c_unclutter[0] = 0; ctl->c_unclutter[1] = n/2; for (i=1; ic_unclutter[2*i] = i; ctl->c_unclutter[2*i+1] = n-i; } for(i=0; ic_clutter[ctl->c_unclutter[i]] = i; return; /* debug */ /* for(k=0; kc_clutter[k]); ** for(k=0; kc_unclutter[k]); ** ** exit(1); */ } static t_int *bfft_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bfftctl *ctl = (t_bfftctl *)(w[1]); t_int n = (t_int)(w[2]); t_float scale = sqrt(1.0f / (t_float)(n)); mayer_fht(out, n); bfft_perform_permutation(out, n, ctl->c_unclutter); while (n--) *out++ *= scale; return (w+5); } static t_int *ibfft_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bfftctl *ctl = (t_bfftctl *)(w[1]); t_int n = (t_int)(w[2]); t_float scale = sqrt(1.0f / (t_float)(n)); if (ctl->c_kill_DC) {out[0] = 0.0f;} if (ctl->c_kill_NY) {out[1] = 0.0f;} bfft_perform_permutation(out, n, ctl->c_clutter); mayer_fht(out, n); while (n--) *out++ *= scale; return (w+5); } static t_int *fht_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bfftctl *ctl = (t_bfftctl *)(w[1]); t_int n = (t_int)(w[2]); mayer_fht(out, n); return (w+5); } static void bfft_dsp(t_bfft *x, t_signal **sp) { int n = sp[0]->s_n; t_float *in = sp[0]->s_vec; t_float *out = sp[1]->s_vec; bfft_permutation(x, n); if (in != out) { dsp_add_copy(in,out,n); in = out; } dsp_add(bfft_perform, 4, &x->x_ctl, n, in, out); } static void ibfft_dsp(t_bfft *x, t_signal **sp) { int n = sp[0]->s_n; t_float *in = sp[0]->s_vec; t_float *out = sp[1]->s_vec; bfft_permutation(x, n); if (in != out) { dsp_add_copy(in,out,n); in = out; } dsp_add(ibfft_perform, 4, &x->x_ctl, n, in, out); } static void fht_dsp(t_bfft *x, t_signal **sp) { int n = sp[0]->s_n; t_float *in = sp[0]->s_vec; t_float *out = sp[1]->s_vec; if (in != out) { dsp_add_copy(in,out,n); in = out; } dsp_add(fht_perform, 4, &x->x_ctl, n, in, out); } static void bfft_free(t_bfft *x) { if (x->x_ctl.c_clutter) free(x->x_ctl.c_clutter); if (x->x_ctl.c_unclutter) free(x->x_ctl.c_unclutter); } static void *bfft_new(void) { t_bfft *x = (t_bfft *)pd_new(bfft_class); int i; outlet_new(&x->x_obj, gensym("signal")); sprintf(x->x_ctl.c_name,"bfft"); x->x_ctl.c_clutter = NULL; x->x_ctl.c_unclutter = NULL; return (void *)x; } static void *ibfft_new(t_symbol *s) { t_bfft *x = (t_bfft *)pd_new(ibfft_class); int i; outlet_new(&x->x_obj, gensym("signal")); if (s == gensym("killDCNY")){ x->x_ctl.c_kill_DC = 1; x->x_ctl.c_kill_NY = 1; post("ibfft: removing DC and NY components."); } else{ x->x_ctl.c_kill_DC = 0; x->x_ctl.c_kill_NY = 0; } x->x_ctl.c_clutter = NULL; x->x_ctl.c_unclutter = NULL; sprintf(x->x_ctl.c_name,"ibfft"); return (void *)x; } static void *fht_new(void) { t_bfft *x = (t_bfft *)pd_new(fht_class); int i; outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_clutter = NULL; x->x_ctl.c_unclutter = NULL; sprintf(x->x_ctl.c_name,"fht"); return (void *)x; } void bfft_tilde_setup(void) { //post("bfft~ v0.1"); bfft_class = class_new(gensym("bfft~"), (t_newmethod)bfft_new, (t_method)bfft_free, sizeof(t_bfft), 0, 0); CLASS_MAINSIGNALIN(bfft_class, t_bfft, x_f); class_addmethod(bfft_class, (t_method)bfft_dsp, gensym("dsp"), 0); ibfft_class = class_new(gensym("ibfft~"), (t_newmethod)ibfft_new, (t_method)bfft_free, sizeof(t_bfft), 0, A_DEFSYMBOL, A_NULL); /* add the more logical bifft~ alias */ class_addcreator((t_newmethod)ibfft_new, gensym("bifft~"), 0, A_DEFSYMBOL, A_NULL); CLASS_MAINSIGNALIN(ibfft_class, t_bfft, x_f); class_addmethod(ibfft_class, (t_method)ibfft_dsp, gensym("dsp"), 0); fht_class = class_new(gensym("fht~"), (t_newmethod)fht_new, (t_method)bfft_free, sizeof(t_bfft), 0, 0); CLASS_MAINSIGNALIN(fht_class, t_bfft, x_f); class_addmethod(fht_class, (t_method)fht_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/sbosc~.c0000644000000000000000000001142712613674326015677 0ustar0000000000000000/* * sbosc.c - smallband oscillator. periodic, linear interpolated * frequency center. * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define LOGTABSIZE 10 #define TABSIZE (1<> SHIFTTABSIZE; t_float f2 = (t & MASKFRACTABSIZE) * INVFRACTABSIZE; unsigned int i2 = (i1+1) & MASKTABSIZE; unsigned int i3 = (i1 - (TABSIZE>>2)) & MASKTABSIZE; unsigned int i4 = (i2 + 1 - (TABSIZE>>2)) & MASKTABSIZE; t_float f1 = 1.0 - f2; t_float a1 = f1 * costable[i1]; t_float a2 = f2 * costable[i2]; t_float b1 = f1 * costable[i3]; t_float b2 = f2 * costable[i4]; *real = a1 + a2; *imag = b1 + b2; } static t_class *sbosc_tilde_class; typedef struct _sbosc_tilde { t_object x_obj; t_float x_f; /* state vars */ unsigned int x_phase; // phase of main pitch osc unsigned int x_phase_inc; // frequency of main pitch osc unsigned int x_harmonic; // first harmonic t_float x_frac; // fraction of first harmonic } t_sbosc_tilde; static void *sbosc_tilde_new(void) { t_sbosc_tilde *x = (t_sbosc_tilde *)pd_new(sbosc_tilde_class); x->x_phase = 0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("phase")); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *sbosc_tilde_perform(t_int *w) { t_sbosc_tilde *x = (t_sbosc_tilde *)(w[1]); t_float *pitch = (t_float *)(w[2]); t_float *center= (t_float *)(w[3]); t_float *out_real = (t_float *)(w[4]); t_float *out_imag = (t_float *)(w[5]); int n = (int)(w[6]); int i; t_float pitch_to_phase = 4294967295.0 / sys_getsr(); for (i = 0; i < n; i++) { t_float p = *pitch++; t_float c = *center++; t_float r1,r2,i1,i2; /* compute harmonic mixture */ unsigned int h1 = x->x_phase * x->x_harmonic; unsigned int h2 = h1 + x->x_phase; _exp_j2pi(h1, &r1, &i1); _exp_j2pi(h2, &r2, &i2); r1 *= x->x_frac; i1 *= x->x_frac; r2 *= 1.0 - x->x_frac; i2 *= 1.0 - x->x_frac; *out_real++ = r1 + r2; *out_imag++ = i1 + i2; x->x_phase += x->x_phase_inc; /* check for phase wrap & update osc */ if ((x->x_phase <= x->x_phase_inc)) { t_float p_plus = (p < 0.0) ? -p : p; t_float p_limit = (p_plus < PITCHLIMIT) ? PITCHLIMIT : p_plus; t_float c_plus = (c < 0.0) ? -c : c; t_float harmonic = c_plus/p_limit; x->x_phase_inc = pitch_to_phase * p_limit; x->x_harmonic = harmonic; x->x_frac = 1.0 - (harmonic - x->x_harmonic); } } return (w+7); } static void sbosc_tilde_dsp(t_sbosc_tilde *x, t_signal **sp) { dsp_add(sbosc_tilde_perform, 6, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[0]->s_n); } static void sbosc_tilde_free(t_sbosc_tilde *x) { } static void sbosc_tilde_phase(t_sbosc_tilde *x, t_floatarg f) { x->x_phase = f * (1.0 / 4294967295.0); } void sbosc_tilde_setup(void) { int i; // init tables for (i=0; i #include #define MAXORDER 64 typedef struct diagctl { t_float *c_state; t_float *c_eigen; t_int c_order; } t_diagctl; typedef struct diag { t_object x_obj; t_float x_f; t_diagctl x_ctl; } t_diag; static t_float randfloat(void){ t_float r = rand (); r /= (RAND_MAX/2); r -= 1; return r; } static void diag_eigen(t_diag *x, t_floatarg index, t_floatarg val) { int i = (int)index; if (i<0) return; if (i>=x->x_ctl.c_order) return; x->x_ctl.c_eigen[i] = val; } /* set decay time of pole at index */ static void diag_time(t_diag *x, t_floatarg index, t_floatarg time) { t_float r; /* time in ms */ time *= 0.001; if (time < 0.0) time = 0.0; r = pow(0.001, (t_float)x->x_ctl.c_order / (time * sys_getsr())); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; diag_eigen(x, index, r); } static void diag_reset(t_diag *x) { int i; for (i=0; ix_ctl.c_order; i++) { x->x_ctl.c_state[i] = 0; } } static void diag_random(t_diag *x) { int i; for (i=0; ix_ctl.c_order; i++) { x->x_ctl.c_state[i] = randfloat(); } } static t_int *diag_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_diagctl *ctl = (t_diagctl *)(w[1]); t_float *eigen = ctl->c_eigen; t_float *state = ctl->c_state; t_int n = (t_int)(w[2]); t_float newstate; int i; for (i=0; is_n; int i; if (x->x_ctl.c_order != n) { if (x->x_ctl.c_state) free(x->x_ctl.c_state); if (x->x_ctl.c_eigen) free(x->x_ctl.c_eigen); x->x_ctl.c_state = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_eigen = (t_float *)malloc(n*sizeof(t_float)); for(i=0;ix_ctl.c_state[i] = 0; x->x_ctl.c_eigen[i] = 0; } x->x_ctl.c_order = n; } dsp_add(diag_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } static void diag_free(t_diag *x) { if (x->x_ctl.c_state) free(x->x_ctl.c_state); if (x->x_ctl.c_eigen) free(x->x_ctl.c_eigen); } t_class *diag_class; static void *diag_new(t_floatarg permute) { t_diag *x = (t_diag *)pd_new(diag_class); int i, n=64; outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_state = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_eigen = (t_float *)malloc(n*sizeof(t_float)); for(i=0;ix_ctl.c_state[i] = 0; x->x_ctl.c_eigen[i] = 0; } x->x_ctl.c_order = n; return (void *)x; } void diag_tilde_setup(void) { //post("diag~ v0.1"); diag_class = class_new(gensym("diag~"), (t_newmethod)diag_new, (t_method)diag_free, sizeof(t_diag), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(diag_class, t_diag, x_f); class_addmethod(diag_class, (t_method)diag_dsp, gensym("dsp"), 0); class_addmethod(diag_class, (t_method)diag_reset, gensym("reset"), 0); class_addmethod(diag_class, (t_method)diag_random, gensym("random"), 0); class_addmethod(diag_class, (t_method)diag_random, gensym("bang"), 0); class_addmethod(diag_class, (t_method)diag_eigen, gensym("eigen"), A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(diag_class, (t_method)diag_time, gensym("time"), A_DEFFLOAT, A_DEFFLOAT, 0); } creb-0.9.2+darcs20151027/modules/dwt.c0000644000000000000000000004654212613674326015174 0ustar0000000000000000/* * dwt.c - code for discrete wavelet transform * (symmetric interpolating biorthogonal wavelets using the lifting transform) * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define MAXORDER 64 typedef enum{DWT,IDWT,DWT16,IDWT16} t_dwttype; typedef struct dwtctl { t_float c_update[MAXORDER]; t_float c_predict[MAXORDER]; t_int c_nupdate; t_int c_npredict; t_int c_levels; t_int c_fakein; t_float c_fakeval; t_int c_mask; char c_name[16]; t_int *c_clutter; t_int *c_unclutter; t_int c_permute; t_dwttype c_type; } t_dwtctl; typedef struct dwt { t_object x_obj; t_float x_f; t_dwtctl x_ctl; } t_dwt; static void dwt_even(t_dwt *x, t_floatarg f) { int k = (int)f; int i, j; float *p = x->x_ctl.c_predict; float *u = x->x_ctl.c_update; float l, xi, xj; if ((k>0) && (kx_ctl.c_npredict = 2*k; x->x_ctl.c_nupdate = 2*k; } } static void dwt_wavelet(t_dwt *x, t_floatarg f) { int k = (int)f; t_float *p = x->x_ctl.c_predict; t_float *u = x->x_ctl.c_update; t_int *np = &x->x_ctl.c_npredict; t_int *nu = &x->x_ctl.c_nupdate; switch(k) { default: case 1: /* haar */ *np = *nu = 2; /* actual order is one */ p[0] = 1; p[1] = 0; u[0] = 0; u[1] = .5; break; case 2: /* hat */ case 3: *np = *nu = 2; p[0] = .5; p[1] = .5; u[0] = .25; u[1] = .25; break; case 4: /* N = 4, N~ = 4 */ case 5: *np = *nu = 4; p[0] = -0.0625; p[1] = 0.5625; p[2] = 0.5625; p[3] = -0.0625; u[0] = -0.03125; u[1] = 0.28125; u[2] = 0.28125; u[3] = -0.03125; break; case 6: case 7: *np = *nu = 6; p[0] = 0.01171875000000; p[1] = -0.09765625000000; p[2] = 0.58593750000000; p[3] = 0.58593750000000; p[4] = -0.09765625000000; p[5] = 0.01171875000000; u[0] = 0.00585937500000; u[1] = -0.04882812500000; u[2] = 0.29296875000000; u[3] = 0.29296875000000; u[4] = -0.04882812500000; u[5] = 0.00585937500000; break; } } static inline void dwt_perform_permutation(t_float *S, int n, t_int *f) { t_int k,l; t_float swap; for(k=0; kx_ctl; t_int k, L=0, l, start, power; t_int nsave = n; while(nsave>>=1) L++; if (ctl->c_clutter) free(ctl->c_clutter); if (ctl->c_unclutter) free(ctl->c_unclutter); ctl->c_clutter = (t_int *)malloc(n*sizeof(t_int)); ctl->c_unclutter = (t_int *)malloc(n*sizeof(t_int)); for(l = L, start = n/2, power=1; l>0; l--, start /=2, power *=2) { for(k=0; kc_unclutter[start+k] = (1 + 2*k) * power; } } ctl->c_unclutter[0] = 0; for(k=0; kc_clutter[ctl->c_unclutter[k]] = k; return; /* debug */ for(k=0; kc_clutter[k]); for(k=0; kc_unclutter[k]); exit(1); } static void idwt_coef(t_dwt *x, t_floatarg index, t_floatarg value) { x->x_ctl.c_fakein = (int)index; x->x_ctl.c_fakeval = value; } static void dwt_print(t_dwt *x) { int i; printf("%s: predict: [ ", x->x_ctl.c_name); for (i=0; ix_ctl.c_npredict; i++) printf("%f ", x->x_ctl.c_predict[i]); printf("], "); printf("update: [ "); for (i=0; ix_ctl.c_nupdate; i++) printf("%f ", x->x_ctl.c_update[i]); printf("]\n"); } static void dwt_filter(t_dwt *x, t_symbol *s, int argc, t_atom *argv) { int invalid_argument = 0; int i; char *name = x->x_ctl.c_name; float *pfilter = x->x_ctl.c_predict; float *ufilter = x->x_ctl.c_update; float *mask = NULL; t_int *length = NULL; float sum = 0; if (s == gensym("predict")) { mask = pfilter; length = &(x->x_ctl.c_npredict); } else if (s == gensym("update")) { mask = ufilter; length = &(x->x_ctl.c_nupdate); } else if (s == gensym("mask")) { mask = NULL; } else { return; } if (argc >= MAXORDER) post("%s: error, maximum order exceeded.",name); else if ((x->x_ctl.c_type == DWT16 || x->x_ctl.c_type == IDWT16 ) && (argc != 16)) post("%s: error, need to have 16 coefficients.",name); else if (argc == 0) post("%s: no arguments given.",name); else if (argc & 1) post("%s: error, only an even number of coefficients is allowed.", name); else { for (i=0; ix_ctl.c_npredict = argc; x->x_ctl.c_nupdate = argc; } } } } static inline void dwtloop(float *vector, int source, int dest, int increment, int backup, int numcoef, int mask, float *filter, int filtlength, float sign) { int k,m; float acc; for (k = 0; k < numcoef; k++) { acc = 0; for (m = 0; m < filtlength; m++) { acc += filter[m] * vector[source]; source += increment; source &= mask; } vector[dest] += sign * acc; dest += increment; source -= backup; source &= mask; } } static inline void dwtloop16(float *vector, int source, int dest, int increment, int backup, int numcoef, int mask, float *filter, int filtlength, /* ignored, set to 16 */ float sign) { int k,m; float acc; for (k = 0; k < numcoef; k++) { acc = 0; acc += filter[0] * vector[source]; source += increment; source &= mask; acc += filter[1] * vector[source]; source += increment; source &= mask; acc += filter[2] * vector[source]; source += increment; source &= mask; acc += filter[3] * vector[source]; source += increment; source &= mask; acc += filter[4] * vector[source]; source += increment; source &= mask; acc += filter[5] * vector[source]; source += increment; source &= mask; acc += filter[6] * vector[source]; source += increment; source &= mask; acc += filter[7] * vector[source]; source += increment; source &= mask; acc += filter[8] * vector[source]; source += increment; source &= mask; acc += filter[9] * vector[source]; source += increment; source &= mask; acc += filter[10] * vector[source]; source += increment; source &= mask; acc += filter[11] * vector[source]; source += increment; source &= mask; acc += filter[12] * vector[source]; source += increment; source &= mask; acc += filter[13] * vector[source]; source += increment; source &= mask; acc += filter[14] * vector[source]; source += increment; source &= mask; acc += filter[15] * vector[source]; source += increment; source &= mask; vector[dest] += sign * acc; dest += increment; source -= backup; source &= mask; } } static t_int *dwt_perform(t_int *w) { t_float *in = (float *)(w[3]); t_float *out = (float *)(w[4]); t_dwtctl *ctl = (t_dwtctl *)(w[1]); t_int n = (t_int)(w[2]); int i; int numcoef = n/2; /* int source_u = ((1 - ctl->c_nupdate)/2 - 1); * int source_p = ((1 - ctl->c_npredict)/2); */ int source_u = ((2 - ctl->c_nupdate) - 1); int source_p = ((2 - ctl->c_npredict)); int increment = 2; int dest = 1; int backup_u = (ctl->c_nupdate-1)*2; int backup_p = (ctl->c_npredict-1)*2; /* copy input to output */ if (in != out) for (i=0; ic_levels; i++){ /* foreward predict */ dwtloop(out, (source_p & (n-1)), dest, increment, backup_p, numcoef, n-1, ctl->c_predict, ctl->c_npredict, -1); /* foreward update */ dwtloop(out, (source_u & (n-1)), 0, increment, backup_u, numcoef, n-1, ctl->c_update, ctl->c_nupdate, +1); /* update control parameters */ numcoef /= 2; source_p *= 2; source_u *= 2; backup_p *= 2; backup_u *= 2; increment *= 2; dest *= 2; } if (ctl->c_permute) dwt_perform_permutation(out, n, ctl->c_unclutter); return (w+5); } static t_int *idwt_perform(t_int *w) { t_float *in = (float *)(w[3]); t_float *out = (float *)(w[4]); t_dwtctl *ctl = (t_dwtctl *)(w[1]); t_int n = (t_int)(w[2]); int i; int numcoef = 1; int source_u = ((2 - ctl->c_nupdate) - 1) * (n/2); int source_p = ((2 - ctl->c_npredict)) * (n/2); int increment = n; int dest = n/2; int backup_u = (ctl->c_nupdate-1)*n; int backup_p = (ctl->c_npredict-1)*n; int fake_in = ctl->c_fakein; float fake_val = ctl->c_fakeval; /* copy input to output */ if (in != out) for (i=0; i= 0) && (fake_inc_permute) dwt_perform_permutation(out, n, ctl->c_clutter); /* backward transform */ /* iterate over all levels */ for (i=0; i < ctl->c_levels; i++){ /* backward update */ dwtloop(out, (source_u & (n-1)), 0, increment, backup_u, numcoef, n-1, ctl->c_update, ctl->c_nupdate, -1); /* backward predict */ dwtloop(out, (source_p & (n-1)), dest, increment, backup_p, numcoef, n-1, ctl->c_predict, ctl->c_npredict, +1); /* update control parameters */ numcoef *= 2; source_p /= 2; source_u /= 2; backup_p /= 2; backup_u /= 2; increment /= 2; dest /= 2; } return (w+5); } static t_int *dwt16_perform(t_int *w) { t_float *in = (float *)(w[3]); t_float *out = (float *)(w[4]); t_dwtctl *ctl = (t_dwtctl *)(w[1]); t_int n = (t_int)(w[2]); int i; int numcoef = n/2; /* int source_u = ((1 - ctl->c_nupdate)/2 - 1); * int source_p = ((1 - ctl->c_npredict)/2); */ int source_u = ((2 - ctl->c_nupdate) - 1); int source_p = ((2 - ctl->c_npredict)); int increment = 2; int dest = 1; int backup_u = (ctl->c_nupdate-1)*2; int backup_p = (ctl->c_npredict-1)*2; /* copy input to output */ if (in != out) for (i=0; ic_levels; i++){ /* foreward predict */ dwtloop16(out, (source_p & (n-1)), dest, increment, backup_p, numcoef, n-1, ctl->c_predict, 16, -1); /* foreward update */ dwtloop16(out, (source_u & (n-1)), 0, increment, backup_u, numcoef, n-1, ctl->c_update, 16, +1); /* update control parameters */ numcoef /= 2; source_p *= 2; source_u *= 2; backup_p *= 2; backup_u *= 2; increment *= 2; dest *= 2; } if (ctl->c_permute) dwt_perform_permutation(out, n, ctl->c_unclutter); return (w+5); } static t_int *idwt16_perform(t_int *w) { t_float *in = (float *)(w[3]); t_float *out = (float *)(w[4]); t_dwtctl *ctl = (t_dwtctl *)(w[1]); t_int n = (t_int)(w[2]); int i; int numcoef = 1; int source_u = ((2 - ctl->c_nupdate) - 1) * (n/2); int source_p = ((2 - ctl->c_npredict)) * (n/2); int increment = n; int dest = n/2; int backup_u = (ctl->c_nupdate-1)*n; int backup_p = (ctl->c_npredict-1)*n; int fake_in = ctl->c_fakein; float fake_val = ctl->c_fakeval; /* copy input to output */ if (in != out) for (i=0; i= 0) && (fake_inc_permute) dwt_perform_permutation(out, n, ctl->c_clutter); /* backward transform */ /* iterate over all levels */ for (i=0; i < ctl->c_levels; i++){ /* backward update */ dwtloop16(out, (source_u & (n-1)), 0, increment, backup_u, numcoef, n-1, ctl->c_update, 16, -1); /* backward predict */ dwtloop16(out, (source_p & (n-1)), dest, increment, backup_p, numcoef, n-1, ctl->c_predict, 16, +1); /* update control parameters */ numcoef *= 2; source_p /= 2; source_u /= 2; backup_p /= 2; backup_u /= 2; increment /= 2; dest /= 2; } return (w+5); } static void dwt_dsp(t_dwt *x, t_signal **sp) { int n = sp[0]->s_n; int ln = 0; dwt_permutation(x, n); x->x_ctl.c_mask = n-1; while (n >>= 1) ln++; x->x_ctl.c_levels = ln; switch(x->x_ctl.c_type){ case DWT: dsp_add(dwt_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); break; case IDWT: dsp_add(idwt_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); break; case DWT16: dsp_add(dwt16_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); break; case IDWT16: dsp_add(idwt16_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); break; } } void dwt_free(t_dwt *x) { if (x->x_ctl.c_clutter) free(x->x_ctl.c_clutter); if (x->x_ctl.c_unclutter) free(x->x_ctl.c_unclutter); } t_class *dwt_class, *idwt_class, *dwt16_class, *idwt16_class; static void dwt_reset(t_dwt *x) { bzero(x->x_ctl.c_update, 16*sizeof(t_float)); bzero(x->x_ctl.c_predict, 16*sizeof(t_float)); x->x_ctl.c_update[7] = .25; x->x_ctl.c_update[8] = .25; x->x_ctl.c_nupdate = 16; x->x_ctl.c_predict[7] = .5; x->x_ctl.c_predict[8] = .5; x->x_ctl.c_npredict = 16; x->x_ctl.c_fakein = -1; x->x_ctl.c_fakeval = 0; } static void *dwt_new_common(t_floatarg permute) { t_dwt *x = (t_dwt *)pd_new(dwt_class); int i; outlet_new(&x->x_obj, gensym("signal")); /* init data */ dwt_reset(x); x->x_ctl.c_clutter = NULL; x->x_ctl.c_unclutter = NULL; x->x_ctl.c_permute = (t_int) permute; return (void *)x; } static void *dwt_new(t_floatarg permute) { t_dwt *x = dwt_new_common(permute); sprintf(x->x_ctl.c_name,"dwt"); x->x_ctl.c_type = DWT; return (void *)x; } static void *idwt_new(t_floatarg permute) { t_dwt *x = dwt_new_common(permute); sprintf(x->x_ctl.c_name,"idwt"); x->x_ctl.c_type = IDWT; return (void *)x; } static void *dwt16_new(t_floatarg permute) { t_dwt *x = dwt_new_common(permute); sprintf(x->x_ctl.c_name,"dwt16"); x->x_ctl.c_type = DWT16; return (void *)x; } static void *idwt16_new(t_floatarg permute) { t_dwt *x = dwt_new_common(permute); sprintf(x->x_ctl.c_name,"idwt16"); x->x_ctl.c_type = IDWT16; return (void *)x; } void dwt_tilde_setup(void) { //post("dwt~ v0.1"); dwt_class = class_new(gensym("dwt~"), (t_newmethod)dwt_new, (t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(dwt_class, t_dwt, x_f); class_addmethod(dwt_class, (t_method)dwt_print, gensym("print"), 0); class_addmethod(dwt_class, (t_method)dwt_reset, gensym("reset"), 0); class_addmethod(dwt_class, (t_method)dwt_dsp, gensym("dsp"), 0); class_addmethod(dwt_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); class_addmethod(dwt_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); class_addmethod(dwt_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); class_addmethod(dwt_class, (t_method)dwt_even, gensym("even"), A_DEFFLOAT, 0); class_addmethod(dwt_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); /*class_addmethod(dwt_class, (t_method)dwt_wavelet, gensym("wavelet"), A_DEFFLOAT, 0); */ idwt_class = class_new(gensym("idwt~"), (t_newmethod)idwt_new, (t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(idwt_class, t_dwt, x_f); class_addmethod(idwt_class, (t_method)dwt_print, gensym("print"), 0); class_addmethod(idwt_class, (t_method)dwt_dsp, gensym("dsp"), 0); class_addmethod(idwt_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); class_addmethod(idwt_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); class_addmethod(idwt_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); class_addmethod(idwt_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(idwt_class, (t_method)dwt_even, gensym("even"), A_DEFFLOAT, 0); dwt16_class = class_new(gensym("dwt16~"), (t_newmethod)dwt16_new, (t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(dwt16_class, t_dwt, x_f); class_addmethod(dwt16_class, (t_method)dwt_print, gensym("print"), 0); class_addmethod(dwt16_class, (t_method)dwt_reset, gensym("reset"), 0); class_addmethod(dwt16_class, (t_method)dwt_dsp, gensym("dsp"), 0); class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); class_addmethod(dwt16_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); idwt16_class = class_new(gensym("idwt16~"), (t_newmethod)idwt16_new, (t_method)dwt_free, sizeof(t_dwt), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(idwt16_class, t_dwt, x_f); class_addmethod(idwt16_class, (t_method)dwt_print, gensym("print"), 0); class_addmethod(idwt16_class, (t_method)dwt_dsp, gensym("dsp"), 0); class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("predict"), A_GIMME, 0); class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("update"), A_GIMME, 0); class_addmethod(idwt16_class, (t_method)dwt_filter, gensym("mask"), A_GIMME, 0); class_addmethod(idwt16_class, (t_method)idwt_coef, gensym("coef"), A_DEFFLOAT, A_DEFFLOAT, 0); } creb-0.9.2+darcs20151027/modules/matrix~.c0000644000000000000000000000677112613674326016100 0ustar0000000000000000/* * matrix.c - applies a matrix transform to a signal block * intended for spectral processing, dynwav * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include #define MAXORDER 1024 typedef struct matrixctl { t_float *c_A; /* matrix */ t_float *c_x; /* vector */ t_int c_order; } t_matrixctl; typedef struct matrix { t_object x_obj; t_float x_f; t_matrixctl x_ctl; } t_matrix; static void matrix_load(t_matrix *x, t_symbol *s) { FILE *matrix; if(s && s->s_name) { post("matrix: loading %s",s->s_name); if(matrix = fopen(s->s_name, "r")) { int n = x->x_ctl.c_order; fread(x->x_ctl.c_A, sizeof(float), n*n, matrix); } else post("matrix: error, cant open file."); } } static t_int *matrix_perform(t_int *w) { t_float *in = (float *)(w[3]); t_float *out = (float *)(w[4]); t_matrixctl *ctl = (t_matrixctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i,j; t_float *A = ctl->c_A; t_float *x = ctl->c_x; if (in == out) /* store input if ness. */ { memcpy(x, in, sizeof(t_float)*n); in = x; } bzero(out, sizeof(t_float)*n); /* init output */ for (j=0; js_n; int k,i; if (x->x_ctl.c_order != n) { if (x->x_ctl.c_A) free (x->x_ctl.c_A); x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); x->x_ctl.c_order = n; } for (i=0;ix_ctl.c_A[i] = 1; dsp_add(matrix_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } static void matrix_free(t_matrix *x) { if (x->x_ctl.c_A) free (x->x_ctl.c_A); if (x->x_ctl.c_x) free (x->x_ctl.c_x); } t_class *matrix_class; static void *matrix_new(t_floatarg order) { t_matrix *x = (t_matrix *)pd_new(matrix_class); int iorder = (int)order; int i, n=64, k; /* out 1 */ outlet_new(&x->x_obj, gensym("signal")); /* init data */ x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); for (i=0;ix_ctl.c_A[i] = 1; x->x_ctl.c_order = n; return (void *)x; } void bmatrix_tilde_setup(void) { //post("matrix~ v0.1"); matrix_class = class_new(gensym("bmatrix~"), (t_newmethod)matrix_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(matrix_class, t_matrix, x_f); class_addmethod(matrix_class, (t_method)matrix_dsp, gensym("dsp"), 0); class_addmethod(matrix_class, (t_method)matrix_load, gensym("load"), A_SYMBOL,0); } creb-0.9.2+darcs20151027/modules/bdiag~.c0000644000000000000000000001355212613674326015635 0ustar0000000000000000/* * bdiag.c - block diagonal state space system * treats input dsp block as n parallel signals * * s1 = (a * s1) + (b * s2) + u1; * s2 = (a * s2) - (b * s1) + u2; * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "extlib_util.h" #include #include #define MAXORDER 64 typedef struct bdiagctl { t_float *c_state; t_float *c_eigen; t_int c_order; } t_bdiagctl; typedef struct bdiag { t_object x_obj; t_float x_f; t_bdiagctl x_ctl; } t_bdiag; static t_float randfloat(void){ t_float r = rand (); r /= (RAND_MAX/2); r -= 1; return r; } static void bdiag_random(t_bdiag *x) { int i; for (i=0; ix_ctl.c_order; i++) { x->x_ctl.c_state[i] = randfloat(); } } static void bdiag_reset(t_bdiag *x) { int i; for (i=0; ix_ctl.c_order; i++) { x->x_ctl.c_state[i] = 0; } } static void bdiag_eigen(t_bdiag *x, t_floatarg index, t_floatarg aval, t_floatarg bval) { int i = (int)index; if (i<0) return; if (i>=x->x_ctl.c_order/2) return; x->x_ctl.c_eigen[2*i+0] = aval; x->x_ctl.c_eigen[2*i+1] = bval; } /* set decay time and frequency of pole at index */ static void bdiag_timefreq(t_bdiag *x, t_floatarg index, t_floatarg time, t_floatarg freq) { t_float r,a,b,n; t_float sr = sys_getsr() / (t_float)x->x_ctl.c_order; /* time in ms */ time *= 0.001; if (time < 0.0) time = 0.0; r = pow(0.001, 1.0 / (time * sr)); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; a = cos(2*M_PI*freq/sr); b = sin(2*M_PI*freq/sr); /* normalize to be sure */ n = 1.0 / sqrt(a*a + b*b); a *= n; b *= n; bdiag_eigen(x, index, r*a, r*b); } static void bdiag_preset(t_bdiag *x, t_floatarg preset) { int p = preset; int i; t_float a, b, w, r; switch(p){ case 0: post("preset 0"); for (i=0; ix_ctl.c_order/2; i++){ w = randfloat() * .001; r = 1. - (((t_float)i + 1.)/1000.); a = cos(w) * r; b = sin(w) * r; post("%f %f %f %f", w, r, a, b); bdiag_eigen(x,i,a,b); } break; case 1: default: break; } } static t_int *bdiag_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_bdiagctl *ctl = (t_bdiagctl *)(w[1]); t_float *eigen = ctl->c_eigen; t_float *state = ctl->c_state; t_int n = (t_int)(w[2]); t_float u1,u2,a,b,s1,s2,s1new,s2new; int i; for (i=0; is_n; int i; if (n == 1) { post("bdiag: doesnt work with blocksize == 1"); dsp_add_copy(sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } else { if (x->x_ctl.c_order != n) { if (x->x_ctl.c_state) free(x->x_ctl.c_state); if (x->x_ctl.c_eigen) free(x->x_ctl.c_eigen); x->x_ctl.c_state = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_eigen = (t_float *)malloc(n*sizeof(t_float)); for(i=0;ix_ctl.c_state[i] = 0; x->x_ctl.c_eigen[i] = 0; } x->x_ctl.c_order = n; } dsp_add(bdiag_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } } static void bdiag_free(t_bdiag *x) { if (x->x_ctl.c_state) free(x->x_ctl.c_state); if (x->x_ctl.c_eigen) free(x->x_ctl.c_eigen); } t_class *bdiag_class; static void *bdiag_new(t_floatarg permute) { t_bdiag *x = (t_bdiag *)pd_new(bdiag_class); int i, n=64; outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_state = (t_float *)malloc(n*sizeof(t_float)); x->x_ctl.c_eigen = (t_float *)malloc(n*sizeof(t_float)); for(i=0;ix_ctl.c_state[i] = 0; x->x_ctl.c_eigen[i] = 0; } x->x_ctl.c_order = n; return (void *)x; } void bdiag_tilde_setup(void) { //post("bdiag~ v0.1"); bdiag_class = class_new(gensym("bdiag~"), (t_newmethod)bdiag_new, (t_method)bdiag_free, sizeof(t_bdiag), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(bdiag_class, t_bdiag, x_f); class_addmethod(bdiag_class, (t_method)bdiag_random, gensym("random"), 0); class_addmethod(bdiag_class, (t_method)bdiag_random, gensym("bang"), 0); class_addmethod(bdiag_class, (t_method)bdiag_reset, gensym("reset"), 0); class_addmethod(bdiag_class, (t_method)bdiag_dsp, gensym("dsp"), 0); class_addmethod(bdiag_class, (t_method)bdiag_eigen, gensym("eigen"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(bdiag_class, (t_method)bdiag_timefreq, gensym("timefreq"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(bdiag_class, (t_method)bdiag_preset, gensym("preset"), A_DEFFLOAT, 0); } creb-0.9.2+darcs20151027/modules/dist~.c0000644000000000000000000001167512613674326015536 0ustar0000000000000000/* * dist.c - wave shaping extern * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "extlib_util.h" #define CLIP 0 #define INVERSE 1 #define INVERSESQ 2 #define INVERSECUB 3 #define RAT1 4 #define RAT2 5 #define FULLRECT 6 #define HALFRECT 7 #define PULSE 8 #define NEWTON1 9 #define UPPERCLIP 10 #define COMPARATOR 11 typedef struct distctl { t_float c_gain; t_float c_delay; char c_type; } t_distctl; typedef struct dist { t_object x_obj; t_float x_f; t_distctl x_ctl; } t_dist; void dist_bang(t_dist *x) { } void dist_gain(t_dist *x, t_floatarg f) { x->x_ctl.c_gain = f; } static t_int *dist_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_distctl *ctl = (t_distctl *)(w[1]); t_float gain = ctl->c_gain; t_int i; t_int n = (t_int)(w[2]); t_float x,y,v; t_float z = ctl->c_delay; switch(ctl->c_type){ case CLIP: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x > 1) ? ( 1.) : x; x = (x < -1) ? (-1.) : x; *out++ = 0.9999 * x; } break; case INVERSE: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x > 1) ? (2. - 1/x) : x; x = (x < -1) ? (-2. - 1/x) : x; *out++ = x/2.0001; } break; case INVERSESQ: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x > 1) ? (2. - 1/x) : x; x = (x < -1) ? (-2. - 1/x) : x; x /= 2; *out++ = 1.999*x*x-1; } break; case INVERSECUB: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x > 1) ? (2. - 1/x) : x; x = (x < -1) ? (-2. - 1/x) : x; x /= 2; *out++ = .9999 * x*x*x; } break; case RAT1: /*(2*d./((1+(d).^2)))*/ for (i = 0; i < n; i++) { x = *in++ * gain; y = (1. + x*x); x = 1.9999*x/y; *out++ = x; } break; case RAT2: /*(2*d./((1+(d).^16)))*/ for (i = 0; i < n; i++) { x = *in++ * gain; y = x*x; y *= y; y *= y; y *= y; y = (1. + y); x = 1.2*x/y; *out++ = x; } break; case FULLRECT: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x>0) ? x : -x; x = (x>1) ? 1 : x; *out++ = 1.9999*(x-.5); } break; case HALFRECT: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x>0) ? x : 0; x = (x>1) ? 1 : x; *out++ = 1.9999*(x-.5); } break; case PULSE: for (i = 0; i < n; i++) { x = *in++ * gain; y = (x>0) ? (1):(-1); x = (z*y > 0) ? (0) : (y); *out++ = .9999 * x; z = x; } ctl->c_delay = z; break; case NEWTON1: for (i = 0; i < n; i++) { x = *in++ * gain; y = 1./(1.+x*x); z = .5; z = .5*(y/z + z); z = .5*(y/z + z); z = .5*(y/z + z); /* z = .5*(y/z + z); * z = .5*(y/z + z); * z = .5*(y/z + z); */ *out++ = x * z; } ctl->c_delay = z; break; case UPPERCLIP: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x < 0.0f) ? 0.0f : x; x = (x > 0.9999f) ? 0.9999f : x; *out++ = x; } break; case COMPARATOR: for (i = 0; i < n; i++) { x = *in++ * gain; x = (x > 0.0f) ? 1.0f : -1.0f; *out++ = x; } break; default: for (i = 0; i < n; i++) *out++ = *in++; break; } return (w+5); } static void dist_dsp(t_dist *x, t_signal **sp) { dsp_add(dist_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } void dist_free(void) { } t_class *dist_class; void *dist_new(t_floatarg type) { t_dist *x = (t_dist *)pd_new(dist_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("gain")); outlet_new(&x->x_obj, gensym("signal")); dist_gain(x, 1); x->x_ctl.c_type = (char)type; x->x_ctl.c_delay = 0; return (void *)x; } void dist_tilde_setup(void) { //post("dist~ v0.1"); dist_class = class_new(gensym("dist~"), (t_newmethod)dist_new, (t_method)dist_free, sizeof(t_dist), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(dist_class, t_dist, x_f); class_addmethod(dist_class, (t_method)dist_bang, gensym("bang"), 0); class_addmethod(dist_class, (t_method)dist_dsp, gensym("dsp"), 0); class_addmethod(dist_class, (t_method)dist_gain, gensym("gain"), A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/sawtooth~.c0000644000000000000000000000641112613674326016433 0ustar0000000000000000/* * sawtooth.c - differentiated piecewize polynomial sawtooth generator * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include typedef struct sawtoothctl { t_float c_phase, c_increment, c_delay_1, c_delay_2; } t_sawtoothctl; typedef struct sawtooth { t_object x_obj; t_float x_f; t_sawtoothctl x_ctl; } t_sawtooth; void sawtooth_phase(t_sawtooth *x, t_floatarg f) { x->x_ctl.c_phase = f; } void sawtooth_freq(t_sawtooth *x, t_floatarg f) { x->x_ctl.c_increment = f / sys_getsr(); post ("increment %f", x->x_ctl.c_increment); } void sawtooth_bang(t_sawtooth *x) { sawtooth_phase(x, 0); } static t_int *sawtooth_perform(t_int *w) { t_float *out = (float *)(w[3]); t_sawtoothctl *ctl = (t_sawtoothctl *)(w[1]); t_int i; t_int n = (t_int)(w[2]); t_float phase, x, _x; t_float x1 = ctl->c_delay_1; t_float x2 = ctl->c_delay_2; phase = ctl->c_phase; for (i = 0; i < n; i++) { phase += ctl->c_increment; /* Limit range to [0,1[ */ x = phase - ((t_float)((t_int)phase)); /* Bring range to [-1,1[ */ x = 2 * x - 1; /* Cubic. */ x = (x-1) * x * (x + 1); /* Differentiate twice, (backward diff) */ _x = x; x -= x1; x1 = _x; _x = x; x -= x2; x2 = _x; *out++ = x; //post("%f", x); } /* Oscillator and filter state. */ ctl->c_phase = phase; ctl->c_delay_1 = x1; ctl->c_delay_2 = x2; return (w+4); } static void sawtooth_dsp(t_sawtooth *x, t_signal **sp) { dsp_add(sawtooth_perform, 3, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec); } void sawtooth_free(void) { } t_class *sawtooth_class; void *sawtooth_new(void) { t_sawtooth *x = (t_sawtooth *)pd_new(sawtooth_class); outlet_new(&x->x_obj, gensym("signal")); sawtooth_bang(x); sawtooth_freq(x, 0); return (void *)x; } void sawtooth_tilde_setup(void) { // post("sawtooth~ v0.1"); sawtooth_class = class_new(gensym("sawtooth~"), (t_newmethod)sawtooth_new, (t_method)sawtooth_free, sizeof(t_sawtooth), 0, 0); class_addmethod(sawtooth_class, (t_method)sawtooth_bang, gensym("bang"), 0); class_addmethod(sawtooth_class, (t_method)sawtooth_dsp, gensym("dsp"), 0); class_addmethod(sawtooth_class, (t_method)sawtooth_phase, gensym("phase"), A_FLOAT, A_NULL); class_addmethod(sawtooth_class, (t_method)sawtooth_freq, gensym("freq"), A_FLOAT, A_NULL); class_addfloat(sawtooth_class, (t_method)sawtooth_phase); } creb-0.9.2+darcs20151027/modules/ratio.c0000644000000000000000000000311312613674326015477 0ustar0000000000000000/* * ratio.c - multiplies by 2^k such that output is between 1 and 2 * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #define SEQL 16 typedef struct{ } t_ratio_data; typedef struct ratio { t_object t_ob; t_outlet *x_out; t_ratio_data x_c; } t_ratio; static void ratio_float(t_ratio *x, t_floatarg f) { f = (f<0)?(-f):(f); if (f) { while (f < 1.0) f *= 2.0; while (f >= 2.0) f *= 0.5; } outlet_float(x->x_out, f); } static void ratio_free(void) { } t_class *ratio_class; static void *ratio_new(void) { t_ratio *x = (t_ratio *)pd_new(ratio_class); x->x_out = outlet_new(&x->t_ob, gensym("float")); return (void *)x; } void ratio_setup(void) { ratio_class = class_new(gensym("ratio"), (t_newmethod)ratio_new, (t_method)ratio_free, sizeof(t_ratio), 0, 0); class_addfloat(ratio_class, ratio_float); } creb-0.9.2+darcs20151027/modules/xfm~.c0000644000000000000000000001261512613674326015360 0ustar0000000000000000/* * xfm.c - cross frequency modulation object * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* coupled fm. osc state equations: phasor for system i = [ 1 -phi ] (1+phi^2)^(1/2) * [ phi 1 ] with phi = 2*pi*(freq_base + freq_mod * out_other) / sr ideal phasor would be [ cos(phi) - sin(phi) ] [ sin(phi) cos(phi) ] this means frequencies are warped: 2*pi*f_real = atan(2*pi*f) some (possible) enhancements: + add an integrator to get phase modulation + undo the frequency warping */ #include "m_pd.h" #include #include #include #include #define SINSAMPLES 512 #define MYPI 3.141592653589793 #define DISTORTED 0 #define NORMALIZED 1 typedef struct xfmctl { //t_float c_sintab[SINSAMPLES + 1]; t_float c_x1, c_y1; /* state osc 1 */ t_float c_x2, c_y2; /* state osc 2 */ t_int c_type; /* type of algo */ } t_xfmctl; typedef struct xfm { t_object x_obj; t_float x_f; t_xfmctl x_ctl; } t_xfm; void xfm_type(t_xfm *x, t_float f) { int t = (int)f; if (t == DISTORTED) x->x_ctl.c_type = t; if (t == NORMALIZED) x->x_ctl.c_type = t; } static inline t_float xfm_sat(t_float x) { const t_float max = 1; const t_float min = -1; x = (x > max) ? (max) : (x); x = (x < min) ? (min) : (x); return(x); } static t_int *xfm_perform(t_int *w) { t_float *inA = (t_float *)(w[3]); t_float *inB = (t_float *)(w[4]); t_float *fbA = (t_float *)(w[5]); t_float *fbB = (t_float *)(w[6]); t_float *outA = (t_float *)(w[7]); t_float *outB = (t_float *)(w[8]); t_xfmctl *ctl = (t_xfmctl *)(w[1]); t_int n = (t_int)(w[2]); //t_float *tab = ctl->c_sintab; t_float x1 = ctl->c_x1, y1 = ctl->c_y1, z1, dx1, dy1, inv_norm1; t_float x2 = ctl->c_x2, y2 = ctl->c_y2, z2, dx2, dy2, inv_norm2; t_float scale = 2 * M_PI / sys_getsr(); t_int i; switch(ctl->c_type){ default: case DISTORTED: /* this is a 4 degree of freedom hyperchaotic system */ /* two coupled saturated unstable oscillators */ for (i=0; ic_x1 = x1; ctl->c_y1 = y1; ctl->c_x2 = x2; ctl->c_y2 = y2; return (w+9); } static void xfm_dsp(t_xfm *x, t_signal **sp) { int n = sp[0]->s_n; int k; dsp_add(xfm_perform, 8, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, sp[5]->s_vec); } static void xfm_free(t_xfm *x) { } static void xfm_reset(t_xfm *x) { x->x_ctl.c_x1 = 1; x->x_ctl.c_y1 = 0; x->x_ctl.c_x2 = 1; x->x_ctl.c_y2 = 0; } t_class *xfm_class; static void *xfm_new(t_floatarg algotype) { t_xfm *x = (t_xfm *)pd_new(xfm_class); /* ins */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); /* outs */ outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); /* init data */ xfm_reset(x); xfm_type(x, algotype); return (void *)x; } void xfm_tilde_setup(void) { //post("xfm~ v0.1"); xfm_class = class_new(gensym("xfm~"), (t_newmethod)xfm_new, (t_method)xfm_free, sizeof(t_xfm), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(xfm_class, t_xfm, x_f); class_addmethod(xfm_class, (t_method)xfm_type, gensym("type"), A_FLOAT, 0); class_addmethod(xfm_class, (t_method)xfm_dsp, gensym("dsp"), 0); class_addmethod(xfm_class, (t_method)xfm_reset, gensym("reset"), 0); } creb-0.9.2+darcs20151027/modules/qmult~.c0000644000000000000000000000661612613674326015734 0ustar0000000000000000/* * qmult.c - quaternion multiplication dsp object * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #include #include #include typedef struct qmultctl { t_float *c_inputleft[4]; t_float *c_inputright[4]; t_float *c_output[4]; } t_qmultctl; typedef struct qmult { t_object x_obj; t_float x_f; t_qmultctl x_ctl; } t_qmult; static t_int *qmult_perform(t_int *word) { t_qmultctl *ctl = (t_qmultctl *)(word[1]); t_int n = (t_int)(word[2]); t_int i; t_float *in0l = ctl->c_inputleft[0]; t_float *in1l = ctl->c_inputleft[1]; t_float *in2l = ctl->c_inputleft[2]; t_float *in3l = ctl->c_inputleft[3]; t_float *in0r = ctl->c_inputright[0]; t_float *in1r = ctl->c_inputright[1]; t_float *in2r = ctl->c_inputright[2]; t_float *in3r = ctl->c_inputright[3]; t_float *out0 = ctl->c_output[0]; t_float *out1 = ctl->c_output[1]; t_float *out2 = ctl->c_output[2]; t_float *out3 = ctl->c_output[3]; t_float wl, xl, yl, zl; t_float wr, xr, yr, zr; t_float w, x, y, z; for (i=0;ix_ctl.c_inputleft[i] = sp[i]->s_vec; x->x_ctl.c_inputright[i] = sp[i+4]->s_vec; x->x_ctl.c_output[i] = sp[i+8]->s_vec; } dsp_add(qmult_perform, 2, &x->x_ctl, sp[0]->s_n); } static void qmult_free(t_qmult *x) { } t_class *qmult_class; static void *qmult_new(t_floatarg channels) { int i; t_qmult *x = (t_qmult *)pd_new(qmult_class); for (i=1;i<8;i++) inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); for (i=0;i<4;i++) outlet_new(&x->x_obj, gensym("signal")); return (void *)x; } void qmult_tilde_setup(void) { //post("qmult~ v0.1"); qmult_class = class_new(gensym("qmult~"), (t_newmethod)qmult_new, (t_method)qmult_free, sizeof(t_qmult), 0, 0); CLASS_MAINSIGNALIN(qmult_class, t_qmult, x_f); class_addmethod(qmult_class, (t_method)qmult_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/permut~.c0000644000000000000000000000771412613674326016106 0ustar0000000000000000/* * permut.c - applies a (random) permutation on a signal block * intended for spectral processing, dynwav * * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include //#include "m_pd.h" #include "extlib_util.h" typedef union { float f; unsigned int i; }t_permutflint; typedef struct permutctl { char c_type; t_int *c_permutationtable; int c_blocksize; } t_permutctl; typedef struct permut { t_object x_obj; t_float x_f; t_permutctl x_ctl; } t_permut; static inline void permut_perform_permutation(t_float *S, int n, t_int *f) { t_int k,l; t_float swap; for(k=0; kx_ctl.c_blocksize; int mask = N-1; t_int *p = x->x_ctl.c_permutationtable; int r, last = 0; t_permutflint flintseed; flintseed.f = (float)seed; srand(flintseed.i); if(p) { p[0] = rand() & mask; for (i=1;ix_ctl.c_blocksize != size) { if (x->x_ctl.c_permutationtable) free(x->x_ctl.c_permutationtable); x->x_ctl.c_permutationtable = (t_int *)malloc(sizeof(int)*size); x->x_ctl.c_blocksize = size; /* make sure it's initialized */ permut_bang(x); } } static t_int *permut_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_permutctl *ctl = (t_permutctl *)(w[1]); t_int i; t_int n = (t_int)(w[2]); t_float x,y; t_int *p = ctl->c_permutationtable; if (in != out) for (i=0; is_n); dsp_add(permut_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } static void permut_free(t_permut *x) { if (x->x_ctl.c_permutationtable) free(x->x_ctl.c_permutationtable); } t_class *permut_class; static void *permut_new(void) { t_permut *x = (t_permut *)pd_new(permut_class); outlet_new(&x->x_obj, gensym("signal")); x->x_ctl.c_permutationtable = 0; x->x_ctl.c_blocksize = 0; permut_resize_table(x, 64); permut_random(x, 0); return (void *)x; } void permut_tilde_setup(void) { //post("permut~ v0.1"); permut_class = class_new(gensym("permut~"), (t_newmethod)permut_new, (t_method)permut_free, sizeof(t_permut), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(permut_class, t_permut, x_f); class_addmethod(permut_class, (t_method)permut_random, gensym("random"), A_FLOAT, 0); class_addmethod(permut_class, (t_method)permut_bang, gensym("bang"), 0); class_addmethod(permut_class, (t_method)permut_dsp, gensym("dsp"), 0); } creb-0.9.2+darcs20151027/modules/lattice~.c0000644000000000000000000000671012613674326016212 0ustar0000000000000000/* * lattice.c - a lattice filter for pd * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "m_pd.h" #include #define MAXORDER 1024 #define MAXREFCO 0.9999 typedef struct latticesegment { t_float delay; // delay element t_float rc; // reflection coefficient } t_latticesegment; typedef struct latticectl { t_latticesegment c_segment[MAXORDER]; // array of lattice segment data t_int c_segments; } t_latticectl; typedef struct lattice { t_object x_obj; t_float x_f; t_latticectl x_ctl; } t_lattice; static t_int *lattice_perform(t_int *w) { t_float *in = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); t_latticectl *ctl = (t_latticectl *)(w[1]); t_int i,j; t_int n = (t_int)(w[2]); t_float x,rc,d; t_latticesegment* seg = ctl->c_segment; t_int segments = ctl->c_segments; for (i=0; ix_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); } static void lattice_free(void) { } t_class *lattice_class; static void lattice_rc(t_lattice *x, t_float segment, t_float refco) { t_int seg = (t_float)segment; if ((seg >= 0) && (seg < x->x_ctl.c_segments)){ if (refco >= MAXREFCO) refco = MAXREFCO; if (refco <= -MAXREFCO) refco = -MAXREFCO; x->x_ctl.c_segment[seg].rc = refco; } } static void lattice_reset(t_lattice *x) { t_float* buf = (t_float *)x->x_ctl.c_segment; t_int n = x->x_ctl.c_segments; t_int i; for (i=0; ix_obj, gensym("signal")); if (seg < 1) seg = 1; if (seg > MAXORDER) seg = MAXORDER; x->x_ctl.c_segments = seg; lattice_reset(x); return (void *)x; } void lattice_tilde_setup(void) { //post("lattice~ v0.1"); lattice_class = class_new(gensym("lattice~"), (t_newmethod)lattice_new, (t_method)lattice_free, sizeof(t_lattice), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(lattice_class, t_lattice, x_f); class_addmethod(lattice_class, (t_method)lattice_dsp, gensym("dsp"), 0); class_addmethod(lattice_class, (t_method)lattice_reset, gensym("reset"), 0); class_addmethod(lattice_class, (t_method)lattice_rc, gensym("rc"), A_FLOAT, A_FLOAT, 0); } creb-0.9.2+darcs20151027/modules/scrollgrid1D~.c0000644000000000000000000001270412613674326017116 0ustar0000000000000000/* * scrollgrid1D.c - 1D scroll grid attractor * Copyright (c) 2000-2003 by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* 1D scroll grid attractor for more information see: Yalcin M., Ozoguz S., Suykens J.A.K., Vandewalle J., ``Families of Scroll Grid Attractors'', International Journal of Bifurcation and Chaos, vol. 12, no. 1, Jan. 2002, pp. 23-41. this file implements a digital variant of the method introduced in the paper, so that it can be used as a parametrizable, bounded chatotic oscillator. in short it is a switched linear system, with some added hard limiting to convert unstable oscillations into stable ones. */ #include "m_pd.h" #include #include #include #include #include "filters.h" typedef struct scrollgrid1Dctl { t_float c_x, c_y, c_z; /* state */ } t_scrollgrid1Dctl; typedef struct scrollgrid1D { t_object x_obj; t_float x_f; t_scrollgrid1Dctl x_ctl; } t_scrollgrid1D; static inline t_float _fixedpoint(t_float x, int n) { int ix = (x + 0.5); if (ix < 0) ix = 0; else if (ix >= n) ix = n-1; return (t_float)ix; } static inline t_float _sat(t_float x, t_float upper) { t_float lower = -1.0; if (x < lower) x = lower; else if (x > upper) x = upper; return x; } static t_int *scrollgrid1D_perform(t_int *w) { t_float *freq = (t_float *)(w[3]); t_float *t1 = (t_float *)(w[4]); t_float *t2 = (t_float *)(w[5]); t_float *order = (t_float *)(w[6]); t_float *outx = (t_float *)(w[7]); t_float *outy = (t_float *)(w[8]); t_float *outz = (t_float *)(w[9]); t_scrollgrid1Dctl *ctl = (t_scrollgrid1Dctl *)(w[1]); t_int n = (t_int)(w[2]); t_int i; t_float inv_sr = 1.0 /sys_getsr(); t_float state[3] = {ctl->c_x, ctl->c_y, ctl->c_z}; t_float c,f; t_float pole[2], r1, r2; t_int o; t_float x,y,z; for (i=0; ic_x = state[0]; ctl->c_y = state[1]; ctl->c_z = state[2]; return (w+10); } static void scrollgrid1D_dsp(t_scrollgrid1D *x, t_signal **sp) { int n = sp[0]->s_n; int k; dsp_add(scrollgrid1D_perform, 9, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, sp[5]->s_vec, sp[6]->s_vec); } static void scrollgrid1D_free(t_scrollgrid1D *x) { } static void scrollgrid1D_reset(t_scrollgrid1D *x) { x->x_ctl.c_x = 1; x->x_ctl.c_y = 1; x->x_ctl.c_z = 1; } t_class *scrollgrid1D_class; static void *scrollgrid1D_new(t_floatarg algotype) { t_scrollgrid1D *x = (t_scrollgrid1D *)pd_new(scrollgrid1D_class); /* ins */ inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); /* outs */ outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); /* init data */ scrollgrid1D_reset(x); return (void *)x; } void scrollgrid1D_tilde_setup(void) { //post("scrollgrid1D~ v0.1"); scrollgrid1D_class = class_new(gensym("scrollgrid1D~"), (t_newmethod)scrollgrid1D_new, (t_method)scrollgrid1D_free, sizeof(t_scrollgrid1D), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(scrollgrid1D_class, t_scrollgrid1D, x_f); class_addmethod(scrollgrid1D_class, (t_method)scrollgrid1D_dsp, gensym("dsp"), 0); class_addmethod(scrollgrid1D_class, (t_method)scrollgrid1D_reset, gensym("reset"), 0); } creb-0.9.2+darcs20151027/abs/0000755000000000000000000000000012613674326013314 5ustar0000000000000000creb-0.9.2+darcs20151027/abs/tblock.pd0000644000000000000000000000132012613674326015113 0ustar0000000000000000#N canvas 506 229 617 246 10; #X obj 36 36 inlet; #X obj 101 35 inlet; #X obj 42 196 outlet; #X obj 144 99 samplerate~; #X obj 59 158 +; #X text 222 78 right inlet is also "active"; #X text 222 133 for spectral domain processing; #X text 222 34 tblock: compute block relative time delays; #X text 223 48 out = left + right * (blocksize / sys_samplerate); #X obj 104 115 /; #X obj 101 92 * \$1; #X obj 103 59 t b f b; #X text 223 118 main usage is to compute block synchronous time delays ; #X obj 95 141 * 1000; #X connect 0 0 4 0; #X connect 1 0 11 0; #X connect 3 0 9 1; #X connect 4 0 2 0; #X connect 9 0 13 0; #X connect 10 0 9 0; #X connect 11 0 4 0; #X connect 11 1 10 0; #X connect 11 2 3 0; #X connect 13 0 4 1; creb-0.9.2+darcs20151027/abs/bdfts.pd0000644000000000000000000000062312613674326014744 0ustar0000000000000000#N canvas 520 402 300 195 10; #X obj 106 9 inlet; #X obj 169 11 inlet; #X obj 121 90 pack \$1 0 0; #X obj 136 150 outlet; #X obj 166 60 t b f; #X obj 109 60 t b f; #X msg 100 125 timefreq \$1 \$2 \$3; #X obj 170 36 * 1000; #X connect 0 0 5 0; #X connect 1 0 7 0; #X connect 2 0 6 0; #X connect 4 0 2 0; #X connect 4 1 2 1; #X connect 5 0 2 0; #X connect 5 1 2 2; #X connect 6 0 3 0; #X connect 7 0 4 0; creb-0.9.2+darcs20151027/abs/vol~.pd0000644000000000000000000000057712613674326014650 0ustar0000000000000000#N canvas 441 433 450 300 10; #X obj 68 21 inlet~; #X obj 122 22 inlet; #X obj 80 104 *~; #X obj 77 141 outlet~; #X obj 116 42 dbtorms; #X obj 114 92 line~; #X msg 112 66 \$1 5; #X obj 215 34 loadbang; #X obj 218 66 f \$1; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 4 0 6 0; #X connect 5 0 2 1; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 8 0 4 0; creb-0.9.2+darcs20151027/abs/bhip~.pd0000644000000000000000000000035712613674326014766 0ustar0000000000000000#N canvas 399 553 450 300 10; #X obj 87 196 biquadseries~ \$1; #X obj 81 134 inlet~; #X obj 138 134 inlet; #X obj 82 236 outlet~; #X msg 107 162 butterHP \$1; #X connect 0 0 3 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 4 0 0 0; creb-0.9.2+darcs20151027/abs/64k.pd0000644000000000000000000000422512613674326014250 0ustar0000000000000000#N canvas 0 0 968 634 10; #X obj 501 74 soundfiler; #X obj 45 125 * 65536; #X obj 197 414 +~; #X obj 212 383 *~ 65536; #X obj 268 232 metro 62.5; #X obj 213 347 phasor~ 1; #X obj 272 271 sel 0; #X msg 270 296 0; #X obj 561 181 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 45 35 +; #X obj 45 10 *; #X obj 683 196 bpm; #X msg 265 177 reset; #X obj 189 133 count 32; #X obj 478 -63 loadbang; #X obj 265 55 mod 16; #X obj 257 2 *; #X obj 45 97 +; #X obj 257 79 / 16; #X text 41 -46 sample shuffle; #X text 257 -44 beat shuffle; #X obj 265 28 +; #X obj 497 -16 symbol \$1; #X obj 273 -23 inlet; #X obj 498 99 / 65536; #X obj 499 128 - 1; #X obj 45 62 mod; #X obj 61 -25 inlet; #X obj 171 -25 inlet; #X text 151 -46 sample offset; #X obj 377 -23 inlet; #X text 357 -44 beat offset; #X obj 601 278 f; #X obj 681 144 inlet; #X text 688 123 bpm; #X msg 500 43 read -resize -raw 0 1 2 l \$1 \$2; #X obj 501 17 pack s s; #X obj 571 -47 t b b; #X obj 589 144 inlet; #X text 589 123 reset; #X obj 193 477 outlet~; #X obj 580 -17 symbol \$0-table; #X obj 795 95 table \$0-table; #X obj 201 441 tabread4~ \$0-table; #X text 433 459 reset; #X obj 433 480 outlet; #X obj 362 480 outlet; #X text 362 459 counter; #X connect 0 0 24 0; #X connect 1 0 2 0; #X connect 2 0 43 0; #X connect 3 0 2 1; #X connect 4 0 13 0; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 5 1; #X connect 7 0 45 0; #X connect 8 0 4 0; #X connect 8 0 7 0; #X connect 8 0 12 0; #X connect 8 0 32 0; #X connect 9 0 26 0; #X connect 10 0 9 0; #X connect 11 0 4 1; #X connect 11 1 32 0; #X connect 12 0 13 0; #X connect 13 0 6 0; #X connect 13 0 10 0; #X connect 13 0 16 0; #X connect 13 0 46 0; #X connect 14 0 8 0; #X connect 14 0 37 0; #X connect 15 0 18 0; #X connect 16 0 21 0; #X connect 17 0 1 0; #X connect 18 0 17 1; #X connect 21 0 15 0; #X connect 22 0 36 0; #X connect 23 0 16 1; #X connect 24 0 25 0; #X connect 25 0 26 1; #X connect 26 0 17 0; #X connect 27 0 10 1; #X connect 28 0 9 1; #X connect 30 0 21 1; #X connect 32 0 5 0; #X connect 33 0 11 0; #X connect 35 0 0 0; #X connect 36 0 35 0; #X connect 37 0 22 0; #X connect 37 1 41 0; #X connect 38 0 8 0; #X connect 41 0 36 1; #X connect 43 0 40 0; creb-0.9.2+darcs20151027/abs/ti_snare.pd0000644000000000000000000000367512613674326015460 0ustar0000000000000000#N canvas 448 117 288 79 10; #X obj 143 84 inlet; #X obj 243 84 inlet; #X obj 112 323 vol~; #X obj 222 52 nbx 3 14 -1e+37 1e+37 0 1 empty empty VOL -20 7 0 10 -262144 -1 -1 99.47 256; #X obj 140 30 nbx 5 14 20 20000 1 1 empty empty T1 -20 7 0 10 -24198 -1 -1 552.632 256; #X obj 74 30 nbx 3 14 -1e+37 1e+37 0 1 empty empty A' -14 7 0 10 -225271 -1 -1 0 256; #X obj 43 106 +; #X obj 12 29 nbx 3 14 -1e+37 1e+37 0 1 empty empty A -10 7 0 10 -260818 -1 -1 -1 256; #X obj 44 172 +; #X obj 13 50 nbx 3 14 -1e+37 1e+37 0 1 empty empty D -10 7 0 10 -260818 -1 -1 113 256; #X obj 43 83 *; #X obj 44 134 *; #X obj 101 347 outlet~; #X obj 80 4 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1; #X obj 178 153 spigot; #X obj 74 50 nbx 3 14 -1e+37 1e+37 0 1 empty empty D' -14 7 0 10 -225271 -1 -1 45 256; #X obj 140 51 nbx 5 14 20 20000 1 1 empty empty T2 -20 7 0 10 -24198 -1 -1 151.334 256; #X obj 222 30 nbx 5 14 20 20000 1 1 empty empty T3 -20 7 0 10 -24198 -1 -1 9652.14 256; #X text 9 2 ti_snare; #X obj 186 209 ead~; #X obj 236 247 osc~; #X obj 122 172 osc~; #X obj 109 286 *~; #X obj 242 178 noise~; #X obj 240 210 lop~; #X obj 151 209 *~; #X obj 82 250 *~; #X obj 103 207 *~; #X obj 154 109 t b b; #X obj 116 110 f 0; #X connect 0 0 28 0; #X connect 1 0 29 0; #X connect 2 0 12 0; #X connect 3 0 2 1; #X connect 4 0 21 0; #X connect 5 0 10 1; #X connect 6 0 19 1; #X connect 7 0 6 1; #X connect 8 0 19 2; #X connect 9 0 8 1; #X connect 10 0 6 0; #X connect 11 0 8 0; #X connect 13 0 14 1; #X connect 14 0 19 0; #X connect 15 0 11 1; #X connect 16 0 20 0; #X connect 17 0 24 1; #X connect 19 0 22 1; #X connect 19 0 25 1; #X connect 19 0 26 1; #X connect 20 0 22 0; #X connect 21 0 25 0; #X connect 21 0 27 0; #X connect 22 0 2 0; #X connect 23 0 24 0; #X connect 24 0 22 0; #X connect 24 0 27 1; #X connect 25 0 22 0; #X connect 26 0 22 1; #X connect 27 0 26 0; #X connect 28 0 14 0; #X connect 28 1 29 0; #X connect 29 0 10 0; #X connect 29 0 11 0; #X coords 0 0 1 1 270 50 1; creb-0.9.2+darcs20151027/abs/eadh~.pd0000644000000000000000000000075612613674326014750 0ustar0000000000000000#N canvas 127 436 262 228 10; #X obj 34 27 inlet; #X obj 84 27 inlet; #X obj 133 27 inlet; #X msg 44 108 start; #X msg 92 107 stop; #X obj 179 27 inlet; #X msg 34 49 bang; #X obj 44 187 outlet~; #X text 14 6 trigger - attack - decay - hold; #X obj 44 144 ear~ \$1 \$2; #X obj 68 78 del \$3; #X connect 0 0 6 0; #X connect 1 0 9 1; #X connect 2 0 9 2; #X connect 3 0 9 0; #X connect 4 0 9 0; #X connect 5 0 10 1; #X connect 6 0 3 0; #X connect 6 0 10 0; #X connect 9 0 7 0; #X connect 10 0 4 0; creb-0.9.2+darcs20151027/abs/cep~.pd0000644000000000000000000000065112613674326014610 0ustar0000000000000000#N canvas 203 382 521 228 10; #X obj 70 42 inlet~; #X obj 124 42 inlet~; #X obj 94 66 nfft~; #X obj 94 95 clog~; #X obj 94 124 nifft~; #X obj 68 164 outlet~; #X obj 126 164 outlet~; #X text 229 45 forward cepstrum; #X text 229 64 using normalized fft/ifft objects; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 3 0; #X connect 2 1 3 1; #X connect 3 0 4 0; #X connect 3 1 4 1; #X connect 4 0 5 0; #X connect 4 1 6 0; creb-0.9.2+darcs20151027/abs/bdft.pd0000644000000000000000000000055112613674326014561 0ustar0000000000000000#N canvas 520 402 300 195 10; #X obj 106 9 inlet; #X obj 169 11 inlet; #X obj 121 90 pack \$1 0 0; #X obj 136 150 outlet; #X obj 167 41 t b f; #X obj 110 41 t b f; #X msg 100 125 timefreq \$1 \$2 \$3; #X connect 0 0 5 0; #X connect 1 0 4 0; #X connect 2 0 6 0; #X connect 4 0 2 0; #X connect 4 1 2 1; #X connect 5 0 2 0; #X connect 5 1 2 2; #X connect 6 0 3 0; creb-0.9.2+darcs20151027/abs/step_16.pd0000644000000000000000000000223612613674326015125 0ustar0000000000000000#N canvas 347 311 817 158 10; #X obj 42 62 inlet; #X obj 84 62 inlet; #X obj 125 62 inlet; #X obj 166 62 inlet; #X obj 209 62 inlet; #X obj 251 62 inlet; #X obj 292 62 inlet; #X obj 333 62 inlet; #X obj 374 62 inlet; #X obj 416 62 inlet; #X obj 457 62 inlet; #X obj 498 62 inlet; #X obj 541 62 inlet; #X obj 583 62 inlet; #X obj 624 62 inlet; #X obj 665 62 inlet; #X text 51 14 16 part step sequencer array input; #X obj 185 41 + 4; #X obj 42 110 step_4 \$1; #X obj 209 110 step_4 \$1; #X obj 374 41 + 4; #X obj 374 110 step_4 \$1; #X obj 541 110 step_4 \$1; #X obj 540 40 + 4; #X obj 737 40 inlet; #X obj 100 40 f 0; #X obj 341 15 loadbang; #X connect 0 0 18 0; #X connect 1 0 18 1; #X connect 2 0 18 2; #X connect 3 0 18 3; #X connect 4 0 19 0; #X connect 5 0 19 1; #X connect 6 0 19 2; #X connect 7 0 19 3; #X connect 8 0 21 0; #X connect 9 0 21 1; #X connect 10 0 21 2; #X connect 11 0 21 3; #X connect 12 0 22 0; #X connect 13 0 22 1; #X connect 14 0 22 2; #X connect 15 0 22 3; #X connect 17 0 19 4; #X connect 17 0 20 0; #X connect 20 0 21 4; #X connect 20 0 23 0; #X connect 23 0 22 4; #X connect 24 0 25 0; #X connect 25 0 17 0; #X connect 25 0 18 4; #X connect 26 0 25 0; creb-0.9.2+darcs20151027/abs/fmod.pd0000644000000000000000000000103512613674326014565 0ustar0000000000000000#N canvas 714 472 443 338 10; #X obj 52 36 inlet; #X obj 52 255 outlet; #X obj 110 36 inlet; #X obj 52 64 / \$1; #X obj 52 230 * \$1; #X obj 82 122 int; #X obj 52 96 t f f; #X obj 52 148 -; #X text 175 90 floating point version of; #X text 361 91 [mod]; #X obj 52 175 moses 0; #X obj 52 203 + 1; #X connect 0 0 3 0; #X connect 2 0 3 1; #X connect 2 0 4 1; #X connect 3 0 6 0; #X connect 4 0 1 0; #X connect 5 0 7 1; #X connect 6 0 7 0; #X connect 6 1 5 0; #X connect 7 0 10 0; #X connect 10 0 11 0; #X connect 10 1 4 0; #X connect 11 0 4 0; creb-0.9.2+darcs20151027/abs/cmul~.pd0000644000000000000000000000113012613674326014772 0ustar0000000000000000#N canvas 24 618 381 197 10; #X obj 58 49 inlet~; #X obj 58 159 outlet~; #X obj 177 154 outlet~; #X text 49 5 complex multiplication; #X obj 178 131 +~; #X obj 58 136 -~; #X obj 58 105 *~; #X obj 108 49 inlet~; #X obj 108 105 *~; #X obj 192 49 inlet~; #X obj 177 106 *~; #X obj 242 49 inlet~; #X obj 227 106 *~; #X connect 0 0 6 0; #X connect 0 0 12 0; #X connect 4 0 2 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 7 0 10 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 9 0 10 1; #X connect 10 0 4 0; #X connect 11 0 8 1; #X connect 11 0 12 1; #X connect 12 0 4 1; creb-0.9.2+darcs20151027/abs/scale7.pd0000644000000000000000000000154012613674326015017 0ustar0000000000000000#N canvas 647 521 450 373 10; #X obj 152 175 select 0 1 2 3 4 5 6; #X obj 224 115 unpack 0 0 0 0 0 0 0; #X obj 225 59 inlet; #X obj 57 51 inlet; #X obj 154 97 mod 7; #X text 219 37 scale input; #X text 48 29 note input; #X obj 224 287 outlet; #X obj 153 220 f; #X obj 185 221 f; #X obj 217 221 f; #X obj 248 220 f; #X obj 280 218 f; #X obj 311 214 f; #X obj 343 212 f; #X connect 0 0 8 0; #X connect 0 1 9 0; #X connect 0 2 10 0; #X connect 0 3 11 0; #X connect 0 4 12 0; #X connect 0 5 13 0; #X connect 0 6 14 0; #X connect 1 0 8 1; #X connect 1 1 9 1; #X connect 1 2 10 1; #X connect 1 3 11 1; #X connect 1 4 12 1; #X connect 1 5 13 1; #X connect 1 6 14 1; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 0 0; #X connect 8 0 7 0; #X connect 9 0 7 0; #X connect 10 0 7 0; #X connect 11 0 7 0; #X connect 12 0 7 0; #X connect 13 0 7 0; #X connect 14 0 7 0; creb-0.9.2+darcs20151027/abs/cinv~.pd0000644000000000000000000000106312613674326014776 0ustar0000000000000000#N canvas 808 178 381 297 10; #X obj 58 49 inlet~; #X obj 58 207 outlet~; #X obj 59 182 *~; #X obj 110 84 *~; #X obj 195 49 inlet~; #X obj 179 208 outlet~; #X obj 180 183 *~; #X obj 145 83 *~; #X obj 94 119 /~; #X obj 196 111 *~ -1; #X obj 73 85 +~ 1; #X text 49 5 complex inverse; #X connect 0 0 2 0; #X connect 0 0 3 0; #X connect 0 0 3 1; #X connect 2 0 1 0; #X connect 3 0 8 1; #X connect 4 0 7 0; #X connect 4 0 7 1; #X connect 4 0 9 0; #X connect 6 0 5 0; #X connect 7 0 8 1; #X connect 8 0 2 1; #X connect 8 0 6 0; #X connect 9 0 6 1; #X connect 10 0 8 0; creb-0.9.2+darcs20151027/abs/csub~.pd0000644000000000000000000000054312613674326014775 0ustar0000000000000000#N canvas 703 725 381 197 10; #X obj 58 49 inlet~; #X obj 58 159 outlet~; #X obj 195 49 inlet~; #X obj 59 101 -~; #X obj 116 49 inlet~; #X obj 116 159 outlet~; #X obj 253 49 inlet~; #X obj 117 101 -~; #X text 49 5 complex subtraction; #X connect 0 0 3 0; #X connect 2 0 3 1; #X connect 3 0 1 0; #X connect 4 0 7 0; #X connect 6 0 7 1; #X connect 7 0 5 0; creb-0.9.2+darcs20151027/abs/ccmap~.pd0000644000000000000000000000143712613674326015127 0ustar0000000000000000#N canvas 725 589 450 300 10; #X obj 39 85 inlet~; #X obj 139 254 outlet~; #X obj 210 86 inlet~; #X obj 98 85 inlet~; #X obj 198 254 outlet~; #X obj 269 86 inlet~; #X text 63 58 z; #X text 237 60 a; #X obj 159 206 cinv~; #X obj 138 230 cmul~; #X obj 211 117 cconj~; #X obj 159 167 -~ 1; #X obj 64 169 csub~; #X text 23 10 conformal self map of the unit disk (z-a)/(1-conj(a)z) ; #X obj 182 142 cmul~; #X connect 0 0 12 2; #X connect 0 0 14 0; #X connect 2 0 10 0; #X connect 2 0 12 0; #X connect 3 0 12 3; #X connect 3 0 14 1; #X connect 5 0 10 1; #X connect 5 0 12 1; #X connect 8 0 9 2; #X connect 8 1 9 3; #X connect 9 0 1 0; #X connect 9 1 4 0; #X connect 10 0 14 2; #X connect 10 1 14 3; #X connect 11 0 8 0; #X connect 12 0 9 0; #X connect 12 1 9 1; #X connect 14 0 11 0; #X connect 14 1 8 1; creb-0.9.2+darcs20151027/abs/idsfosc~.pd0000644000000000000000000000121312613674326015466 0ustar0000000000000000#N canvas 414 255 527 400 10; #X obj 118 339 outlet~; #X obj 175 339 outlet~; #X obj 118 122 inlet~; #X text 93 100 frequency; #X obj 118 162 cosc~; #X obj 118 228 *~; #X obj 149 228 *~; #X obj 118 256 +~ 1; #X obj 119 282 cinv~; #X text 59 21 complex form of the (infinite) discrete summation oscillator ; #X text 62 38 1/(1-az) \, with z = e^(jw); #X text 178 103 modulation (a); #X obj 215 123 inlet~; #X obj 214 192 *~ -1; #X connect 2 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 7 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 0 0; #X connect 8 1 1 0; #X connect 12 0 13 0; #X connect 13 0 6 1; #X connect 13 0 5 1; creb-0.9.2+darcs20151027/abs/lattice3.pd0000644000000000000000000000124212613674326015350 0ustar0000000000000000#N canvas 178 387 450 300 10; #X obj 59 138 pow; #X msg 59 116 2; #X obj 106 139 pow; #X obj 159 136 pow; #X msg 106 117 1.5; #X msg 159 114 1.25; #X obj 106 166 *; #X obj 59 197 *; #X obj 130 47 unpack 0 0 0; #X obj 59 46 t b b b a; #X obj 59 226 outlet; #X obj 59 24 inlet; #X text 22 4 expand harmonic lattice vector in the (2 \, 3/2 \, 5/4) basis; #X connect 0 0 7 0; #X connect 1 0 0 0; #X connect 2 0 6 0; #X connect 3 0 6 1; #X connect 4 0 2 0; #X connect 5 0 3 0; #X connect 6 0 7 1; #X connect 7 0 10 0; #X connect 8 0 0 1; #X connect 8 1 2 1; #X connect 8 2 3 1; #X connect 9 0 1 0; #X connect 9 1 4 0; #X connect 9 2 5 0; #X connect 9 3 8 0; #X connect 11 0 9 0; creb-0.9.2+darcs20151027/abs/vols~.pd0000644000000000000000000000077412613674326015032 0ustar0000000000000000#N canvas 441 433 450 300 10; #X obj 68 21 inlet~; #X obj 122 22 inlet; #X obj 80 104 *~; #X obj 77 141 outlet~; #X obj 116 42 dbtorms; #X obj 114 92 line~; #X msg 112 66 \$1 5; #X obj 215 34 loadbang; #X obj 218 66 f \$1; #X obj 6 22 inlet~; #X obj 18 105 *~; #X obj 15 142 outlet~; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 4 0 6 0; #X connect 5 0 2 1; #X connect 5 0 10 1; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 8 0 4 0; #X connect 9 0 10 0; #X connect 10 0 11 0; creb-0.9.2+darcs20151027/abs/fblock~.pd0000644000000000000000000000120712613674326015277 0ustar0000000000000000#N canvas 64 291 617 246 10; #X text 201 77 main usage is to compute block synchronous frequencies ; #X text 200 92 for spectral domain processing; #X text 201 49 out = left + right * (sys samplerate / blocksize); #X obj 36 36 inlet~; #X obj 37 198 outlet~; #X obj 102 110 samplerate~; #X text 200 35 fblock~: compute block relative frequencies; #X obj 102 83 loadbang; #X obj 57 165 *~; #X obj 101 35 inlet~; #X obj 102 138 / \$1; #X obj 171 86 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X connect 3 0 4 0; #X connect 5 0 10 0; #X connect 7 0 5 0; #X connect 8 0 4 0; #X connect 9 0 8 0; #X connect 10 0 8 1; #X connect 11 0 5 0; creb-0.9.2+darcs20151027/abs/dsfosc~.pd0000644000000000000000000000325012613674326015320 0ustar0000000000000000#N canvas 162 88 557 519 10; #X obj 201 473 outlet~; #X obj 258 473 outlet~; #X text 59 21 complex form of the discrete summation oscillator; #X text 62 38 (1-az^n)/(1-az) \, with z = e^(jw); #X obj 118 122 inlet~; #X text 93 100 frequency; #X obj 263 119 inlet; #X obj 118 284 cosc~; #X obj 233 258 *~ \$1; #X obj 118 350 *~; #X obj 149 350 *~; #X obj 233 283 cosc~; #X obj 232 340 *~; #X obj 263 340 *~; #X obj 118 378 +~ 1; #X obj 233 368 +~ 1; #X obj 119 404 cinv~; #X obj 213 446 cmul~; #X obj 354 122 inlet; #X obj 354 170 * -1; #X obj 166 327 lop~ 10; #X text 195 100 harmonics (N); #X text 317 102 modulation (r); #X obj 384 217 abs; #X obj 354 194 t f f; #X obj 354 278 *; #X obj 354 236 /; #X obj 384 256 pow \$1; #X floatatom 368 316 5 0 0 0 - - -; #X floatatom 192 270 5 0 0 0 - - -; #X obj 264 150 t b f; #X obj 354 148 f; #X obj 298 333 lop~ 10; #X connect 4 0 8 0; #X connect 4 0 7 0; #X connect 6 0 30 0; #X connect 7 0 9 0; #X connect 7 1 10 0; #X connect 8 0 11 0; #X connect 9 0 14 0; #X connect 10 0 16 1; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 12 0 15 0; #X connect 13 0 17 3; #X connect 14 0 16 0; #X connect 15 0 17 2; #X connect 16 0 17 0; #X connect 16 1 17 1; #X connect 17 0 0 0; #X connect 17 1 1 0; #X connect 18 0 31 0; #X connect 19 0 24 0; #X connect 19 0 20 0; #X connect 20 0 10 1; #X connect 20 0 9 1; #X connect 23 0 26 1; #X connect 23 0 27 0; #X connect 24 0 26 0; #X connect 24 1 23 0; #X connect 25 0 32 0; #X connect 26 0 25 0; #X connect 27 0 25 1; #X connect 28 0 32 1; #X connect 28 0 29 0; #X connect 29 0 20 1; #X connect 30 0 31 0; #X connect 30 1 8 1; #X connect 30 1 27 1; #X connect 31 0 19 0; #X connect 32 0 13 1; #X connect 32 0 12 1; creb-0.9.2+darcs20151027/abs/frequor~.pd0000644000000000000000000000120312613674326015516 0ustar0000000000000000#N canvas 649 489 450 300 10; #X obj 133 212 *~ 2; #X obj 134 235 -~ 1; #X obj 230 141 + 0.5; #X obj 133 188 phasor~; #X msg 190 112 0; #X obj 190 90 loadbang; #X obj 135 258 outlet~; #X obj 133 165 fblock \$1; #X msg 190 141 1; #X obj 132 92 inlet; #X text 28 4 frequor~: frequency domain phasor~ (for traversing spectra) ; #X text 98 75 nb windings; #X text 102 25 output: (0 \, N/2-1) -> (0 \, 1); #X text 152 41 (N/2 \, N-1) -> (-1 \, 0); #X connect 0 0 1 0; #X connect 1 0 6 0; #X connect 2 0 3 1; #X connect 3 0 0 0; #X connect 4 0 2 0; #X connect 4 0 8 0; #X connect 5 0 4 0; #X connect 7 0 3 0; #X connect 8 0 7 1; #X connect 9 0 7 1; creb-0.9.2+darcs20151027/abs/inv.pd0000644000000000000000000000025212613674326014434 0ustar0000000000000000#N canvas 329 434 450 300 10; #X obj 68 45 inlet; #X obj 67 130 outlet; #X obj 68 71 + 1; #X obj 68 96 mod 2; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; creb-0.9.2+darcs20151027/abs/sin~.pd0000644000000000000000000000025612613674326014633 0ustar0000000000000000#N canvas 843 64 157 187 10; #X obj 29 28 inlet~; #X obj 29 59 -~ 0.25; #X obj 29 90 cos~; #X obj 29 117 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; creb-0.9.2+darcs20151027/abs/pdynwav~.pd0000644000000000000000000000033312613674326015526 0ustar0000000000000000#N canvas 164 313 194 151 10; #X obj 30 24 inlet~; #X obj 110 23 inlet; #X obj 30 98 outlet~; #X obj 110 49 phasor~; #X obj 30 67 dynwav~; #X connect 0 0 4 0; #X connect 1 0 3 0; #X connect 3 0 4 1; #X connect 4 0 2 0; creb-0.9.2+darcs20151027/abs/fblock.pd0000644000000000000000000000123712613674326015104 0ustar0000000000000000#N canvas 290 132 617 246 10; #X obj 36 36 inlet; #X obj 101 35 inlet; #X obj 42 196 outlet; #X obj 104 83 samplerate~; #X obj 101 115 / \$1; #X obj 59 158 +; #X obj 103 144 *; #X obj 103 59 t b b f; #X text 200 79 right inlet is also "active"; #X text 201 119 main usage is to compute block synchronous frequencies ; #X text 200 134 for spectral domain processing; #X text 201 49 out = left + right * (sys samplerate / blocksize); #X text 200 35 fblock: compute block relative frequencies; #X connect 0 0 5 0; #X connect 1 0 7 0; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 5 0 2 0; #X connect 6 0 5 1; #X connect 7 0 5 0; #X connect 7 1 3 0; #X connect 7 2 6 1; creb-0.9.2+darcs20151027/abs/cconj~.pd0000644000000000000000000000035112613674326015132 0ustar0000000000000000#N canvas 700 418 285 166 10; #X obj 58 49 inlet~; #X obj 57 105 outlet~; #X obj 195 49 inlet~; #X obj 194 105 outlet~; #X obj 194 75 *~ -1; #X text 49 5 complex conjugate; #X connect 0 0 1 0; #X connect 2 0 4 0; #X connect 4 0 3 0; creb-0.9.2+darcs20151027/abs/step_4.pd0000644000000000000000000000141212613674326015035 0ustar0000000000000000#N canvas 241 612 442 251 10; #X obj 59 51 inlet; #X obj 90 186 tabwrite \$1; #X obj 59 79 t f b; #X msg 89 104 0; #X obj 102 51 inlet; #X obj 102 79 t f b; #X obj 145 51 inlet; #X obj 145 79 t f b; #X obj 188 51 inlet; #X obj 188 79 t f b; #X msg 132 104 1; #X msg 175 104 2; #X msg 218 104 3; #X text 43 21 4 part building block for a step sequencer array input ; #X obj 293 50 inlet; #X obj 162 157 +; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 2 1 3 0; #X connect 3 0 15 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 5 1 10 0; #X connect 6 0 7 0; #X connect 7 0 1 0; #X connect 7 1 11 0; #X connect 8 0 9 0; #X connect 9 0 1 0; #X connect 9 1 12 0; #X connect 10 0 15 0; #X connect 11 0 15 0; #X connect 12 0 15 0; #X connect 14 0 15 1; #X connect 15 0 1 1; creb-0.9.2+darcs20151027/abs/cstate~.pd0000644000000000000000000000027212613674326015323 0ustar0000000000000000#N canvas 441 639 416 164 10; #X obj 18 23 tabreceive~ \$1-real; #X obj 17 52 outlet~; #X obj 164 53 outlet~; #X obj 165 24 tabreceive~ \$1-imag; #X connect 0 0 1 0; #X connect 3 0 2 0; creb-0.9.2+darcs20151027/abs/count.pd0000644000000000000000000000064112613674326014772 0ustar0000000000000000#N canvas 245 395 450 300 10; #X obj 51 24 inlet; #X obj 63 144 f 0; #X obj 64 180 + 1; #X obj 99 144 mod \$1; #X msg 75 108 0; #X obj 41 246 outlet; #X obj 44 66 route reset; #X msg 13 109 bang; #X obj 161 20 inlet; #X connect 0 0 6 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 1; #X connect 4 0 1 1; #X connect 6 0 4 0; #X connect 6 1 7 0; #X connect 7 0 1 0; #X connect 8 0 3 1; creb-0.9.2+darcs20151027/abs/rms~.pd0000644000000000000000000000026212613674326014640 0ustar0000000000000000#N canvas 190 209 347 206 10; #X obj 113 45 inlet~; #X obj 114 72 env~; #X obj 115 98 dbtorms; #X obj 113 134 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; creb-0.9.2+darcs20151027/abs/fmop~.pd0000644000000000000000000000067512613674326015010 0ustar0000000000000000#N canvas 662 414 450 300 10; #X obj 82 154 cos~; #X obj 82 89 phasor~; #X obj 160 96 osc~; #X obj 160 122 *~; #X obj 82 190 outlet~; #X obj 82 61 inlet~; #X obj 160 60 inlet~; #X obj 230 60 inlet~; #X text 76 12 fm operator; #X text 234 38 mod depth; #X text 157 40 mod freq; #X text 59 39 carrier freq; #X connect 0 0 4 0; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 0 0; #X connect 5 0 1 0; #X connect 6 0 2 0; #X connect 7 0 3 1; creb-0.9.2+darcs20151027/abs/pulsor~.pd0000644000000000000000000000157412613674326015372 0ustar0000000000000000#N canvas 641 469 535 446 10; #X obj 96 90 fblock \$1; #X obj 203 102 bang~; #X msg 203 126 0; #X obj 96 179 phasor~; #X obj 159 179 phasor~; #X obj 133 216 -~; #X msg 154 64 1; #X obj 154 37 loadbang; #X obj 203 151 +; #X obj 266 78 inlet; #X text 251 57 duty cycle; #X text 46 11 pulsor~: rectangular window w. duty cycle; #X obj 133 243 +~; #X obj 266 126 fmod 1; #X obj 132 273 onecomp~; #X obj 133 301 outlet~; #X text 115 332 pulse outlet; #X obj 266 104 * -1; #X obj 232 301 outlet~; #X text 228 331 complement; #X connect 0 0 4 0; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 2 0 8 0; #X connect 2 0 3 1; #X connect 3 0 5 0; #X connect 4 0 5 1; #X connect 5 0 12 0; #X connect 6 0 0 1; #X connect 7 0 6 0; #X connect 8 0 4 1; #X connect 9 0 17 0; #X connect 12 0 14 0; #X connect 12 0 18 0; #X connect 13 0 8 1; #X connect 13 0 12 1; #X connect 14 0 15 0; #X connect 17 0 13 0; creb-0.9.2+darcs20151027/abs/ucnorm~.pd0000644000000000000000000000112412613674326015340 0ustar0000000000000000#N canvas 0 0 450 300 10; #X text 59 21 normalize complex number to unit magnitude; #X obj 117 70 inlet~; #X obj 131 99 *~; #X obj 187 70 inlet~; #X obj 203 99 *~; #X obj 226 157 +~ 1; #X obj 226 185 /~; #X obj 226 213 sqrt~; #X obj 116 242 *~; #X obj 116 264 outlet~; #X obj 186 242 *~; #X obj 186 264 outlet~; #X connect 1 0 2 0; #X connect 1 0 2 1; #X connect 1 0 8 0; #X connect 2 0 6 1; #X connect 3 0 4 0; #X connect 3 0 4 1; #X connect 3 0 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 10 1; #X connect 7 0 8 1; #X connect 8 0 9 0; #X connect 10 0 11 0; creb-0.9.2+darcs20151027/abs/cosc~.pd0000644000000000000000000000102712613674326014766 0ustar0000000000000000#N canvas 267 527 381 197 10; #X obj 57 52 inlet~; #X obj 58 78 phasor~; #X obj 151 51 inlet; #X text 48 25 frequency; #X text 154 25 phase; #X text 49 5 complex oscillator (unit norm exponential); #X obj 59 131 cos~; #X obj 118 132 sin~; #X obj 58 159 outlet~; #X obj 119 158 outlet~; #X obj 221 52 inlet; #X obj 59 105 *~ 1; #X text 211 24 phase synchronous harmonic; #X connect 0 0 1 0; #X connect 1 0 11 0; #X connect 2 0 1 1; #X connect 6 0 8 0; #X connect 7 0 9 0; #X connect 10 0 11 1; #X connect 11 0 7 0; #X connect 11 0 6 0; creb-0.9.2+darcs20151027/abs/bpm.pd0000644000000000000000000000063012613674326014416 0ustar0000000000000000#N canvas 385 419 372 239 10; #X obj 48 40 inlet; #X obj 52 155 outlet; #X obj 213 157 outlet; #X text 30 185 quarter note time; #X text 184 188 measure frequency; #X text 46 18 bpm input; #X obj 55 126 /; #X obj 36 67 t b f; #X obj 200 101 / 240; #X msg 44 99 15000; #X connect 0 0 7 0; #X connect 0 0 8 0; #X connect 6 0 1 0; #X connect 7 0 9 0; #X connect 7 1 6 1; #X connect 8 0 2 0; #X connect 9 0 6 0; creb-0.9.2+darcs20151027/abs/blop~.pd0000644000000000000000000000035712613674326015000 0ustar0000000000000000#N canvas 399 553 450 300 10; #X obj 87 196 biquadseries~ \$1; #X msg 107 162 butterLP \$1; #X obj 81 134 inlet~; #X obj 138 134 inlet; #X obj 82 236 outlet~; #X connect 0 0 4 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 1 0; creb-0.9.2+darcs20151027/abs/eadsrh~.pd0000644000000000000000000000114712613674326015310 0ustar0000000000000000#N canvas 127 436 524 279 10; #X obj 34 27 inlet; #X obj 84 27 inlet; #X obj 133 27 inlet; #X msg 44 108 start; #X msg 306 113 stop; #X obj 354 31 inlet; #X msg 34 49 bang; #X obj 44 187 outlet~; #X text 13 6 trigger - attack - decay - sustain - release - duration ; #X obj 44 144 eadsr~ \$1 \$2 \$3 \$4; #X obj 306 84 del \$5; #X obj 211 27 inlet; #X obj 260 27 inlet; #X connect 0 0 6 0; #X connect 1 0 9 1; #X connect 2 0 9 2; #X connect 3 0 9 0; #X connect 4 0 9 0; #X connect 5 0 10 1; #X connect 6 0 3 0; #X connect 6 0 10 0; #X connect 9 0 7 0; #X connect 10 0 4 0; #X connect 11 0 9 3; #X connect 12 0 9 4; creb-0.9.2+darcs20151027/abs/onecomp~.pd0000644000000000000000000000031412613674326015475 0ustar0000000000000000#N canvas 527 369 294 159 10; #X obj 53 26 inlet~; #X obj 53 53 *~ -1; #X obj 53 78 +~ 1; #X obj 53 104 outlet~; #X text 155 23 one compliment; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; creb-0.9.2+darcs20151027/abs/cadd~.pd0000644000000000000000000000042312613674326014731 0ustar0000000000000000#N canvas 800 696 381 197 10; #X obj 58 49 inlet~; #X obj 58 159 outlet~; #X text 49 5 complex addition; #X obj 195 49 inlet~; #X obj 114 49 inlet~; #X obj 114 159 outlet~; #X obj 251 49 inlet~; #X connect 0 0 1 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 6 0 5 0; creb-0.9.2+darcs20151027/abs/expmap~.pd0000644000000000000000000000151512613674326015333 0ustar0000000000000000#N canvas 754 478 456 394 10; #X obj 75 47 inlet~; #X obj 134 47 inlet; #X obj 186 47 inlet; #X obj 167 138 /; #X obj 167 160 log; #X text 138 29 min; #X text 193 30 max; #X text 80 9 exponential map from (-1 \, 1) to (min \, max); #X obj 75 244 *~; #X obj 75 302 *~; #X obj 74 335 outlet~; #X obj 214 114 f \$1; #X obj 167 114 f \$2; #X obj 75 268 exp~; #X obj 271 70 t b b; #X obj 271 49 loadbang; #X obj 134 71 t b f; #X obj 74 137 +~ 1; #X obj 74 162 *~ 0.5; #X connect 0 0 17 0; #X connect 1 0 16 0; #X connect 2 0 12 0; #X connect 3 0 4 0; #X connect 4 0 8 1; #X connect 8 0 13 0; #X connect 9 0 10 0; #X connect 11 0 3 1; #X connect 11 0 9 1; #X connect 12 0 3 0; #X connect 13 0 9 0; #X connect 14 0 12 0; #X connect 14 1 11 0; #X connect 15 0 14 0; #X connect 16 0 12 0; #X connect 16 1 11 0; #X connect 17 0 18 0; #X connect 18 0 8 0; creb-0.9.2+darcs20151027/abs/ti_hihat.pd0000644000000000000000000000774112613674326015443 0ustar0000000000000000#N canvas 172 85 810 555 10; #X obj -27 21 inlet; #X obj 91 224 ead~; #X obj 90 272 *~; #N canvas 413 387 659 494 hihat 0; #X obj 27 324 square~; #X obj 87 324 square~; #X obj 60 360 *~; #X obj 156 326 square~; #X obj 216 326 square~; #X obj 189 362 *~; #X obj 289 329 square~; #X obj 349 329 square~; #X obj 322 365 *~; #X obj 418 331 square~; #X obj 478 331 square~; #X obj 451 367 *~; #X obj 320 396 +~; #X obj 165 408 +~; #X obj 217 444 outlet~; #X obj 212 181 f; #X obj 251 183 + 1; #X obj 211 155 until; #X msg 210 131 8; #X msg 242 130 0; #X obj 210 108 t b b; #X obj 210 79 t b f; #X obj 277 212 random 20000; #X msg 309 128 seed \$1; #X obj 211 211 t f b; #X obj 212 256 pack 0 0; #X obj 212 278 route 0 1 2 3 4 5 6 7; #X obj 210 34 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10 -262144 -1 -1 600.246 256; #X floatatom 28 304 5 0 0 0 - - -; #X floatatom 93 305 5 0 0 0 - - -; #X floatatom 161 305 5 0 0 0 - - -; #X floatatom 219 307 5 0 0 0 - - -; #X floatatom 292 307 5 0 0 0 - - -; #X floatatom 353 305 5 0 0 0 - - -; #X floatatom 421 307 5 0 0 0 - - -; #X floatatom 481 311 5 0 0 0 - - -; #X obj 279 237 + 0; #X text 193 16 magic number; #X obj 355 37 nbx 5 14 20 20000 1 1 empty empty empty 0 -6 0 10 -262144 -1 -1 10752.2 256; #X text 344 18 freq range; #X obj 464 37 nbx 5 14 20 20000 1 1 empty empty empty 0 -6 0 10 -262144 -1 -1 95.6572 256; #X text 433 16 bottom freq; #X obj 143 31 inlet; #X obj 307 38 inlet; #X obj 424 36 inlet; #X obj 143 62 * 1000; #X obj 210 55 f 0; #X obj 456 79 t b f; #X obj 354 59 t b f; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 13 0; #X connect 3 0 5 0; #X connect 4 0 5 1; #X connect 5 0 13 1; #X connect 6 0 8 0; #X connect 7 0 8 1; #X connect 8 0 12 0; #X connect 9 0 11 0; #X connect 10 0 11 1; #X connect 11 0 12 1; #X connect 12 0 14 0; #X connect 13 0 14 0; #X connect 15 0 16 0; #X connect 15 0 24 0; #X connect 16 0 15 1; #X connect 17 0 15 0; #X connect 18 0 17 0; #X connect 19 0 15 1; #X connect 20 0 18 0; #X connect 20 1 19 0; #X connect 21 0 20 0; #X connect 21 1 23 0; #X connect 22 0 36 0; #X connect 23 0 22 0; #X connect 24 0 25 0; #X connect 24 1 22 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 26 1 29 0; #X connect 26 2 30 0; #X connect 26 3 31 0; #X connect 26 4 32 0; #X connect 26 5 33 0; #X connect 26 6 34 0; #X connect 26 7 35 0; #X connect 27 0 46 0; #X connect 28 0 0 0; #X connect 29 0 1 0; #X connect 30 0 3 0; #X connect 31 0 4 0; #X connect 32 0 6 0; #X connect 33 0 7 0; #X connect 34 0 9 0; #X connect 35 0 10 0; #X connect 36 0 25 1; #X connect 38 0 48 0; #X connect 40 0 36 1; #X connect 40 0 47 0; #X connect 42 0 45 0; #X connect 43 0 38 0; #X connect 44 0 40 0; #X connect 45 0 27 0; #X connect 46 0 21 0; #X connect 47 0 46 0; #X connect 47 1 36 1; #X connect 48 0 46 0; #X connect 48 1 22 1; #X restore 105 248 pd hihat; #X obj 130 294 nbx 5 14 20 20000 1 1 empty empty HP -20 7 0 10 -24198 -1 -1 20 256; #X obj 89 313 bhip~ 1; #X obj 189 42 nbx 3 14 -1e+37 1e+37 0 1 empty empty A' -14 7 0 10 -225271 -1 -1 5 256; #X obj 76 174 +; #X obj 38 39 nbx 3 14 -1e+37 1e+37 0 1 empty empty A -10 7 0 10 -260818 -1 -1 5 256; #X obj 145 180 +; #X obj 101 39 nbx 3 14 -1e+37 1e+37 0 1 empty empty D -10 7 0 10 -260818 -1 -1 36 256; #X obj 76 141 *; #X obj 145 142 *; #X obj 89 339 outlet~; #X obj 258 41 nbx 3 14 -1e+37 1e+37 0 1 empty empty D' -14 7 0 10 -225271 -1 -1 36 256; #X obj -20 82 t b f; #X obj 101 17 inlet; #X obj 38 18 inlet; #X obj 257 19 inlet; #X obj 188 18 inlet; #X obj 327 21 inlet; #X obj 379 21 inlet; #X connect 0 0 15 0; #X connect 1 0 2 0; #X connect 2 0 5 0; #X connect 3 0 2 1; #X connect 4 0 5 1; #X connect 5 0 13 0; #X connect 6 0 11 1; #X connect 7 0 1 1; #X connect 8 0 7 1; #X connect 9 0 1 2; #X connect 10 0 9 1; #X connect 11 0 7 0; #X connect 12 0 9 0; #X connect 14 0 12 1; #X connect 15 0 1 0; #X connect 15 1 11 0; #X connect 15 1 12 0; #X connect 16 0 10 0; #X connect 17 0 8 0; #X connect 18 0 14 0; #X connect 19 0 6 0; #X connect 20 0 4 0; #X connect 21 0 3 0; #X coords 0 0 0.00245098 0.00260417 200 50 0; creb-0.9.2+darcs20151027/abs/ucmod~.pd0000644000000000000000000000112712613674326015147 0ustar0000000000000000#N canvas 0 0 450 300 10; #X obj 74 72 inlet~; #X obj 121 72 inlet~; #X obj 150 147 *~ -1; #X obj 87 114 *~; #X obj 124 114 *~; #X obj 179 71 inlet~; #X obj 86 146 +~ 1; #X obj 88 236 cmul~; #X obj 135 193 cinv~; #X obj 87 266 outlet~; #X obj 144 267 outlet~; #X text 84 18 unit circle modulator. (1+r conj(z)/(1+rz); #X connect 0 0 3 0; #X connect 1 0 4 0; #X connect 2 0 8 1; #X connect 3 0 6 0; #X connect 4 0 7 1; #X connect 4 0 2 0; #X connect 5 0 4 1; #X connect 5 0 3 1; #X connect 6 0 7 0; #X connect 6 0 8 0; #X connect 7 0 9 0; #X connect 7 1 10 0; #X connect 8 0 7 2; #X connect 8 1 7 3; creb-0.9.2+darcs20151027/abs/lpifft~.pd0000644000000000000000000000255112613674326015326 0ustar0000000000000000#N canvas 261 505 536 346 10; #X obj 407 227 f; #X obj 351 251 * -1; #X obj 73 189 *~; #X obj 104 189 *~; #X obj 49 41 inlet~; #X obj 103 42 inlet~; #X obj 64 242 +~; #X obj 112 246 -~; #X obj 361 35 inlet; #X obj 377 59 fblock \$1; #X msg 434 38 1; #X obj 361 85 /; #X obj 392 299 +~; #X obj 361 109 moses 1; #X msg 361 131 1; #X obj 407 154 t b f; #X msg 407 176 0.5; #X obj 409 204 /; #X obj 407 275 pulsor~ \$1; #X obj 329 275 pulsor~ \$1; #X obj 446 15 loadbang; #X obj 48 315 outlet~; #X obj 123 312 outlet~; #X text 18 265 xform s.t. real spectrum = mono; #X text 18 7 ifft with rectangular lowpass for anti-aliased dynwav ; #X text 9 18 creation arg = fft size \, right inlet = dynwav cutoff freq; #X obj 122 165 +~; #X obj 73 214 nifft~; #X connect 0 0 1 0; #X connect 0 0 18 0; #X connect 1 0 19 0; #X connect 2 0 27 0; #X connect 3 0 27 1; #X connect 4 0 2 0; #X connect 5 0 3 0; #X connect 6 0 21 0; #X connect 7 0 22 0; #X connect 8 0 11 0; #X connect 9 0 11 1; #X connect 10 0 9 1; #X connect 11 0 13 0; #X connect 12 0 26 0; #X connect 13 0 14 0; #X connect 13 1 15 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 15 1 17 1; #X connect 16 0 17 0; #X connect 17 0 0 0; #X connect 18 0 12 1; #X connect 19 1 12 0; #X connect 20 0 10 0; #X connect 26 0 3 1; #X connect 26 0 2 1; #X connect 27 0 6 0; #X connect 27 0 7 0; #X connect 27 1 6 1; #X connect 27 1 7 1; creb-0.9.2+darcs20151027/abs/step_16r.pd0000644000000000000000000000217512613674326015311 0ustar0000000000000000#N canvas 602 279 442 438 10; #X obj 135 64 inlet; #X text 43 21 4 part building block (read) for a step sequencer array input; #X obj 135 148 + 4; #X obj 135 173 step_4r \$1; #X obj 200 203 outlet; #X obj 178 229 outlet; #X obj 156 252 outlet; #X obj 135 278 outlet; #X obj 21 176 step_4r \$1; #X obj 86 206 outlet; #X obj 64 232 outlet; #X obj 42 255 outlet; #X obj 21 281 outlet; #X obj 363 166 step_4r \$1; #X obj 428 196 outlet; #X obj 406 222 outlet; #X obj 384 245 outlet; #X obj 363 271 outlet; #X obj 249 169 step_4r \$1; #X obj 314 199 outlet; #X obj 292 225 outlet; #X obj 270 248 outlet; #X obj 249 274 outlet; #X obj 249 144 + 8; #X obj 363 141 + 12; #X connect 0 0 2 0; #X connect 0 0 8 0; #X connect 0 0 23 0; #X connect 0 0 24 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 6 0; #X connect 3 2 5 0; #X connect 3 3 4 0; #X connect 8 0 12 0; #X connect 8 1 11 0; #X connect 8 2 10 0; #X connect 8 3 9 0; #X connect 13 0 17 0; #X connect 13 1 16 0; #X connect 13 2 15 0; #X connect 13 3 14 0; #X connect 18 0 22 0; #X connect 18 1 21 0; #X connect 18 2 20 0; #X connect 18 3 19 0; #X connect 23 0 18 0; #X connect 24 0 13 0; creb-0.9.2+darcs20151027/abs/step_4r.pd0000644000000000000000000000114612613674326015223 0ustar0000000000000000#N canvas 241 612 442 251 10; #X obj 59 173 tabread \$1; #X obj 59 199 outlet; #X obj 135 64 inlet; #X obj 135 173 tabread \$1; #X obj 135 199 outlet; #X obj 210 173 tabread \$1; #X obj 210 199 outlet; #X obj 288 173 tabread \$1; #X obj 288 199 outlet; #X obj 135 148 + 1; #X obj 210 148 + 2; #X obj 288 148 + 3; #X text 43 21 4 part building block (read) for a step sequencer array input; #X connect 0 0 1 0; #X connect 2 0 0 0; #X connect 2 0 9 0; #X connect 2 0 10 0; #X connect 2 0 11 0; #X connect 3 0 4 0; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 9 0 3 0; #X connect 10 0 5 0; #X connect 11 0 7 0; creb-0.9.2+darcs20151027/abs/cstate+~.pd0000644000000000000000000000036612613674326015402 0ustar0000000000000000#N canvas 441 639 286 142 10; #X obj 23 12 table \$1-real \$2; #X obj 23 33 table \$1-imag \$2; #X obj 23 101 tabsend~ \$1-real; #X obj 143 101 tabsend~ \$1-imag; #X obj 22 70 inlet~; #X obj 143 69 inlet~; #X connect 4 0 2 0; #X connect 5 0 3 0; creb-0.9.2+darcs20151027/abs/icep~.pd0000644000000000000000000000065212613674326014762 0ustar0000000000000000#N canvas 318 596 521 228 10; #X obj 70 42 inlet~; #X obj 124 42 inlet~; #X obj 94 66 nfft~; #X obj 94 124 nifft~; #X obj 68 164 outlet~; #X obj 126 164 outlet~; #X text 229 45 backward cepstrum; #X obj 94 95 cexp~; #X text 229 64 using normalized fft/ifft objects; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 7 0; #X connect 2 1 7 1; #X connect 3 0 4 0; #X connect 3 1 5 0; #X connect 7 0 3 0; #X connect 7 1 3 1;