din-5.2.1/0000755000175100017510000000000012122367131007272 500000000000000din-5.2.1/README0000644000175100017510000000214712122366642010104 00000000000000DIN Is Noise Copyright (c) 2006-2013 S Jagannathan Please visit http://dinisnoise.org for more information. DIN Is Noise is released under GPL 2.0 license. See the file COPYING for more information. DIN is Free Software. Building DIN: In a shell, type: cd /path/to/din/download/directory tar xf din-5.2.1.tar.gz cd din-5.2.1 ./configure make sudo make install If the configure script fails, check if you have these libraries: OpenGL, Tcl, fftw3f, libircclient, liblo and JACK If you dont, install these libraries first and then try again. Running DIN: In a shell, type: din Help: Press F1 inside DIN. Use Insert and Delete keys to scroll thru the help text. FAQ: http://dinisnoise.org/faq/ DIN commands: http://dinisnoise.org/commands/ DIN keyboard shortcuts: http://dinisnoise.org/hotkeys/ Or e-mail your question to the author: S Jagannathan: jag@dinisnoise.org Please consider a donation for the DIN Is Noise project. Your support will help the author further develop DIN and other exciting audio-visual projects. To donate, please visit http://dinisnoise.org/donate/ din-5.2.1/acinclude.m40000644000175100017510000000004712111771600011402 00000000000000AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) din-5.2.1/configure.ac0000644000175100017510000000116712122366541011511 00000000000000AC_INIT([din], [5.2.1]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([configure.ac]) AC_PROG_CXX AC_CHECK_HEADERS([GL/gl.h],AC_MSG_NOTICE([+++ Found OpenGL +++]),[AC_MSG_ERROR([!!! Please install OpenGL !!!])]) AC_CHECK_HEADERS([tcl.h] [tcl8.5/tcl.h],AC_MSG_NOTICE([+++ Found Tcl 8.5 +++]),[AC_MSG_WARN([!!! Is Tcl 8.5 installed? !!!])]) AC_CHECK_HEADERS([libircclient/libircclient.h],,[AC_MSG_ERROR([!!! Please install libircclient !!!])]) PKG_CHECK_MODULES([liblo], [liblo]) PKG_CHECK_MODULES([jack], [jack]) PKG_CHECK_MODULES([fftw3f], [fftw3f]) AC_CONFIG_FILES([Makefile src/Makefile include/Makefile data/Makefile]) AC_OUTPUT din-5.2.1/aclocal.m40000644000175100017510000011622412122366546011071 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, [m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) din-5.2.1/Makefile.am0000644000175100017510000000016312111771600011244 00000000000000SUBDIRS = include src data blurb = README COPYING AUTHORS CHANGELOG INSTALL NEWS TODO BUGS EXTRA_DIST = $(blurb) din-5.2.1/Makefile.in0000644000175100017510000005163012122366546011275 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ INSTALL NEWS TODO acconfig.h depcomp install-sh ltmain.sh \ missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw3f_CFLAGS = @fftw3f_CFLAGS@ fftw3f_LIBS = @fftw3f_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ jack_CFLAGS = @jack_CFLAGS@ jack_LIBS = @jack_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include src data blurb = README COPYING AUTHORS CHANGELOG INSTALL NEWS TODO BUGS EXTRA_DIST = $(blurb) all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ distclean distclean-generic distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: din-5.2.1/configure0000755000175100017510000054131012122366547011137 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for din 5.2.1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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. 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 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" 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 : # 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. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} 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_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; } # 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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='din' PACKAGE_TARNAME='din' PACKAGE_VERSION='5.2.1' PACKAGE_STRING='din 5.2.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="configure.ac" # 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='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS fftw3f_LIBS fftw3f_CFLAGS jack_LIBS jack_CFLAGS liblo_LIBS liblo_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM 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 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 enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR liblo_CFLAGS liblo_LIBS jack_CFLAGS jack_LIBS fftw3f_CFLAGS fftw3f_LIBS' # 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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 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 ;; -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 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 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 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 din 5.2.1 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] --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/din] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of din 5.2.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CXX C++ compiler command CXXFLAGS 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 CC C compiler command CFLAGS C compiler flags CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path liblo_CFLAGS C compiler flags for liblo, overriding pkg-config liblo_LIBS linker flags for liblo, overriding pkg-config jack_CFLAGS C compiler flags for jack, overriding pkg-config jack_LIBS linker flags for jack, overriding pkg-config fftw3f_CFLAGS C compiler flags for fftw3f, overriding pkg-config fftw3f_LIBS linker flags for fftw3f, overriding pkg-config 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 din configure 5.2.1 generated by GNU Autoconf 2.67 Copyright (C) 2010 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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # 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; test "x$as_lineno_stack" = x && { as_lineno=; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # 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 "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; 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 "test \"\${$3+set}\"" = set; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # 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 "test \"\${$3+set}\"" = set; 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile 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 din $as_me 5.2.1, which was generated by GNU Autoconf 2.67. 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $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 STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $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_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" 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 STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk 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 test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$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 AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='din' VERSION='5.2.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # 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 test "${ac_cv_objext+set}" = set; 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 test "${ac_cv_cxx_compiler_gnu+set}" = set; 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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= 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 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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { $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 test "${ac_cv_c_compiler_gnu+set}" = set; 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 test "${ac_cv_prog_cc_g+set}" = set; 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 #include #include /* 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 depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= 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 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 test "${ac_cv_prog_CPP+set}" = set; 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 test "${ac_cv_path_GREP+set}" = set; 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" { test -f "$ac_path_GREP" && $as_test_x "$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 test "${ac_cv_path_EGREP+set}" = set; 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" { test -f "$ac_path_EGREP" && $as_test_x "$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 test "${ac_cv_header_stdc+set}" = set; 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 # 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 for ac_header in GL/gl.h do : ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" if test "x$ac_cv_header_GL_gl_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GL_GL_H 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: +++ Found OpenGL +++" >&5 $as_echo "$as_me: +++ Found OpenGL +++" >&6;} else as_fn_error $? "!!! Please install OpenGL !!!" "$LINENO" 5 fi done for ac_header in tcl.h tcl8.5/tcl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: +++ Found Tcl 8.5 +++" >&5 $as_echo "$as_me: +++ Found Tcl 8.5 +++" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: !!! Is Tcl 8.5 installed? !!!" >&5 $as_echo "$as_me: WARNING: !!! Is Tcl 8.5 installed? !!!" >&2;} fi done for ac_header in libircclient/libircclient.h do : ac_fn_c_check_header_mongrel "$LINENO" "libircclient/libircclient.h" "ac_cv_header_libircclient_libircclient_h" "$ac_includes_default" if test "x$ac_cv_header_libircclient_libircclient_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIRCCLIENT_LIBIRCCLIENT_H 1 _ACEOF else as_fn_error $? "!!! Please install libircclient !!!" "$LINENO" 5 fi done if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblo" >&5 $as_echo_n "checking for liblo... " >&6; } if test -n "$liblo_CFLAGS"; then pkg_cv_liblo_CFLAGS="$liblo_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblo\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblo") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_liblo_CFLAGS=`$PKG_CONFIG --cflags "liblo" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$liblo_LIBS"; then pkg_cv_liblo_LIBS="$liblo_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblo\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblo") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_liblo_LIBS=`$PKG_CONFIG --libs "liblo" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then liblo_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "liblo" 2>&1` else liblo_PKG_ERRORS=`$PKG_CONFIG --print-errors "liblo" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$liblo_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (liblo) were not met: $liblo_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables liblo_CFLAGS and liblo_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables liblo_CFLAGS and liblo_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else liblo_CFLAGS=$pkg_cv_liblo_CFLAGS liblo_LIBS=$pkg_cv_liblo_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jack" >&5 $as_echo_n "checking for jack... " >&6; } if test -n "$jack_CFLAGS"; then pkg_cv_jack_CFLAGS="$jack_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 ($PKG_CONFIG --exists --print-errors "jack") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_jack_CFLAGS=`$PKG_CONFIG --cflags "jack" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$jack_LIBS"; then pkg_cv_jack_LIBS="$jack_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack\""; } >&5 ($PKG_CONFIG --exists --print-errors "jack") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_jack_LIBS=`$PKG_CONFIG --libs "jack" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then jack_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack" 2>&1` else jack_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$jack_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (jack) were not met: $jack_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables jack_CFLAGS and jack_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables jack_CFLAGS and jack_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else jack_CFLAGS=$pkg_cv_jack_CFLAGS jack_LIBS=$pkg_cv_jack_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw3f" >&5 $as_echo_n "checking for fftw3f... " >&6; } if test -n "$fftw3f_CFLAGS"; then pkg_cv_fftw3f_CFLAGS="$fftw3f_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3f\""; } >&5 ($PKG_CONFIG --exists --print-errors "fftw3f") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_fftw3f_CFLAGS=`$PKG_CONFIG --cflags "fftw3f" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$fftw3f_LIBS"; then pkg_cv_fftw3f_LIBS="$fftw3f_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fftw3f\""; } >&5 ($PKG_CONFIG --exists --print-errors "fftw3f") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_fftw3f_LIBS=`$PKG_CONFIG --libs "fftw3f" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then fftw3f_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fftw3f" 2>&1` else fftw3f_PKG_ERRORS=`$PKG_CONFIG --print-errors "fftw3f" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$fftw3f_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (fftw3f) were not met: $fftw3f_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables fftw3f_CFLAGS and fftw3f_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables fftw3f_CFLAGS and fftw3f_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else fftw3f_CFLAGS=$pkg_cv_fftw3f_CFLAGS fftw3f_LIBS=$pkg_cv_fftw3f_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi ac_config_files="$ac_config_files Makefile src/Makefile include/Makefile data/Makefile" 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 test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file 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 if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${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. 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' 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 if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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 din $as_me 5.2.1, which was generated by GNU Autoconf 2.67. 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" config_commands="$ac_config_commands" _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 Configuration commands: $config_commands 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="\\ din config.status 5.2.1 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 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' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' 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 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _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 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; *) 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 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # 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 {' >"$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 >>"\$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 >>"\$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 < "$tmp/subs1.awk" > "$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 :C $CONFIG_COMMANDS" 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="$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 >"$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 # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _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 s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$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' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; 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 din-5.2.1/AUTHORS0000644000175100017510000000030612111771600010257 00000000000000S Jagannathan -- original author. Peter Nelson -- FPS limiting & JACK MIDI support. speps -- din desktop stub & icon; Arch packaging. din-5.2.1/COPYING0000644000175100017510000004311012111771600010242 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 COPYING, 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 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) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) year 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. din-5.2.1/INSTALL0000644000175100017510000002245012111771600010244 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. din-5.2.1/NEWS0000644000175100017510000000033712122361021007704 00000000000000DIN Is Noise is the Pixelache Software of the year 2012. http://www.pixelache.ac/helsinki/2011/piksel11-pixelache-sotfware-of-the-year-2012/ Please donate to DIN Is Noise project by visiting http://dinisnoise.org/donate/ din-5.2.1/TODO0000644000175100017510000000366612111771600007713 00000000000000legend: * todo b bug @ doing ? thinking of @ ! needs thinking immediates: dont copy curve name from library - keep it optional? editor assignments must be saved/loaded properly position intial din window so that it doesnt hide behind any window manager panels move sustain marker din board: * display fm/am/gater bpm like oscilloscope * set range sizes based on note interval lengths. currently its a constant number of microtones. * multiple melody voices (now as drones only) ie multiple mouse pointers with phrases assignable to each ! dont calculate fm/am/gaters buffers if fmd == 0, amd == 0 and vol == 0 ! phrasor to drones ! drone rise & set gater: * tap gater pattern - tap a key to set gater pattern press = 1, release = 0 modulation: * relative modulation by semi-tones - eg., current -> +1 -1 -2 +1 +1 -> current * library of relative modulation patterns keyframe animation: * of any vertex or tangent against time console: * save history of all commands entered in a session to disk and reload * console::bg to have a coat of bg paint for a line on console - makes help text stand out curve_editor: * multi-select via box drawing * multi-operation - move/insert/delete on multiple elements with undo * paste insert / paste append * picker -> pick vertex / tangent / curves * cursor value printing format to control number of places after decimal point is displayed * set win_chunk & curv_chunk * rails vertex/tangent goes along the rails rail bpm rail trigger is mouse * vertex labelling at screen left, bottom ? undo stack attached to every curve instead of being on the curve editor gui: * multiple area on same screen with different ui controls / editors * standard controls - labels, buttons, check, radio, slider, list * place text (labels?) anywhere on screen as doc commands: * set-style target goto mouse captures: * more than 1 * save/load din-5.2.1/acconfig.h0000644000175100017510000000047412111771600011137 00000000000000#undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM #undef PACKAGE_LOCALE_DIR #undef PACKAGE_DOC_DIR #undef PACKAGE_DATA_DIR #undef PACKAGE_PIXMAPS_DIR #undef PACKAGE_HELP_DIR #undef PACKAGE_MENU_DIR #undef PACKAGE_SOURCE_DIR #undef GETTEXT_PACKAGE din-5.2.1/depcomp0000755000175100017510000004426712122323375010606 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: din-5.2.1/install-sh0000755000175100017510000003253712122323375011232 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: din-5.2.1/ltmain.sh0000644000175100017510000060603112111771600011036 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.26 TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: din-5.2.1/missing0000755000175100017510000002623312122323375010621 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: din-5.2.1/mkinstalldirs0000755000175100017510000000672212122323375012031 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: din-5.2.1/CHANGELOG0000644000175100017510000012750712122366621010443 00000000000000March 20, 2013: !!! din-5.2.1 !!! FIX drawing tips twice! :( March 20, 2013: !!! din-5.2 !!! NEW tips display that shows tips for each instrument/editor FIX unfold console when user presses F1 to display detailed help FIX when user presses b, dont state change when gater state is already changing FIX text/value field precision set to 1/100 - thats enough isnt it? :) FIX changed feedback and volume curves for better sound delay March 14, 2013: !!! din-5.1 !!! NEW folding corrections made on proprietary portable release back into Free release March 6, 2013: !!! din-5.0 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! NEW merged CHANGELOG from unreleased din-4.3. NEW Author's Note with a request for donation. NEW draw baseline of oscilloscope to help picking & moving easier FIX save & load curve editor assignments FIX left click + mouse-move (not drag!) on parameters to move parameters dialog on keyboard-keyboard. FIX Toggling while fade-in/out happens in Voice, Gater, Delay buttons. FIX Press ESC to leave command mode FIX remember parameter slider positions on keyboard-keyboard FIX fade out on quit FIX remove finished notes in the background on keyboard-keyboard FIX INTERNAL rollup code in console FIX INTERNAL removed get-curve-editor command FIX INTERNAL correct init of vars in keyboard-keyboard class FIX INTERNAL correct init of widget::focus FIX INETERNAL correct init of on_color & off_color in checkbutton class October 1, 2012: !!! wip din-4.3 !!! NEW filled_button - a button that is filled with some color (part of GUI library) - used on parameter sliders (see below) NEW created parameters dialog for keyboard-keyboard. visually edit attack time, decay time, pitch bend & note volume! to operate slider, left-click on the slider and mouse-move to change value NEW right-click on parameters titlebar and mouse-move to move the dialog. right-click again to drop! NEW min/max dialog for editing parameter limits. click on the filled button at the left of a parameter slider to show/hide min/max dialog NEW set-var commands for din variables attack_time, decay_time, pitch_bend and note_volume also updates the GUI. eg., set-var attack_time 0.15 ;# updates attack_time slider set-var decay_time 5 ;# updates decay_time slider set-var pitch_bend 50 ;# updates the pitch_bend slider NEW on exit, din waits until all launched keyboard-keyboard notes have faded out NEW tweaked parameters of keyboard-keyboard and gave better defaults. BUG resize screen and parameters dialog may disappear; workaround: resize to last good size. FIX click or ALT+F4 on window close button doesnt quit din. must quit thru ESC, ESC again. September 25, 2012: !!! din-4.2.1 !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! FIX phrasor continues playing on microtonal-keyboard when instrument is keyboard-keyboard September 21, 2012: !!! din-4.2 !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! NEW voice, gater & delay fade in/out at start, during operation & at exit. NEW auto-fold the console during verbose parameter change (FM/AM depth/bpm etc) *** tweaked the compressor & delay feedback/volume curves for better defaults September 18, 2012: !!! din 4.1 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! NEW Compressor checkbox on microtonal-keyboard & keyboard-keyboard NEW show names of donors to the DIN is Noise project on the ticker September 2, 2012: !!! wip: 4.1 !!! FIX font definition with y > 0 for correct positioning of ui elements like buttons, checkboxes etc. FIX pushed the ticker down to the bottom FIX start resolution is 800 x 600 instead of 640 x 480. done in 4.0, forgot to note in CHANGELOG August 31, 2012: !!! din-4.0 !!! NEW Donate button and a ticker message - sorry folks, lost my patronage and my situation is dire :( FIX click and release on button triggers click on the button instead of just click August 30, 2012: !!! wip: din-4.0 !!! NEW drones fade in and out on din load/exit! NEW drones fade in on creation! NEW drones fade out on delete! NEW visually move the sustain on attack editor on keyboard-keyboard NEW sustain saved with attack curve library FIX proper onion skin toggling on all editors August 8, 2012: !!! wip: din-4.0 !!! FIX notes that were bent stay bent when new note is launched NEW save/reload mouse position on keyboard-keyboard for better mouse based pitch bending NEW save/reload of number of trail points & handle size of all drones May 14, 2012: !!! wip: din-3.6 ||| FIX data files stored in /usr/local/share/din instead of /usr/local/var/din NEW change the trail size of each drone (+ and -), selected drones or all drones NEW change size of a drone (9 & 0), selected drones or all drones May 08, 2012: !!! din-3.5 !!! +++ save/load variable delta_bpm *** INTERNAL: moved SAMPLE_DURATION calculation to audio_out::set_sample_rate *** INTERNAL: revised console.h/.cc *** INTERNAL/FIX?: moved console text color constants to main.cc FIX MIDI connnected to MIDI connected in audio.cc - thanks Ian Morrison NEW drone trails! press + and - on microtonal-keyboard to increase & decrease trail length NEW drone handle size - press 9, 0 on microtonal-keyboard NEW press o on curve editor to overlay din microtonal-keyboard or keyboard-keyboard on the curve editor useful for editing drone modulation curves and watching the drone modulation shapes change FIX memory leak on keyboard-keyboard when fully decayed notes are removed NEW mouse driven pitch bend on keyboard-keyboard! move mouse either side of dotted vertical line to pitch bend. pitch bend applies to all notes. to zero pitch bend bring mouse back to the dotted line. change pitch bend amount from command mode: set-var pitch_bend 100 ;# upto 100 hz sv pb 100 ;# short form mouse driven pitch bend overrides MIDI driven pitch bend. use one or the other :) NEW variable trail_length for drone trail lengths: set-var trail_length 10 ;# trail has 10 points sv tl 10 ;# short form can also be set from the ui as listed above NEW din.desktop and din.png files to help packagers (look in ~/.din/data) April 17, 2012: !!!! din-3.0 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! +++ visual drone modulation +++ +++ j - toggle modulation target: voice or drones +++ y, u - decrease/increase FM depth of selected drones or all drones or the lead voice when there are no drones. +++ r, t - decrease/increase AM depth of selected drones or all drones or the lead voice when there are no drones. +++ F7, F8 - decrease/increase FM bpm of selected drones or all drones or the lead voice when there are no drones. +++ F9, F10 - decrease/increase FM bpm of selected drones or all drones or the lead voice when there are no drones. +++ press 3 on microtonal-keyboard to edit the drone modulation curves pink for AM cyan for FM +++ automagically save and load modulation on drones +++ k - toggle drone anchor drawing +++ smoother increase / decrease of drone master volume March 4, 2012: !!!! din-2.0 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! +++: quantise bezier curve pattern generated by morse-code command to n beats: morse-code sos ;# quantise to 1 beat (default) morse-code sos 2.5 ;# quantise to 2 and half beats mc sos 3 ;# short form; quantise to 3 beats ;# the bezier curve pattern is on copy curve ;# just paste (LCTRL + v) on any curve in any curve editor +++: detect when a MIDI device connects or disconnects with din +++: press keys on the MIDI keyboard and launch notes. support from C-1 (MIDI note on # = 0) to G9 (MIDI note on # = 127). +++: support for retuning intervals, velocity curves and pitch bending. fix: fixed decay failure when note volume at start of decay is -ve February 11, 2012: !!!! din-1.9.5 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! fix: shoot of volume when sustain is larger than x value of last vertex on attack curve! +++: add new variable auto_connect_outputs to control if din will auto connect its output to system audio outputs. yes by default. set-var auto_connect_outputs 1 ;# auto connects next time din starts sv aco 0 ;# short form; disables auto connect ***: reworked (yet again) the result handling of Tcl interpreter January 15, 2012: !!!! din-1.9.4 !!!! ***: changed curve-value command to retain existing x or y values of a vertex or tangent position. ***: rewrote the result handling of Tcl interpreter December 22, 2011: !!!! din-1.9.3 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! +++: new changer patch to automagically change the key of din every n seconds fix: fixed Bus Error / Segmentation fault due to bad result clearing in the Tcl interpreter. December 08, 2011 !!!! din-1.9.2 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! fix: size of boxes in keyboard-keyboard is constant irrespective of note volume +++: added new variable delta_time set-var delta_time 0.1 ;# 1/10 sec delta delta_time is used for changing attack and decay time thru their keyboard short cuts ie attack time & decay time change in delta_time steps. November 27, 2011: !!!! din-1.9.1 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! fix: version number on title bar matches version number of din. fix: immediately insert vertex when there is only one curve in a curve editor fix: immediately draw scratch curve when there is only one curve in a curve editor fix: doesnt enter command mode when ALT + TAB is pressed ***: changed name of din board to microtonal-keyboard +++: new keyboard short cuts for attack time & decay time on keyboard-keyboard +++: f11, f12 to change octave shift bpm on microtonal keyboard & keyboard-keyboard +++: SPACE to toggle delay on keyboard-keyboard ***: changed waveform of keyboard-keyboard from sine to the waveform on microtonal-keyboard. ***: LALT -> SPACE on sine composer to avoid clash with ALT + TAB November 16, 2011: !!!! din-1.9 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! fix: disabled exit Tcl command that quits & crashes din fix: disabled application of sine harmonic composer output to non waveforms (ie gater patterns, fm/am patterns etc) +++: added 33 new Bezier curve waveforms to the waveforms library +++: added display of Fast Fourier Transform (FFT) of Bezier curve waveforms +++: added display of samples for 2 cycles of a waveform at a particular pitch ***: labelled the octave shift patterns & added a new octave shift pattern (snap-4th) ***: can now toggle sine harmonic composer, fft and samples display (see curve_editor.hlp) on waveform editors November 6, 2011: !!!! din-1.8.6 !!!! !!!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!!! fix: saved & restored note-volume +++: separate waveform (ie oscillator) for voice on din board & voices on keyboard-keyboard +++: added new waveforms to library. beziered pulse (with different duty cycles) & saw waveforms +++: added attack & decay patterns library +++: midi clock sync & midi start messages syncs bpm components ***: optimised solver (see solver.cc) October 29, 2011: !!! din-1.8.5.0 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! +++ keyboard-keyboard press a key to play a note keys of the computer keyboard mapped to notes of the scale over a range of 3 octaves *** reassigned curve editors for keyboard-keyboard !fix! bezier curve solver returns upper y when slope is infinity (returned lower y prior) October 5, 2011: !!! din-1.8 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! *** optimised visible range calculation when scrolling on din board +++ added shrutis.tuning -- divides the octave into 22 intervals based on the Indian classical music tradition. tuning set shruti ;# load shruti tuning +++ color coded text messages to the terminal. --- removed unlimited resonators due to complexity in editing & management; now there is only 1 oscillator ie waveform to voice the lead sound. --- removed channels response due to complexity in editing & management volume of waveform is determined by height of the mouse in playing area - @bottom volume is 0; @top volume is wave_volume (see variable wave_volume below) +++ added variable wave_volume to set waveform volume ie oscillator volume: set-var wave_volume 0 ;# mutes voice (also by pressing SPACE on din board) set-var wave_volume 1 ;# max volume - will be *very* loud set-var wave_volume 0.125 ;# default volume set-var wave_volume 2.8 ;# crazy volume accepted (ie not clipped) set-var wave_volume -1 ;# negative volume accepted but will invert waveform --- removed strength & channel editors due to removal of resonators & channels response concepts. *** changed curve editor assignments due to removal of above editors press F1 on din board to see new assignments --- removed stereo gaters due to complexity in editing & management. now there is just 1 gater (called gr) applied to L & R *** the lead voice is now mono *** the drones have always been mono *** the delays remain stereo September 8, 2011: !!! din-1.7.3 !!! !fix! segfault due to undefined order of initialisation of global variables on some versions of g++. August 23, 2011: !!! din-1.7.2 !!! *** revamped start-end patch to support multiple MIDI #CC assignments *** in command mode, type help start-end or read the file ~/.din/start-end.help.tcl for complete information. August 19, 2011: !!! din-1.7.1 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! +++ parameter limit labelling on all curve editors +++ beat/value marker with realtime update on all beat/value editors (gater, modulation & octave_shift) *** improved default octave shift pattern !fix! recompute visible ranges after resizing a range August 17, 20011: !!! din-1.7 !!! !!! factory reset required for upgrade from *any* version: see http://dinisnoise.org/faq/#factory !!! *** din audio output range is 0.1 Hz to infinity Hz. +++ num-octaves command num-octaves 4 ;# span current scale to 4 octaves num-octaves 28 ;# span current scale to 28 octaves preserves existing drones & range size mods +++ current octave labelling +++ cursor info mod (absolute volume printed at all times instead of 0 under playing area and 1 above playing area) +++ key note colored green on all octaves +++ save/reload drone phases July 26, 2011: !!! din-1.6.6 !!! !!! factory reset required if upgrading: see http://dinisnoise.org/faq/#factory !!! !fix! more accurate selection of drones (inbox selection instead of radial selection) +++ new variable delta_bpm (or dbpm); gater bpm changes by delta_bpm for each f9/f10 eg., set-var delta_bpm 5 ;# increases/decreases bpm by 5 beats for gaters, am, fm & octave shift modules +++ new variable drone_handle_size (or dhs) eg., set-var drone_handle_size 14 ;# default is 7; doubles the size of the drone handles *** f9/f10 - decreases/increases both gaters bpm at the same time. *** lshift + f9/f10 - decreases/increases left gater bpm ie gl *** lctrl + f9/f10 - decreases/increases right gater bpm ie gl *** improved handling of gater bpm change and fm/am depth change July 20, 2011: !!! din-1.6.5 !!! !!! factory reset required if upgrading: see http://dinisnoise.org/faq/#factory !!! !fix! segmentation fault when opening window on ATI/Intel graphics cards *** sine -> waveform key shortcut changed to left_alt instead of right_control July 3, 2011: !!! din-1.6.4 !!! --- removed dependency on SDL +++ optimised mouse, keyboard & OpenGL handling using Xlib. din is now an X11 application. *** restored drone master volume to default instead of 0 ie quiet June 11, 2011: !!! din-1.6.3 !!! !!! factory reset required if upgrading: see http://dinisnoise.org/faq/#factory !!! *** optimised mouse capture --- removed FFT on waveform; no dependency on FFTWF library anymore *** faster startup (no FFT wisdom calculation) & performance (no FFT calculation waveform edit/change) !fix! clear drones when scale changes May 28, 2011: !!! din-1.6.2 !!! !!! factory reset required if upgrading !!! *** silence drones when drones loaded to avoid shock volume change. *** fixed volume variable to go from 0 to 1 instead of 0 to 0.99xxx *** added interval check (clamps to 1 to 2) in tone ranges +++ 2600.patch.tcl : google insight banned words -> morse code -> music. --- removed superfluous feedback/volume setting from delay.cc/h code !fix! drones not resizing/repositioning when range size changed with LCTRL + mouse move *** reordered keyboard handling in din::handle_input (..) May 16, 2011: !!! din-1.6.1 !!! !!! factory reset required !!! +++ new volume variable accesible in Tcl interpreter; goes from 0 to 1 *** changed start-end.patch.tcl to allow use of mouse or midi slider to go from start/end and apply command +++ added drone_master_volume to possibilities for going start->end +++ cursor info display shows frequency & volume +++ show_frequency variable change to show_cursor_info +++ din irc bot video May 9, 2011: !!! din-1.6 !!! +++ new patch start-end to go from a start to end value and execute a command for each inbetween value +++ see start-end.patch.tcl & start-end.help.tcl for more information May 1, 2011: !!! din-1.5.9 !!! --- gaters command. gaters state stored in din_info *** oscilloscope colors saved on exit *** renamed short name of some commands April 17, 2011: !!! din-1.5.8.0 !!! +++ get-beat [all|first|last] +++ get-beat fm all returns current beat, first beat and last beat of fm +++ get-beat am first returns first beat of am *** frequency display switches correctly between phrasor cursor & mouse cursor *** lop alias load-patch, lp alias list-patches & asd alias assign-drones in droner +++ [ & ] keys for decreasing, increasing phrasor jog +++ i to toggle display of frequencies on notes & under mouse cursor April 6, 2011: !!! din-1.5.7 !!! +++ timenow variable contains time elapsed in seconds from din start +++ loop procedure to run user defined Tcl code at every din loop proc loop {} { ;# this runs every din loop echo $timenow ;# just print number of seconds elapsed since din start on console } +++ list-patches command to list patches +++ load-patch command to load a patch +++ picth intervals as vars eg., $1, $2b, $3b, $3, $4, $5b, $5, $6b $6, $7b, $7 & $8 +++ piano notes as vars eg., $C, $Db $D, $Eb, $E, $F, $Gb, $G, $Ab $A, $Bb $B. $C is 261.626, $A is 440 *** doesnt select sine composer and/or fft levels on curve editor when curve edit is in progress +++ documentation for most of din commands April 1, 2011: !!! din-1.5.6 !!! *** completely optimised for JACK instead of compatibility with both OSS and JACK. *** see revision 2201 at http://code.google.com/p/din/source/detail?r=2201 for more information. March 29, 2011: !!! din-1.5.5 !!! *** octave shift is faster (we shift once every audio out like before but we dont find shifts per sample) and more accurate (no floating point drift) *** the beat of fm, am, gaters always progresses (am_vol/am_depth/fm_depth & mouse height determines their use in sound) *** changed octave_shift curve name from octave_shift to os for easier handling on the command line +++ added 2 patterns to octave shift library !fix! fixed bug in solver::operator (float x) --> (see din-1.5.5/src/solver.cc) March 28, 2011: !!! din-1.5.4 !!! +++ added variable jog for phrasor jogging +++ set-var jog 3 ;# default jog +++ set-var jog 30 ;# warp speed jog! +++ sv j 30 ;# short form +++ get-var jog ;# returns jog value +++ gv j ;# short form +++ left_alt + enter resets taptarget bpms ie equivalent to command set-now $taptarget 0 --> used to match beat of external sounds +++ added configure.ac check for tcl.h in addition to tcl8.5/tcl.h *** optimised beat2value.cc/h that drives the gaters, fm, am & os *** bot is insecure to allow full remote operation of din. *** bot will connect to password protected irc channels only. !!! use it among friends. not enemies !!! *** bot always connects at your command (see din-1.5.4/src/bot.cc & din-1.5.4/include/bot.h) March 25, 2011: !!! din-1.5.3 !!! *** factory reset required, see http://dinisnoise.org/faq/ !fix! fixed compressor response when input audio sample hits xmax boundary - stays at max instead of going to min !fix! get-drone command and ~/.din/droner.tcl +++ display name of jack connection on din title bar +++ new variable show_frequency to toggle frequency display under mouse and frequencies of notes of the scale +++ set-var show_frequency 1 ;# displays frequency under mouse & frequency of all notes in all the octaves +++ set-var show_frequency 0 ;# hides frequency under mouse & frequency of all notes in all the octaves +++ set-var sf 1 ;# sf is short for show_frequency +++ sv sf 0 ;# sv is short for set-var; sf is short for show_frequency +++ din saves show_frequency state when it quits and restores it when you start din again *** tweaked ~/.din/scoper.tcl to allow easy entry of midi slider/knob values *** documented ~/.din/2600.tcl --- oss midi support & other unused procs in ~/.din/init.tcl March 20, 2011: !!! din-1.5.2 !!! *** factory reset required, see http://dinisnoise.org/faq/ +++ can specify number of samples used to construct the profile curve in sine harmonic composer (was 100 samples). +++ set-var num_sine_samples OR nss, get-var num_sine_samples ORR nss +++ ' and \ keys in waveform editor to decrease/increase num_sine_samples 1 at a time *** use large number of samples to accurately profile a curve that has large number of harmonics *** experiment with num_sine_samples to change timbre +++ save/load vertex labelling on curve editors March 14, 2011: !!! din-1.5.1 !!! *** factory reset required, see http://dinisnoise.org/faq/ +++ constant size vertex/tangent handles in all editors +++ initial handle size specified in ~/.din/globals +++ vertex labelling in all editors +++ press l in an editor (but *not* on a curve vertex/tangent cos thats for making curve linear) to toggle +++ scales can have an unlimited number (previously 16) of notes, hence an unlimited number of ranges (previously 64) !!! din remains a 3 octave instrument !!! *** set-bpm , get-bpm +++ set-now , get-now +++ get-drone selected, set-drone *** droner.tcl to support microtonal chord progressions via MIDI --- removed mouse interpolation --- reinstated original subdivision for curve generation as new subdivision scheme introed in din-1.5 doesnt work for octave shift (will revisit) +++ delete-disabled-resonators command updated to allow all resonators to be deleted *** optimised resonator picking and disable/enable/enable all --- removed curve_editor::randomise (..) and rnd_miny_maxy --> unused feature !bug! deleteing all resonators when mouse capture is applied crashes din (segmentation fault) !bug! unpredictable curve loss when moving curve in strength editor (segmentation fault on quit) February 15, 2011: !!!! din-1.5 release !!!! !fix! mirroring tangents caused 1st subdivided point to lie on the curve so no further subdivision hence no profile. !fix! midi ring buffer deallocation in audio::alloc +++ mouse x, y interpolation for click/tick/glitch free sound on long periods +++ midi-pitch-bend, midi-program-change support (thanks Peter Nelson - http://fuzzle.org/~petern/) +++ experimental get-selection command to get selected items from current curve editor +++ can create, edit and remove drones while phrasor is playing a phrase +++ tonex, toney for finding tone on din board *** midi_cc -> midi-cc, midi_note_on -> midi-note-on, midi_note_off -> midi-note-off, midi_clock -> midi-clock, midi_start -> midi-start *** changed scoper.tcl, midimap.tcl, 2600.tcl --- removed curve_editor::scale () +++ to bot.cc +++ add sample_rate change callback. +++ add buffer_size change callback altho we dont support buffer size change in din. would require a restart. *** optimised malloc in JACK MIDI. February 9, 2011 !!!! release: din-1.4.3 !!!! !!!! factory reset required. see http://dinisnoise.org/faq/ for more information. !++! fps, usleep vars to bring down CPU usage (thanks Peter Nelson - http://fuzzle.org/~petern/) !++! full JACK MIDI support (thanks Peter Nelson - http://fuzzle.org/~petern/) !--! jettisoned RtMidi support -> tagged in svn for din-OSS use. !--! no requirement of alsa sound library hence din is fully cross-platform. porters rejoice! +++ to mute/unmute resonators @ din board. +++ marked the low (1-, 2b-, 2-, 3b-, 3- etc) & high octave (1+, 2b+, 2+, 3b+, 3+ etc) on din tone board +++ changed set-bpm command to accept multiple bpm targets and values +++ changed get-bpm command to print bpms of multiple bpm targets +++ changed set-var command to accept multiple vars and values +++ changed get-var to print values of multiple vars +++ undo-redo on curve editors does undo-redo of window position too +++ save-restore exact din board position, oscilloscope position +++ better default view of din board showing key note when launched for 1st time +++ new vars zoom & pan added to control zoom and pan variables in curve_editor +++ scroll, zoom & pan now loaded from settings.tcl instead of din_info *** midimap.tcl sourced in init.tcl for default midi_cc, midi_note_on/off, midi_clock & midi_start *** tweak of handle sizes in curve editors for easier editing for new user !fix! load-resonators doesnt fail when resonators file doesnt exist !fix! default resonator strength is simple linear curve instead of bezier curve for easier initial editing. !fix! tangents dont mirror by default in drone editor January 27, 2011: ++ add resonator with + r in strength editor. -- removed resonator::MAX_RESONATORS - add as many resonators as you like ++ delete-disabled-resonators Tcl command ++ new hires clock ** mark curve segments in curve_editor ** list_resonators -> ls-resonators command name change ** editor name change: morse_code -> morse-code !fix! add drone clears selected drones !fix! oscilloscope not selected when selecting drones !fix! configure.ac now checks for OpenGL, Tcl, libircclient & libasound2 January 21, 2011: !! release: 1.4.1 !! ++ ultra drone editing - multiple drone creation, moving around the board and delete ++ infinite volumes - change height of the keyboard to get as many volume levels as you like. ++ integrated jack/oss into same code base January 14, 2011: * infinite volumes - change the height of the infinite keyboard to get as many volume levels as you like January 13, 2011: * integrating jack/oss api in same code base January 10, 2011: * din-1.4 : first release into the wild * fast multi bezier curve (ie multi_curve) solver with infinite points and bezier curves * WIP: new website design @ dinisnoise.org December 30, 2010: * bot uses safe interpreter when connected to irc channel December 29, 2010: * esc 2 times from din board to quit din -- waits for ESC_WAIT (1.25 seconds between ESC presses). * fixed oscillator_strength marker display, default globals tuning file spec and default din_info December 28, 2010: * set_bpm --> set-bpm and other commands names changed. no underscore, use hypen instead to separate command words in a command name - easy to type. + added equivalent help files December 27, 2010: * fixed key repeat speed bug when MIDI is on * tweaked the jag font * WIP: infinite curve points, infinite resonators ---> not adequately tested; @alejo: dont package December 16, 2010: * help.tcl, set_text_color to set console text color, faster command lookup from command list December 15, 2010: * help for commands is via help.tcl script -- we will use this script to also produce command reference documentation at dinisnoise.org soon. December 11, 2010: * bot: * disabled exec command from Tcl interpreter when bot connects to irc. exec enabled again when bot disconnects. * new disconnect subcommand with custom disconnect message. eg., bot disconnect message * key: command changed to print nearest note name (eg., key note) & value (eg., key value). * scale: new scale command. list, get, set, add, remove & find are subcommands. eg., scale set major * tuning: new tuning command. list, set & get are subcommands. eg., tuning set et * bpm: new bpm command. list, set, get, reset, style (set & get subcommands) are subcommands. eg., bpm set fm 240 * delay: new delay command. set, get are subcommands. list coming soon. delay set {l r} 5000 ;# sets delay time of both channel to 5 seconds. * taptarget variable to control what component (gl gr fm am or os) gets affected when tap bpm is used. eg., set taptarget {gl gr} * console: stays in command mode when TAB pressed until ESC or TAB is pressed again. used to leave command mode when ENTER was pressed. * BUGFIX: delay haywire fix when delay time is 1 second ie 1000 msecs. November 30, 2010: * bot input/output is queued and processed in input loop * |BUG| fix multi line output of commands to IRC. no lines sent. November 24, 2010: * tonic limited to 40 to max_frequency possible in given sample rate * display key and completion of octave shift --> since octave shift is general we call it modulating up/down instead of octave up/down. October 11, 2010: @oss: !!!after 4 years figure out that ive been calculating everything in the audio thread. so no matter how fast a processor we have, calculations cant be performed faster than the rate at which the audio thread is called. fixed this at least now. this opens the way for the power of multi-core processors & GPUs.!!! ***tcl interp back in main thread*** ---removed command scheduling in console as tcl interp is back in main thread --- ***viewport struct changed, creates default or restores last viewport on constructor *** ***audio_out::write changed to accept audio buffer to read for writing from main thread *** ++++++ concept of a bunch of audio buffers in main thread that is filled continously one after another. give a written buffer when audio thread wants one. important to keep a good number of audio buffers but not too many so that main thread is not writing the same buffer the audio thread wants to read. if all buffers are written but none read so far, main thread will stop writing anymore and wait for audio thread to read some. ++++ ***better commenting and messages on shell console*** September 29, 2010: @@@ sort of back in the groove again. @@@ wip though as trying to have 1 Tcl interpreter in audio thread for accessing samples later [!!!] FIXED resizing window [!!!] FIXED abrupt level change when moving from editors back to board [+++] can continue to play with the mouse when in command mode. tracks cursor in editors. September 12, 2010: +++ get_scope/set_scope, get_drone/set_drone and scoper.tcl, droner.tcl August 05, 2010: [***/+++]: midi command fleshed out with list, open, close options. [+++]: midiopenall, midicloseall tcl cmds available for one-shot open/close of midi input devices [+++]: midimapper.tcl - displays midi output on console. to invoke issue command: scr midimapper August 03, 2010: [mod] param value messages on the console [bug] segfault on load_scale of bhoopali - couldnt recreate! July 31, 2010: *** back to working on font again ***changed set_font_size to change cell size, char spacing & headroom ***get_font_size simply prints 4 numbers ***created help files of set_font_size & get_font_size ***changed save_settings.tcl to include font size params so we dont save them in the font file itself. this is good. July 30, 2010: !+++! tap bpm, set taptarget {gl gr fm am os}. change taptarget to change whose bpm is affected. eg, set taptarget {fm am os} only sets fm, am & octave shift bpm to tapbpm. July 28, 2010: *** worked on timing of keypress (keypressedd(..) in input.h) July 27, 2010: !fix! western notation display didnt update correctly when key was set to a numeric value. !fix! no overwriting of console command line +++ wrap around of console command history +++ notation saved into settings.tcl +++ ~/.din/init.tcl for custom Tcl scripts to be loaded at startup. +++ set_kb_layout/kbl command. kbl us sets to us layout. kbl uk sets uk layout. July 23, 2010: !!!check b4 din workshop at usurp gallery, london *** will try to make a live cd with this version +++ new sound patterns added (one, one-lr, two, two-1, three, many) July 19, 2010: !!!+++ experimental MIDI support using modified RtMidi library !!!source ~/.din/midi.tcl after install; turn on gaters and move any sliders u have to change the gater bpm !!!set min 0; set max 240; set which g ;# set which fm will change fm bpm. July 18, 2010: * Happy birthday to self! jag turns 35. a hub. a dad. not a millionaire. Only want to do what I do now at 40 - maybe also want to be more famous and print money. *** phrasor optimisation, draw a red marker to id phrase start during a recording so its easy to finish at that point, *** phrasor playback starts at beginning of last recorded phrase !!! bug fix in phrasor when pausing doesnt leave mouse at the right note, these bugs introed because we move from absolute to relative mouse calculation !!! bug fix no jump of mouse when phrasor is playing and u leave board to the editors and come back. !!! test required. July 15, 2010: * changed name of waveform from noname to wave in file data/one - the one resonator file * removed key get from key command its available as getv key July 14, 2010: +++set_curve_editor, get_curve_editor to place different curve editors on different screens. July 11, 2010: +++!!! din-1.1.2 - jack, oss (branch) support updated. +++ delay feedback, volume curves, only time is value *** fixed undo/redo/copy/paste bug on multi_curve *** fixed morse code trailing spacings and morse code is now on copy curve to paste +++ save_settings.tcl to save settings into ~/.din/settings.tcl which is loaded on next din start June 03, 2010: * din-1.1 RC. * cleaned up documentation * sa command is gone. tonic/key is substitute. May 31, 2010: +++ Tcl interpreter is the din command line. +++ Oscilloscope fully moveable and resizeable. +++ message announcing current curve editor *** fixed note marking in strength editor !!! Oscilloscope drawing optimised with single call to glDrawArrays instead of glBegin() ..glVertex3f..glEnd () May 18, 2010: *** Tcl/Tk integration getting mature !+++! experimental linebreaking and wordwrap added to console - disabled by default +++ new variable sa so can do gv sa --- removing tcl command - no longer required as Tcl/Tk interpeter is the din command line May 15, 2010: !+++! experimental tcl/tk integration. +++ new tcl command - syntax tcl * this will let us script din with tcl and also make custom uis using tk. +++ sa.tcl. to bring up ui, do tcl source ~/.din/sa.tcl *** mouse capture replay doesnt warp the mouse, draws a cross indicating playback position. May 13, 2010: +++ morse code -> bezier curve -> waveform/am/fm/gaters/octave_shift *** editable beizer curve based patterns for dot, dash, inner spacing, letter spacing and word spacing. May 5, 2010: +++!!!*** jack is now trunk +++!!!*** oss is a branch https://din.googlecode.com/svn/branches/oss *** oss is faster than jack but allows no collaboration. +++ oscilloscope is back on jack *** major renames of many files in din/data *** optimised keyboard handling in curve_editor.cc/h, din.cc/h *** new gater patterns, new octave shift patterns, tastier defaults April 27, 2010: !!! experimental jack support +++ autoconnect to system:playback_1 and system:playback_2 ports to start playing audio April 26, 2010: *** optimised keyboard handling April 25, 2010: +++drones can be created to any tone. can be snapped to a note. +++gaters on/off command +++snap_drones var to setv/getv commands sv snap_drones 0 or 1 gv snap_drones +++reenabled the drone editor April 23, 2010: rc 1.0.6 ++sa/key display on pressing ; --drones are synced only on startup **pfx changed to p in bot command April 22, 2010: prepping for version 1.0.6 +++bot::setset() +++tests if bot is running when outputing mesg with it ***gate->g, gate-l->gl, gate-r->gr, all->a in set_bpm, get_bpm, set_style, get_style commands April 18, 2010: prepping for version 1.0.6. +octave shift with controllable bpm and progress curve. +octave shift editor (press 7) +octave_shift.lib - library of octave shift progress curves. *libircclient expected at /usr/lib/ and /usr/include/libircclient - need to change this to use pkg-config. April 15, 2010: * check b4 openlab opennight #4 * reworked solver so that custom min and max handlers can be used to get looping (in waveform) but ping-pong (in gaters, fm, am) * inlined these functions but if they were not inlined then maybe slightly slower (nanoseconds? microseconds? testing needed) * default is ping-pong on gaters, fm, am April 12, 2010: ---removed multi_curve copy constructor and operator=, color and name restored after default copy. ***chrono uses ie CLOCKS_PER_SEC and clock() for timing instead of sample based timing. can therefore use it for non-audio timing. ***mouse command changed for relative mouse movement instead of absolute positioning. making it selectable is a better goal. !!!removed otransmit code in osc.cc and osc(..) removes timers as timer struct removed from chrono.h/cc. no problem for osc recieve. ***using SDLK keycodes in curve library handling in curve_editor. !!!fixed bug in osc due to stringstream/tokenizer mixup. April 5, 2010: +++get_font_size command +++xsize and ysize are cell width and cell height for font can be set independently ***updated set_font_size command to handle xsize and ysize xxxhopefully fixed the font save bug - was writing a null character b4. ***updated cell_size code to prevent squash/stretch of font when varying its xsize and ysize*** April 3, 2010: +++tokenizer.cc/.h - ditching stringstream !!!font size bug still persists - do not use set_font_size command!!! +++ircu.patch - patch for ircu irc server ircd undernet to allow messages to flood the channel so that din can send and receive data freely without any limits. march 31, 2010: +++varun: happy birthday. ***+++ irc bot cleaned up, with doc ***fixed (assuming strongly) kerning and font size bug ---all .hlp files from data march 25, 2010: +++ added doc directory. will move all help files here in the future. but its not ready yet. so we use help files in data. +++ added mouse command, untested but no harm if not used. +++ octave shift shortcuts changed to z and x due to keymap issue on non english keyboards. need to check this. march 23, 2010: $$$ work in progress: 1.0.5.1 *** enhanced sa command to apply octave modifiers to values not just note names. mouse warp toggle added too. +++ added octave shift short cut []. +++ brought am, fm, gate-l, gate-r parameters as keyboard shortcuts +++ FIXED BUG: creating a drone outside the ranges didnt create the drone on the correct note. *** using keycodes instead of characters ie SDLK_SLASH instead of / character to check slash so that it works on all keyboards. --- replaced din_help.txt with din.hlp. march 20, 2010: $$$ release 1.0.4.1. *** if no audio, din continues to work. can edit resonators and drones. *** better selection of drones. +++ aout command to control OSS audio parameters. can also edit ~/.din/audio_prefs. march 16, 2010: !!!+++ ditched portaudio and moved to oss. portaudio was using oss anyway. with direct oss can set many audio buffer parameters.+++!!! !!!testing required on this oss port!!! march 12, 2010: ** made basic install of din easy such that its a gateway to explore more complex features of din. +++ allow din board height to be changed allowing finer or coarser volume control. march 08, 2010: + sine wave -> bezier curve: export sine wave generated with the sine_mixer as a bezier waveform. 100 vertices with folded tangents generated. a ui/command to reduce/control number of generated points desired. + bezier curve -> sine wave: import fft levels of a bezier waveform into sine levels and alter the drawn sine wave. only partially correct as it doesnt import phase information from the fft. works when phase is 0. + clear/erase harmonic by pressing 'c' over sine levels. ! use resonator names from file instead of resetting to default name/numbering. + current curve editor var in uis_t to keep track of the current curve editor so we can run curve commands on the console. + curve_name command to set the curve name. possible due to previous feature. * worked on resonators in file: resonators, one december 18, 2009: ** bug fixed: pan and zoom with shift+a/d and shift+q/e november 20, 2009: assigned curve names, save and load curve names when curves are loaded. default name is noname. fixed bug: can change resolution of curves in modulation and gater editors. november 13, 2009: mouse position saved and restored on din board TODO: but must be done for all ui screens and must also restore window position november 11, 2009: console rollup state saved/restored removed numeric notation of ranges as it doesnt work for keys other than C. will revisit later. november 9, 2009: removed set_bg command - no range color filling, just plain looking ui. its the sound we are after. notation support: indian (S r etc), western (C C# etc) and numeric (1 2b etc) optimised solver.h/cc again to return last result when y cannot be solved for given x. FIXED BUG: In console, if you clear text (press backspace), and rollup console - crash fixed colors used for drawing ranges, phrasor position and drone makers november 4, 2009: *** cleaned up the trunk !!! optimised the configure.ac and Makefile.am +++ BUGS october 15, 2009: ***marked position of phrasor when paused october 14, 2009: +++get_kern command to get character kerning in the font. +++added {}`| characters to the font october 10, 2009: !!!!++++multicore support added +++xset m 0 0 to reset mouse to zero acceleration and threshold when din, and restore upon exit. october 9, 2009: !!! fixed ranga backdrop drawing bug +++ added support for audio out via alsa dmix so that you could play an audio clip in the background and play din over it. *** preparing for release of din. version 1. may 7, 2009: +++fft.cc, fft.h - separated fft engine from curve editor ***worked on the resonators may 6, 2009: +++ added ability to move the mouse in curve editors with the keyboard +++ vary the pan and zoom speeds din-5.2.1/BUGS0000644000175100017510000000005112111771600007667 00000000000000See code.google.com/p/din issues page. din-5.2.1/include/0000755000175100017510000000000012122367131010715 500000000000000din-5.2.1/include/Makefile.am0000644000175100017510000000175112114434547012704 00000000000000## Process this file with automake to produce Makefile.in #dinincludedir = $(pkgincludedir) dist_include = \ main.h\ dingl.h\ key_consts.h\ box.h\ utils.h\ vector2d.h\ tick.h\ chrono.h\ ui.h\ ui_list.h\ glyph.h\ line.h\ font_editor.h\ font.h\ console.h\ viewwin.h\ input.h\ oscilloscope.h\ point.h\ curve.h\ multi_curve.h\ play.h\ curve_editor.h\ basic_editor.h\ listeners.h\ console_iterator.h\ audio.h\ phrasor.h\ beat2value.h\ random.h\ globals.h\ scale_info.h\ command.h\ scalelist.h\ crvpt.h\ textboard.h\ sine_mixer.h\ levels.h\ help.h\ mocap.h\ din.h\ curve_library.h\ delay.h\ curve_listener.h\ strength_editor.h\ range.h\ note.h\ color.h\ solver.h\ container.h\ checkdotdin.h\ compressor.h\ osc.h\ bot.h\ tokenizer.h\ morse_code.h\ tcl_interp.h\ box_selector.h\ ansi_color_codes.h\ keyboard_keyboard.h\ fft.h\ widget.h\ button.h\ checkbutton.h\ field.h\ fader.h\ drone.h\ ticker_tape.h\ slider.h\ label.h\ label_field_slider.h\ filled_button.h\ authors_note.h EXTRA_DIST = $(dist_include) din-5.2.1/include/Makefile.in0000644000175100017510000002325712122366546012724 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ #dinincludedir = $(pkgincludedir) VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw3f_CFLAGS = @fftw3f_CFLAGS@ fftw3f_LIBS = @fftw3f_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ jack_CFLAGS = @jack_CFLAGS@ jack_LIBS = @jack_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_include = \ main.h\ dingl.h\ key_consts.h\ box.h\ utils.h\ vector2d.h\ tick.h\ chrono.h\ ui.h\ ui_list.h\ glyph.h\ line.h\ font_editor.h\ font.h\ console.h\ viewwin.h\ input.h\ oscilloscope.h\ point.h\ curve.h\ multi_curve.h\ play.h\ curve_editor.h\ basic_editor.h\ listeners.h\ console_iterator.h\ audio.h\ phrasor.h\ beat2value.h\ random.h\ globals.h\ scale_info.h\ command.h\ scalelist.h\ crvpt.h\ textboard.h\ sine_mixer.h\ levels.h\ help.h\ mocap.h\ din.h\ curve_library.h\ delay.h\ curve_listener.h\ strength_editor.h\ range.h\ note.h\ color.h\ solver.h\ container.h\ checkdotdin.h\ compressor.h\ osc.h\ bot.h\ tokenizer.h\ morse_code.h\ tcl_interp.h\ box_selector.h\ ansi_color_codes.h\ keyboard_keyboard.h\ fft.h\ widget.h\ button.h\ checkbutton.h\ field.h\ fader.h\ drone.h\ ticker_tape.h\ slider.h\ label.h\ label_field_slider.h\ filled_button.h\ authors_note.h EXTRA_DIST = $(dist_include) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: din-5.2.1/include/main.h0000644000175100017510000000061412111771577011746 00000000000000#ifndef __main #define __main #include #include #include "ansi_color_codes.h" void accept_keypress (int accept); void warp_pointer (int dx, int dy); void warp_pointer_abs (int x, int y); void setup_window (); void modulate_up (); void modulate_down (); void set_tonic (float f); void start_octave_shift (int idir, const std::string& sdir); void do_octave_shift (); #endif din-5.2.1/include/dingl.h0000644000175100017510000000155012111771577012117 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __dingl #define __dingl #include #include #endif din-5.2.1/include/key_consts.h0000644000175100017510000000405612111771577013207 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __key_consts #define __key_consts const int k_a = 38, k_d = 40, k_w = 25, k_s = 39; const int k_z = 52, k_x = 53; const int k_b = 56; const int k_i = 31; const int k_f = 41, k_g = 42, k_h = 43, k_v = 55; const int k_left = 113, k_right = 114, k_up = 111, k_down = 116; const int k_left_bracket = 34, k_right_bracket = 35; const int k_space = 65; const int k_q = 24, k_e = 26, k_c = 54, k_p = 33; const int k_comma = 59, k_period = 60, k_slash = 61; const int k_semicolon = 47, k_quote = 48; const int k_lshift = 50, k_lctrl = 37, k_rctrl = 105; const int k_n = 57, k_m = 58, k_menu = 135; const int k_f1 = 67, k_f2 = 68, k_f3 = 69, k_f4 = 70, k_f5 = 71, k_f6 = 72, k_f7 = 73, k_f8 = 74, k_f9 = 75, k_f10 = 76, k_f11 = 95, k_f12 = 96; const int k_r = 27, k_t = 28, k_y = 29, k_u = 30; const int k_enter = 36; const int k_1 = 10, k_2 = 11, k_3 = 12, k_4 = 13, k_5 = 14, k_6 = 15, k_7 = 16, k_8 = 17, k_9 = 18, k_0 = 19; const int k_minus = 20, k_equals = 21; const int k_l = 46, k_k = 45; const int k_backslash = 94, k_lalt = 64, k_ralt = 108; const int k_tab = 23, k_insert = 118, k_delete = 119; const int k_home = 110, k_end = 115, k_pgup = 112, k_pgdn = 117; const int k_backspace = 22, k_backquote = 49; const int k_hash = 51; const int k_j = 44, k_o = 32; const int k_esc = 9; #endif din-5.2.1/include/box.h0000644000175100017510000000410512111771577011611 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __box #define __box #include template struct box { T left, bottom; T right, top; T width, height; T midx, midy; double width_1, height_1; box () { left = bottom = right = top = width = height = 0; width_1 = height_1 = 0.0; } box (T l, T b, T r, T t) { operator() (l, b, r, t); } inline void operator() (T l, T b, T r, T t) { left = l; bottom = b; right = r; top = t; calc (); } inline void calc () { if (left > right) std::swap (left, right); if (bottom > top) std::swap (bottom, top); width = right - left; height = top - bottom; midx = left + width / 2; midy = bottom + height / 2; if (width != 0) width_1 = 1.0 / width; if (height != 0) height_1 = 1.0 / height; } inline void move (T dx, T dy) { left += dx; right += dx; bottom += dy; top += dy; calc (); } inline void resize (T dx, T dy) { right += dx; top += dy; calc (); } inline void lower_corner (T x, T y) { left = x; bottom = y; right = left + width; top = bottom + height; calc (); } }; template inline bool inbox (const box& b, const T& x, const T& y) { return ((x >= b.left) && (x <= b.right) && (y >= b.bottom) && (y <= b.top)); } #endif din-5.2.1/include/utils.h0000644000175100017510000000222612111771577012163 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef _UTILS #define _UTILS template inline bool inrange (const T& min, const T& val, const T& max) { return ((val >= min) && (val <= max)); } template inline T& clamp (const T& lo, T& val, const T& hi) { // ensures lo <= val <= hi if (val < lo) val = lo; else if (val > hi) val = hi; return val; } #endif din-5.2.1/include/vector2d.h0000644000175100017510000000445412111771577012560 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __vector2d #define __vector2d #include template inline T distance2 (const T& x1, const T& y1, const T& x2, const T& y2) { T dx = x2 - x1; T dy = y2 - y1; return (dx * dx + dy * dy); } template inline void direction (T& dx, T& dy, const T& x1, const T& y1, const T& x2, const T& y2) { dx = x2 - x1; dy = y2 - y1; } template inline double magnitude (const T& x1, const T& y1, const T& x2, const T& y2) { T dx, dy; direction (dx, dy, x1, y1, x2, y2); return sqrt ((double) (dx * dx + dy * dy)); } template inline double magnitude (const T& vx, const T& vy) { return sqrt ((double) (vx * vx + vy * vy)); } template inline double magnitude2 (const T& x1, const T& y1, const T& x2, const T& y2) { T dx, dy; direction (dx, dy, x1, y1, x2, y2); return (dx * dx + dy * dy); } template inline T magnitude2 (const T& vx, const T& vy) { return (vx * vx + vy * vy); } template inline double unit_vector (S& ux, S& uy, const T& x1, const T& y1, const T& x2, const T& y2) { // unit vector joining x1,y1 & x2,y2 T dx, dy; direction (dx, dy, x1, y1, x2, y2); double mag = magnitude (dx, dy); if (mag > 0) { ux = dx / mag; uy = dy / mag; } else { ux = uy = 0; } return mag; } template inline double unit_vector (T& ux, T& uy, const T& vx, const T& vy) { double mag = magnitude (vx, vy); if (mag > 0) { ux = vx / mag; uy = vy / mag; } else { ux = uy = 0; } return mag; } #endif din-5.2.1/include/tick.h0000644000175100017510000000200112111771577011744 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __tick #define __tick #include inline double ticks2secs (clock_t ticks) { return ticks * 1.0 / CLOCKS_PER_SEC; } inline clock_t secs2ticks (double secs) { return (clock_t) (secs * CLOCKS_PER_SEC); } #endif din-5.2.1/include/chrono.h0000644000175100017510000000215412111771577012313 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __chrono #define __chrono #include #include struct chrono { double secs; double ticks; double delta_secs; int delta_ticks; chrono (); chrono& operator++ (); }; struct nano_chrono { timespec start, now, delta; double secs; void reset (); void tick (); void find_elapsed (); }; #endif din-5.2.1/include/ui.h0000644000175100017510000000222712115672665011443 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __ui #define __ui #include struct ui { std::string name; int id; int prev_mousex, prev_mousey; virtual void enter () {} virtual void leave () {} virtual bool handle_input() {return true;} virtual void calc_win_mouse () {} virtual void draw() {} virtual void bg () {} ui () { prev_mousex = prev_mousey = -1;} virtual ~ui () {} }; #endif din-5.2.1/include/ui_list.h0000644000175100017510000000663012115121167012462 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __ui_list #define __ui_list #include "fader.h" #include "filled_button.h" #include "checkbutton.h" #include "font_editor.h" #include "field.h" #include "label.h" #include "label_field_slider.h" struct curve_editor; struct attack_val : val_handler { void operator() (const float& f); }; struct decay_val : val_handler { void operator() (const float& f); }; struct note_volume_val : val_handler { void operator() (const float& f); }; struct pitch_bend_val : val_handler { void operator() (const int& f); }; template struct min_max_clicked : click_listener, change_listener { label_field_slider& lfs; min_max_clicked (label_field_slider& _lfs); void clicked (button& b); void changed (field& f); }; struct din; struct voice__listener : state_listener { void changed (checkbutton& cb); }; struct gater__listener : state_listener { void changed (checkbutton& cb); }; struct delay__listener : state_listener { void changed (checkbutton& cb); }; struct compress__listener : state_listener { void changed (checkbutton& cb); }; struct ui_list : ui { std::vector uis; ui *current, *prev; curve_editor* crved; font_editor fed; static const int MAX_EDITORS = 7; static const int key [MAX_EDITORS]; static ui* ed [MAX_EDITORS]; float esct; ui_list (); void set_current (ui* u, int ised = 1); bool set_editor (const std::string& name, int screen); bool handle_input (); void draw (); // gui widgets // std::vector widgets; checkbutton w_voice; voice__listener vlis; fader fdr_voice; checkbutton w_gater; gater__listener glis; fader fdr_gater; void flash_gater (); checkbutton w_delay; delay__listener dlis; fader fdr_delay; checkbutton w_compress; compress__listener clis; attack_val atv; decay_val dkv; pitch_bend_val pbv; note_volume_val nvv; label d_parameters; label_field_slider lfs_attack_time; label_field_slider lfs_decay_time; label_field_slider lfs_pitch_bend; label_field_slider lfs_note_volume; label d_min_max; label mml_min, mml_max; field mmf_min, mmf_max; static widget* mm_last; min_max_clicked lmm_attack, lmm_decay; min_max_clicked lmm_pitch_bend; min_max_clicked lmm_note_volume; void setup_widgets (); void update_widgets (); float eval_fade (fader& fdr, checkbutton& cb); widget* get_widget (const std::string& name); ~ui_list (); }; template void widget_load (const std::string& name, T** pw, int n); template void widget_save (const std::string& name, T** pw, int n); #endif din-5.2.1/include/glyph.h0000644000175100017510000000206412111771577012146 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __glyph #define __glyph #include #include "line.h" struct glyph { std::vector lines; int width, height; glyph (const std::vector& vl); glyph (int w = 3, int h = 8) { width = w; height = h; } void find_width_height (); }; #endif din-5.2.1/include/line.h0000644000175100017510000000244412111771577011754 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __line #define __line #include #include "point.h" struct line { std::vector< point > points; line () {} line (const std::vector< point >& pts) : points(pts) {} line (const std::vector< point >& pts) { points.clear (); for (unsigned int i = 0, j = pts.size(); i < j; ++i) { points.push_back (point((int)pts[i].x, (int)pts[i].y)); } } void draw (); void set (int i, int x, int y); void insert (int i, int x, int y); int remove (int i); }; #endif din-5.2.1/include/font_editor.h0000644000175100017510000000361012111771577013335 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __font_editor #define __font_editor #include "viewwin.h" #include "ui.h" #include "point.h" #include "line.h" #include "help.h" #include "curve_editor.h" #include "glyph.h" #include "font.h" #include struct line_hit { int l; // line? int v; // vertex? line_hit () { l = v = -1; // invalid } line_hit (int ll, int vv) : l(ll), v(vv) {} bool operator() () { return ( (l > -1) && (v > -1)); } }; struct font_editor : curve_editor { font& fn; int nchars; std::string name; std::map glyphs; std::vector chars; glyph gl; std::vector lines; int ichar; std::vector< point > scratch_points; line_hit cur, ins, del; bool moving; void prep_edit (); void prep_save (); void edit_char (int i); void save_char (int i); font_editor (font& f, const std::string& settingsf, const std::string& helpf = "~/.din/font_editor.help"); virtual ~font_editor (); void save_font (); bool handle_input (); void draw (); void draw_lines (); void draw_scratch_line (); line_hit hittest (); void move (); void leave (); }; #endif din-5.2.1/include/font.h0000644000175100017510000000417112111771577011772 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef _FONT #define _FONT #include "dingl.h" #include "glyph.h" #include #include #include struct font { std::string fname; std::string name; int nchars; int max_char_width, max_char_height; int avg_char_width, avg_char_height; int xsize, ysize; // x and y size of cell int lift; int charspc, wordspc; int headroom; // space above char std::map characters; // vector desc of chars std::map < char, std::map > kern; // char-char kerning int modified; // if modified will save font (const std::string& fn); ~font (); void load (const std::string& fn); void load (std::ifstream& file); void save (); int char_width (char c); int char_height (char c); void draw_char (char c, int x, int y, int z = 0); const std::string& filename () const { return fname;} const std::map& get_chars (); void set_chars (const std::map& chars); }; extern font fnt; inline int get_line_height () { return (fnt.max_char_height + fnt.headroom); } inline void draw_char (char c, int x, int y, int z = 0) { fnt.draw_char (c, x, y, z); } void write_buffer (char* format, ...); int draw_string (const std::string& s, int x, int y, int z = 0); int get_char_width (const std::string& s); int get_max_char_height (const std::string& s); #endif din-5.2.1/include/console.h0000644000175100017510000000772112122171216012454 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef _CONSOLE #define _CONSOLE #define eol console::EOL #define cll console::CLL #define tab " " #include "dingl.h" #include "globals.h" #include "color.h" #include "filled_button.h" #include "label.h" #include "fader.h" #include #include #include struct mesg { std::string text; // text color clr; // color mesg (const std::string& t, const color& c) : text(t), clr(c) {} mesg (const std::string& t) : text(t), clr (1, 1, 1) {} mesg () : clr (1, 1, 1) {} }; struct console : widget, pusher, click_listener { // colors of text (defined in main.cc) static const color yellow; static const color green; static const color red; static const color cyan; static const char EOL = '\n'; // end of last mesg static const char CLL = '\b'; // clear last mesg // console text is a bunch of lines // static const int GUTTER = 5; // number of lines int nlines; // number of lines in console int startl, lines_per_screen; // start line of display and lines per screen std::vector lines; void add_line (const mesg& ln); void clear (); // clear all lines on console mesg cur_line; // currently edited line color clr; // its color console (); // operators for appending values to console console& operator() (const std::string& cmd); console& operator<< (unsigned int i); console& operator<< (unsigned long i); console& operator<< (unsigned long long i); console& operator<< (int i); console& operator<< (const std::string& s); console& operator<< (float f); console& operator<< (double d); console& operator<< (char c); console& operator<< (const color& d); void up (int i); // scroll up by i lines void down (int i); // scroll down void pgdn (); // page down void pgup (); // page up void home (); // scroll to show 1st line void end (); // scroll to show last line void last (); // ensures last mesg is always displayed void del (); // del one character from currently edited line // visual // std::string ps1; // console prompt int rollup_; // roll up console? ie show last line only? void rollup (int r); int rollup (); int char_width; int line_height; box win; void set_window (const box& w); int startx, starty; // bottom (left), top(left) int curs_loc; int curs_locx; void calc_visual_params (); void draw (); // input // int handle_input (); void clicked (button& b); // commands // int command_mode; // in command mode? mesg cmd_line; // command text void toggle_command_mode (); std::vector history; // command history int hid; // tips display // filled_button b_tips; // toggles tips display label l_tips; // tips displayed here int show_tips; // show tips? int b_tips_clicked; // faders for tips to fade in and out fader faders [4]; // rise, stay, fall, rest int cur_fdr; std::string tip; // the acutal tip std::string get_tip; // the tip command that gets next tip void reset_tips (); void bg (); }; template inline console& operator<< (console& c, const box& b) { c << b.left << ' ' << b.bottom << ' ' << b.right << ' ' << b.top; return c; } extern console cons; #endif din-5.2.1/include/viewwin.h0000644000175100017510000000557012111771577012520 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __viewwin #define __viewwin #include "box.h" struct viewport { // opengl viewport int width, height; int xmax, ymax; float xmax_1, ymax_1; // 1.0 / xmax , 1.0 / ymax // for constant size handle of vertex/tangent in curve editors // static int handle_radius; static float handle_factor; viewport (); void operator() (int width, int height); void calc (int w, int h); bool inside (int x, int y); }; struct window : box { // curve editor float mousex, mousey; // mouse in window co-ords int prev_mousex, prev_mousey; // prev mouse in mouse co-ords void locate_mouse (); // find mouse in window co-ords void update_mouse (); // update mouse in window co-ords float vwx, vwy; // for view-win transform; to locate mouse in window void calc_viewwin (); static int PAN_RATE, ZOOM_RATE; // num pan, zooms per second static float PAN_AMOUNT, ZOOM_AMOUNT; // pan, zoom amount per key press static double PAN_REPEAT, ZOOM_REPEAT; // key repeat time static void calc_repeats (); float pan_x, pan_y; void calc_panxy (); void panx (int dir); void pany (int dir); float aspect_ratio; float width_1, height_1; // 1.0 / width, 1.0 / height window (); window (float l, float b, float r, float t); void set (float l, float b, float r, float t); void get (float& l, float& b, float& r, float& t); void zoom (int dir); void project (); float handle_radius, handle_radius2; float sus_handle_radius; void calc_handle_radius (); inline void calc () { calc_repeats (); calc_panxy (); calc_viewwin (); calc_handle_radius (); locate_mouse (); } }; inline void view2win (int vx, int vy, float& wx, float& wy, viewport& view, window& win) { float xr = vx * view.xmax_1; float yr = 1 - vy * view.ymax_1; wx = win.left + xr * win.width; wy = win.bottom + yr * win.height; } inline void win2view (float wx, float wy, int& vx, int& vy, window& win, viewport& view) { float xr = (wx - win.left) * win.width_1; float yr = (wy - win.bottom) * win.height_1; vx = (int) (xr * view.xmax); vy = (int) (yr * view.ymax); } #endif din-5.2.1/include/input.h0000644000175100017510000000405212111771577012161 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __input #define __input #include #include "chrono.h" struct key_stamp { double dt; double t; key_stamp () { t = 0; dt = 0; } }; struct key_state { static const int NUM_BYTES = 32; char now [NUM_BYTES]; char last [NUM_BYTES]; static const int MAX_KEYS = 256; key_stamp stamp [MAX_KEYS]; key_state () { memset (now, 0, NUM_BYTES); memset (last, 0, NUM_BYTES); } }; extern key_state keys; inline int keydown (int k) { int quo = k >> 3; unsigned int rem = k - (quo << 3); return ((keys.now[quo] >> rem) & 0x01); } inline int waskeydown (int k) { int quo = k >> 3; unsigned int rem = k - (quo << 3); return ( (keys.last[quo] >> rem) & 0x01); } inline int keypressed (int k) { return (!waskeydown(k) && keydown(k)); } extern nano_chrono ui_clk; inline int keypressedd (int k, double firstt = 1./3, double constt = 1./20) { /* keypressed with key repeat */ if (keydown(k)) { if (!waskeydown(k)) { keys.stamp[k].dt = firstt; keys.stamp[k].t = ui_clk.secs; return 1; } else { double dt = ui_clk.secs - keys.stamp[k].t; if (dt > keys.stamp[k].dt) { keys.stamp[k].dt = constt; keys.stamp[k].t = ui_clk.secs; return 1; } } } return 0; } #endif din-5.2.1/include/oscilloscope.h0000644000175100017510000000323012114471526013507 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __oscilloscope #define __oscilloscope #include "box.h" #include "ui.h" struct oscilloscope : ui { static const int MAX_SAMPLES = 512; int num_samples; void add_samples (float* outl, float* outr, int n); struct sample_t { static float lmin, lmax; // current min/max of left channel static float rmin, rmax; // current min/max of right channel float left, right; // stereo pair sample_t () {left = right = 0;} } samples [MAX_SAMPLES]; int paused; int visible; void toggle_pause (); void toggle_visible (); int viewr; int addr; oscilloscope (); ~oscilloscope (); bool load_last (); bool save_last (); box win, pick_win; float* vertex_array; float* color_array; float lr, lg, lb; float rr, rg, rb; int leftx, rightx, endx, base, ndraw; void calc_draw_params (); void draw (); bool handle_input (); }; #endif din-5.2.1/include/point.h0000644000175100017510000000207612111771577012157 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __point #define __point template struct point { T x, y; point (T a, T b) : x(a), y(b) {} point () : x(0), y(0) {} void operator() (T a, T b) { x = a; y = b; } bool operator== (const point& p) { return ( (x == p.x) && (y == p.y)); } }; #endif din-5.2.1/include/curve.h0000644000175100017510000000451212111771577012147 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef _CURVE #define _CURVE #include #include #include "crvpt.h" #include "point.h" struct curve { float x[2], y[2]; // start/end points float tx[2], ty[2]; // start/end tangents std::list lpts; // for generation (faster bcos recursive subdivision inserts points) std::vector vpts; // for draw & solve (faster bcos no inserts after generation) curve (); curve (float x1, float y1, float x2, float y2, float tx1, float ty1, float tx2, float ty2, float d = 1); curve (const curve& c); curve& operator= (const curve& c); void copy (const curve& c); /* * din generates points on the bezier curve using recursive subdivision: * * find midpoint of line joining end points * if distance between midpoint on this line and point on the bezier curve > limit * insert point and repeat else stop */ float limit2; // square of limit distance void set_limit (float l); // evaluation means generation of points of the curve enum {EVAL_REQUIRED, EVAL_COMPLETE}; int eval_state; void eval (); inline void tangent (int i, float xt, float yt) { tx[i] = xt; ty[i] = yt; eval_state = EVAL_REQUIRED; } inline void get_tangent (int i, float& xt, float& yt) { xt = tx[i]; yt = ty[i]; } inline void vertex (int i, float xv, float yv) { x[i] = xv; y[i] = yv; eval_state = EVAL_REQUIRED; } inline void get_vertex (int i, float& xv, float& yv) { xv = x[i]; yv = y[i]; } inline int eval_required () { return (eval_state == EVAL_REQUIRED); } }; #endif din-5.2.1/include/multi_curve.h0000644000175100017510000000552312111771577013364 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef _MULTICURVE #define _MULTICURVE #include #include #include #include "point.h" #include "curve.h" typedef std::vector< point > points_array; struct multi_curve { // multiple bezier curves // std::string name; // name float r, g, b; // color // curve info points_array vertices; points_array left_tangents; points_array right_tangents; std::vector curv; // bezier curves of this multi_curve. std::vector eval; // eval status of each bezier curve float resolution; // resolution of all bezier curves multi_curve (); multi_curve (const std::string& filename); multi_curve (const multi_curve& src); multi_curve& operator= (const multi_curve& src); void copy (const multi_curve& src); void clear (int all = 1); int num_vertices (); void add_vertex (float x, float y); void add_left_tangent (float x, float y); void add_right_tangent (float x, float y); bool set_vertex (int i, float x, float y, int carry_tangents = 0); bool set_left_tangent (int i, float x, float y); bool set_right_tangent (int i, float x, float y); void get_vertex (int i, float& x, float& y); void get_left_tangent (int i, float& x, float& y); void get_right_tangent (int i, float& x, float& y); bool insert (float x, float y, float tx, float ty); bool remove (int i); void set_resolution (float d); float get_resolution (); void set_color (); // random color void set_color (float rr, float gg, float bb); void get_color (float& rr, float& gg, float& bb) { rr = r; gg = g; bb = b;} void force_eval (); void evaluate (); void load (const std::string& filename); void load (std::ifstream& file); void save (const std::string& filename); void save (std::ofstream& file); }; void create_polyline (multi_curve& crv, const points_array& pts); void convert2_catmull_rom (multi_curve& crv, float tangent_size); void convert2_polyline (multi_curve& crv); multi_curve* check_list (multi_curve** lst, int n, const std::string& name); multi_curve* get_curve (const std::string& name); #endif din-5.2.1/include/play.h0000644000175100017510000000452112111771577011770 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __PLAY #define __PLAY #include "note.h" #include "solver.h" #include "audio.h" // // plays a tone // struct play { solver* get_wave; // solver linked to multi_curve float x; // current x on the waveform; x usually goes from 0 to 1. 0 = waveform start, 1 = waveform end ie 1 cycle. float dx; // change of x every audio buffer; determines how fast the waveform is sampled and hence the frequency of tone (equivalent to variable step in note.h) float left, right; // stereo volume of tone play (solver* s); play (); void init (); inline void set_step (float xd) { dx = xd; } inline void set (float xd, float l, float r) { dx = xd; left = l; right = r; } inline void set_wave (solver* w) { get_wave = w; } inline void set_volume (float l, float r) { left = l; right = r; } inline void solve (float* wav, int n) { (*get_wave)(x, dx, n, wav); } inline void solve_fm (float* wav, float* fm, int n) { (*get_wave) (x, dx, n, fm, wav); } inline void operator() (float* out, int n, float* wav, float chan) { // no modulation audio output for (int i = 0; i < n; ++i) out[i] += (chan * wav[i]); } inline void operator() (float* out, int n, float* wav, float* chan) { // no modulation audio output with chan array for (int i = 0; i < n; ++i) out[i] += (chan[i] * wav[i]); } inline void operator() (float* out, int n, float* wav, float* am, float chan) { // AM and FM modulation in audio output for (int i = 0; i < n; ++i) out[i] += ((chan + am[i]) * wav[i]); } }; #endif din-5.2.1/include/curve_editor.h0000644000175100017510000001320512111771577013514 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __curve_editor #define __curve_editor #include #include #include #include #include "curve.h" #include "multi_curve.h" #include "basic_editor.h" #include "curve_listener.h" #include "help.h" #include "ui.h" #include "mocap.h" #include "beat2value.h" #include "box_selector.h" class curve_library; struct curve_samples { int n; float* x; float* y; float hz; float step; int nperiods; void set (float f, int p = 2); ~curve_samples () { if (x) delete[] x; if (y) delete[] y; } void render (multi_curve *crv); }; struct hit_t { multi_curve* crv; // curve hit int crv_id; // curve index enum {NONE = 0, VERTEX, LEFT_TANGENT, RIGHT_TANGENT}; // things that can be hit in curve unsigned int what; // what was hit in curve int id; // id of that which was hit // tangent vectors from corresponding vertex // point left_tangent, right_tangent; float left_tangent_magnitude, right_tangent_magnitude; hit_t (multi_curve* cv = 0, int cid = -1, unsigned int w = NONE, int i = -1); void clear (); int operator()(); bool operator== (const hit_t& h) {return ((crv == h.crv) && (what == h.what) && (id == h.id));} }; struct mouse_macro { // for applying mouse capture to hit vertex/tangent of hit curve mocap mo; // mouse capture data hit_t hit; // hit curve & vertex/tangent mouse_macro (const mocap& m, hit_t& h) : mo(m), hit(h) {} }; struct undo_t { int i; multi_curve curve; window win; undo_t (int ii, const multi_curve& mc, window& w) : i(ii), curve (mc), win (w) {} }; typedef undo_t redo_t; struct curve_info { multi_curve* curve; bool mark_segments; bool disabled; curve_listener* lisner; curve_info (multi_curve* c, curve_listener* l, bool disabled = false); curve_info (); }; struct curve_editor : basic_editor { std::vector curveinfo; // edited curves int curcrv; // curve editor features // bool carry_tangents; // when vertex moves, their tangents move too. bool mirror_tangents; // when 1 tangent of a vertex moves, the other moves too. // // hit testing // box_selector selector; std::vector hitlist; int hlid; hit_t pik; bool use_existing_hit; void hittest (multi_curve* crv, int crv_id, const points_array& points, unsigned int what); hit_t hittest (); void clear_hit (hit_t& h); void calc_hit_params (hit_t& h); // vertex/tangent operations enum {DO_NOTHING = 0, MOVE_PICKED, MOVE_ALL, SCALE_ALL}; int todo; hit_t mov, ins, del, mir, rep; bool move (); void insert (); void remove (); bool move (int); bool move (hit_t& hit, float x, float y); void replace (); void mirror (int whole_curve = 0); void resolution (int i, int dir); // scratch curve bool show_scratch_curve; points_array win_scratch_points, curv_scratch_points; multi_curve scratch_curve; // load and save editor settings std::string settings_filename; // undo, redo // std::list undos; std::list redos; void dodo (std::list& do1, std::list& do2, std::string mesg); // copy & paste static multi_curve copy; void paste (hit_t& h); // curve library // curve_library* library; void add_curve (); void replace_curve (); void insert_curve (); void load_curve (int dir); help helptext; // mouse capture // std::vector macros; bool detach_mocap (hit_t& hit); void attach_mocap (hit_t& hit); // settings // curve_editor (const std::string& settingsf, const std::string& helpf = "curve_editor.hlp"); ~curve_editor (); void load (const std::string& fname); void save (); // ui bool handle_input (); // curve mgmt ops void add (multi_curve* crv, curve_listener* lsnr); int num_curves (); void clear (); curve_info& get_curve_info (int i); multi_curve* get_curve (int i); // curve selection ops void pick (int k); void toggle (int k); void enable (int k); void enable_all (); bool one_curve_enabled (); std::string selection (); void draw_common (); void draw_all (); void draw (); void clear_scratch_curve (); void draw_scratch_curve (); void draw_curve (multi_curve* crv); void draw_tangents (multi_curve* crv); void draw_vertices (multi_curve* crv); void draw_handle (const point& p); void draw_tangent (const point& p, const point& t); void draw_curves (); void mark_curve_segments (); void draw_vertices (); void draw_tangents (); void attach_library (curve_library* lib); void enter (); void bg (); void apply_mocap (); int sine_enabled, fft_enabled; void draw_sine (); void sine2curve (); int samples_enabled; float hz; int nperiods; curve_samples cs; void draw_samples (); int is_waveform_editor; std::vector bv; int labelvertex; void toggle_vertex_labels (); int overlay; }; #endif din-5.2.1/include/basic_editor.h0000644000175100017510000000526612111771577013461 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __basic_editor #define __basic_editor #include "viewwin.h" #include "point.h" #include "help.h" #include "mocap.h" #include "ui.h" #include "textboard.h" #include struct basic_editor : ui { window win; // edit window // object space <> window space mapping point win_chunk; point obj_chunk; point win_per_obj; point obj_per_win; int win_resolution; float obj_resolution; // snapping support int snap_what; enum {SNAP_NONE, SNAP_X, SNAP_Y, SNAP_BOTH}; void snap (float& x, float& y); int is_snapx (); int is_snapy (); static const int buf_size = 1024; static char buf [buf_size]; help helptext; mocap mocap0; int pan, zoom; // pan & zoom deltas to control pan and zoom speed basic_editor (const std::string& settingsf = "../data/basic_editor.txt", const std::string& helpf = "../data/basic_editor_help.txt"); virtual ~basic_editor (); void obj2win (const point& p, float& wx, float& wy); void obj2win (const float& ox, const float& oy, float& wx, float& wy); void win2obj (const float& dx, const float& dy, float& cx, float& cy); void calc_win_mouse (); inline const point& get_obj_chunk () { return obj_chunk; } inline float get_obj_resolution () { return obj_resolution; } void load (const std::string& fname); void load (std::ifstream& file); void save (std::ofstream& file); void set_win_chunk (int x, int y); bool handle_input (); void project (); void unproject (); void draw (); void draw_cursor (); int update_snaps; std::vector xlines, ylines; int nxpts, nypts; int startx, endx, starty, endy; void draw_snaps (); void calc_snaps (); textboard tb; int ntexts; static const int KB_KB_ATTACK = 1857; float susx, susy; box susbox; void update_sustain (float s); void calc_visual_params (); int edit_sustain; int lmb_clicked; }; #endif din-5.2.1/include/listeners.h0000644000175100017510000000442412111771577013035 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __LISTENERS #define __LISTENERS #include "curve_listener.h" struct din; struct wave_listener : curve_listener { enum {DIN_BOARD, KEYBOARD_KEYBOARD, DRONE}; int which; wave_listener (int w) : which (w) {} void edited (curve_editor* ed, int i); }; struct drone_listener : curve_listener { din* d; drone_listener (din* dd); void edited (curve_editor* ed, int i); }; struct mod_listener : curve_listener { din* d; mod_listener (din* dd); void edited (curve_editor* ed, int i); }; struct beat2value; struct beat2value_listener : curve_listener { beat2value* beat2value0; beat2value_listener (beat2value* g); void edited (curve_editor* ed, int i); }; struct morse_code_listener : curve_listener { void edited (curve_editor* ed, int i); }; struct solver; struct delay; struct delay_listener : curve_listener { delay* dly; solver* sol; float* result; delay_listener (delay* d, solver* s, float* r) : dly(d), sol (s), result (r) {} void edited (curve_editor* ed, int i); }; struct keyboard_keyboard; struct attack_listener : curve_listener { keyboard_keyboard* k; attack_listener (keyboard_keyboard*); void edited (curve_editor* ed, int i); }; struct decay_listener : curve_listener { keyboard_keyboard* k; decay_listener (keyboard_keyboard*); void edited (curve_editor* ed, int i); }; struct velocity_listener : curve_listener { keyboard_keyboard* k; velocity_listener (keyboard_keyboard* kk) : k(kk) {} void edited (curve_editor* ed, int i); }; #endif din-5.2.1/include/console_iterator.h0000644000175100017510000000230612111771577014375 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __console_iterator #define __console_iterator #include #include struct console_iterator { console& con; char delim; console_iterator (console& c, char delim = ' '); console_iterator& operator* (); console_iterator& operator++ (); console_iterator& operator++ (int); template console_iterator& operator= (const T& t) { con << t; return *this; } }; #endif din-5.2.1/include/audio.h0000644000175100017510000000562012111771577012125 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __AUDIO #define __AUDIO #include #include #include #include #include "console.h" typedef jack_default_audio_sample_t sample_t; struct audio_out { static int AUTO_CONNECT_OUTPUTS; // auto connect din to system audio outputs? sample_t sample_rate; static const int num_channels = 2; int samples_per_buffer; // has 2 channels int samples_channel_size, samples_buffer_size; int samples_per_channel; // written by the main thread // // a multi buffer scheme // // main thread writes a buffer, while audio thread streams another to audio card // sample_t * samples_buffers; // a bunch of sample buffers int num_samples_buffers; int* available; // buffer available for streaming? sample_t *readp, *writep; int readi, writei; inline int can_write () {return !available [writei];} // reuseable buffers sample_t *result, *ams, *fms, *gatr, *vol; // result, AM & FM, gater, volume // // jack // jack_client_t *client; // L and R connections int lcons, rcons; // l and r connected? jack_port_t *out_left, *out_right; const char **con_left, **con_right; // midi input jack_port_t *midi_in; jack_ringbuffer_t *midi_rb; int num_midi_con; // jack preferences std::string prefs_name; void load_prefs (); void save_prefs (); void defaults (); audio_out (); ~audio_out (); void alloc (); int open (); int close (); int start (); void set_callbacks (); void set_sample_rate (int s); void stream (float* lbuf, float* rbuf, float* sbuf); static int audio_wanted (jack_nframes_t nsamples, void *arg); }; int buffer_size_changed (jack_nframes_t nframes, void *arg); int sample_rate_changed (jack_nframes_t nframes, void *arg); void midi (); void applyfx (float* out0, float* out1, int delay = 1, int compress = 1); void update_audio (); console& operator<< (console& c, const audio_out& ao); void run_midi_cmd (const std::string& c, size_t length, jack_midi_data_t *buffer, std::vector& args); void connection_changed (jack_port_id_t a, jack_port_id_t b, int connect, void *arg); #endif din-5.2.1/include/phrasor.h0000644000175100017510000000360012111771577012476 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __phrasor #define __phrasor #include #include "box.h" #include "point.h" struct phrasor { static int JOG; std::vector < point > data; int sz, lst; int state; enum {stopped, recording, playing, paused}; int cur; int cue; int recl; phrasor () { clear (); } void get (int& win_mousex, int& win_mousey) { point& pt = data[cur]; win_mousex = pt.x; win_mousey = pt.y; } void next () { int c = cur + 1; if (c >= sz) cur = 0; else cur = c; } void clear () { state = stopped; data.clear (); cur = cue = 0; sz = 0; lst = -1; } void jog (int j) { int c = cur + j; if (c >= sz) cur = 0; else if (c < 0) cur = lst; else cur = c; } void play () { if (cur < sz) state = playing; } void set_cue () { cue = cur; } void goto_cue () { cur = cue; } void validate () { sz = data.size (); lst = sz - 1; } void rec () { state = phrasor::recording; recl = cur = sz; } void draw (unsigned int i, float r, float g, float b); void draw_marker (int x, int y); }; #endif din-5.2.1/include/beat2value.h0000644000175100017510000000344112111771577013055 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __BEAT2VALUE #define __BEAT2VALUE #include "multi_curve.h" #include "solver.h" #include struct beat2value { std::string name; // name for use in console prints beat2value (const std::string& name, const std::string& fname); ~beat2value (); void operator() (float* soln, int n); // solve n values void modulate (float* out, float* in, int n, float depth); // modulate n outs with n mods at depth (used by fm/am) std::string crvname; multi_curve crv; // transfer function is a bezier curve solver sol; void curve_edited (); std::string style; // style of continuation at end of curve (loop or pong) xhandler *xmin, *xmax; float bpm; // current bpm float now; // beat position float delta; // used by the solver float set_bpm (float n); float get_bpm (); }; void tween (float* buf1, float* buf2, int n, float amount); // interpolate buf2 -> buf1 by amount; store in buf1 void multiply (float* out, float* mul, int n); // multiply n muls with n outs; store in out #endif din-5.2.1/include/random.h0000644000175100017510000000661412111771577012310 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef ___random #define ___random /* A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. */ const int N = 624; const int M = 397; const int MATRIX_A = 0x9908b0df; /* constant vector a */ const int UPPER_MASK = 0x80000000; /* most significant w-r bits */ const int LOWER_MASK = 0x7fffffff; /* least significant r bits */ static unsigned int mt[N]; /* the array for the state vector */ static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ /* initializes mt[N] with a seed */ inline void seed_rand_gen (unsigned int s) { mt[0]= s & 0xffffffff; for (mti=1; mti> 30)) + mti); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array mt[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ //mt[mti] &= 0xffffffff; /* for >32 bit machines */ } } inline unsigned int get_rand_32 (void) { unsigned int y; static unsigned int mag01[2]={0x0, MATRIX_A}; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (mti >= N) { /* generate N words at one time */ int kk, nm=N-M, mn=-nm, n1=N-1, m1=M-1; if (mti == N+1) /* if init_gen_rand_() has not been called, */ seed_rand_gen (0); for (kk=0;kk> 1) ^ mag01[y & 0x1]; } for (;kk> 1) ^ mag01[y & 0x1]; } y = (mt[n1]&UPPER_MASK)|(mt[0]&LOWER_MASK); mt[n1] = mt[m1] ^ (y >> 1) ^ mag01[y & 0x1]; mti = 0; } y = mt[mti++]; /* Tempering */ y ^= (y >> 11); y ^= (y << 7) & 0x9d2c5680; y ^= (y << 15) & 0xefc60000; y ^= (y >> 18); return y; } inline unsigned int get_rand_16 (void) { return get_rand_32()&0xffff; } inline unsigned int get_rand_8 (void) { return get_rand_32()&0xff; } inline unsigned int get_rand_7 (void) { return get_rand_32()&0x7f; } inline unsigned int get_rand_bit (void) { return get_rand_32()&0x01; } inline double get_rand_01 (void) { return (get_rand_16() * 1.0 / 0xffff); } template class rnd { T min, max; T delta; public: rnd (T mi, T ma) { min = mi; max = ma; delta = max - min; } T operator() () { return (T) (min + delta * get_rand_01()); } }; #endif din-5.2.1/include/globals.h0000644000175100017510000000315712111771577012452 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __globals #define __globals #include "tokenizer.h" #include #include struct load_globals { std::string ignore; bool load_intervals (const std::string& fname); void load_note_colors (const std::string& fname); load_globals (); }; void calc_volume_vars (int height); void calc_tonic_limits (); template struct pusher { virtual T& operator<< (const std::string& s)=0; virtual T& operator<< (char c)=0; }; #include template void into_lines (const std::string& str, pusher& push) { static tokenizer tz; static const std::string newline = "\n"; static const char endln = '\n'; if (str.length()) { tz.set (str, newline); std::string ln; while (1) { std::string ln; tz >> ln; if (ln == "") break; else { push << ln << endln; } } } } #endif din-5.2.1/include/scale_info.h0000644000175100017510000000267612111771577013136 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __SCALE_INFO #define __SCALE_INFO #include #include #include struct scale_info { std::string name; // name of scale float lo_tonic, tonic, hi_tonic; std::map intervals; // custom intervals for this scale std::vector notes; // notes of the scale int num_ranges; // number of tone ranges (see range.h) int last_range; scale_info () { num_ranges = 0; last_range = -1; intervals.clear (); } void load_last (); void save_last (); bool set_tonic (float s); bool set_scale (const std::string& n); bool load_custom_tuning (); void save_custom_tuning (); }; #endif din-5.2.1/include/command.h0000644000175100017510000002275512115663325012445 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __command #define __command #include "help.h" struct tokenizer; struct command { std::string longname; std::string shortname; command (const std::string& ln, const std::string& sn) : longname (ln), shortname (sn) {} virtual bool operator() (tokenizer& tz) { return true; } virtual ~command () {} }; struct cmdlist { std::vector cmds; int ncmds; std::string result; // holds last run command output static const int size = 2048; char buf [size]; // for console printing void add (command* cmd); }; struct din; struct set_var : command { // set var din* d; public: set_var (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); int set_scroll (std::string& varn, tokenizer& tz); int set_zoom_pan (int& rate, float& amount, std::string& varn, tokenizer& tz); ~set_var () {} }; struct get_var : command { // get var din* d; public: get_var (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~get_var () {} }; struct delay; struct set_delay: command { // set delay time delay* left; delay* right; public: set_delay (delay* l, delay* r, const std::string& ln, const std::string& sn) : command (ln, sn), left(l), right(r) {} bool operator() (tokenizer& tz); ~set_delay () {} }; struct get_delay: command { // get delay time delay* left; delay* right; public: get_delay (delay* l, delay* r, const std::string& ln, const std::string& sn) : command (ln, sn), left(l), right(r) {} bool operator() (tokenizer& tz); ~get_delay () {} }; struct beat2value; // bpm // struct bpm_com { static const int NUM = 4; static const char* str [NUM]; static beat2value* bv [NUM]; int getid (const std::string& name); }; struct ls_bpm: command, bpm_com { // list bpmable components ls_bpm (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~ls_bpm () {} }; struct set_bpm: command, bpm_com { set_bpm (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_bpm () {} }; struct get_bpm: command, bpm_com { get_bpm (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_bpm () {} }; struct set_style : command, bpm_com { set_style (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_style () {} }; struct get_style : command, bpm_com { get_style (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_style () {} }; struct set_beat : command, bpm_com { set_beat (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_beat () {} }; struct get_beat : command, bpm_com { get_beat (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_beat () {} }; struct add_scale: command { public: add_scale (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator () (tokenizer& tz); ~add_scale () {} }; struct remove_scale : command { public: remove_scale (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator () (tokenizer& tz); ~remove_scale () {} }; struct ls_scales: command { public: ls_scales (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator () (tokenizer& tz); ~ls_scales () {} }; struct ls_notes: command { public: ls_notes (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator () (tokenizer& tz); ~ls_notes () {} }; struct load_scale : command { din* d; int reentry; public: load_scale (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator () (tokenizer& tz); ~load_scale () {} }; struct key : command { din* d; public: key (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~key () {} void find_nearest_note (std::string& note, float& frequency, float& dist); }; struct load_tuning: command { din* d; public: load_tuning (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~load_tuning () {} }; struct notation : command { din* d; notation (din* dd, const std::string& ln, const std::string& sn) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~notation () {} }; struct note_distance: command { public: note_distance (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~note_distance () {} }; struct chord: command { public: chord (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~chord () {} }; struct set_font_size: command { public: set_font_size (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_font_size () {} }; struct get_font_size: command { public: get_font_size (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_font_size () {} }; struct set_kern: command { public: set_kern (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_kern () {} }; struct get_kern: command { public: get_kern (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_kern () {} }; struct curve_name : command { // change picked curve name curve_name (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~curve_name () {} }; struct multi_curve; struct paste_gater: command { paste_gater (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~paste_gater () {} }; struct curve_value : command { // change curve value (vertex, tangent) curve_value (const std::string& ln, const std::string& sn) : command (ln, sn) {} ~curve_value () {} bool operator() (tokenizer& tz); }; struct curve__library : command { // edit curve library attached to current curve editor curve__library (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~curve__library () {} }; struct set_curve_editor : command { set_curve_editor (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_curve_editor () {} }; struct set_scope : command { din* d; set_scope (const std::string& ln, const std::string& sn, din* dd) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~set_scope () {} }; struct get_scope : command { din* d; get_scope (const std::string& ln, const std::string& sn, din* dd) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~get_scope () {} }; struct echo : command { echo (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~echo () {} }; struct set_text_color: command { set_text_color (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~set_text_color () {} }; struct get_selection : command { get_selection (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_selection () {} }; struct set_drone : command { din& d; set_drone (const std::string& ln, const std::string& sn, din& dd) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~set_drone () {} }; struct get_drone : command { din& d; get_drone (const std::string& ln, const std::string& sn, din& dd) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~get_drone () {} }; struct get_intervals : command { get_intervals (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~get_intervals () {} }; struct num_octaves : command { din& d; num_octaves (const std::string& ln, const std::string& sn, din& dd) : command (ln, sn), d(dd) {} bool operator() (tokenizer& tz); ~num_octaves () {} }; struct quit : command { quit (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~quit () {} }; /* struct template : command { template (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); ~template () {} };*/ #endif din-5.2.1/include/scalelist.h0000644000175100017510000000243512111771577013010 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __SCALELIST #define __SCALELIST #include #include struct tokenizer; struct scale { std::string name; std::string notes; int num_notes; scale () : num_notes(0) {} bool operator== (const scale& s) { return name == s.name;} }; struct scalelist { std::vector scales; scalelist (); ~scalelist (); void load (); void save (); int add (tokenizer& tz); int remove (const std::string& name); int get (const std::string& str, scale& s); void ls (); }; #endif din-5.2.1/include/crvpt.h0000644000175100017510000000224012111771577012155 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __crvpt #define __crvpt struct crvpt { // curve point float x, y; float t; // bezier param // used by solver (see solver.h/solver.cc) float m; // slope of seg joining next point int inf; // is slope infinity? crvpt () { x = y = t = m = 0; inf = 0; } crvpt (float xx, float yy, float tt) { x = xx; y = yy; t = tt; m = 0; inf = 0; } }; #endif din-5.2.1/include/textboard.h0000644000175100017510000000315112111771577013015 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __textboard #define __textboard #include #include #include #include "viewwin.h" struct text { std::string txt; // actual text float wx, wy; int vx, vy; // view coords float r, g, b; // color int state; enum {permanent, temporary}; int type; enum {hlabel=0, vlabel=1, none}; text (const std::string& t, float xx, float yy, float rr=0.5, float gg=0.5, float bb=0.5, int s = text::temporary, int y = text::none) : txt(t), wx(xx), wy (yy), r(rr), g(gg), b(bb), state (s), type (y) {} }; struct basic_editor; struct textboard { std::vector texts; void draw (); void add (const text& t) { texts.push_back (t);} void erase (const std::string& s); void clear (); void refresh (basic_editor* b); void load (std::ifstream& file); void save (std::ofstream& file); }; #endif din-5.2.1/include/sine_mixer.h0000644000175100017510000000265612111771577013174 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __sine_mixer #define __sine_mixer #include "box.h" #include "levels.h" #include "ui.h" #include "multi_curve.h" #include struct sine_mixer : ui { static const float pi; static int NUM_SINE_SAMPLES; static const int MIN_SINE_SAMPLES = 4; static void set_sine_samples (int s); int nharmonics; std::vector< std::vector > harmonics; // output std::vector nonorm, norm; void normalise (); levels sine_levels; sine_mixer (); ~sine_mixer (); void draw (); bool handle_input (); void prep_harmonics (); void num_harmonics (int n); void mix (); void make_curve (multi_curve& c); }; #endif din-5.2.1/include/levels.h0000644000175100017510000000337012111771577012316 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __levels #define __levels #include "ui.h" #include "box.h" #include #include struct levels : ui { std::string name; // name of this control void load (); // load settings void save (); // save settings // gui vars box bbox; int elem_width; int height; bool hover; int nlev; // number of levels int lastlev; int lev; // edited level float val; // edited val int hgt; // edited height bool moving; // moving this control? bool editing; // editing individual elements? int editable; // is control editable? bool edited; // values edited? int saveable; // levels saved on quit? std::vector values; // 0 to 1 for each level std::vector heights; // 0 to height levels (const std::string& s); ~levels (); bool handle_input (); // color float r, g, b; float a, a0; void draw (); void clear (); void calc (); void set (int i, float v, int h = -1); void chkpos (); }; #endif din-5.2.1/include/help.h0000644000175100017510000000172012111771577011751 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __help #define __help #include #include struct help { std::vector text; help (const std::string& fname); void operator() (); }; #endif din-5.2.1/include/mocap.h0000644000175100017510000000223312111771577012120 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __mocap #define __mocap #include struct basic_editor; struct mocap { // mouse capture std::vector x, y; unsigned int cur; int state; enum {empty, capturing, finished}; mocap (); bool get (float& x, float& y); bool add (float wx, float wy); void finish (basic_editor* b); void clear (); int operator() (); // mocap exists? }; #endif din-5.2.1/include/din.h0000644000175100017510000001414012115672756011576 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef DIN #define DIN #include "curve_editor.h" #include "listeners.h" #include "range.h" #include "ui.h" #include "audio.h" #include "play.h" #include "oscilloscope.h" #include "curve_library.h" #include "beat2value.h" #include "help.h" #include "phrasor.h" #include "input.h" #include "command.h" #include "globals.h" #include "random.h" #include "drone.h" struct din_info { struct scroll_t { double rept; // key repeat time int rate; // scrolls per second int dx, dy; // x & y amount per scroll scroll_t () : rate (80), dx(15), dy(1) {} void calc_repeat_time () { if (rate) rept = 1./ rate; } }; scroll_t scroll; int height; // din board height int gater; // gater enabled? int delay; // delay enabled? int compress; // compressor enabled? int voice; // lead voice? int anchor; // draw drone anchor? din_info (); void save (); }; struct octave_shift_data { float tonic; // current tonic int dir; // shift direction; 0 = up, 1 = down int active; // active? octave_shift_data () : tonic (0), dir (-1), active (0) {} }; struct din : ui { multi_curve wave; // waveform curve_editor waved; // waveform shape editor wave_listener wavlis; solver wavsol; play wavplay; // tone ranges // std::vector ranges; int num_ranges, last_range, current_range; range *firstr, *lastr; float step; // represents pitch (see note.h) float delta; // 0 - left of range, 1 - right of range float octave_position; // octave position of pitch (any value between 0 to 2 ie 3 octaves) int show_cursor_info; // display frequency / volume under mouse cursor? std::string cursor_info; int visl, visr; // visible ranges void find_visible_ranges (int dir = 0); bool load_ranges (); void save_ranges (); void create_ranges (int n); void setup_ranges (int load = 1); void setup_range_notes (); void update_range_notes (); void calc_range_label (); void range_right_changed (); void range_left_changed (); void set_range_size (int r, int sz); void set_range_size (int s, int t, int sz); int find_range (int x, int r); void find_current_range (); bool find_tone_and_volume (); void retune_note (const std::string& nn, float v); void retune_note (); void restore_note (); void restore_all_notes (); float get_note_value (const std::string& s); // // mouse board // box win; void scroll (int dx, int dy); void calc_win_mouse (); int win_mousex, win_mousey; // mouse pos in win int delta_mousex, delta_mousey; int tonex, toney; int dv; // driver volume ie mouse height on board inline void find_volume () { extern int BOTTOM; extern double VOLUME; extern float DELTA_VOLUME; dv = toney - BOTTOM; VOLUME = dv * DELTA_VOLUME; } void set_tonic (float s); float get_tonic (); void mouse2tonic (); // // drones // box_selector selector; std::vector drones; std::vector selected_drones; float drone_master_volume; float last_drone_master_volume; multi_curve drone_wave; // drone waveform curve_editor droneed; wave_listener dronelis; int snap_drones; // snap to range ends ie notes? int editing_drone; // drone selection void find_selected_drones (); int select_all_drones (); void pick_drone (); std::string get_selected_drones (); void clear_selected_drones (); void load_drones (); void save_drones (); void add_drone (); void set_drone (int d); void update_drone_tone (); void update_drone_x (int i, int j); void update_drone_master_volume (float delta); void update_drone_players (); void update_drone_solvers (); void update_drone_ranges (); void update_drone_anchors (); std::string on_delete; void delete_selected_drones (); int delete_all_drones (); int anchor; void draw_drones (); void set_drone_volume (int i, float v); int do_drone_modulation; void change_drone_bpm (int what, float delta); void change_drone_depth (int what, float delta); void change_drone_trail_points (int n); void change_drone_handle_size (int n); void modulate_drones (); int rising, falling; std::vector dead_drones; void rise_drones (); void fall_drones (); // am, fm & gaters // float am_depth, fm_depth; void change_depth (int i, float d); void change_bpm (beat2value& which, float amt); float am_vol; float fm_step; beat2value fm, am, gatr; void calc_am_fm_gater (); // gater editor curve_editor gated; curve_library gatlib; beat2value_listener gatrlis; // am & fm modulation editors curve_editor moded; beat2value_listener fmlis, amlis; // musical key int key_id; // C = 0, C# = 1, D = 2, D# = 3, E = 4, F = 5, F# = 6, G = 7, G# = 8, A = 9, A# = 10, B = 11 void set_key_id (int i); int get_key_id () { return key_id;} // phrasor - record/play/scratch a phrase phrasor phrasor0; int jogged; oscilloscope osc; din (cmdlist& cmdlst); ~din (); bool handle_input (); void load_scale (); void save_scale (); void enter (); void bg (); // background execution void draw (); // din saved info din_info dinfo; void save_info (); // help help helptext; // range display notation std::string notation; void set_notation (const std::string& s); void notate_ranges (); void render_audio (float* out0, float* out1); void roll_console (); }; #endif din-5.2.1/include/curve_library.h0000644000175100017510000000313512111771577013673 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __CURVE_LIBRARY #define __CURVE_LIBRARY #include #include #include "multi_curve.h" struct curve_editor; struct curve_library; struct curve_library { // a library of multi curves loaded from file std::string filename; std::vector curves; std::vector sustains; int cur; int has_sustain; // only curve library of keyboard-keyboard attack has sustain curve_library (const std::string& fname, int _has_sustain = 0); ~curve_library (); void load (const std::string& fname); void add (const multi_curve& m); void del (); void replace (const multi_curve& m); void insert (const multi_curve& m); const multi_curve& prev (); const multi_curve& next (); void move (int i); int num_curves () { return (int) curves.size (); } void save (); }; #endif din-5.2.1/include/delay.h0000644000175100017510000000265412111771577012126 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __delay #define __delay #include "multi_curve.h" #include "solver.h" #include "listeners.h" struct delay { // 1 channel delay int nsamples; float* samples; float* fbk; float* vol; int id; float msecs; // delay time // feedback and volume are beziers solved into fbk and vol std::string fbk_fname, vol_fname; multi_curve fbk_crv, vol_crv; delay_listener fbk_lis, vol_lis; solver fbk_sol, vol_sol; delay (float t, const std::string& fn, const std::string& vn); ~delay (); void zero (); void check_buffer (); void operator() (float* out, int nz, float fdr); void set (float t); void get (float& t); }; #endif din-5.2.1/include/curve_listener.h0000644000175100017510000000176612111771577014064 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef CURVE_LISTENER #define CURVE_LISTENER struct curve_editor; struct curve_listener { virtual void selected (int i) {} virtual void edited (curve_editor* ed, int i)=0; virtual ~curve_listener () {} }; #endif din-5.2.1/include/strength_editor.h0000644000175100017510000000260412111771577014227 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __STRENGTH_EDITOR #define __STRENGTH_EDITOR #include "curve_editor.h" #include using namespace std; struct note_marker { string note_name; int x; static int ybot, ytop; static int clearance; }; struct din; struct strength_editor : curve_editor { din* d; vector note_markers; int selected_resonator; help helptext; void build_note_markers (); void draw_note_markers (); strength_editor (din* dd, string settings_file, string help_file); bool handle_input (); void select_curve (int i); void draw_selected_resonator (); void draw (); }; #endif din-5.2.1/include/range.h0000644000175100017510000000332312111771577012116 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __RANGE #define __RANGE #include "box.h" #include "note.h" #include "color.h" #include #include struct range { // // a range of tones from one note to another (both included). // the tones between the notes are the microtones. // box extents; // range extents ie rectangle note notes[2]; // end notes std::string intervals[2]; // interval names of end notes (see ~/.din/*.tuning files) enum {NONE = -1, LEFT, RIGHT, BOTH}; int key; float delta_octave_position; // difference of octave position of the end notes float delta_step; // difference of step values ie pitch/frequency of the end notes (see note.h) void calc (int octave, float start, std::map& _intervals); // draw labels std::string octave; static const int spacer = 5; static int char_height, ybot1, ybot2, ytop1, ytop2; void draw_labels (int label_what = LEFT, int show_frequency = 0); }; #endif din-5.2.1/include/note.h0000644000175100017510000000240312111771577011765 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __NOTE #define __NOTE #include struct note { // // musical note / tone // std::string name; std::string hz_name; float hz; // frequency of note in hertz float step; // amount to step in x along the waveform every sample to get the audio level at that sample. float octave_position; // octave number + note position in octave note (); void set_frequency (float f); }; void hz2step (float& hz, float& step); // convert frequency to step #endif din-5.2.1/include/color.h0000644000175100017510000000370212111771577012141 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __color #define __color #include "dingl.h" #include "random.h" struct color { float r, g, b; color& operator*= (float v) { r *= v; g *= v; b *= v; return *this; } color (float rr = 0, float gg = 0, float bb = 0) { r = rr; g = gg; b = bb; } color (const color& t, const color& s) { r = t.r - s.r; g = t.g - s.g; b = t.b - s.b; } }; inline void hex2rgb (unsigned char hr, unsigned char hg, unsigned char hb, double& r, double& g, double& b) { const unsigned char ff = 0xff; const double ff1 = 1.0 / ff; r = hr * ff1; g = hg * ff1; b = hb * ff1; } inline void set_rnd_color (float& r, float& g, float& b, float m0 = 0, float m1 = 1) { rnd rd (m0, m1); r = rd(); g = rd (); b = rd (); } inline void setcolor (unsigned char hr, unsigned char hg, unsigned char hb, float a = 1) { double r, g, b; hex2rgb (hr, hg, hb, r, g, b); glColor4f (r, g, b, a); } inline void blend_color (const color& source, const color& target, color& result, float amount) { color delta (target, source); delta *= amount; result.r = source.r + delta.r; result.g = source.g + delta.g; result.b = source.b + delta.b; } #endif din-5.2.1/include/solver.h0000644000175100017510000001211112111771577012327 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __SOLVER #define __SOLVER #include "crvpt.h" #include "multi_curve.h" #include struct solver; struct xhandler { virtual void operator() (solver& s, float& x, float& dx) = 0; virtual ~xhandler () {} }; struct atmin: xhandler { void operator() (solver& s, float& x, float& dx); }; struct atmax: xhandler { void operator() (solver& s, float& x, float& dx); }; struct tomin: xhandler { void operator() (solver& s, float& x, float& dx); }; struct loopmin : atmin { void operator() (solver& s, float& x, float& dx); }; struct loopmax : tomin { void operator() (solver& s, float& x, float& dx); }; struct pongmax: atmax { void operator() (solver& s, float& x, float& dx); }; struct pongmin: atmin { void operator() (solver& s, float& x, float& dx); }; struct curve_editor; struct gotog : xhandler { float g; curve_editor* ed; gotog (float gg, curve_editor* e); void operator() (solver& s, float& x, float& dx); void set (float gg); }; extern atmin _atmin; extern atmax _atmax; extern tomin _tomin; extern loopmin _loopmin; extern loopmax _loopmax; extern pongmin _pongmin; extern pongmax _pongmax; extern gotog _gotog; struct solver { // // given x return y // // assumes x such that // x0 <= x1 <= x2 <= ...... <= xlast // // solved curve multi_curve* mcrv; int ncurvs, icurv, last_curv; int iseg; // line segment on curve expected to contain x float startx, starty; float endx, endy; float m, inf; float ycomp; // first and last points float firstx, firsty; float lastx, lasty; float result; // last result inline int inseg (float x, int c, int i) { std::vector& curv = mcrv->curv; std::vector& vpts = curv[c].vpts; float leftx = vpts[i].x, rightx = vpts[i+1].x; if (x >= leftx && x <= rightx) { setseg (c, i); return 1; } return 0; } void setseg (int c, int i) { std::vector& curv = mcrv->curv; std::vector& vpts = curv[c].vpts; crvpt& start = vpts[i]; crvpt& end = vpts[i+1]; startx = start.x; starty = start.y; endx = end.x; endy = end.y; m = start.m; inf = start.inf; if (inf == 1) ycomp = endy; else ycomp = starty - m * startx; icurv = c; iseg = i; } inline int lastseg (int c) { std::vector& curv = mcrv->curv; std::vector& vpts = curv[c].vpts; return vpts.size() - 2; return 0; } inline int getsegs (int c) { return (mcrv->curv[c].vpts.size() - 1); } inline int searchleft (float x) { int lseg = iseg, lcurv = icurv; while (1) { if (--lseg < 0) { --lcurv; if (lcurv < 0) break; lseg = lastseg (lcurv); } if (inseg (x, lcurv, lseg)) return 1; } return 0; } inline int searchright (float x) { int rseg = iseg, rcurv = icurv; int rsegs = getsegs (rcurv); while (1) { if (++rseg < rsegs); else { ++rcurv; if (rcurv >= ncurvs) break; rsegs = getsegs (rcurv); rseg = 0; } if (inseg (x, rcurv, rseg)) return 1; } return 0; } inline int findseg (float x) { int fcurv = 0, fseg = 0, nsegs = getsegs (fcurv); while (1) { if (inseg (x, fcurv, fseg)) return 1; else { ++fseg; if (fseg >= nsegs) { if (++fcurv >= ncurvs) { setseg (ncurvs - 1, nsegs - 1); break; } fseg = 0; nsegs = getsegs (fcurv); } } } return 0; } solver (); solver (multi_curve* crv); void operator() (multi_curve* crv); // given x, solve y float operator() (float x); float operator() (float &x, float& dx, xhandler& xmin = _atmin, xhandler& xmax = _tomin); void operator() (float& x, float& dx, int n, float* soln, xhandler& xmin = _atmin, xhandler& xmax = _tomin); // fast solver when x is incremented by dx n times, solution stored in soln void operator() (float& x, float& dx, int n, float* mod, float* soln, xhandler& xmin = _atmin, xhandler& xmax = _tomin); // same as last solver but x is also modulated by mod. void operator() (float* ax, int n, xhandler& xmin = _atmin, xhandler& xmax = _atmax); // given an array of x, store solution in same array --> used by compressor void init (); void update (); // when multi curve has changed }; #endif din-5.2.1/include/container.h0000644000175100017510000000354312111771577013010 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __container #define __container template inline void clear (S& container) { // clears container of pointers. deletes the pointers. typedef typename S::iterator Si; for (Si i = container.begin(), j = container.end(); i != j; ++i) { T* t = *i; delete t; } container.clear (); } template inline void erase (T& container, unsigned int q) { // erases qth item in container typedef typename T::iterator Ti; Ti iter = container.begin(); for (unsigned int p = 0; p < q; ++p, ++iter); if (iter != container.end()) container.erase (iter); } template inline T& get (S& container, unsigned int q) { // gets qth item in container typedef typename S::iterator Si; Si iter = container.begin (); for (unsigned int p = 0; p < q; ++p, ++iter); return *iter; } template inline T& get (S& container, I& iter, unsigned int q) { // gets qth item of container and its iterator iter = container.begin (); for (unsigned int p = 0; p < q; p++, ++iter); return *iter; } #endif din-5.2.1/include/checkdotdin.h0000644000175100017510000000256612115624522013300 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __checkdotdin #define __checkdotdin #include #include #include #include "ansi_color_codes.h" struct checkdotdin { checkdotdin () { extern std::string dotdin; dotdin = std::string(getenv ("HOME")) + std::string("/.din/"); std::ifstream testf ((dotdin + "globals").c_str(), std::ios::in); if (testf) { std::cout << PASS << "<<< using data files in " << dotdin << " >>>" << ENDL; } else { system ("checkdotdin"); std::cout << PASS << "<<< copied initial data files into: " << dotdin << " >>>" << ENDL; } } }; #endif din-5.2.1/include/compressor.h0000644000175100017510000000247112111771577013221 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __compressor #define __compressor #include "curve_editor.h" #include "multi_curve.h" #include "solver.h" struct compressor; struct compressor_listener : curve_listener { compressor& c; compressor_listener (compressor& cc) : c (cc) {} void edited (curve_editor* ed, int i); }; struct compressor { // dynamic range compression using a bezier curve based transfer function std::string fname; multi_curve crv; solver apply; compressor_listener lis; compressor (const std::string& f); ~compressor (); } ; #endif din-5.2.1/include/osc.h0000644000175100017510000000332112111771577011604 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __osc #define __osc #include #include "command.h" #include struct oserver : command { lo_server server; int lo_fd; fd_set rfds; struct timeval tv; bool enabled; bool msg; oserver (const std::string& ln, const std::string& sn) : command (ln, sn) {} bool operator() (tokenizer& tz); void handle_requests (); void toggle (); ~oserver (); }; int command_handler (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data); struct oconnect : command { lo_address& client; oconnect (lo_address& c, const std::string& ln, const std::string& sn) : command (ln, sn), client(c) {} bool operator() (tokenizer& tz); ~oconnect () {} }; struct osend : command { lo_address& client; osend (lo_address& c, const std::string& ln, const std::string& sn) : command (ln, sn), client(c) {} bool operator() (tokenizer& tz); ~osend () {} }; void osc (); #endif din-5.2.1/include/bot.h0000644000175100017510000000570612111771577011615 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ /* * din irc bot * * based on LGPLed code by Georgy Yunaev gyunaev@ulduzsoft.com * of libircclient.sourceforge.net. * */ #ifndef __BOT #define __BOT #include #include #include "command.h" #include "globals.h" #include #include void* irc_monitor (void *pbot); // callbacks for various irc events void dump_event (irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count); void event_join (irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count); void event_connect (irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count); void event_privmsg (irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count); void event_channel (irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count); void irc_event_dcc_chat (irc_session_t* session, const char* nick, const char* addr, irc_dcc_t dccid); void irc_event_dcc_send (irc_session_t* session, const char* nick, const char* addr, const char* filename, unsigned long size, irc_dcc_t dccid); void event_numeric (irc_session_t* session, unsigned int event, const char* origin, const char** params, unsigned int count); // utils std::string get_nick (const char * origin); struct tokenizer; // the bot // struct bot_t : command, pusher { // libircclient irc_callbacks_t callbacks; irc_session_t* sess; // server, nickname and channel std::string srv, nick, chan, passwd; std::string nickolon; // nick: int len; // messages from irc std::string mesg; std::queue cmds, mesgs; void handle_input (); // irc monitoring thread pthread_t tid; int prefixed; // yes? std::string prefix; // eg., some_nick: std::vector allowed; bot_t (const std::string& ln, const std::string& sn); int make (); ~bot_t (); std::string quitmsg; int kill (); bool operator() (tokenizer& ss); // command parser // pusher bot_t& operator<< (const std::string& s); bot_t& operator<< (char c) {return *this;} }; #endif din-5.2.1/include/tokenizer.h0000644000175100017510000000347012111771577013037 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ // string tokenizer // based on code by Song Ho Ahn (song.ahn@gmail.com) #ifndef TOKENIZER_H #define TOKENIZER_H #include #include const std::string DEFAULT_DELIMITER = " "; struct tokenizer { tokenizer(); tokenizer(const std::string& s, const std::string& d=DEFAULT_DELIMITER); tokenizer (const std::vector& tokens); tokenizer& operator>> (std::string& s); tokenizer& operator>> (float& f); tokenizer& operator>> (int& i); tokenizer& operator>> (char& c); std::vector tokens; int tokens_available; unsigned int tokid; std::string delimiter; std::string buffer; int blen, dlen; void str (const std::string& s); void del (const std::string& d); void vec (const std::vector& v); void set (const std::string& s, const std::string& d=DEFAULT_DELIMITER); bool isdelim (char c); void skip_ws (); int cur; void init_cur (); std::string cur2end (); std::string token; }; #endif din-5.2.1/include/morse_code.h0000644000175100017510000000331512111771577013142 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __MORSE_CODE #define __MORSE_CODE #include "command.h" #include "multi_curve.h" #include "curve_editor.h" #include "listeners.h" #include #include struct morse_code : command { // convert text to morse code to multi_curve to use as a pattern // international morse code std::map code; int ncodes; // bezier curves for morse code primitives multi_curve dot, dash; multi_curve inner_space, letter_space, word_space; // morse code editor curve_editor ed; morse_code_listener lis; // generation int add_first_vertex; point org; point vi; morse_code (const std::string& ln, const std::string& sn); ~morse_code (); bool load (const std::string& fname); bool operator() (tokenizer& tz); bool create_pattern (const std::string& text, float tox); void append (multi_curve& m, multi_curve& p); void scale_tox (multi_curve& m, float tox); }; #endif din-5.2.1/include/tcl_interp.h0000644000175100017510000000235512111771577013171 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __tcl #define __tcl #include #include #include struct tcl_interp { // tcl interpreter Tcl_Interp *interp; void setup (Tcl_Interp* pi); tcl_interp (); ~tcl_interp (); std::string result; tcl_interp& operator() (const std::string& cmd); }; typedef int (*tclcmd)(ClientData cd, Tcl_Interp* ti, int objc, Tcl_Obj* CONST objv[]); int tcl_run (ClientData cd, Tcl_Interp* ti, int objc, Tcl_Obj* CONST objv[]); #endif din-5.2.1/include/box_selector.h0000644000175100017510000000334712111771577013520 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __box_selector #define __box_selector #include "box.h" #include template struct box_selector { box region; int exists; void begin (T x, T y) { region.left = x; region.bottom = y; exists = 1; } void update (T x, T y) { region.right = x; region.top = y; } void end () { region.calc (); exists = 0; } void draw () { glColor3f (1, 1, 1); if (exists) { glBegin (GL_LINE_LOOP); glVertex2i (region.left, region.bottom); glVertex2i (region.right, region.bottom); glVertex2i (region.right, region.top); glVertex2i (region.left, region.top); glEnd (); } } int handle_input (T x, T y) { extern int lmb; if (lmb) { if (!exists) { begin (x, y); return 0; } else { update (x, y); return 0; } } else if (exists) { end (); return 1; } return 0; } }; #endif din-5.2.1/include/ansi_color_codes.h0000644000175100017510000000032312111771577014324 00000000000000#ifndef __ANSI_COLOR_CODES #define __ANSI_COLOR_CODES #define FAIL "\033[1;31m" #define LOAD "\033[1;35m" #define SAVE LOAD #define PASS "\033[1;34m" #define ENDL "\033[0m\n" #define DOING "\033[1;30m" #endif din-5.2.1/include/keyboard_keyboard.h0000644000175100017510000001006412115673023014471 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __keyboard_keyboard #define __keyboard_keyboard #include "ui.h" #include "note.h" #include "solver.h" #include "play.h" #include "multi_curve.h" #include "curve_editor.h" #include "listeners.h" #include "random.h" #include "curve_library.h" #include "color.h" struct keyboard_keyboard; struct triggered_note { note tn; // note info float start_hz; // initial frequency of note int key; // key on computer keyboard that triggers note // solver & player for waveform of keyboard-keyboard solver sol; play player; // state // note removed when FINISHED // enum {ATTACK, DECAY, FINISHED}; int state; // // volumes float volume_now; float volume_max; // // attack // float abs_attack, delta_attack; solver attack; // solves attack curve from keyboard-keyboard // // decay // float decay_time; float decay_start_volume; float abs_decay, delta_decay; solver decay; // solves decay curve from keyboard-keyboard // visual int x, y; // position float r, g, b; // color int mx; // mouse x pos (see mouse_bend ()) int bendx; triggered_note (const note& n, int k, multi_curve* wav, multi_curve* atk, multi_curve* dk, float volmax, float xx = 0, float yy = 0, float rr = 1, float gg = 1, float bb = 1, int mox = 0); void set_frequency (float f); void eval (float* left, float* right, float* wav, float* vol, int n); }; struct key_info { int id; // from X char ch; // character // visual int x, y; // position float r, g, b; // color int attacked; // attacked? key_info (int i = -1, char c = '.', int a = 0) : id (i), ch (c), attacked (a) { r = g = b = 1; } }; struct keyboard_keyboard : ui { multi_curve wave; // waveform curve_editor waved; // waveform shape editor wave_listener wavlis; // waveform edit listener void update_waveform (); std::vector notes; // notes of the scale worth 3 octaves void setup_notes (int overwrite = 1); std::list triggered_notes; // currently active notes void remove_finished_notes (); void attack_note (int ky); void decay_note (int ky); void render_audio (float* L, float* R); std::map > scale2keybd; static const int MAX_KEYS = 256; // assume no keycode exceeds 255 int keybd2notes [MAX_KEYS]; std::vector keys; // attack & decay curve multi_curve attackcrv, decaycrv; curve_editor attacked, decayed; attack_listener attacklis; decay_listener decaylis; curve_library attacklib, decaylib; void update_attack (); void update_decay (); bool handle_input (); // visual int arm, ymarker, ychars, spacing; void calc_visual_params (); void draw (); keyboard_keyboard (); ~keyboard_keyboard (); help helptext; // MIDI // static const int MIDI_MAX = 128; static const color note_color []; static const int color_index []; note midi_notes [MIDI_MAX]; void setup_midi_notes (); void note_on (unsigned char id, unsigned char vel); void note_off (unsigned char id); void pitch_bend (float v); // MIDI velocity curve multi_curve velcrv; velocity_listener vellis; curve_editor veled; curve_library vellib; solver velsol; // mouse based pitch bend // int marker_x; void mouse_bend (); void enter (); void leave (); void bg (); }; #endif din-5.2.1/include/fft.h0000644000175100017510000000255212111771577011604 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __fft #define __fft #include #include #include struct multi_curve; struct fft { // // FFT of Bezier curve waveform using FFTW // fftwf_plan plan; float* in; fftwf_complex* out; std::vector harms; // harmonics levels lev; // harmonics levels void draw (); // draw levels void go (multi_curve* crv); // do fft on a multiple segment bezier curve float f; // audio frequency used for fft int n; // num samples int halfn; float x, dx; // on bezier curve, or theta/dtheta on sine. fft (); ~fft (); }; #endif din-5.2.1/include/widget.h0000644000175100017510000000662312115667226012312 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __widget #define __widget #include "box.h" #include "color.h" #include "point.h" #include #include #include #include extern int lmb; struct ui; struct widget; struct mover { widget& w; // target widget int* pmb; // mouse button that moves widget int mb_clicked; // is mouse button clicked int move; // 1 - widget is moving, 0 - not int prevx, prevy; // previous mouse position mover (widget& ww, int* pb = &lmb); int handle_input (); }; typedef std::vector::size_type size_vw; class widget { // ui widget std::string name; // name of this widget box extents; // extents of the bounding box around this widget color clr; // color int posx, posy; // position in screen space int visible_; // visible? int hover; // mouse over widget? int enable_; // enabled? std::vector screens; // screens where shown std::vector children; // widget's children (ie other widgets; a gui hierarchy) // helper to handle move with mouse // friend struct mover; int moveable; // moveable? mover movr; // handles move public: static widget* focus; // widget with input focus; only 1 at a time ie only 1 widget can receive input. widget (int l = 0, int b = 0, int r = 0, int t = 0); const std::string& get_name () {return name;} void set_name (const std::string& _name) {name = _name;} void add_child (widget *w); // n children const box& get_extents () const {return extents;} void set_extents (int l, int b, int r, int t); void set_extents (const box& ext) { extents = ext;} virtual void set_pos (int x, int y); void get_pos (int& x, int& y); int is_moveable () const {return moveable;} void set_moveable (int m, int* pmb = &lmb) {moveable = m; movr.pmb = pmb;} void move (int dx, int dy); void set_color (float r, float g, float b) { clr.r = r; clr.g = g; clr.b = b; } void set_color (const color& c) {clr.r = c.r; clr.g = c.g; clr.b = c.b; } const color& get_color () const {return clr;} inline int hovering () {return hover;} void add_screen (ui* scr); int is_screen (ui* scr); const std::vector& get_screens () const {return screens;} int visible () const {return visible_;} void show (); void hide (); void enable (int e) {enable_ = e;} int enabled () const {return enable_;} virtual int handle_input (); virtual void draw (); virtual void save (std::ofstream& file); void draw_bbox (); }; // listeners for widgets // template struct change_listener { virtual void changed (W& w) = 0; }; #endif din-5.2.1/include/button.h0000644000175100017510000000263412111771577012341 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __button #define __button #include "widget.h" #include class button; struct click_listener { virtual void clicked (button& b) = 0; }; class button : public widget { std::string label; int click; enum {not_clicked = 0, almost_clicked = 1, clicked_indeed = 2}; click_listener* lsnr; public: button (int px = 0, int py = 0, const std::string& label = ""); void set_label (const std::string& label); int clicked () {return (click == clicked_indeed);} void set_click (int what) {click = what;} int handle_input (); void draw (); void set_listener (click_listener* l) {lsnr = l;} }; #endif din-5.2.1/include/checkbutton.h0000644000175100017510000000321712121070430013312 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __checkbutton #define __checkbutton #include "button.h" struct checkbutton; struct state_listener { virtual void changed (checkbutton& cb) = 0; }; class checkbutton : public button { int state; // 1 - on, 0 - off state_listener* lsnr; int color_blend_; public: static const color on_color, off_color; checkbutton (int left = 0, int bottom = 0, int st = 0, const std::string& label = "", int clr_blnd = 1); int is_on () const {return state;} void turn_on (); void turn_off (); void toggle (); void set_state (int s); int get_state () const {return state;} int handle_input (); void draw (); void set_listener (state_listener* sl) {lsnr = sl;} void blend_on_off_color (float blend); int color_blend () const {return color_blend_;} void color_blend (int yesorno) {color_blend_ = yesorno;} }; #endif din-5.2.1/include/field.h0000644000175100017510000000410012122313077012064 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __field #define __field #include "widget.h" #include #include #include class field : public widget { // a text field int width; // in chars enum {pushback = 1, insert = 2}; int mode; // push back or insert std::string text; // text of the field int len; // length of text int last; // last char // the view int left, right; // left & right chars std::string view_text; void calc_view_text (); int cursor; // cursor pos ie char position int offset; // offset from left // focus // int focus; // 1 - field has focus, 0 - lost focus int clicked_lmb; // listener change_listener* lsnr; char sbuf [1024]; // buffer for writing ints and floats public: field (int w); field (int x, int y, const std::string& str = "", int w = 0); void set_text (const std::string& txt); void set_text (int i); void set_text (float f); const std::string& get_text () {return text;} int handle_input (); void calc_view (); void calc_cursor (); void update (); void draw (); void draw_cursor (int x, int y); int hittest (int x, int y); int has_focus () {return focus;} operator int() const; operator float() const; void set_listener (change_listener* fl); }; #endif din-5.2.1/include/fader.h0000644000175100017510000000242212121153534012066 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __FADER #define __FADER #include struct fader { int on; // on? float start; float end; float delta; float alpha; int flip; // end > start? 1:0 float amount; // output float start_time, delta_time; std::string post; // post command excecuted on console void set_post (const std::string& pst); fader (float vs = 0, float ve = 1); void set (float vs, float ve, int _on = 1, float dt = 1.5); int eval (); void restart (); float value (); }; #endif din-5.2.1/include/drone.h0000644000175100017510000001037312111771577012134 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __DRONE #define __DRONE #include "fader.h" #include "beat2value.h" #include "solver.h" #include "play.h" struct mod_params { float depth; float bpm; float b, db; // beat, delta on beat2value curve -> see calc (..) float result; mod_params (beat2value& bv) { int reset = 1; clear (bv, reset); } void set_bpm (beat2value& bv, float value, int reset = 0) { bv.set_bpm (value); bpm = bv.bpm; extern audio_out aout; db = bv.delta * aout.samples_per_channel; // modulate once every audio buffer if (reset) b = bv.sol.firstx; } void calc (beat2value& bv) { result = depth * bv.sol (b, db); } void clear (beat2value& bv, int reset = 0) { depth = 0; set_bpm (bv, 30, reset); } }; struct drone_modulation { // am, fm modulation curves - shared by all drones // x - beat, y - modulation level static beat2value am_crv, fm_crv; enum {FM = 1, AM}; mod_params am, fm; int active; drone_modulation () : am (am_crv), fm (fm_crv) { active = 0; } void clear () { am.clear (am_crv); fm.clear (fm_crv); active = 0; } void calc () { am.calc (am_crv); fm.calc (fm_crv); } void calc_active () { active = (((am.depth == 0) || (am.bpm == 0)) && ((fm.depth == 0) || (fm.bpm == 0))) ? 0:1; } }; struct din; struct drone { play player; // player for this drone solver sol; // solver for this drone float step; // determines pitch (see note.h) float vol; // actual volume int range; // range number on microtonal-keyboard float pos; // position in range (0 - left, 1 - right, can go < 0 & > 1 too) int sel; // selected? // visual // int x, y; // current position int dy; // height from microtonal-keyboard bottom box handle; // for picking float r, g, b; // color int cx, cy; // position on creation / unmodulated position // drone trails std::list< point > trailq; std::list< point >::size_type num_trail_points; int handle_size; enum {DEAD, ACTIVE, RISING, FALLING}; // states int state; // state fader fdr; // for rising/falling -> fade in/out color drone_modulation mod; // modulation parameters drone () { step = vol = 0; range = pos = 0; r = g = b = 0.5; x = y = dy = 0; sel = 0; state = RISING; extern int DRONE_HANDLE_SIZE, TRAIL_LENGTH; handle_size = DRONE_HANDLE_SIZE; num_trail_points = TRAIL_LENGTH; } void calc_handle () { extern int BOTTOM; y = BOTTOM + dy; handle (x - handle_size, y - handle_size, x + handle_size, y + handle_size); } void set_xy (din& board, const int& x, const int& y); void change_bpm (mod_params& mp, beat2value& bv, float delta) { float bpm = mp.bpm + delta; mp.set_bpm (bv, bpm); } void change_bpm (int i, int what, float delta) { if (what == drone_modulation::FM) { change_bpm (mod.fm, drone_modulation::fm_crv, delta); cons << "drone: " << i << ", FM bpm = " << mod.fm.bpm << eol; } else { change_bpm (mod.am, drone_modulation::am_crv, delta); cons << "drone: " << i << ", AM bpm = " << mod.am.bpm << eol; } mod.calc_active (); } void change_depth (int i, int what, float delta) { if (what == drone_modulation::FM) { mod.fm.depth += delta; cons << "drone: " << i << ", FM depth = " << mod.fm.depth << eol; } else { mod.am.depth += delta; cons << "drone: " << i << ", AM depth = " << mod.am.depth << eol; } mod.calc_active (); } }; #endif din-5.2.1/include/ticker_tape.h0000644000175100017510000000110012114476122013272 00000000000000#ifndef __ticker_tape #define __ticker_tape #include "button.h" #include "box.h" #include struct ticker_tape : click_listener, public widget { static const std::string message; button toggle; // on / off box twin; // window int xstart, startx; int leftxt, rightxt; int dy; int handle_input (); void draw (); int show_text; void toggle_text (); float mr, mg, mb; ticker_tape (); void clicked (button& b); void set_color (float r, float g, float b) { mr = r; mg = g; mb = b; toggle.set_color (mr, mg, mb); } }; #endif din-5.2.1/include/slider.h0000644000175100017510000000764512115145007012302 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #ifndef __slider #define __slider #include "widget.h" #include "dingl.h" #include "viewwin.h" #include "utils.h" #include "font.h" #include extern int mousex; extern viewport view; extern int lmb; template class values { T low, high, delta, val; float amount; public: values (T l = 0, T h = 0, float a = 0) { set_limits (l, h); set_amount (a); } operator T() { return ((T) val); } void set_limits (T l, T h) { low = l; high = h; delta = high - low; } void get_limits (T& l, T& h) { l = low; h = high; } T get_val () const { return val; } void set_val (const T& v) { val = v; clamp (low, val, high); amount = (val - low) * 1. / delta; } void set_amount (float a) { amount = a; clamp (0.0, amount, 1.0); val = low + delta * amount; } float get_amount () const { return amount; } }; #include using std::list; template class slider : public widget { values vx; int dx; int lmb_clicked; int slide; list < change_listener *> lsnrs; typedef typename list< change_listener * >::iterator iter; public: slider (int w, int h) : widget (0, 0, w, h), vx (0, 0, 0), dx (0) {lmb_clicked = slide = 0;} int handle_input () { widget::handle_input (); const box& e = get_extents (); int ret = 0; if (lmb) { if (lmb_clicked == 0) { if (slide) { slide = 0; widget::focus = 0; ret = 1; } else if (hovering()) { slide = 1; widget::focus = this; ret = 1; } } lmb_clicked = 1; } else { if (slide) { dx = mousex - e.left; clamp (0, dx, e.width); float amount = dx * e.width_1; vx.set_amount (amount); for (iter i = lsnrs.begin (), j = lsnrs.end (); i != j; ++i) (*i)->changed (*this); ret = 1; } lmb_clicked = 0; } return ret; } void draw () { glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); const color& clr = get_color (); glColor4f (clr.r, clr.g, clr.b, 0.25); const box& e = get_extents (); glRecti (e.left, e.bottom, e.right, e.top); glColor4f (clr.r, clr.g, clr.b, 1); glRecti (e.left, e.bottom, e.left + dx, e.top); glDisable (GL_BLEND); } void update () { float amount = vx.get_amount (); const box& e = get_extents (); dx = amount * e.width; for (iter i = lsnrs.begin (), j = lsnrs.end (); i != j; ++i) (*i)->changed (*this); } void add_listener (change_listener* sl) { lsnrs.push_back (sl); } T get_val () const { return vx.get_val (); } void set_val (const T& t) { vx.set_val (t); update (); } void set_limits (T l, T h) { float v = get_val (); vx = values (l, h); set_val (v); } void get_limits (T& l, T& h) { vx.get_limits (l, h); } }; #endif din-5.2.1/include/label.h0000644000175100017510000000054412121102662012063 00000000000000#ifndef __label #define __label #include #include "widget.h" class label : public widget { std::string text; public: label (const std::string& txt = ""); void set_text (const std::string& txt); const std::string& get_text () const { return text; } void draw (); int handle_input (); void update (); }; #endif din-5.2.1/include/label_field_slider.h0000644000175100017510000000563112122313233014571 00000000000000#ifndef __label_field_slider #define __label_field_slider #include "font.h" #include "label.h" #include "field.h" #include "slider.h" #include "filled_button.h" #include #include #include #include extern font fnt; template struct val_handler { virtual void operator() (const T& t) = 0; }; template class label_field_slider : public widget, change_listener< slider >, change_listener { filled_button fbtn; label lbl; field fld; slider sld; val_handler& vhan; void advance_right (int& x, widget& w) { static const int XSPACING = 10; const box& e = w.get_extents (); x += (e.width + XSPACING); } public: label_field_slider (int x, int y, const std::string& t, int wf, int ws, int hs, val_handler& vh) : lbl (t), fld (wf), sld (ws, hs), vhan (vh) { set_pos (x, y); sld.add_listener (this); fld.set_listener (this); add_child (&lbl); lbl.add_child (&fbtn); lbl.add_child (&fld); lbl.add_child (&sld); lbl.set_moveable (1); } void update () { lbl.update (); fld.update (); int x, y; get_pos (x, y); set_pos (x, y); } void set_pos (int x, int y) { widget::set_pos (x, y); fbtn.set_pos (x, y + fnt.lift); advance_right (x, fbtn); lbl.set_pos (x, y); advance_right (x, lbl); sld.set_pos (x, y); advance_right (x, sld); fld.set_pos (x, y); } void update_pos () { int x1, y1; fbtn.get_pos (x1, y1); int x2, y2; lbl.get_pos (x2, y2); widget::set_pos (x1, y2); } void save (std::ofstream& file) { int x, y; get_pos (x, y); file << get_name () << ' ' << x << ' ' << y << std::endl; } int handle_input () { int t = fbtn.handle_input (); int l = lbl.handle_input (); if (l) update_pos (); t |= l; t |= fld.handle_input (); t |= sld.handle_input (); return t; } void draw () { fbtn.draw (); lbl.draw (); fld.draw (); sld.draw (); } void changed (slider& s) { T v = s.get_val (); fld.set_text (v); vhan (v); } void changed (field& f) { T val = f; sld.set_val (val); vhan (sld.get_val ()); } void set_color (float r, float g, float b) { fbtn.set_color (r, g, b); lbl.set_color (r, g, b); fld.set_color (r, g, b); sld.set_color (r, g, b); } const color& get_color () const {return fbtn.get_color ();} void set_limits (T lo, T hi) { sld.set_limits (lo, hi); } void get_limits (T& lo, T& hi) { sld.get_limits (lo, hi); } void set_val (const T& t) { sld.set_val (t); } void set_button_listener (click_listener* l) { fbtn.set_listener (l); } const std::string& get_text () const {return lbl.get_text();} }; #endif din-5.2.1/include/filled_button.h0000644000175100017510000000060312111771577013652 00000000000000#ifndef __filled_button #define __filled_button #include "button.h" class filled_button : public button { int size; public: filled_button (int sz = 8, float r = 1, float g = 1, float b = 1) { set_color (r, g, b); size = sz; set_extents (0, 0, size, size); } void set_label (const std::string& label) {} // dont need void draw (); }; #endif din-5.2.1/include/authors_note.h0000644000175100017510000000071412121172077013524 00000000000000#ifndef __authors_note #define __authors_note #include "ui.h" #include "button.h" #include "ticker_tape.h" #include struct widget; struct authors_note : ui, click_listener { button donate_now; button im_a_donor; ticker_tape ticker; authors_note () { name = "authors-note"; } void enter (); void leave (); void clicked (button& b); void setup_widgets (std::vector& widgets); void update_widgets (); }; #endif din-5.2.1/src/0000755000175100017510000000000012122367131010061 500000000000000din-5.2.1/src/Makefile.am0000644000175100017510000000212112114434460012032 00000000000000AM_CXXFLAGS = $(liblo_CFLAGS) $(jack_CFLAGS) $(fftw3f_CFLAGS) -I /usr/include -I /usr/local/include -I /opt/include -I/usr/include/tcl8.5 -I/usr/local/include/tcl8.5 -I /opt/include/tcl8.5 -I ../include -Wall -O3 LIBS += $(liblo_LIBS) $(jack_LIBS) $(fftw3f_LIBS) -L/usr/lib/tcl8.5 -L/usr/local/lib/tcl8.5 -L /opt/lib/tcl8.5 -L /usr/lib -L /opt/lib -L /usr/local/lib -ltcl8.5 -lGL -lircclient -lrt -lX11 bin_PROGRAMS = din din_SOURCES = \ main.cc\ din.cc\ audio.cc\ range.cc\ note.cc\ play.cc\ curve.cc\ multi_curve.cc\ solver.cc\ curve_library.cc\ basic_editor.cc\ curve_editor.cc\ listeners.cc\ console.cc\ console_iterator.cc\ help.cc\ line.cc\ font.cc\ glyph.cc\ oscilloscope.cc\ delay.cc\ viewwin.cc\ mocap.cc\ beat2value.cc\ scale_info.cc\ command.cc\ scalelist.cc\ textboard.cc\ sine_mixer.cc\ levels.cc\ chrono.cc\ font_editor.cc\ phrasor.cc\ compressor.cc\ osc.cc\ globals.cc\ bot.cc\ tokenizer.cc\ morse_code.cc\ tcl_interp.cc\ ui.cc\ keyboard_keyboard.cc\ fft.cc\ widget.cc\ button.cc\ checkbutton.cc\ field.cc\ drone.cc\ fader.cc\ ticker_tape.cc\ label.cc\ filled_button.cc\ authors_note.cc din-5.2.1/src/Makefile.in0000644000175100017510000004715612122366546012074 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = din$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_din_OBJECTS = main.$(OBJEXT) din.$(OBJEXT) audio.$(OBJEXT) \ range.$(OBJEXT) note.$(OBJEXT) play.$(OBJEXT) curve.$(OBJEXT) \ multi_curve.$(OBJEXT) solver.$(OBJEXT) curve_library.$(OBJEXT) \ basic_editor.$(OBJEXT) curve_editor.$(OBJEXT) \ listeners.$(OBJEXT) console.$(OBJEXT) \ console_iterator.$(OBJEXT) help.$(OBJEXT) line.$(OBJEXT) \ font.$(OBJEXT) glyph.$(OBJEXT) oscilloscope.$(OBJEXT) \ delay.$(OBJEXT) viewwin.$(OBJEXT) mocap.$(OBJEXT) \ beat2value.$(OBJEXT) scale_info.$(OBJEXT) command.$(OBJEXT) \ scalelist.$(OBJEXT) textboard.$(OBJEXT) sine_mixer.$(OBJEXT) \ levels.$(OBJEXT) chrono.$(OBJEXT) font_editor.$(OBJEXT) \ phrasor.$(OBJEXT) compressor.$(OBJEXT) osc.$(OBJEXT) \ globals.$(OBJEXT) bot.$(OBJEXT) tokenizer.$(OBJEXT) \ morse_code.$(OBJEXT) tcl_interp.$(OBJEXT) ui.$(OBJEXT) \ keyboard_keyboard.$(OBJEXT) fft.$(OBJEXT) widget.$(OBJEXT) \ button.$(OBJEXT) checkbutton.$(OBJEXT) field.$(OBJEXT) \ drone.$(OBJEXT) fader.$(OBJEXT) ticker_tape.$(OBJEXT) \ label.$(OBJEXT) filled_button.$(OBJEXT) authors_note.$(OBJEXT) din_OBJECTS = $(am_din_OBJECTS) din_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(din_SOURCES) DIST_SOURCES = $(din_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ $(liblo_LIBS) $(jack_LIBS) $(fftw3f_LIBS) \ -L/usr/lib/tcl8.5 -L/usr/local/lib/tcl8.5 -L /opt/lib/tcl8.5 \ -L /usr/lib -L /opt/lib -L /usr/local/lib -ltcl8.5 -lGL \ -lircclient -lrt -lX11 LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw3f_CFLAGS = @fftw3f_CFLAGS@ fftw3f_LIBS = @fftw3f_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ jack_CFLAGS = @jack_CFLAGS@ jack_LIBS = @jack_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CXXFLAGS = $(liblo_CFLAGS) $(jack_CFLAGS) $(fftw3f_CFLAGS) -I /usr/include -I /usr/local/include -I /opt/include -I/usr/include/tcl8.5 -I/usr/local/include/tcl8.5 -I /opt/include/tcl8.5 -I ../include -Wall -O3 din_SOURCES = \ main.cc\ din.cc\ audio.cc\ range.cc\ note.cc\ play.cc\ curve.cc\ multi_curve.cc\ solver.cc\ curve_library.cc\ basic_editor.cc\ curve_editor.cc\ listeners.cc\ console.cc\ console_iterator.cc\ help.cc\ line.cc\ font.cc\ glyph.cc\ oscilloscope.cc\ delay.cc\ viewwin.cc\ mocap.cc\ beat2value.cc\ scale_info.cc\ command.cc\ scalelist.cc\ textboard.cc\ sine_mixer.cc\ levels.cc\ chrono.cc\ font_editor.cc\ phrasor.cc\ compressor.cc\ osc.cc\ globals.cc\ bot.cc\ tokenizer.cc\ morse_code.cc\ tcl_interp.cc\ ui.cc\ keyboard_keyboard.cc\ fft.cc\ widget.cc\ button.cc\ checkbutton.cc\ field.cc\ drone.cc\ fader.cc\ ticker_tape.cc\ label.cc\ filled_button.cc\ authors_note.cc all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) din$(EXEEXT): $(din_OBJECTS) $(din_DEPENDENCIES) @rm -f din$(EXEEXT) $(CXXLINK) $(din_OBJECTS) $(din_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authors_note.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/beat2value.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkbutton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chrono.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compressor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console_iterator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve_editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve_library.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/din.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filled_button.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font_editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard_keyboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/label.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levels.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/line.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listeners.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mocap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/morse_code.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_curve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/note.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oscilloscope.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phrasor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/play.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/range.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scalelist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sine_mixer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcl_interp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ticker_tape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tokenizer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewwin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: din-5.2.1/src/main.cc0000644000175100017510000006054312115633636011254 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include #include #include #include #include #include #include #include #include #include #include #include "dingl.h" #include "main.h" #include "box.h" #include "utils.h" #include "font.h" #include "console.h" #include "input.h" #include "viewwin.h" #include "curve.h" #include "multi_curve.h" #include "solver.h" #include "chrono.h" #include "ui_list.h" #include "curve_editor.h" #include "font_editor.h" #include "din.h" #include "curve_library.h" #include "console_iterator.h" #include "delay.h" #include "random.h" #include "globals.h" #include "command.h" #include "scalelist.h" #include "morse_code.h" #include "sine_mixer.h" #include "checkdotdin.h" #include "osc.h" #include "bot.h" #include "tcl_interp.h" #include "key_consts.h" #include "ansi_color_codes.h" #include "compressor.h" #include "oscilloscope.h" #include "scale_info.h" #include "keyboard_keyboard.h" #include "fft.h" #include "authors_note.h" #include using namespace std; // declare / define all global vars // struct flob { flob () { std::cout << PASS << "+++ initialised random number generator +++" << ENDL; seed_rand_gen (clock()); // seed random number generator } ~flob () { std::cout << FAIL << "!!! din shutdown !!!" << ENDL; } } _flob; // first and last object widget* widget::focus = 0; // widget that has focus widget* ui_list::mm_last = 0; // last button clicked on the label field sliders (see min_max_clicked below) const color checkbutton::on_color (0.25, 1, 0.25), checkbutton::off_color (1, 0.25, 0.25); // colors in checkbutton std::string APP_NAME; // in format din-x.y.[z] where x.y.[z] is version std::string WIN_TITLE; // title of din window (includes APP_NAME and jack connection name) int SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_DEPTH; // initial screen width, height & color depth int SAMPLE_RATE; // sample rate for the session float SAMPLE_DURATION; // duration of an audio sample in seconds std::string SCALE; // current scale int NUM_OCTAVES; // number of octaves in din std::string TUNING; // current tuning int NUM_INTERVALS; // number of intervals in tuning std::string INTERVALS_FILE; // file name that contains interval ratios std::map INTERVALS; // maps interval name with ratio std::vector INTERVALS_SEQ; // sequential intervals (eg., value of 1 2b 3 3b ... 7b 7 2) std::map NOTE_POS; // maps interval name to note number std::string FIRST_INTERVAL_NAME, LAST_INTERVAL_NAME; // for microtonal keyboard // int LEFT, BOTTOM, RIGHT, TOP, HEIGHT; // extents int NUM_MICROTONES; // number of microtones in a range int NUM_VOLUMES, LAST_VOLUME; // number of volume levels float DELTA_VOLUME; // change in volume every pixel of board height int TRAIL_LENGTH = 1; // drone trail length (== number of trail points) int DRONE_HANDLE_SIZE; // for the session // for CPU loading (see http://www.dinisnoise.org/faq/#load) // int FPS, USLEEP; double FPS_T; float DELTA_BPM; // change in bpm when using key shorcuts (see http://www.dinisnoise.org/din_help/) float PITCH_BEND; // in Hz; used for pitch bending notes on keyboard-keyboard float HZ = 440; // frequency that determines number of samples displayed on waveform editors // western notation // int NUM_NOTES = 13; const char* WESTERN_SHARP [] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "C"}; const char* WESTERN_FLAT [] = {"C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab", "A", "Bb", "B", "C"}; float WIKIPEDIA_KEY_FREQUENCIES [] = { // octave of Middle-C; from wikipedia - piano key frequencies page. 261.626, 277.183, 293.665, 311.127, 329.628, 349.228, 369.994, 391.995, 415.305, 440, 466.164, 493.883, 523.251 }; // jack port names // std::string name ("din"), dinl, dinr; const char* colon = ":", *L = "L", * R = "R", *MIDI_IN = "midi"; // screens - 1 is instrument; 2 - 8 are editors // const int ui_list::key [] = {k_2, k_3, k_4, k_5, k_6, k_7, k_8}; // keys 2 - 8 ui* ui_list::ed [] = {0}; char basic_editor::buf [] = {0}; // solver xhandlers; see solver.cc atmin _atmin; atmax _atmax; tomin _tomin; loopmin _loopmin; loopmax _loopmax; pongmin _pongmin; pongmax _pongmax; // see multi_curve.cc multi_curve curve_editor::copy; // 0 init correct for oscilloscope; see oscilloscope.cc float oscilloscope::sample_t::lmin = 0, oscilloscope::sample_t::lmax = 0; float oscilloscope::sample_t::rmin = 0, oscilloscope::sample_t::rmax = 0; // see phrasor.cc int phrasor::JOG = 3; // jog amount // see range.cc int range::char_height, range::ybot1, range::ybot2, range::ytop1, range::ytop2; // see sine_mixer.cc const float sine_mixer::pi = 3.14159; int sine_mixer::NUM_SINE_SAMPLES = 100; // see viewwin.cc int viewport::handle_radius = 50; float viewport::handle_factor = 0; int window::PAN_RATE = 100, window::ZOOM_RATE = 100; double window::PAN_REPEAT = 1. / PAN_RATE, window::ZOOM_REPEAT = 1. / ZOOM_RATE; float window::PAN_AMOUNT = 0.1, window::ZOOM_AMOUNT = 0.1; // ~/.din contains defaults, user savings and preferences std::string dotdin; checkdotdin cdd; // load initial globals // load_globals lg; // custom std::vector font // font fnt ("jag.fnt"); // din clocks // chrono clk; // audio clock double TIME_NOW = 0; // time now in seconds on the audio clock (ie clk) stored in variable timenow in Tcl interpreter nano_chrono ui_clk; // ui clock // audio output // int audio_out::AUTO_CONNECT_OUTPUTS = 1; // to JACK audio_out aout; // console // // possible text colors of console const float cc = 0.6; const color console::yellow (1, 1, cc); const color console::green (cc, 1, cc); const color console::red (1, cc, cc); const color console::cyan (cc, 1, 1); console cons; char xkey; // X window lookedup char for console / field typings (see console.cc / field.cc) // display - using OpenGL viewport view; // list of scales scalelist scalelst; // keyboard and mouse state key_state keys; int mousex = 0, mousey = 0, mouseyy = 0; // absolute mouse x, y & main viewport y int lmb = 0, rmb = 0, mmb = 0; // mouse buttons // // L and R delays // delay left_delay (1000, "feedback-l.crv", "volume-l.crv"), right_delay (1000, "feedback-r.crv", "volume-r.crv"); curve_editor delayed ("delay.ed"); // vars in Tcl interpreter // // midi bpm from external midi clock double MIDI_BPM = 0; // tap bpm from computer keyboard double TAP_BPM = 0; // din board height (0 to 1) double VOLUME = 0; sine_mixer sinemixer; // sine mixer for waveform edit fft fft0; // FFT of waveform in waveform editors cmdlist cmdlst; // list of din commands // 1 oscillator / waveform for lead // float WAVE_VOLUME = 0.15; curve_library wavlib ("waveforms.lib"); // waveform library // compressor // compressor coml ("coml.crv"), comr ("comr.crv"); curve_editor comed ("compressor.ed"); scale_info scaleinfo; // octave shift // octave_shift_data osd; beat2value octave_shift ("Octave Shift", "octave-shift.crv"); curve_editor octed ("octave-shift.ed"); curve_library octlib ("octave-shift-patterns.lib"); beat2value_listener octlis (&octave_shift); // drone modulation // beat2value drone_modulation::am_crv ("drone AM", "dam.crv"); beat2value drone_modulation::fm_crv ("drone FM", "dfm.crv"); curve_editor dmod_ed ("drone-modulation.ed"); beat2value_listener damlis (&drone_modulation::am_crv), dfmlis (&drone_modulation::fm_crv); // microtonal-keyboard see din.cc/.h // din din0 (cmdlst); // keyboard-keyboard // float NOTE_VOLUME = 0.75 * WAVE_VOLUME; // in secs float ATTACK_TIME = 0.05; float DECAY_TIME = 5.0; float DELTA_TIME = 0.025; const color keyboard_keyboard::note_color [] = {{0.9, 0.9, 0.9}, {0.2, 0.2, 0.2}}; // midi keybd note color const int keyboard_keyboard::color_index [] = {0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0}; // 0 - white, 1 - black; 1 octave keyboard_keyboard keybd2; gotog _gotog (1, &keybd2.attacked); // default sustain (see keyboard-keyboard.cc) std::string INSTRUMENT = "keyboard_keyboard"; void modulate_up () { if (!osd.active) { static const std::string down = "down"; start_octave_shift (0, down); } } void modulate_down () { if (!osd.active) { static const std::string up = "up"; start_octave_shift (1, up); } } void start_octave_shift (int idir, const std::string& sdir) { osd.tonic = scaleinfo.tonic; osd.dir = idir; osd.active = 1; octave_shift.now = octave_shift.sol.firstx; cons << console::yellow << "modulating " << sdir << eol; } void set_tonic (float f) { scaleinfo.set_tonic (f); din0.update_range_notes (); din0.update_drone_tone (); keybd2.setup_notes (0); } void do_octave_shift () { extern audio_out aout; octave_shift.now += (octave_shift.delta * aout.samples_per_channel); if (octave_shift.now > octave_shift.sol.lastx) { octave_shift.now = octave_shift.sol.lastx; osd.active = 0; } float shift = octave_shift.sol (octave_shift.now); if (shift != 0) { if (osd.dir) set_tonic (osd.tonic * shift); else set_tonic (osd.tonic / shift); } if (!osd.active) { cons << console::yellow << "modulation complete" << eol; cons ("key"); } } void setup_editors () { // in delay editor load feedback & volume curves delayed.add (&left_delay.fbk_crv, &left_delay.fbk_lis); delayed.add (&left_delay.vol_crv, &left_delay.vol_lis); delayed.add (&right_delay.fbk_crv, &right_delay.fbk_lis); delayed.add (&right_delay.vol_crv, &right_delay.vol_lis); // +listener to compressor editor comed.add (&coml.crv, &coml.lis); comed.add (&comr.crv, &comr.lis); // octave shift octave_shift.xmin = &_atmin; octave_shift.xmax = &_atmax; octed.add (&octave_shift.crv, &octlis); octed.attach_library (&octlib); octed.bv.push_back (&octave_shift); // drone modulation dmod_ed.add (&drone_modulation::am_crv.crv, &damlis); dmod_ed.add (&drone_modulation::fm_crv.crv, &dfmlis); dmod_ed.attach_library (&wavlib); } std::vector curve_list; void setup_curve_list () { multi_curve* lst [] = { &din0.wave, &keybd2.wave, &din0.fm.crv, &din0.am.crv, &din0.gatr.crv, &octave_shift.crv, &din0.drone_wave, &left_delay.fbk_crv, &left_delay.vol_crv, &right_delay.fbk_crv, &right_delay.vol_crv }; for (int i = 0; i < 11; ++i) curve_list.push_back (lst[i]); } const char* bpm_com::str [bpm_com::NUM] = {"gr", "am", "fm", "os"}; beat2value* bpm_com::bv [] = {&din0.gatr, &din0.am, &din0.fm, &octave_shift}; #define DEFINE_TCL_CMD(X) inline int (X) (ClientData cd, Tcl_Interp* ti, int objc, Tcl_Obj* CONST objv[]) { return tcl_run (cd, ti, objc, objv);} DEFINE_TCL_CMD(tcl_key) DEFINE_TCL_CMD(tcl_setv) DEFINE_TCL_CMD(tcl_getv) DEFINE_TCL_CMD(tcl_set_delay) DEFINE_TCL_CMD(tcl_get_delay) DEFINE_TCL_CMD(tcl_ls_bpm); DEFINE_TCL_CMD(tcl_set_bpm) DEFINE_TCL_CMD(tcl_get_bpm) DEFINE_TCL_CMD (tcl_set_beat); DEFINE_TCL_CMD (tcl_get_beat); DEFINE_TCL_CMD(tcl_set_style) DEFINE_TCL_CMD(tcl_get_style) DEFINE_TCL_CMD(tcl_gaters) DEFINE_TCL_CMD(tcl_add_scale) DEFINE_TCL_CMD(tcl_ls_scale) DEFINE_TCL_CMD(tcl_remove_scale) DEFINE_TCL_CMD(tcl_load_scale) DEFINE_TCL_CMD(tcl_ls_notes) DEFINE_TCL_CMD(tcl_set_kern) DEFINE_TCL_CMD(tcl_get_kern) DEFINE_TCL_CMD(tcl_set_font_size) DEFINE_TCL_CMD(tcl_get_font_size) DEFINE_TCL_CMD(tcl_note_distance) DEFINE_TCL_CMD(tcl_chord) DEFINE_TCL_CMD(tcl_notation) DEFINE_TCL_CMD(tcl_echo) DEFINE_TCL_CMD(tcl_curve_value) DEFINE_TCL_CMD(tcl_curve_name) DEFINE_TCL_CMD(tcl_curve_library) DEFINE_TCL_CMD(tcl_morse_code) DEFINE_TCL_CMD(tcl_bot) DEFINE_TCL_CMD (tcl_set_editor); DEFINE_TCL_CMD (tcl_get_editor); DEFINE_TCL_CMD (tcl_set_scope); DEFINE_TCL_CMD (tcl_get_scope); DEFINE_TCL_CMD (tcl_get_drone); DEFINE_TCL_CMD (tcl_set_drone); DEFINE_TCL_CMD (tcl_load_tuning); DEFINE_TCL_CMD (tcl_text_color); DEFINE_TCL_CMD (tcl_paste_gater); DEFINE_TCL_CMD (tcl_get_selection); DEFINE_TCL_CMD (tcl_get_intervals); DEFINE_TCL_CMD (tcl_osc_server); DEFINE_TCL_CMD (tcl_osc_connect); DEFINE_TCL_CMD (tcl_osc_send); DEFINE_TCL_CMD (tcl_num_octaves); DEFINE_TCL_CMD (tcl_quit); // din commands // // format: long name, short name // // for L and R delays set_delay sd (&left_delay, &right_delay, "set-delay", "sd"); get_delay gd (&left_delay, &right_delay, "get-delay", "gd"); // for adding/listing/removing scales add_scale as ("add-scale", "as"); remove_scale rs ("remove-scale", "rs"); load_scale los (&din0, "load-scale", "los"); ls_scales ls ("list-scales", "ls"); ls_notes lsn ("list-notes", "ln"); // set and get din variables set_var sv (&din0, "set-var", "sv"); get_var gv (&din0, "get-var", "gv"); // bpm commands // ls_bpm lb ("list-bpms", "lb"); set_bpm sb ("set-bpm", "sb"); get_bpm gb ("get-bpm", "gb"); set_beat sn ("set-beat", "sbt"); get_beat gn ("get-beat", "gbt"); set_style ss ("set-style", "ss"); get_style gs ("get-style", "gs"); // set key/tonic key ky (&din0, "key", "key"); // set tuning load_tuning ltu (&din0, "load-tuning", "ltu"); // display notation on the keyboard notation no (&din0, "notation", "no"); // music utils note_distance nd ("note-distance", "nd"); chord ch ("chord", "ch"); // font cmds set_font_size sfs ("set-font-size", "sfs"); get_font_size gfs ("get-font-size", "gfs"); set_kern sk ("set-kern", "sk"); get_kern gk ("get-kern", "gk"); // curve cmds curve_name cn ("curve-name", "cn"); curve_value cv ("curve-value", "cv"); curve__library cl ("curve-library", "cl"); set_curve_editor sced ("set-curve-editor", "sced"); paste_gater pasg ("paste-gater", "paste-gater"); // morse code morse_code mc ("morse-code", "mc"); // unix like echo echo ech ("echo", "eo"); // OSC server/client commands lo_address client = 0; oserver srv ("server", "server"); oconnect con (client, "connect", "connect"); osend snd (client, "send", "send"); // IRC bot bot_t bot ("bot", ":"); // oscilloscope set_scope ssco ("set-scope", "ssco", &din0); get_scope gsco ("get-scope", "gsco", &din0); // drone get_drone gdro ("get-drone", "gdro", din0); set_drone sdro ("set-drone", "sdro", din0); // console set_text_color stc ("set-text-color", "stc"); get_selection gsel ("get-selection", "gsel"); get_intervals gint ("get-intervals", "gint"); num_octaves noct ("num-octaves", "noct", din0); quit qt ("quit", "exit"); void add_commands (Tcl_Interp* interp) { // add din commands to Tcl interpreter int ncmds = 45; tclcmd cmd_funcs [] = { tcl_key, tcl_setv, tcl_getv, tcl_set_delay, tcl_get_delay, tcl_ls_bpm, tcl_set_bpm, tcl_get_bpm, tcl_set_beat, tcl_get_beat, tcl_set_style, tcl_get_style, tcl_add_scale, tcl_ls_scale, tcl_remove_scale, tcl_load_scale, tcl_ls_notes, tcl_set_kern, tcl_get_kern, tcl_set_font_size, tcl_get_font_size, tcl_note_distance, tcl_chord, tcl_notation, tcl_echo, tcl_curve_value, tcl_curve_name, tcl_curve_library, tcl_morse_code, tcl_bot, tcl_set_editor, tcl_get_editor, tcl_set_scope, tcl_get_scope, tcl_get_drone, tcl_set_drone, tcl_load_tuning, tcl_text_color, tcl_paste_gater, tcl_get_selection, tcl_get_intervals, tcl_osc_server, tcl_osc_connect, tcl_osc_send, tcl_num_octaves, tcl_quit }; command* cmds [] = { &ky, &sv, &gv, &sd, &gd, &lb, &sb, &gb, &sn, &gn, &ss, &gs, &as, &ls, &rs, &los, &lsn, &sk, &gk, &sfs, &gfs, &nd, &ch, &no, &ech, &cv, &cn, &cl, &mc, &bot, &sced, &ssco, &gsco, &gdro, &sdro, <u, &stc, &pasg, &gsel, &gint, &srv, &con, &snd, &noct, &qt }; extern cmdlist cmdlst; for (int i = 0; i < ncmds; ++i) { command* cmdp = cmds[i]; cmdlst.add (cmdp); Tcl_CreateObjCommand (interp, cmdp->longname.c_str(), cmd_funcs[i], (void *) i, 0); Tcl_CreateObjCommand (interp, cmdp->shortname.c_str(), cmd_funcs[i], (void *) i, 0); } cout << PASS << "+++ added " << ncmds << " din commands to the Tcl interpreter +++" << ENDL; } // bring up the Tcl interpreter; all din commands are available in the interpreter. // tcl_interp interpreter; authors_note anote; ui_list uis; void update_window (int wnow, int hnow, int wprev, int hprev) { // called when main window resized glViewport (0, 0, wnow, hnow); // update OpenGL viewport view (wnow, hnow); // update viewport data int w = wnow - 1, h = hnow - 1; sinemixer.sine_levels.chkpos (); // update console window co-ords cons.set_window (box(0, -h, w, 0)); // update din window co-ords din0.win (din0.win.left, din0.win.bottom, din0.win.left + w, din0.win.bottom + h); uis.update_widgets (); keybd2.calc_visual_params (); // update current curve editor co-ords if (uis.crved) uis.crved->enter (); if (uis.current == &din0) { // find range, tone & volume din0.find_current_range (); din0.find_tone_and_volume (); } } void save_window () { extern std::string dotdin; std::string fname = dotdin + "window"; ofstream file (fname.c_str(), ios::out); extern viewport view; if (file) { file << "view_width " << view.width << eol; file << "view_height " << view.height << eol; file << "win_left " << din0.win.left << eol; file << "win_bottom " << din0.win.bottom << eol; } else { cout << FAIL << "!!! couldnt save window in " << fname << " !!!" << ENDL; return; } cout << PASS << "+++ saved window in " << fname << " +++" << ENDL; } Display *display; // X display // din window Window win; XSetWindowAttributes swa; XWindowAttributes gwa; // OpenGL settings for din window GLint glattribs [] = {GLX_RGBA, GLX_DOUBLEBUFFER, None}; XVisualInfo *visual; Colormap colormap; GLXContext glc; // X input XEvent event; void load_instrument () { extern ui_list uis; if (INSTRUMENT == "keyboard_keyboard") { uis.set_current (&keybd2, 0); cons ("setup-editors"); } else { uis.set_current (&din0, 0); cons ("setup-editors"); } } void accept_keypress (int accept) { swa.event_mask = ExposureMask | StructureNotifyMask | FocusChangeMask; if (accept) { swa.event_mask |= KeyPressMask; xkey = 0; } XChangeWindowAttributes (display, win, CWColormap | CWEventMask, &swa); } void warp_pointer_abs (int x, int y) { XWarpPointer (display, None, win, 0, 0, view.width, view.height, x, y); } void warp_pointer (int dx, int dy) { XWarpPointer (display, win, None, 0, 0, view.width, view.height, dx, dy); } void restore_last_window () { extern int SCREEN_WIDTH, SCREEN_HEIGHT; int width = SCREEN_WIDTH, height = SCREEN_HEIGHT; // defaults from ~/.din/globals extern std::string dotdin; std::string fname (dotdin + "window"); ifstream file (fname.c_str(), ios::in); // ~/.din/window if (file) { std::string ignore; // last window size file >> ignore >> width; file >> ignore >> height; // last din board position file >> ignore >> din0.win.left; file >> ignore >> din0.win.bottom; } else cout << FAIL << "<<< couldnt load last window from: " << fname << ", will use defaults >>>" << ENDL; view (width, height); din0.prev_mousey = view.ymax; } int focus = 0; // din has focus? int quit_now = 0; // quit now? int main (int argc, char** argv) { int ignore = system (". ~/.din/m00"); // xset m 0 0 for clean mouse data, without any acceleration applied by X // bring up Tcl interpreter std::string source = "source " + dotdin; std::string load_init_tcl (source + "init.tcl"); // init scripts interpreter (load_init_tcl); std::string load_settings_tcl (source + "settings.tcl"); // init din settings interpreter (load_settings_tcl); setup_editors (); setup_curve_list (); // bring up OpenGL window // display = XOpenDisplay (0); if (display == 0) { cout << FAIL << "!!! couldnt connect to X server !!!" << ENDL; exit (1); } visual = glXChooseVisual(display, DefaultScreen (display), glattribs); if(visual == 0) { cout << FAIL << "!!! couldnt setup GLX visual !!!" << ENDL; exit (1); } else { cout << PASS << "+++ opened GLX visual " << (void *) visual->visualid << " for rendering +++" << ENDL; } colormap = XCreateColormap (display, RootWindow (display, visual->screen), visual->visual, AllocNone); swa.colormap = colormap; swa.event_mask = ExposureMask | StructureNotifyMask | FocusChangeMask; restore_last_window (); win = XCreateWindow (display, RootWindow (display, visual->screen), 0, 0, view.width, view.height, 0, visual->depth, InputOutput, visual->visual, CWColormap | CWEventMask, &swa); Atom delete_window_message = XInternAtom (display, "WM_DELETE_WINDOW", False); XSetWMProtocols (display, win, &delete_window_message, 1); glc = glXCreateContext(display, visual, 0, GL_TRUE); glXMakeCurrent(display, win, glc); XMapWindow(display, win); // show window XMoveWindow (display, win, 0, 0); extern std::string WIN_TITLE; XStoreName (display, win, WIN_TITLE.c_str()); glClearColor(0, 0, 0, 0); // black bg uis.set_current (&anote, 0); // open with author's note cons.home (); // display all text in console aout.set_callbacks (); aout.start (); // start audio loop in a separate thread. see audio_wanted (..) // for mouse Window rw, cw; unsigned int buttons; int rx, ry; extern bot_t bot; // ui loop double futuret = 0; extern double FPS_T; extern int USLEEP; ui_clk.reset (); while (1) { if (quit_now) { if ((din0.drones.size () == 0) && (uis.fdr_voice.on == 0) && (uis.fdr_delay.on == 0) && (keybd2.triggered_notes.size () == 0)) // make sure all sound making things are faded out/off break; } if (focus) { // get mouse & keyboard state if din window has focus XQueryKeymap (display, keys.now); // get keyboard state XQueryPointer (display, win, &rw, &cw, &rx, &ry, &mousex, &mousey, &buttons); // get mouse state mouseyy = view.ymax - mousey; // mouse buttons lmb = buttons & Button1Mask; rmb = buttons & Button3Mask; } // handle input // osc (); // OSC midi (); // MIDI via JACK bot.handle_input (); // IRC mesgs/cmds uis.handle_input (); // ui mesgs & background processing memcpy (keys.last, keys.now, key_state::NUM_BYTES); // save keyboard state // write audio // if (aout.can_write ()) { float* out0 = aout.writep; // left float* out1 = out0 + aout.samples_per_channel; // right // apply octave shift // if (osd.active) do_octave_shift (); memset (aout.writep, 0, aout.samples_buffer_size); // silence everything interpreter ("loop"); din0.render_audio (out0, out1); keybd2.render_audio (out0, out1); applyfx (out0, out1, din0.dinfo.delay, din0.dinfo.compress); // add audio to oscilloscope if (!din0.osc.paused && din0.osc.visible) din0.osc.add_samples (out0, out1, aout.samples_per_channel); update_audio (); } // draw ui // if (ui_clk.secs >= futuret) { // fps & ui sleep limiting to manage processor usage uis.draw (); glXSwapBuffers (display, win); futuret = ui_clk.secs + FPS_T; } // handle window event if ( XPending (display) ) { XNextEvent(display, &event); if (focus) { if (event.type == KeyPress) { // for console typings XLookupString (&event.xkey, &xkey, 1, 0, 0); } else if (event.type == FocusOut) focus = 0; } else if (event.type == FocusIn) focus = 1; if(event.type == Expose) { // window resized XGetWindowAttributes (display, win, &gwa); update_window (gwa.width, gwa.height, view.width, view.height); } else if ((event.type == ClientMessage) && (event.xclient.data.l[0] == (unsigned int) delete_window_message)) { // window deleted // can only quit thru ESC, ESC again (see ui.cc) } } if (USLEEP) usleep (USLEEP); ui_clk.tick(); } aout.close (); // saves save_window (); std::string save_settings_tcl ("source " + dotdin + "save_settings.tcl"); interpreter (save_settings_tcl); ignore = system ("xset m $ACCEL $THRESHOLD 2>err"); // restore mouse settings // glx quit glXMakeCurrent(display, None, 0); glXDestroyContext(display, glc); XDestroyWindow(display, win); XCloseDisplay(display); return 0; } din-5.2.1/src/din.cc0000644000175100017510000012405712122344732011075 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "key_consts.h" #include "main.h" #include "din.h" #include "console.h" #include "solver.h" #include "utils.h" #include "input.h" #include "color.h" #include "random.h" #include "command.h" #include "delay.h" #include "chrono.h" #include "osc.h" #include "delay.h" #include "bot.h" #include "tcl_interp.h" #include "font.h" #include "ansi_color_codes.h" #include "scale_info.h" #include "ui_list.h" #include "keyboard_keyboard.h" #include #include using namespace std; extern string dotdin; // ~/.din directory extern console cons; // console extern viewport view; // viewport extern int mousex, mousey; // mouse pos extern int lmb, rmb, mmb; // mouse button state extern int LEFT, BOTTOM, RIGHT, TOP; // din board extents extern int HEIGHT; // TOP - BOTTOM extern float DELTA_VOLUME; // delta volume per unit key height extern int LAST_VOLUME; // last volume in key height units extern int NUM_VOLUMES; // number of available volumes extern int NUM_MICROTONES; // default number of microtones in a range extern int NUM_OCTAVES; extern map NOTE_POS; // interval name -> value, 1 - 1, 1# - 2, 2 - 3 etc extern int SAMPLE_RATE; // sampling rate extern map INTERVALS; // interval name -> value extern audio_out aout; // audio output extern tcl_interp interpreter; // integrated tcl interpreter extern scale_info scaleinfo; // scale information for microtonal and keyboard keyboard extern int TRAIL_LENGTH; // drone trail length (== number of trail points) extern int DRONE_HANDLE_SIZE; extern chrono clk; // audio clock extern din din0; // microtonal-keyboard extern ui_list uis; // list of screens din::din (cmdlist& cl) : wave ("waveform1.crv"), waved ("waveform1.ed"), wavlis (wave_listener::DIN_BOARD), win (0, 0, view.xmax, view.ymax), drone_master_volume (0.01), drone_wave ("drone.crv"), droneed ("drone.ed"), dronelis (wave_listener::DRONE), fm ("Voice FM", "fm.crv"), am ("Voice AM", "am.crv"), gatr ("Gater", "gater.crv"), gated ("gater.ed"), gatlib ("gater-patterns.lib"), gatrlis (&gatr), moded ("modulation.ed"), fmlis (&fm), amlis (&am), helptext ("din.hlp"), notation ("numeric") { name = "microtonal-keyboard"; prev_mousex = 0; prev_mousey = 0; win_mousex = win_mousey = 0; current_range = 0; snap_drones = 0; do_drone_modulation = 1; droneed.add (&drone_wave, &dronelis); extern curve_library wavlib; droneed.attach_library (&wavlib); wavsol (&wave); wavplay.set_wave (&wavsol); waved.add (&wave, &wavlis); waved.attach_library (&wavlib); wavlis.edited (&waved, 0); gated.attach_library (&gatlib); gated.add (&gatr.crv, &gatrlis); gated.bv.push_back (&gatr); am_depth = 0; fm_depth = 0; moded.add (&fm.crv, &fmlis); moded.add (&am.crv, &amlis); moded.bv.push_back (&fm); moded.bv.push_back (&am); show_cursor_info = 0; rising = falling = 0; } void din::load_scale () { setup_ranges (); load_drones (); update_drone_tone (); update_drone_x (0, last_range); find_current_range (); } bool din::load_ranges () { string fname = dotdin + scaleinfo.name + ".ranges"; cout << LOAD << "<< loading ranges from: " << fname; ifstream file (fname.c_str(), ios::in); if (!file) { cout << ENDL << FAIL << "!!! couldnt load range pos from " << fname << ", will use defaults +++" << ENDL; return false; } string ignore; file >> ignore >> NUM_OCTAVES; int n; file >> ignore >> n; create_ranges (n); int l = 0, r, w; for (int i = 0; i < num_ranges; ++i) { range& R = ranges[i]; file >> ignore >> w; r = l + w; R.extents (l, BOTTOM, r, TOP); l = r; } cout << ", done >>>" << ENDL; return true; } void din::save_ranges () { string fname = dotdin + scaleinfo.name + ".ranges"; ofstream file (fname.c_str(), ios::out); if (file) { file << "num_octaves " << NUM_OCTAVES << endl; file << "num_ranges " << num_ranges << endl; for (int i = 0; i < num_ranges; ++i) { range& r = ranges[i]; file << i << ' ' << r.extents.width << endl; } cout << PASS << "+++ saved ranges in " << fname << " +++" << ENDL; } } void din::create_ranges (int n) { if (n > 0) { num_ranges = n; ranges.resize (num_ranges); last_range = num_ranges - 1; firstr = &ranges [0]; lastr = &ranges [last_range]; } } void din::setup_ranges (int load) { cout << DOING << "*** setting up ranges ***" << ENDL; if (load) { if (!load_ranges()) { create_ranges (NUM_OCTAVES * scaleinfo.num_ranges); set_range_size (0, last_range, NUM_MICROTONES); } } else { // number of octaves has changed int last_num_ranges = num_ranges; create_ranges (NUM_OCTAVES * scaleinfo.num_ranges); set_range_size (last_num_ranges, last_range, NUM_MICROTONES); // new ranges to default size, keep size of existing ranges } setup_range_notes (); update_range_notes (); calc_range_label (); notate_ranges (); find_current_range (); cout << PASS "+++ setup ranges +++" << ENDL; } void din::setup_range_notes () { for (int p = 0, r = 0; p < NUM_OCTAVES; ++p) { for (int i = 0, j = 1; i < scaleinfo.num_ranges; ++i, ++j) { range& R = ranges[r++]; R.intervals[0] = scaleinfo.notes[i]; R.intervals[1] = scaleinfo.notes[j]; } } } void din::update_range_notes () { float octave_start = scaleinfo.lo_tonic; for (int p = 0, r = 0; p < NUM_OCTAVES; ++p) { for (int i = 0; i < scaleinfo.num_ranges; ++i) { ranges[r++].calc (p, octave_start, scaleinfo.intervals); } octave_start *= 2; } } void din::calc_range_label () { if (num_ranges) { range::char_height = get_line_height (); range::ybot1 = firstr->extents.bottom - range::char_height; range::ybot2 = range::ybot1 - range::char_height - range::spacer; range::ytop1 = firstr->extents.top + range::char_height; range::ytop2 = range::ytop1 + range::char_height + range::spacer; } } void din::set_range_size (int ran, int sz) { // set size of range ran and greater range& R = ranges[ran]; int delta = sz - R.extents.width; R.extents (R.extents.left, BOTTOM, R.extents.left + sz, TOP); for (int i = ran + 1; i < num_ranges; ++i) { range& Ri = ranges[i]; Ri.extents (Ri.extents.left + delta, Ri.extents.bottom, Ri.extents.right + delta, Ri.extents.top); } update_drone_x (ran, last_range); find_visible_ranges (); } void din::set_range_size (int s, int t, int sz) { int r, l; if (s < 1) { r = LEFT; } else r = ranges[s-1].extents.right; for (int i = s; i <= t; ++i) { l = r; r = l + sz; range& R = ranges[i]; R.extents (l, BOTTOM, r, TOP); } update_drone_x (s, t); find_visible_ranges (); } void din::range_left_changed () { range& R = ranges [current_range]; int old_left = R.extents.left; if (delta_mousex != 0) { R.extents (R.extents.left + delta_mousex, R.extents.bottom, R.extents.right, R.extents.top); int delta_left = R.extents.left - old_left; for (int i = 0; i < current_range; ++i) { range& ir = ranges [i]; ir.extents (ir.extents.left + delta_left, ir.extents.bottom, ir.extents.right + delta_left, ir.extents.top); } update_drone_x (0, current_range); find_visible_ranges (); } } void din::range_right_changed () { range& R = ranges [current_range]; int old_right = R.extents.right; if (delta_mousex != 0) { R.extents (R.extents.left, R.extents.bottom, R.extents.right + delta_mousex, R.extents.top); int delta_right = R.extents.right - old_right; for (int i = current_range + 1; i < num_ranges; ++i) { range& ir = ranges [i]; ir.extents (ir.extents.left + delta_right, ir.extents.bottom, ir.extents.right + delta_right, ir.extents.top); } update_drone_x (current_range, last_range); find_visible_ranges (); } } void din::set_key_id (int i) { key_id = i; notate_ranges (); } void din::set_notation (const string& s) { if (s == "w" || s == "west" || s == "western") notation = "western"; else notation = "numeric"; notate_ranges (); } void din::notate_ranges () { extern const char* WESTERN_FLAT []; if (notation == "western") { for (int i = 0; i < num_ranges; ++i) { range& ri = ranges [i]; string i0 = ri.intervals[0], i1 = ri.intervals[1]; int ii0 = NOTE_POS[i0], ii1 = NOTE_POS[i1]; int kii0 = (key_id + ii0) % 12; int kii1 = (key_id + ii1) % 12; ri.notes[0].name = WESTERN_FLAT[kii0]; ri.notes[1].name = WESTERN_FLAT[kii1]; } } else if (notation == "numeric") { for (int i = 0; i < num_ranges; ++i) { range& ri = ranges [i]; string i0 = ri.intervals[0], i1 = ri.intervals[1]; ri.notes[0].name = i0; ri.notes[1].name = i1; } } // misc labels int m = num_ranges / scaleinfo.num_ranges; for (int i = 0; i < num_ranges; ++i) { range& ri = ranges [i]; stringstream ss; ss << 1 + i / scaleinfo.num_ranges << '/' << m; ss >> ri.octave; if (ri.intervals[0] == "1") ri.key = range::LEFT; else ri.key = range::NONE; // highlight key note in green } ranges[last_range].key = range::RIGHT; } void din::set_tonic (float s) { if (scaleinfo.set_tonic(s)) { update_range_notes (); update_drone_tone (); notate_ranges (); } } void din::mouse2tonic () { // set mouse at tonic range& r = ranges[scaleinfo.num_ranges]; // range of middle tonic int dx = win_mousex - r.extents.left; warp_pointer (-dx, 0); } float din::get_tonic () { return scaleinfo.tonic; } float din::get_note_value (const string& s) { return scaleinfo.intervals[s]; } void din::retune_note (const string& nn, float v) { float b4 = scaleinfo.intervals[nn]; scaleinfo.intervals[nn] = v; update_range_notes (); update_drone_tone (); cons << console::green << "retuned note: " << nn << " from: " << b4 << " to " << v << eol; } void din::retune_note () { // find nearest note range& r = ranges[current_range]; int left = r.extents.left, right = r.extents.right; int delta_left = win_mousex - left, delta_right = right - win_mousex; int i = 0; if (delta_left > delta_right) i = 1; string label(r.intervals[i]); float sas [] = {scaleinfo.lo_tonic, scaleinfo.tonic, scaleinfo.hi_tonic}; float sa = sas [(int) octave_position]; float freq = step * SAMPLE_RATE; float interval = freq / sa; label = r.intervals[i]; float b4 = scaleinfo.intervals[label]; scaleinfo.intervals [label] = interval; update_range_notes (); update_drone_tone (); cons << console::green << "retuned " << label << " from " << b4 << " to " << interval << eol; } void din::restore_note () { // find nearest note range& r = ranges[current_range]; int left = r.extents.left, right = r.extents.right; int delta_left = win_mousex - left, delta_right = right - win_mousex; int i = 0; if (delta_left > delta_right) i = 1; string n (r.intervals[i]); if (n != "S") { n = r.intervals[i]; cons << console::green << "restored " << n << " from " << scaleinfo.intervals[n] << " to " << INTERVALS[n] << eol; scaleinfo.intervals [n] = INTERVALS [n]; update_range_notes (); update_drone_tone (); } } void din::restore_all_notes () { scaleinfo.intervals = INTERVALS; update_range_notes (); update_drone_tone (); } void din::save_scale () { save_ranges (); save_drones (); scaleinfo.save_custom_tuning (); } din::~din () { wave.save ("waveform1.crv"); cout << FAIL << "--- destroyed microtonal-keyboard ---" << ENDL; } void din::load_drones () { string fdrone = dotdin + scaleinfo.name + ".drone"; ifstream file (fdrone.c_str(), ios::in); drones.clear (); rising = falling = 0; if (!file) return; else { string ignore; int num_drones = 0; file >> ignore >> num_drones; file >> ignore >> drone_master_volume; last_drone_master_volume = 0; cout << LOAD << "<<< loading " << num_drones << " drones from: " << fdrone; for (int i = 0; i < num_drones; ++i) { drone di; file >> ignore >> di.cx >> di.cy; di.set_xy (*this, di.cx, di.cy); file >> ignore >> di.player.x; file >> ignore >> di.r >> di.g >> di.b; file >> ignore >> di.mod.active >> di.mod.am.b >> di.mod.am.db >> di.mod.am.depth >> di.mod.am.bpm >> di.mod.fm.b >> di.mod.fm.db >> di.mod.fm.depth >> di.mod.fm.bpm; file >> di.num_trail_points >> di.handle_size; di.state = drone::RISING; di.fdr.set (0, 1); ++rising; drones.push_back (di); } update_drone_players (); cout << ", done. >>>" << ENDL; } } void din::save_drones () { drone_wave.save ("drone.crv"); string drone_file = dotdin + scaleinfo.name + ".drone"; ofstream file (drone_file.c_str(), ios::out); if (file) { int num_drones = drones.size (); file << "num_drones " << num_drones << eol; file << "master_volume " << drone_master_volume << eol; for (int i = 0; i < num_drones; ++i) { drone& di = drones[i]; file << "positon " << di.cx << ' ' << di.cy << eol; file << "wave_pos " << di.player.x << eol; file << "color " << di.r << ' ' << di.g << ' ' << di.b << eol; file << "drone_modulation " << di.mod.active << ' ' << di.mod.am.b << ' ' << di.mod.am.db << ' ' << di.mod.am.depth << ' ' << di.mod.am.bpm << ' ' << di.mod.fm.b << ' ' << di.mod.fm.db << ' ' << di.mod.fm.depth << ' ' << di.mod.fm.bpm << ' ' << di.num_trail_points << ' ' << di.handle_size << eol; } cout << PASS << "+++ saved " << num_drones << " drones in: " << drone_file << " +++" << ENDL; } } void din::update_drone_tone () { for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { drone& di = drones[i]; range& r = ranges[di.range]; di.step = (1 - di.pos) * r.notes[0].step + di.pos * r.notes[1].step; di.player.set (di.step, drone_master_volume * di.vol, drone_master_volume * di.vol); } } void din::update_drone_x (int s, int t) { for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { drone& di = drones[i]; if (di.mod.active == 0) { if ((di.range >= s) && (di.range <= t)) { range& r = ranges[di.range]; di.x = di.cx = (int)((1 - di.pos) * r.extents.left + di.pos * r.extents.right); di.calc_handle (); } } } } void din::update_drone_anchors () { for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) drones[i].calc_handle (); } void din::update_drone_ranges () { for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { drone& di = drones[i]; if (di.range > last_range) { di.range = last_range; range& rd = ranges[di.range]; di.pos = (di.x - rd.extents.left) * 1. / rd.extents.width; } else if (di.pos > 1) { int r = find_range (di.x, di.range); range& rr = ranges[r]; di.range = r; di.pos = (di.x - rr.extents.left) * 1. / rr.extents.width; } } } void din::add_drone () { drones.push_back (drone()); update_drone_players (); set_drone (drones.size() - 1); clear_selected_drones (); } void din::delete_selected_drones () { if (selected_drones.size () == 0) pick_drone (); for (int i = 0, j = selected_drones.size (); i < j; ++i) { int s = selected_drones[i]; drone& ds = drones[s]; if (ds.state == drone::ACTIVE) { ds.state = drone::FALLING; ds.fdr.set (1, 0); ++falling; } } } int din::delete_all_drones () { if (select_all_drones ()) { delete_selected_drones (); return 1; } else cons << console::red << "Drones are busy rising or falling. Please try later!" << eol; return 0; } void din::set_drone (int d) { if (d == -1) return; // bad drone id find_volume (); drone& dd = drones[d]; if (!editing_drone) { // create drone // random color static const float limit = 0.9; dd.r = limit * get_rand_01 (); dd.g = limit * get_rand_01 (); dd.b = limit * get_rand_01 (); // create drone at mouse position dd.x = dd.cx = win_mousex; dd.y = dd.cy = win_mousey; dd.dy = win_mousey - BOTTOM; // prep to rise the drones ++rising; dd.state = drone::RISING; dd.fdr.set (0, 1); } else { // editing the drone // update drone position dd.cx += delta_mousex; dd.cy -= delta_mousey; } if (!dd.mod.active) dd.set_xy (*this, dd.cx, dd.cy); } void din::clear_selected_drones () { for (int i = 0, j = selected_drones.size(); i < j; ++i) drones[selected_drones[i]].sel = 0; selected_drones.clear (); editing_drone = 0; } void din::update_drone_players () { for (int i = 0, j = drones.size (); i < j; ++i) { drone& di = drones[i]; di.sol (&drone_wave); di.player.set_wave (&di.sol); } } void din::pick_drone () { clear_selected_drones (); for (int i = drones.size () - 1; i > -1; --i) { drone& di = drones[i]; if ((di.state == drone::ACTIVE) && inbox (di.handle, win_mousex, win_mousey)) { di.sel = 1; selected_drones.push_back (i); break; } } } void din::draw_drones () { glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); int num_drones = drones.size (); // draw drone trails for (int i = 0; i < num_drones; ++i) { drone& di = drones[i]; if (di.mod.active) { glBegin (GL_LINE_STRIP); glColor4f (di.r, di.g, di.b, di.fdr.amount); list< point >& tq = di.trailq; for (list< point >::iterator iter = tq.begin (), jter = tq.end (); iter != jter; ++iter) { point& p = *iter; glVertex2i (p.x, p.y); } glEnd (); } } if (dinfo.anchor) { // draw drone anchor for (int i = 0; i < num_drones; ++i) { drone& di = drones[i]; if (di.range >= visl && di.range <= visr) { glColor4f (di.r, di.g, di.b, di.fdr.amount); glBegin (GL_LINES); glVertex2i (di.x, di.y); glVertex2i (di.x, BOTTOM); glEnd (); } } } // draw drone handles for (int i = 0; i < num_drones; ++i) { drone& di = drones[i]; if (di.range >= visl && di.range <= visr) { glColor4f (di.r, di.g, di.b, di.fdr.amount); glRecti (di.handle.left, di.handle.bottom, di.handle.right, di.handle.top); if (di.sel) glColor4f (0, 1, 0, di.fdr.amount); else glColor4f (1, 1, 1, di.fdr.amount); glBegin (GL_LINE_LOOP); glVertex2i (di.handle.left, di.handle.bottom); glVertex2i (di.handle.right, di.handle.bottom); glVertex2i (di.handle.right, di.handle.top); glVertex2i (di.handle.left, di.handle.top); glEnd (); } } // draw drone selection box selector.draw (); } void din::update_drone_master_volume (float d) { int n = drones.size (); if (n == 0) return; float nd = d / n; drone_master_volume += nd; for (int i = 0, j = drones.size(); i < j; ++i) { drone& di = drones[i]; di.player.set_volume (drone_master_volume * di.vol, drone_master_volume * di.vol); } roll_console (); cons << "drone master volume = " << drone_master_volume << eol; } void din::update_drone_solvers () { for (int i = 0, j = drones.size (); i < j; ++i) drones[i].sol.update (); } string din::get_selected_drones () { stringstream ss; for (int i = 0, j = drones.size (); i < j; ++i) if (drones[i].sel) ss << i << ' '; return ss.str(); } void din::set_drone_volume (int i, float v) { if (i > -1 && i < (int) drones.size()) { drone& di = drones[i]; di.vol = v; di.dy = di.vol / DELTA_VOLUME; di.player.set (di.step, drone_master_volume * di.vol, drone_master_volume * di.vol); di.calc_handle (); } } void din::calc_win_mouse () { delta_mousex = mousex - prev_mousex; delta_mousey = mousey - prev_mousey; win_mousex += delta_mousex; win_mousey -= delta_mousey; tonex = win_mousex; toney = win_mousey; prev_mousex = mousex; prev_mousey = mousey; } void din::find_selected_drones () { // select drones that lie inside selection box // clear_selected_drones (); for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { drone& di = drones [i]; if ((di.state == drone::ACTIVE) && inbox (selector.region, di.x, di.y)) { selected_drones.push_back (i); di.sel = 1; } } } int din::select_all_drones () { clear_selected_drones (); int result = 1; for (int i = 0, j = drones.size (); i < j; ++i) { drone& di = drones[i]; if (di.state == drone::ACTIVE) { di.sel = 1; selected_drones.push_back (i); } else result = 0; } return result; } bool din::handle_input () { extern float DELTA_BPM; static const float delta_am_depth = 0.01, delta_fm_depth = 1; static const float delta_drone_master = 0.001; jogged = 0; if (osc.handle_input ()) { // oscilloscope selector.exists = 0; return true; } if (selector.handle_input (win_mousex, win_mousey)) find_selected_drones (); // box select drones if (phrasor0.state == phrasor::recording) { // record mouse pos for playback l8r static point pt; pt.x = win_mousex; pt.y = win_mousey; phrasor0.data.push_back (pt); ++phrasor0.sz; } // movement if (keypressedd (k_a, dinfo.scroll.rept, dinfo.scroll.rept)) scroll (-dinfo.scroll.dx, 0); else if (keypressedd (k_d, dinfo.scroll.rept, dinfo.scroll.rept)) scroll (+dinfo.scroll.dx, 0); else if (keypressedd (k_w, dinfo.scroll.rept, dinfo.scroll.rept)) scroll (0, +dinfo.scroll.dy); else if (keypressedd (k_s, dinfo.scroll.rept, dinfo.scroll.rept)) scroll (0, -dinfo.scroll.dy); // octave shift else if (keypressed (k_z)) modulate_up (); else if (keypressed (k_x)) modulate_down (); else if (keypressed (k_b)) { // toggle gater if (uis.w_gater.enabled()) uis.w_gater.toggle (); } else if (keypressed (k_f)) { // phrase record if (phrasor0.state == phrasor::recording) { phrasor0.validate (); phrasor0.play (); cons << console::green << "phrasor STOPPED recording, started PLAYING." << eol; } else { phrasor0.rec (); cons << console::red << "phrasor is RECORDING." << eol; } } else if (keypressed (k_v)) { // phrase play/pause if (phrasor0.state == phrasor::playing) { cons << console::yellow << "phrasor has PAUSED." << eol; phrasor0.state = phrasor::paused; find_current_range (); } else { cons << console::green << "phrasor is PLAYING." << eol; phrasor0.validate (); phrasor0.play (); } } else if (keypressed (k_g)) { // phrase clear phrasor0.clear (); find_current_range (); cons << console::red << "phrases deleted." << eol; } // mute lead else if (keypressed (k_space)) { uis.w_voice.toggle (); } // drones // else if (keypressedd (k_q)) add_drone (); // add drone else if (keypressed (k_e)) { // move selected drones if (editing_drone) clear_selected_drones (); else { if (selected_drones.size () == 0) pick_drone (); if (selected_drones.size ()) editing_drone = 1; } } else if (editing_drone) { for (int i = 0, j = selected_drones.size(); i < j; ++i) set_drone (selected_drones[i]); } else if (keypressedd (k_c)) delete_selected_drones (); else if (keypressed (k_k)) dinfo.anchor = !dinfo.anchor; else if (keypressedd (k_comma, 1./16, 1./128)) update_drone_master_volume (-delta_drone_master); // decrease drone master volume else if (keypressedd (k_period, 1./16, 1./128)) update_drone_master_volume (+delta_drone_master); // increase drone master volume else if (keypressedd (k_slash)) { // mute/unmute drone master volume if (drone_master_volume == 0) update_drone_master_volume (last_drone_master_volume); else { last_drone_master_volume = drone_master_volume; update_drone_master_volume (-drone_master_volume); } } else if (keypressed (k_j)) { do_drone_modulation = !do_drone_modulation; if (do_drone_modulation && drones.size ()) cons << console::cyan << "modulating drones" << eol; else cons << console::cyan << "modulating voice" << eol; } // phrase jogging // else if (keydown (k_left)) { // jog left phrasor0.jog (-phrasor::JOG); jogged = 1; } else if (keydown (k_right)) { // jog right phrasor0.jog (+phrasor::JOG); jogged = 1; } else if (keypressedd (k_left_bracket)) { // decrease jog amount if (--phrasor::JOG < 2) phrasor::JOG = 2; cons << console::yellow << "phasor jog: " << phrasor::JOG << eol; } else if (keypressedd (k_right_bracket)) { // increase jog amount ++phrasor::JOG; cons << console::yellow << "phasor jog: " << phrasor::JOG << eol; } else if (keydown (k_down)) phrasor0.set_cue (); // set cue point else if (keydown (k_up)) phrasor0.goto_cue (); // goto cue point else if (keypressed (k_p)) { // toggle compressor uis.w_compress.toggle (); } else if (keypressed (k_semicolon)) { // set key to pitch under cursor set_tonic (step * SAMPLE_RATE); mouse2tonic (); cons ("key"); } // tuning // else if (keydown (k_lctrl)) { if (keypressed (k_m)) set_range_size (0, last_range, ranges[current_range].extents.width); else if (keypressed (k_n)) { restore_all_notes (); cons << console::green << "restored all notes" << eol; } else range_left_changed (); } else if (keydown (k_lshift)) { if (keypressed (k_m)) set_range_size (0, last_range, NUM_MICROTONES); else if (keypressed (k_n)) restore_note (); else range_right_changed (); } else if (keypressed (k_n)) { retune_note (); } else if (keypressed (k_m)) { set_range_size (current_range, NUM_MICROTONES); } else if (keydown (k_h)) { // adjust board height if (delta_mousey != 0) { HEIGHT -= delta_mousey; TOP = BOTTOM + HEIGHT; if (TOP <= BOTTOM) { // set sane values TOP = BOTTOM + 2; HEIGHT = 2; } // update volume internals calc_volume_vars (HEIGHT); // update ranges for (int i = 0; i < num_ranges; ++i) { range& ri = ranges[i]; ri.extents.top = TOP; ri.extents.height = HEIGHT; ri.extents.calc (); } calc_range_label (); // update drones for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { drone& di = drones[i]; if (di.mod.active == 0) { di.dy = (int)(di.vol * HEIGHT); di.cy = BOTTOM + di.dy; di.calc_handle (); } } } } else if (keypressed (k_i)) { // label mouse cursor, notes, pitches show_cursor_info = !show_cursor_info; } else if (keypressed (k_f1)) helptext(); // oscilloscope // else if (keypressed (k_rctrl)) { osc.toggle_visible (); } else if (keypressed (k_menu)) osc.toggle_pause (); // bpms extern beat2value octave_shift; if (keypressedd (k_f5)) { // decrease gater bpm (lshift - gl, lctrl - gr) change_bpm (gatr, -DELTA_BPM); } else if (keypressedd (k_f6)) { // increase gater bpm (lshift - gl, lctrl - gr) change_bpm (gatr, +DELTA_BPM); } else if (keypressedd (k_f7)) { // decrease fm bpm if (do_drone_modulation && drones.size ()) { change_drone_bpm (drone_modulation::FM, -DELTA_BPM); } else { change_bpm (fm, -DELTA_BPM); } } else if (keypressedd (k_f8)) { // increase fm bpm if (do_drone_modulation && drones.size ()) { change_drone_bpm (drone_modulation::FM, DELTA_BPM); } else { change_bpm (fm, +DELTA_BPM); } } else if (keypressedd (k_f9)) { // decrease am bpm if (do_drone_modulation && drones.size ()) { change_drone_bpm (drone_modulation::AM, -DELTA_BPM); } else { change_bpm (am, -DELTA_BPM); } } else if (keypressedd (k_f10)) { // increase am bpm if (do_drone_modulation && drones.size ()) { change_drone_bpm (drone_modulation::AM, DELTA_BPM); } else { change_bpm (am, +DELTA_BPM); } } else if (keypressedd (k_f11)) { // decrease octave shift bpm change_bpm (octave_shift, -DELTA_BPM); } else if (keypressedd (k_f12)) { // increase octave shift bpm change_bpm (octave_shift, +DELTA_BPM); } // depths else if (keypressedd (k_r)) { // decrease am depth if (do_drone_modulation && drones.size ()) { change_drone_depth (drone_modulation::AM, -1); } else { am_depth -= delta_am_depth; cons << "am depth: " << am_depth << eol; } } else if (keypressedd (k_t)) { // increase am depth if (do_drone_modulation && drones.size ()) { change_drone_depth (drone_modulation::AM, +1); } else { am_depth += delta_am_depth; cons << "am depth: " << am_depth << eol; } } else if (keypressedd (k_y)) { // decrease fm depth if (do_drone_modulation && drones.size()) { change_drone_depth (drone_modulation::FM, -1); } else { fm_depth -= delta_fm_depth; hz2step (fm_depth, fm_step); cons << "fm depth: " << fm_depth << eol; } } else if (keypressedd (k_u)) { // increase fm depth if (do_drone_modulation && drones.size ()) { change_drone_depth (drone_modulation::FM, +1); } else { fm_depth += delta_fm_depth; hz2step (fm_depth, fm_step); cons << "fm depth: " << fm_depth << eol; } } else if (keypressedd (k_minus)) { change_drone_trail_points (-1); } else if (keypressedd (k_equals)) { change_drone_trail_points (+1); } else if (keypressedd (k_9)) { change_drone_handle_size (-1); update_drone_anchors (); } else if (keypressedd (k_0)) { change_drone_handle_size (+1); update_drone_anchors (); } return true; } void din::change_drone_trail_points (int delta) { int n = selected_drones.size (); if (n) { // change for selected drones only for (int i = 0; i < n; ++i) { int s = selected_drones[i]; drone& ds = drones[s]; ds.num_trail_points += delta; if (ds.num_trail_points < 1) ds.num_trail_points = 1; } } else { // change for all drones n = drones.size (); for (int i = 0; i < n; ++i) { drone& di = drones[i]; di.num_trail_points += delta; if (di.num_trail_points < 1) di.num_trail_points = 1; } } } void din::change_drone_handle_size (int delta) { int n = selected_drones.size (); if (n) { // change for selected drones only for (int i = 0; i < n; ++i) { int s = selected_drones[i]; drone& ds = drones[s]; ds.handle_size += delta; if (ds.handle_size < 0) ds.handle_size = 0; } } else { // change for all drones n = drones.size (); for (int i = 0; i < n; ++i) { drone& di = drones[i]; di.handle_size += delta; if (di.handle_size < 0) di.handle_size = 0; } } } void din::change_drone_bpm (int what, float delta) { // change FM/AM bpm of drones // int n = selected_drones.size (); if (n) { // change for selected drones only for (int i = 0; i < n; ++i) { int s = selected_drones[i]; drone& ds = drones[s]; ds.change_bpm (s, what, delta); } } else { // change for all drones n = drones.size (); for (int i = 0; i < n; ++i) { drone& di = drones[i]; di.change_bpm (i, what, delta); } } cons.rollup (1); } void din::change_drone_depth (int what, float delta) { int n = selected_drones.size (); if (n) { // change for selected drones for (int i = 0; i < n; ++i) { int s = selected_drones[i]; drone& di = drones[s]; di.change_depth (s, what, delta); } } else { // change for all drones n = drones.size (); if (!n) cons << console::red << "no drones" << eol; for (int i = 0; i < n; ++i) { drone& di = drones[i]; di.change_depth (i, what, delta); } } cons.rollup(1); } void warp_pointer (int dx, int dy); void din::scroll (int dx, int dy) { mousex -= dx; prev_mousex -= dx; mousey += dy; prev_mousey += dy; win (win.left + dx, win.bottom + dy, win.right + dx, win.top + dy); warp_pointer (-dx, dy); find_visible_ranges (dx); } void din::find_current_range () { // find the range where mouse is found win_mousex = win.left + mousex; win_mousey = win.bottom + view.ymax - mousey; if (win_mousex <= ranges[0].extents.left) current_range = 0; else if (win_mousex >= ranges[last_range].extents.right) current_range = last_range; else for (int i = 0; i < num_ranges; ++i) { range& curr = ranges[i]; box& ext = curr.extents; if ( (win_mousex >= ext.left) && (win_mousex <= ext.right)) { current_range = i; break; } } find_visible_ranges (); } void din::find_visible_ranges (int dir) { // bcos we only draw visible ranges if (dir > 0) { while ((visr < last_range) && (ranges[visr].extents.right < win.right)) ++visr; while ((visl < last_range) && (ranges[visl].extents.right < win.left)) ++visl; } else if (dir < 0) { while ((visl > 0) && (ranges[visl].extents.left > win.left)) --visl; while ((visr > 0) && (ranges[visr].extents.left > win.right)) --visr; } else { visl = current_range; visr = current_range; while ( (visl > 0) && (win.left < ranges[visl].extents.left) ) --visl; while ( (visr < last_range) && (ranges[visr].extents.right < win.right) ) ++visr; } } int din::find_range (int x, int r) { while (1) { range& curr = ranges [r]; int deltax = x - curr.extents.left; if (deltax > curr.extents.width) { if (++r < num_ranges); else { r = num_ranges - 1; break; } } else if (deltax < 0) { if (--r < 0) { r = 0; break; } } else break; } return r; } bool din::find_tone_and_volume () { find_volume (); // locate current tone range* curr = &ranges [current_range]; int deltax = tonex - curr->extents.left; if (deltax >= curr->extents.width) { // tone in range to the right ++current_range; if (current_range == num_ranges) { // snap to last range current_range = last_range; curr = lastr; } else { curr = &ranges [current_range]; } } else if (deltax < 0) { // tone in range to the left --current_range; if (current_range < 0) { // snap to first range curr = firstr; current_range = 0; } else { curr = &ranges [current_range]; } } // located tone so find frequency // deltax = tonex - curr->extents.left; delta = deltax * curr->extents.width_1; step = curr->notes[0].step + delta * curr->delta_step; // step determines frequency see note.h // octave position of tone among all octaves octave_position = curr->notes[0].octave_position + delta * curr->delta_octave_position; extern double VOLUME; if (show_cursor_info) { // display frequency & volume at mouse cursor stringstream ss; ss.clear (); ss << (step * SAMPLE_RATE) << " / " << VOLUME; cursor_info = ss.str(); } bool result = false; if (dv < 0) { // below keyboard, silence wavplay.set (step, 0, 0); am_vol = 0; } else { am_vol = VOLUME; extern float WAVE_VOLUME; wavplay.set (step, VOLUME * WAVE_VOLUME, VOLUME * WAVE_VOLUME); result = true; } Tcl_UpdateLinkedVar (interpreter.interp, "volume"); // VOLUME is accessible in Tcl interpreter as variable volume return result; } void din::draw () { glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho (0, view.xmax, 0, view.ymax, -1, 1); glMatrixMode (GL_MODELVIEW); glLoadIdentity (); // draw oscilloscope if (osc.visible) { osc.draw (); glLoadIdentity (); } glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho (win.left, win.right, win.bottom, win.top, -1, 1); // label visible ranges for (int i = visl; i < visr; ++i) ranges[i].draw_labels (range::LEFT, show_cursor_info); ranges[visr].draw_labels (range::BOTH, show_cursor_info); draw_drones (); // draw drones // mark range notes int rl = ranges[visl].extents.left, rr = ranges[visr].extents.right; float tr = 1; glColor3f (tr, tr, tr); glBegin (GL_LINES); glVertex2i (rl, BOTTOM); glVertex2i (rr, BOTTOM); glVertex2i (rl, TOP); glVertex2i (rr, TOP); glEnd (); // phrasor markers if (phrasor0.state != phrasor::stopped) { if (phrasor0.state == phrasor::recording) phrasor0.draw (phrasor0.recl, 1, 0, 0); else { phrasor0.draw (phrasor0.cur, 0, 1, 0); phrasor0.draw (phrasor0.cue, 0.25, 0.25, 0.25); } } // draw cursor info if (show_cursor_info) { static const int delta_label = 10; glColor3f (1, 0.25, 0.15); draw_string (cursor_info, tonex + delta_label, toney + delta_label, 0); } } void warp_pointer_abs (int x, int y); void din::enter () { if (phrasor0.state != phrasor::playing) { warp_pointer_abs (prev_mousex, prev_mousey); mousex = prev_mousex; mousey = prev_mousey; find_current_range (); } } void din::roll_console () { if (cons.rollup() == 0) cons.rollup (1); } void din::change_depth (int i, float d) { roll_console (); if (i == 1) { fm_depth += d; hz2step (fm_depth, fm_step); cons << "fm depth: " << fm_depth << eol; } else { am_depth += d; cons << "am depth: " << am_depth << eol; } } void din::change_bpm (beat2value& which, float amt) { roll_console (); float bpm = which.get_bpm () + amt; bpm = which.set_bpm (bpm); cons << which.name << " bpm: " << bpm << eol; } void din::calc_am_fm_gater () { am.modulate (aout.ams, aout.result, aout.samples_per_channel, am_depth * am_vol); fm.modulate (aout.fms, aout.result, aout.samples_per_channel, fm_step); gatr (aout.gatr, aout.samples_per_channel); } void din::bg () { // always runs even when din board is not visible if (phrasor0.state == phrasor::playing) { phrasor0.get (tonex, toney); if (!jogged) phrasor0.next (); } } void din::modulate_drones () { for (int i = 0, j = drones.size (); i < j; ++i) { drone& di = drones[i]; int add2_trail = 0; drone_modulation& dm = di.mod; dm.calc (); if (dm.active) { int x = di.cx + dm.fm.result, y = di.cy + dm.am.result; di.set_xy (*this, x, y); add2_trail = 1; } if (add2_trail) { if (di.trailq.size () < di.num_trail_points) { di.trailq.push_back (point(di.x, di.y)); } else di.trailq.pop_front (); } } } void din::render_audio (float* out0, float* out1) { calc_am_fm_gater (); // compute AM & FM & gater over bpm // find tone/volume from mouse position // if (find_tone_and_volume ()) { wavplay.solve_fm (aout.result, aout.fms, aout.samples_per_channel); // do FM float *lout = out0, *rout = out1; wavplay (lout, aout.samples_per_channel, aout.result, aout.ams, wavplay.left * uis.fdr_voice.amount); // do AM // apply gater // lout = out0; rout = out1; if (uis.fdr_gater.on) { memcpy (aout.result, lout, aout.samples_channel_size); // voice multiply (lout, aout.gatr, aout.samples_per_channel); // voice * gater tween (lout, aout.result, aout.samples_per_channel, uis.fdr_gater.amount); // blended } else { if (dinfo.gater) { multiply (lout, aout.gatr, aout.samples_per_channel); // voice * gater } } memcpy (rout, lout, aout.samples_channel_size); // copy left -> right } // apply drones // rise_drones (); modulate_drones (); fall_drones (); for (int i = 0, num_drones = drones.size (); i < num_drones; ++i) { float* lout = out0, *rout = out1; drone& di = drones[i]; play& dp = di.player; dp.solve (aout.result, aout.samples_per_channel); dp (lout, aout.samples_per_channel, aout.result, dp.left * di.fdr.amount); // render drone waveform to left memcpy (rout, lout, aout.samples_channel_size); // copy left -> right ie drone is mono } } void din::rise_drones () { if (rising) { for (int i = 0, j = drones.size (); i < j; ++i) { drone& di = drones[i]; if (di.state == drone::RISING) { di.fdr.eval (); if (di.fdr.on == 0) { di.state = drone::ACTIVE; --rising; } } } } } void din::fall_drones () { if (falling) { for (int i = 0, j = drones.size (); i < j; ++i) { drone& di = drones[i]; if (di.state == drone::FALLING) { di.fdr.eval (); if (di.fdr.on == 0) { di.state = drone::DEAD; dead_drones.push_back (i); if (--falling == 0) { sort (dead_drones.begin (), dead_drones.end()); for (int m = dead_drones.size () - 1; m > -1; --m) drones.erase (drones.begin () + dead_drones[m]); update_drone_players (); dead_drones.clear (); clear_selected_drones (); if (on_delete != "") { cons (on_delete); on_delete = ""; } return; } } } } } } din_info::din_info () { extern string dotdin; ifstream file ((dotdin + "din_info").c_str(), ios::in); string ignore; if (file) { file >> ignore >> height; HEIGHT = height; TOP = BOTTOM + HEIGHT; calc_volume_vars (HEIGHT); int rollup; file >> ignore >> rollup; cons.rollup (rollup); file >> ignore >> delay; file >> ignore >> gater; file >> ignore >> compress; file >> ignore >> voice; file >> ignore >> anchor; file >> ignore >> cons.show_tips; } else { height = 290; cons.rollup (0); delay = 1; compress = 1; voice = 1; anchor = 1; cons.show_tips = 1; } cons.last (); } void din_info::save () { extern string dotdin; ofstream file ((dotdin + "din_info").c_str(), ios::out); if (file) { file << "board_height " << HEIGHT << endl; file << "rollup " << cons.rollup() << endl; file << "delay " << delay << endl; file << "gater " << gater << endl; file << "compress " << compress << endl; file << "voice " << voice << endl; file << "anchor " << anchor << endl; file << "show_tips " << cons.show_tips << endl; } else { cout << "cannot save din_info" << eol; } } din-5.2.1/src/audio.cc0000644000175100017510000003677212111771577011443 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "main.h" #include "audio.h" #include "chrono.h" #include "command.h" #include "console.h" #include "tcl_interp.h" #include "ansi_color_codes.h" #include "delay.h" #include "compressor.h" #include "keyboard_keyboard.h" #include "fader.h" #include "ui_list.h" #include #include #include #include #include using namespace std; extern string dotdin; // ~/.din extern int SAMPLE_RATE; extern float SAMPLE_DURATION; extern chrono clk; // din audio clock // jack port names extern string name, dinl, dinr; extern const char *colon, *L, *R, *MIDI_IN; extern audio_out aout; extern delay left_delay, right_delay; extern ui_list uis; extern string APP_NAME; extern string WIN_TITLE; audio_out::audio_out () { client = 0; result = ams = fms = vol = gatr = 0; num_midi_con = 0; prefs_name = dotdin + "jack_prefs"; load_prefs (); open (); } audio_out::~audio_out () { if (midi_rb) jack_ringbuffer_free (midi_rb); sample_t* ptr [] = {samples_buffers, result, ams, fms, vol, gatr}; for (int i = 0; i < 6; ++i) if (ptr[i]) delete[] ptr[i]; if (available) delete[] available; cout << FAIL << "--- destroyed audio ---" << ENDL; } void audio_out::alloc () { // alloc memory for various buffers // samples_per_buffer = num_channels * samples_per_channel; samples_buffer_size = sizeof (sample_t) * samples_per_buffer; samples_channel_size = sizeof (sample_t) * samples_per_channel; if (samples_buffers) delete[] samples_buffers; samples_buffers = new sample_t [num_samples_buffers * samples_per_buffer]; if (available) delete[] available; available = new int [num_samples_buffers]; readi = writei = 0; readp = writep = samples_buffers; for (int i = 0; i < num_samples_buffers; ++i) available[i] = 0; sample_t** ptr [] = {&result, &ams, &fms, &vol, &gatr}; for (int i = 0; i < 5; ++i) { if (ptr[i]) delete[] *ptr[i]; *ptr[i] = new sample_t [samples_per_channel]; } if (midi_rb) jack_ringbuffer_free (midi_rb); midi_rb = jack_ringbuffer_create (samples_buffer_size); } void audio_out::set_sample_rate (int s) { SAMPLE_RATE = sample_rate = s; SAMPLE_DURATION = 1. / SAMPLE_RATE; // update din audio clock // clk.delta_ticks = samples_per_channel; clk.delta_secs = samples_per_channel * 1. / SAMPLE_RATE; cout << PASS << "+++ sample rate is " << SAMPLE_RATE << " Hz +++" << ENDL; } int audio_out::open() { cout << DOING << "*** connecting to JACK server ***" << ENDL; jack_status_t status; jack_options_t options = JackNullOption; client = jack_client_open (name.c_str(), options, &status, 0); if (!client) { cout << FAIL << "!!! couldnt connect to JACK server. !!!" << ENDL; exit (1); } else { name = string (jack_get_client_name (client)); // write JACK connection name on din title bar (useful when running multiple dins) WIN_TITLE = APP_NAME + " [" + name + "]"; dinl = name + colon + L; dinr = name + colon + R; cout << PASS << "+++ connected to JACK server as: " << name << " +++" << ENDL; } sample_rate = jack_get_sample_rate (client); samples_per_channel = jack_get_buffer_size (client); // create output audio ports // out_left = jack_port_register (client, L, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); out_right = jack_port_register (client, R, JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); if ((out_left == 0) || (out_right == 0)) { cout << FAIL << "!!! couldnt create input & output ports !!!" << ENDL; exit (1); } else cout << PASS << "+++ opened input & output ports +++" << ENDL; lcons = rcons = 0; midi_in = jack_port_register (client, MIDI_IN, JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0); if (!midi_in) cout << FAIL << "!!! couldn't create midi input port !!!" << ENDL; else { cout << PASS "+++ opened MIDI port +++" << ENDL; } alloc (); set_sample_rate (sample_rate); cout << PASS << "+++ opened JACK connection +++" << ENDL; return 0; } void audio_out::set_callbacks () { jack_set_sample_rate_callback (client, sample_rate_changed, (void *) this); jack_set_buffer_size_callback (client, buffer_size_changed, (void *) this); jack_set_port_connect_callback (client, connection_changed, (void *) this); cout << PASS << "+++ setup audio callbacks (sample rate, buffer size & midi connection) +++" << ENDL; } int audio_out::start () { if (client) { if (jack_set_process_callback (client, audio_wanted, (void *) this)) { cout << FAIL << "!!! couldnt set JACK process callback !!!" << ENDL; exit (1); }; if (jack_activate (client)) { cout << FAIL << "!!! couldnt activate JACK din client !!!" << ENDL; exit (1); }; // go! if (AUTO_CONNECT_OUTPUTS) { // autoconnect din audio output to system audio output so user hears sounds when din comes up and // need not fiddle with connectons // if (jack_connect (client, dinl.c_str(), "system:playback_1") != 0) cout << FAIL << "!!! couldnt connect to system:playback_1 !!!" << ENDL; else cout << PASS "+++ connected din:L to system:playback_1 +++" << ENDL; if (jack_connect (client, dinr.c_str(), "system:playback_2") != 0) cout << FAIL "!!! couldnt connect to system:playback_2 !!!" << ENDL; else cout << PASS "+++ connected din:R to system:playback_2 +++" << ENDL; cout << PASS << "+++ " << APP_NAME << " is streaming audio now +++ " << ENDL; } else { cout << FAIL << "!!! you must connect din outputs to system audio outputs to hear audio !!!" << ENDL; } } return 0; } int audio_out::close () { if (client) { lcons = jack_port_connected (out_left); if (lcons) { con_left = jack_port_get_connections (out_left); for (int i = 0; i < lcons; ++i) jack_disconnect (client, dinl.c_str(), con_left[i]); jack_free (con_left); cout << FAIL << "--- disconnected " << lcons << " connections to din:L ---" << ENDL; } rcons = jack_port_connected (out_right); if (rcons) { con_right = jack_port_get_connections (out_right); for (int i = 0; i < rcons; ++i) jack_disconnect (client, dinl.c_str(), con_right[i]); jack_free (con_right); cout << FAIL << "--- disconnected " << rcons << " connections to din:R ---" << ENDL; } if (jack_deactivate (client) == 0) { cout << FAIL << "--- deactivated din from JACK ---" << ENDL; }; if (jack_client_close(client) == 0) { cout << FAIL << "--- closed JACK connection ---" << ENDL; } else cout << FAIL << "!!! couldnt close JACK connection !!! " << ENDL; } return 0; } void audio_out::stream (sample_t* lbuf, sample_t* rbuf, sample_t* sbuf) { // copy samples buffer into left & right JACK bufers sample_t* lbuf0 = sbuf; sample_t* rbuf0 = sbuf + samples_per_channel; memcpy (lbuf, lbuf0, samples_channel_size); memcpy (rbuf, rbuf0, samples_channel_size); } void audio_out::load_prefs () { // // load jack audio preferences from disk // ifstream file (prefs_name.c_str(), ios::in); string ignore; if (!file) defaults (); else { string type; file >> ignore >> type; if (type != "audio_prefs") { cout << FAIL << "!!! bad audio prefrences file: " << prefs_name << ", will use defaults. !!!" << ENDL; num_samples_buffers = 2; } else { cout << LOAD << "<< loading audio prefs from: " << prefs_name; file >> ignore >> num_samples_buffers; cout << ", done. >>>" << ENDL; } } } void audio_out::save_prefs () { // save jack audio preferences to disk // ofstream file (prefs_name.c_str(), ios::out); if (file) { file << "type: audio_prefs" << eol; file << "num_samples_buffers: " << num_samples_buffers << eol; } else cout << FAIL << "!!! couldnt write audio preferences file: " << prefs_name << " !!!" << ENDL; } void audio_out::defaults () { cout << PASS << "<<< using default for JACK settings >>>" << ENDL; num_samples_buffers = 2; } int buffer_size_changed (jack_nframes_t nframes, void *arg) { if ((unsigned int) aout.samples_per_channel != jack_get_buffer_size (aout.client)) { cout << FAIL << "!!! buffer size change not supported, please restart din !!!" << ENDL; } return 0; } int sample_rate_changed (jack_nframes_t nframes, void *arg) { aout.set_sample_rate (jack_get_sample_rate (aout.client)); return 0; } int audio_out::audio_wanted (jack_nframes_t nsamples, void *arg) { // the "process" callback of JACK // // stream audio buffer to audio card // // read midi data // if (aout.available[aout.readi]) { // samples buffer written by main thread ready for streaming sample_t* lbuf = (sample_t *) jack_port_get_buffer (aout.out_left, aout.samples_per_channel); // jack left buffer sample_t* rbuf = (sample_t *) jack_port_get_buffer (aout.out_right, aout.samples_per_channel); // jack right buffer aout.stream (lbuf, rbuf, aout.readp); // stream samples buffer into left & right channels // update samples buffer status to let main thread write aout.available [aout.readi] = 0; if (++aout.readi >= aout.num_samples_buffers) { aout.readi = 0; aout.readp = aout.samples_buffers; } else aout.readp += aout.samples_per_buffer; ++clk; // update audio clock } // read midi data if (aout.midi_rb) { void *midi_buf = jack_port_get_buffer (aout.midi_in, nsamples); jack_nframes_t event_count = jack_midi_get_event_count (midi_buf); if (event_count > 0) { jack_nframes_t frame_start = jack_last_frame_time (aout.client); jack_nframes_t event_index; for (event_index = 0; event_index < event_count; ++event_index) { jack_midi_event_t ev; jack_midi_event_get (&ev, midi_buf, event_index); // push event onto ringbuffer if (jack_ringbuffer_write_space (aout.midi_rb) < sizeof ev.size + sizeof ev.time + ev.size) break; ev.time += frame_start; jack_ringbuffer_write (aout.midi_rb, (const char *)&ev.size, sizeof ev.size); jack_ringbuffer_write (aout.midi_rb, (const char *)&ev.time, sizeof ev.time); jack_ringbuffer_write (aout.midi_rb, (const char *)ev.buffer, ev.size); } } } return 0; } void run_midi_cmd (const string& c, size_t length, jack_midi_data_t *buffer, std::vector& args) { char buf [10]; unsigned char *bufp = (unsigned char *)buffer; string cmd (c); args.clear (); for (size_t i = 0; i < length; i++) { args.push_back (*bufp); sprintf (buf, " %u", *bufp++); cmd += buf; } cons (cmd); } void midi () { if (!aout.midi_rb) return; extern double MIDI_BPM; extern tcl_interp interpreter; static double start_time = 0; static int num_clocks = 0; jack_midi_event_t ev; jack_midi_data_t* ebuf = 0; unsigned int ebuf_size = 0; std::vector args; while (1) { size_t f = jack_ringbuffer_read_space (aout.midi_rb); if (f < sizeof ev.size) break; jack_ringbuffer_peek (aout.midi_rb, (char *) &ev.size, sizeof ev.size); if (f < sizeof ev.size + sizeof ev.time + ev.size) break; int alloc = 0; if (ebuf) { if (ev.size > ebuf_size) { free (ebuf); alloc = 1; } } else alloc = 1; if (alloc) { ebuf = (jack_midi_data_t *) malloc (ev.size); ebuf_size = ev.size; } ev.buffer = ebuf; jack_ringbuffer_read(aout.midi_rb, (char *)&ev.size, sizeof ev.size); jack_ringbuffer_read(aout.midi_rb, (char *)&ev.time, sizeof ev.time); jack_ringbuffer_read(aout.midi_rb, (char *)ev.buffer, ev.size); extern keyboard_keyboard keybd2; if ((*ev.buffer & 0xf0) == 0xb0) { // control change run_midi_cmd ("midi-cc", ev.size, ev.buffer, args); } else if ((*ev.buffer & 0xf0) == 0x90) { // note on run_midi_cmd ("midi-note-on", ev.size, ev.buffer, args); keybd2.note_on (args[1], args[2]); } else if ((*ev.buffer & 0xf0) == 0x80) { // note off run_midi_cmd ("midi-note-off", ev.size, ev.buffer, args); keybd2.note_off (args[1]); } else if ((*ev.buffer & 0xf0) == 0xc0) { // program change run_midi_cmd ("midi-program-change", ev.size, ev.buffer, args); } else if ((*ev.buffer & 0xf0) == 0xe0) { // pitch bend char status = ev.buffer[0]; char lsb = ev.buffer[1]; char msb = ev.buffer[2]; // normalise pitchbend range to -1.0...1.0 short value = (lsb | (msb << 7)) - 0x2000; float fvalue = (float)value / ((value < 0) ? 0x2000 : 0x1FFF); keybd2.pitch_bend (fvalue); ostringstream msg; msg << "midi-pitch-bend " << status << " " << value << " " << fvalue; cons (msg.str()); } else if (*ev.buffer == 0xf8) { // midi clock double elapsed_time; if (ev.time >= start_time) { elapsed_time = ev.time - start_time; } else { // time has wrapped (~ 27 hours @ 44100Hz) elapsed_time = UINT_MAX - start_time + ev.time; } ++num_clocks; if (elapsed_time >= SAMPLE_RATE) { double f_num_clocks = 1. / elapsed_time * num_clocks; double midi_bpm = f_num_clocks * 2.5 * SAMPLE_RATE; MIDI_BPM = midi_bpm; Tcl_UpdateLinkedVar (interpreter.interp, "midibpm"); cons ("midi-clock"); num_clocks = 0; start_time = ev.time; } } else if (*ev.buffer == 0xfa) { // midi start cons ("midi-start"); num_clocks = 0; start_time = ev.time; } } if (ebuf) free (ebuf); } void applyfx (float* out0, float* out1, int do_delay, int do_compress) { // apply delays // float fdr = uis.fdr_delay.amount; float* outl = out0; left_delay (outl, aout.samples_per_channel, fdr); float* outr = out1; right_delay (outr, aout.samples_per_channel, fdr); // apply compression // extern compressor coml, comr; if (do_compress) { float* outl = out0, *outr = out1; coml.apply (outl, aout.samples_per_channel); comr.apply (outr, aout.samples_per_channel); } } void update_audio () { // stream status aout.available [aout.writei] = 1; if (++aout.writei >= aout.num_samples_buffers) { aout.writep = aout.samples_buffers; aout.writei = 0; } else aout.writep += aout.samples_per_buffer; // store timenow as seconds on din audio clock extern double TIME_NOW; TIME_NOW = clk.secs; extern tcl_interp interpreter; Tcl_UpdateLinkedVar (interpreter.interp, "timenow"); } void connection_changed (jack_port_id_t a, jack_port_id_t b, int connect, void *arg) { audio_out* ao = (audio_out *) arg; // handle MIDI connections int n = jack_port_connected (ao->midi_in); if (n) { if (ao->num_midi_con == 0) { cons << console::green << "MIDI connected" << eol; cout << PASS << "+++ MIDI connected +++" << ENDL; } } else { if (ao->num_midi_con) { cons << console::red << "MIDI disconnected" << eol; cons << FAIL << "--- MIDI disconnected ---" << ENDL; } } ao->num_midi_con = n; } din-5.2.1/src/range.cc0000644000175100017510000000623212111771577011422 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "range.h" #include "font.h" #include "utils.h" #include "random.h" #include using namespace std; void range::calc (int octave, float start, map& _intervals) { float start_interval = _intervals [intervals[0]]; float end_interval = _intervals [intervals[1]]; clamp (1, start_interval, 2); clamp (1, end_interval, 2); float start_frequency = start_interval * start; float end_frequency = end_interval * start; notes[0].set_frequency (start_frequency); notes[0].octave_position = octave + start_interval - 1; notes[1].set_frequency (end_frequency); notes[1].octave_position = octave + end_interval - 1; delta_step = notes[1].step - notes[0].step; delta_octave_position = notes[1].octave_position - notes[0].octave_position; } void range::draw_labels (int label_what, int show_frequency) { static float kr = 0.3, kg = 1, kb = 0.3; // key color static float fr = 0.3, fg = fr, fb = fr; // frequency color static float nr = 1, ng = nr, nb = nr; // normal color float r0, g0, b0; float r1, g1, b1; if (key == range::LEFT) { r0 = kr; g0 = kg; b0 = kb; r1 = kr; g1 = kg; b1 = kb; } else { r0 = nr; g0 = ng; b0 = nb; r1 = fr; g1 = fg; b1 = fb; } glColor3f (r0, g0, b0); glBegin (GL_LINES); glVertex2i (extents.left, extents.bottom); glVertex2i (extents.left, extents.top); glEnd (); draw_string (notes[0].name, extents.left, ytop1); draw_string (notes[0].name, extents.left, ybot1); if (show_frequency) { glColor3f (r1, g1, b1); draw_string (notes[0].hz_name, extents.left, ybot2); draw_string (notes[0].hz_name, extents.left, ytop2); } if (label_what == BOTH) { if (key == range::RIGHT) { r0 = kr; g0 = kg; b0 = kb; r1 = kr; g1 = kg; b1 = kb; } else { r0 = nr; g0 = ng; b0 = nb; r1 = fr; g1 = fg; b1 = fb; } glColor3f (r0, g0, b0); glBegin (GL_LINES); glVertex2i (extents.right, extents.bottom); glVertex2i (extents.right, extents.top); glEnd (); draw_string (notes[1].name, extents.right, ybot1); draw_string (notes[1].name, extents.right, ytop1); if (show_frequency) { glColor3f (r1, g1, b1); draw_string (notes[1].hz_name, extents.right, ybot2); draw_string (notes[1].hz_name, extents.right, ytop2); } } glColor3f (fr, fr, fr); draw_string (octave, extents.midx, extents.midy); } din-5.2.1/src/note.cc0000644000175100017510000000222312111771577011267 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "note.h" #include #include using namespace std; note::note () { octave_position = 0; hz = 0; step = 0; } void note::set_frequency (float f) { hz = f; hz2step (hz, step); std::stringstream ss; ss << hz; ss >> hz_name; } void hz2step (float& hz, float& step) { extern int SAMPLE_RATE; step = hz * 1.0 / SAMPLE_RATE; } din-5.2.1/src/play.cc0000644000175100017510000000177512111771577011302 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "play.h" #include using namespace std; play::play (solver *w) { init (); set_wave (w); } void play::init () { get_wave = 0; x = 1; dx = 0; left = right = 0; } play::play () { init (); } din-5.2.1/src/curve.cc0000644000175100017510000001012712111771577011450 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "curve.h" #include "vector2d.h" #include "utils.h" #include "color.h" #include using namespace std; curve::curve () { for (int i = 0; i < 2; ++i) x[i] = y[i] = tx[i] = ty[i] = 0; set_limit (1); } void curve::copy (const curve& s) { if (this != &s) { for (int i = 0; i < 2; ++i) { x[i] = s.x[i]; y[i] = s.y[i]; tx[i] = s.tx[i]; ty[i] = s.ty[i]; } lpts.clear (); for (list::const_iterator p = s.lpts.begin (), q = s.lpts.end (); p != q; ++p) lpts.push_back (*p); vpts.clear (); for (int i = 0, j = s.vpts.size(); i < j; ++i) vpts.push_back (s.vpts[i]); limit2 = s.limit2; eval_state = s.eval_state; } } curve::curve (const curve& s) { copy (s); } curve& curve::operator= (const curve& s) { copy (s); return *this; } curve::curve (float x1, float y1, float x2, float y2, float tx1, float ty1, float tx2, float ty2, float d) { x[0] = x1; x[1] = x2; y[0] = y1; y[1] = y2; tx[0] = tx1; tx[1] = tx2; ty[0] = ty1; ty[1] = ty2; set_limit (d); } void curve::set_limit (float l) { limit2 = l * l; eval_state = EVAL_REQUIRED; } void curve::eval () { /* * generates points of the curve using recursive subdivision * */ lpts.clear (); // clear existing points // add end points to curve lpts.push_back (crvpt (x[0], y[0], 0)); // x0, y0, t0 lpts.push_back (crvpt (x[1], y[1], 1)); // x1, y1, t1 list::iterator i (lpts.begin ()); list::iterator j (++lpts.begin()); // generate other points of the curve crvpt r; while (j != lpts.end()) { // end points crvpt& p = *i; crvpt& q = *j; // mid point of line joining end points float mx = (p.x + q.x) / 2, my = (p.y + q.y) / 2; // T of parametric bezier curve equation float T = (p.t + q.t) / 2; // calculate various co-efficients of the bezier curve float T1 = 1 - T; float T1_2 = T1 * T1; float T1_3 = T1_2 * T1; float T_2 = T * T; float T_3 = T_2 * T; float BP1 = T1_3; float BT1 = 3 * T * T1_2; float BT2 = 3 * T_2 * T1; float BP2 = T_3; // calculate point on the bezier curve float bx = BP1 * x[0] + BT1 * tx[0] + BT2 * tx[1] + BP2 * x[1]; float by = BP1 * y[0] + BT1 * ty[0] + BT2 * ty[1] + BP2 * y[1]; // distance between mid point of line joining end points & point on the bezier curve float d2 = magnitude2 (mx, my, bx, by); if (d2 >= limit2) { // insert point on bezier curve & further subdivide r.x = bx; r.y = by; r.t = T; r.m = 0; r.inf = 0; j = lpts.insert (j, r); // new right hand end point } else { // limit reached. no more inserts // calc slope of left end point float dx = q.x - p.x; if (dx == 0) { p.m = 0; p.inf = 1; // slope is infinite } else { float dy = q.y - p.y; if (dy == 0) { p.m = 0; p.inf = 0; } else { p.m = dy / dx; p.inf = -1; } } i = j; // right end point is now left end point ++j; // new right end point // we find slope of all points except last point (that is OK) } } vpts.clear (); for (list::const_iterator p = lpts.begin (), q = lpts.end (); p != q; ++p) vpts.push_back (*p); eval_state = EVAL_COMPLETE; } din-5.2.1/src/multi_curve.cc0000644000175100017510000002323212111771577012663 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "multi_curve.h" #include "vector2d.h" #include "container.h" #include "random.h" using namespace std; static char eol = '\n'; multi_curve::multi_curve (const string& filename) { load (filename); } multi_curve::multi_curve () { clear (); } void multi_curve::copy (const multi_curve& src) { if (this != &src) { name = src.name; r = src.r; g = src.g; b = src.b; vertices.clear (); left_tangents.clear (); right_tangents.clear (); for (int i = 0, j = src.vertices.size (); i < j; ++i) { vertices.push_back (src.vertices[i]); left_tangents.push_back (src.left_tangents[i]); right_tangents.push_back (src.right_tangents[i]); } curv.clear (); eval.clear (); for (int i = 0, j = src.curv.size (); i < j; ++i) { curv.push_back (src.curv[i]); eval.push_back (src.eval[i]); } resolution = src.resolution; } } multi_curve::multi_curve (const multi_curve& src) { copy (src); } multi_curve& multi_curve::operator= (const multi_curve& src) { copy (src); return *this; } int multi_curve::num_vertices () { return vertices.size (); } void multi_curve::add_vertex (float x, float y) { vertices.push_back (point (x, y)); if (num_vertices() > 1) { curv.push_back (curve()); eval.push_back (1); } } void multi_curve::add_left_tangent (float x, float y) { left_tangents.push_back (point (x, y)); } void multi_curve::add_right_tangent (float x, float y) { right_tangents.push_back (point (x, y)); } void multi_curve::get_vertex (int i, float& x, float& y) { point& v = vertices[i]; x = v.x; y = v.y; } bool multi_curve::set_vertex (int i, float x, float y, int carry_tangents) { point& v = vertices[i]; if ((v.x != x) || (v.y != y)) { float dlx, dly, drx, dry; if (carry_tangents) { point& lt = left_tangents[i]; point& rt = right_tangents[i]; dlx = lt.x - v.x; dly = lt.y - v.y; drx = rt.x - v.x; dry = rt.y - v.y; lt.x = x + dlx; lt.y = y + dly; rt.x = x + drx; rt.y = y + dry; } v.x = x; v.y = y; eval[i] = 1; eval[max (0, i - 1)] = 1; return true; } else return false; } bool multi_curve::set_left_tangent (int i, float x, float y) { point& lt = left_tangents [i]; if ((lt.x != x) || (lt.y != y)) { lt.x = x; lt.y = y; int j = i - 1; if (j > -1) eval[j] = 1; return true; } else return false; } bool multi_curve::set_right_tangent (int i, float x, float y) { point& rt = right_tangents[i]; if ((rt.x != x) || (rt.y != y)) { rt.x = x; rt.y = y; if (i < (int)eval.size()) eval[i] = 1; return true; } else return false; } void multi_curve::get_left_tangent (int i, float& x, float& y) { point& lt = left_tangents [i]; x = lt.x; y = lt.y; } void multi_curve::get_right_tangent (int i, float& x, float& y) { point& rt = right_tangents[i]; x = rt.x; y = rt.y; } bool multi_curve::insert (float x, float y, float tx, float ty) { points_array::iterator vter = ++vertices.begin (), lter = ++left_tangents.begin (), rter = ++right_tangents.begin (); vector::iterator eter = eval.begin (); vector::iterator cter = curv.begin (); for (int i = 0, j = vertices.size() - 1; i < j; ++i, ++vter, ++lter, ++rter, ++eter, ++cter) { point& lt = vertices[i]; point& rt = vertices[i + 1]; if ((x >= lt.x) && (x <= rt.x)) { float ltx, lty; unit_vector (ltx, lty, x, y, lt.x, lt.y); float rtx, rty; unit_vector (rtx, rty, x, y, rt.x, rt.y); vertices.insert (vter, point(x, y)); left_tangents.insert (lter, point (x + tx * ltx, y + ty * lty)); right_tangents.insert (rter, point (x + tx * rtx, y + ty * rty)); curv.insert (cter, curve()); eval[i] = 1; eval.insert (eter, 1); return true; } } return false; } bool multi_curve::remove (int i) { // remove ith vertex and its tangents if (vertices.size () < 3) return false; erase (vertices, i); erase (left_tangents, i); erase (right_tangents, i); if (i == (int) eval.size()) { int j = i - 1; erase (eval, j); erase (curv, j); } else { erase (eval, i); erase (curv, i); if (--i > -1) eval[i] = 1; } return true; } void multi_curve::set_resolution (float d) { resolution = d; force_eval (); } void multi_curve::force_eval () { for (int i = 0, j = eval.size(); i < j; ++i) eval[i] = 1; } float multi_curve::get_resolution () { return resolution; } void multi_curve::set_color () { static const float base = 0.1; static rnd rd (base, 1. - base); r = rd (); g = rd (); b = rd (); } void multi_curve::set_color (float rr, float gg, float bb) { r = rr; g = gg; b = bb; } void multi_curve::evaluate () { for (int i = 0, last = eval.size(); i < last; ++i) { curve& crv = curv[i]; if (eval[i]) { int j = i + 1; point& v0 = vertices[i]; point& v1 = vertices[j]; point& rt0 = right_tangents[i]; point& lt1 = left_tangents[j]; crv.vertex (0, v0.x, v0.y); crv.vertex (1, v1.x, v1.y); crv.tangent (0, rt0.x, rt0.y); crv.tangent (1, lt1.x, lt1.y); crv.set_limit (resolution); crv.eval (); eval[i] = 0; } } } void multi_curve::clear (int all) { if (all) { name = "noname"; r = g = b = 1.0; } vertices.clear (); left_tangents.clear (); right_tangents.clear (); eval.clear (); curv.clear (); resolution = 0.0005; } void multi_curve::load (const string& filename) { extern string dotdin; ifstream file ((dotdin + filename).c_str (), ios::in); if (!file) return; load (file); } void multi_curve::load (ifstream& file) { clear (); string ignore; file >> ignore >> name; int nvertices; file >> ignore >> nvertices; for (int i = 0; i < nvertices; ++i) { float x, y; file >> ignore >> x >> y; add_vertex (x, y); file >> ignore >> x >> y; add_left_tangent (x, y); file >> ignore >> x >> y; add_right_tangent (x, y); } file >> ignore >> resolution; file >> ignore >> r >> g >> b; evaluate (); } void multi_curve::save (const string& filename) { extern string dotdin; ofstream file ((dotdin + filename).c_str (), ios::out); if (!file) return; save (file); } void multi_curve::save (ofstream& file) { string ignore; file << "name " << name << eol; int nvertices = num_vertices (); file << "num_vertices " << nvertices << eol; for (int i = 0; i < nvertices; ++i) { point& v = vertices[i]; point& lt = left_tangents[i]; point& rt = right_tangents[i]; file << "vertex " << v.x << ' ' << v.y << eol; file << "left_tangent " << lt.x << ' ' << lt.y << eol; file << "right_tangent " << rt.x << ' ' << rt.y << eol; } file << "curve_resolution " << resolution << eol; file << "color " << r << ' ' << g << ' ' << b << eol; } void create_polyline (multi_curve& crv, const points_array& pts) { int npts = pts.size (); if (npts < 2) return; crv.clear (0); for (int i = 0; i < npts; ++i) { float xi = pts[i].x, yi = pts[i].y; crv.add_vertex (xi, yi); crv.add_left_tangent (xi, yi); crv.add_right_tangent (xi, yi); } crv.evaluate (); } void convert2_polyline (multi_curve& crv) { for (int i = 0, j = crv.vertices.size(); i < j; ++i) { point& v = crv.vertices[i]; crv.set_left_tangent (i, v.x, v.y); crv.set_right_tangent (i, v.x, v.y); } crv.evaluate (); } void convert2_catmull_rom (multi_curve& crv, float tangent_size) { int npts = crv.num_vertices (); if (npts < 2) return; int last = npts - 1; point& p0 = crv.vertices[0]; point& p1 = crv.vertices[1]; point& pl = crv.vertices[last]; point& pl1 = crv.vertices[last-1]; // set tangents for 1st vertex float dx, dy; direction (dx, dy, p0.x, p0.y, p1.x, p1.y); float tx = tangent_size * dx, ty = tangent_size * dy; crv.set_left_tangent (0, p0.x - tx, p0.y - ty); crv.set_right_tangent (0, p0.x + tx, p0.y + ty); // set tangents for last vertex direction (dx, dy, pl.x, pl.y, pl1.x, pl1.y); tx = tangent_size * dx; ty = tangent_size * dy; crv.set_left_tangent (last, pl.x + tx, pl.y + ty); crv.set_right_tangent (last, pl.x - tx, pl.y - ty); // set left, right tangent for inbetween vertices for (int i = 1; i < last; ++i) { int l = i - 1, r = i + 1; point& pi = crv.vertices[i]; point& pl = crv.vertices[l]; point& pr = crv.vertices[r]; direction (dx, dy, pl.x, pl.y, pr.x, pr.y); crv.set_left_tangent (i, pi.x - tangent_size * dx, pi.y - tangent_size * dy); crv.set_right_tangent (i, pi.x + tangent_size * dx, pi.y + tangent_size * dy); } crv.evaluate (); } multi_curve* check_list (multi_curve** lst, int n, const string& name) { for (int m = 0; m < n; ++m) if (lst[m]->name == name) return lst[m]; return 0; } din-5.2.1/src/solver.cc0000644000175100017510000001130512111771577011635 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "solver.h" #include "multi_curve.h" #include "random.h" #include "curve_editor.h" #include "console.h" extern console cons; #include using namespace std; void solver::init () { mcrv = 0; icurv = ncurvs = 0; iseg = 0; firstx = firsty = 0; lastx = lasty = 0; startx = starty = 0; endx = endy = 0; result = 0; } solver::solver () { init (); } solver::solver (multi_curve* c) { init (); operator() (c); } void solver::operator() (multi_curve* c) { mcrv = c; update (); } void solver::update () { // curve valid? vector& curv = mcrv->curv; ncurvs = curv.size (); last_curv = ncurvs - 1; if (icurv > last_curv) icurv = 0; // segment valid? vector& vpts = curv[icurv].vpts; int nsegs = vpts.size() - 1; if (iseg >= nsegs) iseg = 0; setseg (icurv, iseg); // first point vector& fpts = curv[0].vpts; firstx = fpts[0].x; firsty = fpts[0].y; // last point vector& lpts = curv[last_curv].vpts; int last_point = lpts.size () - 1; lastx = lpts[last_point].x; lasty = lpts[last_point].y; } // solves y for x float solver::operator() (float x) { if (x < startx) { if (!searchleft (x)) { result = firsty; return result; } } else if (x > endx) { if (!searchright (x)) { result = lasty; return result; } } result = ycomp + m * x; return result; } float solver::operator() (float& x, float& dx, xhandler& xmin, xhandler& xmax) { if (x < startx) { if (!searchleft (x)) xmin (*this, x, dx); } else if (x > endx) { if (!searchright (x)) xmax (*this, x, dx); } float result = ycomp + m * x; x += dx; return result; } // solves y for x with modulation of x void solver::operator() (float& x, float& dx, int q, float* mod, float* y, xhandler& xmin, xhandler& xmax) { for (int p = 0; p < q; ++p) { x += (mod[p] + dx); if (x < startx) { if (!searchleft (x)) xmin (*this, x, dx); } else if (x > endx) { if (!searchright (x)) xmax (*this, x, dx); } y[p] = ycomp + m * x; } } // solves y for x void solver::operator() (float& x, float& dx, int q, float* y, xhandler& xmin, xhandler& xmax) { for (int p = 0; p < q; ++p) { x += dx; if (x < startx) { if (!searchleft (x)) xmin (*this, x, dx); } else if (x > endx) { if (!searchright (x)) xmax (*this, x, dx); } y[p] = ycomp + m * x; } } // solves array of x. stores solution ie y in the same array at corresponding location void solver::operator() (float* ax, int q, xhandler& xmin, xhandler& xmax) { float x, dx = 0; for (int p = 0; p < q; ++p) { x = ax[p]; if (x < startx) { if (!searchleft (x)) xmin (*this, x, dx); } else if (x > endx) { if (!searchright (x)) xmax (*this, x, dx); } ax[p] = ycomp + m * x; } } void atmin::operator() (solver& s, float& x, float& dx) { x = s.firstx; s.setseg (0, 0); } void atmax::operator () (solver& s, float& x, float& dx) { x = s.lastx; s.setseg (s.last_curv, s.lastseg (s.last_curv)); } gotog::gotog (float gg, curve_editor* e) : ed (e) { set (gg); } void gotog::set (float gg) { g = gg; ed->update_sustain (g); } void gotog::operator () (solver& s, float& x, float& dx) { x = g; if (!s.findseg (x)) { x = s.lastx; set (x); } } void tomin::operator() (solver& s, float& x, float& dx) { x -= s.lastx; if (!s.inseg (x, 0, 0)) if (!s.searchright(x)) if (!s.searchleft (x)) { x = s.firstx; s.setseg (0, 0); } } void loopmin::operator() (solver& s, float& x, float& dx) { atmin::operator() (s, x, dx); if (dx < 0) dx = -dx; } void loopmax::operator() (solver& s, float& x, float& dx) { tomin::operator() (s, x, dx); if (dx < 0) dx = -dx; } void pongmax::operator () (solver& s, float& x, float& dx) { atmax::operator() (s, x, dx); if (dx > 0) dx = -dx; } void pongmin::operator () (solver& s, float& x, float& dx) { atmin::operator() (s, x, dx); if (dx < 0) dx = -dx; } din-5.2.1/src/curve_library.cc0000644000175100017510000000725012115072562013167 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "curve_library.h" #include "curve_editor.h" #include "console.h" #include "utils.h" #include "ansi_color_codes.h" #include "solver.h" #include using namespace std; extern console cons; extern gotog _gotog; void curve_library::load (const string& fname) { extern string dotdin; ifstream inf ((dotdin + fname).c_str(), ios::in); if (inf) { string ignore; int ncurves; inf >> ignore >> ncurves; for (int i = 0; i < ncurves; ++i) { multi_curve m; m.load (inf); curves.push_back (m); if (has_sustain) { float sus; inf >> ignore >> sus; sustains.push_back (sus); } } cout << PASS << "<<< loaded " << ncurves << " curves from: " << fname << " >>>" << ENDL; } cur = 0; } curve_library::curve_library (const string& fname, int hs) { filename = fname; cur = 0; has_sustain = hs; load (filename); } curve_library::~curve_library () { save (); } void curve_library::add (const multi_curve& m) { curves.push_back (m); if (has_sustain) sustains.push_back (_gotog.g); cons << "added curve " << num_curves() - 1 << eol; } void curve_library::del () { curves.erase (curves.begin() + cur); if (has_sustain) sustains.erase (sustains.begin() + cur); clamp (0, cur, curves.size () - 1); cons << "erased curve " << cur << eol; } void curve_library::replace (const multi_curve& m) { curves[cur] = m; if (has_sustain) sustains[cur] = _gotog.g; cons << "replaced curve " << cur << eol; } void curve_library::insert (const multi_curve& m) { curves.insert (curves.begin() + cur, m); if (has_sustain) sustains.insert (sustains.begin() + cur, _gotog.g); cons << "inserted curve " << cur << eol; } const multi_curve& curve_library::prev () { if (--cur < 0) cur = curves.size() - 1; if (has_sustain) _gotog.set (sustains[cur]); cons << "loaded curve: " << curves[cur].name << " [" << cur + 1 << '/' << curves.size() << "]" << eol; return curves[cur]; } const multi_curve& curve_library::next () { if (++cur >= (int)curves.size()) cur = 0; if (has_sustain) _gotog.set (sustains[cur]); cons << "loaded curve: " << curves[cur].name << " [" << cur + 1 << '/' << curves.size() << "]" << eol; return curves[cur]; } void curve_library::move (int i) { multi_curve& from = curves [cur]; cons << "move from: " << cur; int j = cur + i; int last = curves.size() - 1; if (j < 0) j = 0; else if (j > last) j = last; multi_curve to = curves[j]; curves[j] = from; from = to; cur = j; if (has_sustain) swap (sustains[cur], sustains[j]); cons << " to: " << cur << eol; } void curve_library::save () { extern string dotdin; ofstream outf ((dotdin + filename).c_str(), ios::out); if (outf) { outf << "num_curves " << num_curves () << endl; for (int i = 0, j = num_curves(); i < j; ++i) { curves[i].save (outf); if (has_sustain) outf << "sustain " << sustains[i] << eol; } } } din-5.2.1/src/basic_editor.cc0000644000175100017510000002137112111771577012756 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include #include #include "key_consts.h" #include "main.h" #include "input.h" #include "font.h" #include "console.h" #include "basic_editor.h" #include "solver.h" using namespace std; extern console cons; basic_editor::basic_editor (const std::string& settingsf, const std::string& helpf) : helptext (helpf) { snap_what = SNAP_NONE; load (settingsf); update_snaps = 1; edit_sustain = 0; lmb_clicked = 0; pan = zoom = 1; } basic_editor::~basic_editor () {} void basic_editor::obj2win (const point& v, float& wx, float& wy) { wx = win_per_obj.x * v.x; wy = win_per_obj.y * v.y; } void basic_editor::obj2win (const float& ox, const float& oy, float& wx, float& wy) { wx = win_per_obj.x * ox; wy = win_per_obj.y * oy; } void basic_editor::win2obj (const float& wx, const float& wy, float& ox, float& oy) { ox = obj_per_win.x * wx; oy = obj_per_win.y * wy; } void basic_editor::load (const std::string& fname) { extern std::string dotdin; ifstream file ((dotdin + fname).c_str (), ios::in); if (!file) return; load (file); } void basic_editor::load (ifstream& file) { std::string ignore; file >> ignore >> id; file >> ignore >> name; float l, b, r, t; file >> ignore >> l >> b >> r >> t; win.set (l, b, r, t); file >> ignore >> win_chunk.x >> win_chunk.y; file >> ignore >> obj_chunk.x >> obj_chunk.y; win_per_obj (win_chunk.x / obj_chunk.x, win_chunk.y / obj_chunk.y); obj_per_win (obj_chunk.x / win_chunk.x , obj_chunk.y / win_chunk.y); file >> ignore >> snap_what; update_snaps = 1; file >> ignore >> win_resolution; int dummy1 = 0; float dummy2 = 0; win2obj (win_resolution, dummy1, obj_resolution, dummy2); } void basic_editor::save (ofstream& file) { file << "id " << id << endl; file << "editor " << name << endl; file << "window " << win.left << ' ' << win.bottom << ' ' << win.right << ' ' << win.top << endl; file << "win_chunk " << win_chunk.x << ' ' << win_chunk.y << endl; file << "obj_chunk " << obj_chunk.x << ' ' << obj_chunk.y << endl; file << "snap " << snap_what << endl; file << "win_resolution " << win_resolution << endl; } void basic_editor::calc_win_mouse () { win.update_mouse (); } bool basic_editor::handle_input () { if (id == KB_KB_ATTACK) { extern int lmb; if (lmb) { if (lmb_clicked == 0) { if (edit_sustain) edit_sustain = 0; else if (inbox (susbox, win.mousex, win.mousey)) edit_sustain = 1; lmb_clicked = 1; } } else { if (edit_sustain) { float sx, sy; snap (sx, sy); float cx, cy; win2obj (sx, sy, cx, cy); _gotog.set (cx); } lmb_clicked = 0; } } // mouse capture if (mocap0.state == mocap::capturing) mocap0.add (win.mousex, win.mousey); // movement double pan_rept = window::PAN_REPEAT, zoom_rept = window::ZOOM_REPEAT; if (keypressedd (k_a, pan_rept, pan_rept)) {win.panx (-pan); calc_visual_params ();} else if (keypressedd (k_d, pan_rept, pan_rept)) {win.panx (+pan); calc_visual_params ();} else if (keypressedd (k_w, pan_rept, pan_rept)) {win.pany (+pan); calc_visual_params ();} else if (keypressedd (k_s, pan_rept, pan_rept)) {win.pany (-pan); calc_visual_params ();} else if (keypressedd (k_q, zoom_rept, zoom_rept)) {win.zoom (zoom); calc_visual_params ();} else if (keypressedd (k_e, zoom_rept, zoom_rept)) {win.zoom (-zoom); calc_visual_params ();} // snap else if (keypressed (k_x)) snap_what = SNAP_X; else if (keypressed (k_y)) snap_what = SNAP_Y; else if (keypressed (k_b)) snap_what = SNAP_BOTH; else if (keypressed (k_n)) snap_what = SNAP_NONE; else if (keypressedd (k_f5)) { if (keydown (k_lshift)) set_win_chunk (win_chunk.x, --win_chunk.y); else set_win_chunk (--win_chunk.x, win_chunk.y); } else if (keypressedd (k_f6)) { if (keydown (k_lshift)) set_win_chunk (win_chunk.x, ++win_chunk.y); else set_win_chunk (++win_chunk.x, win_chunk.y); } else if (keypressed (k_f7)) { if (mocap0.state != mocap::capturing) { mocap0.clear (); mocap0.state = mocap::capturing; cons << console::red << "capturing mouse" << eol; } else { mocap0.finish (this); cons << console::green << "mouse captured" << eol; } } return true; } void basic_editor::set_win_chunk (int x, int y) { if (x < 1) x = 1; if (y < 1) y = 1; win_chunk.x = x; win_chunk.y = y; float wx = win_chunk.x / obj_chunk.x, wy = win_chunk.y / obj_chunk.y; win_per_obj (wx, wy); obj_per_win (1./wx, 1./wy); } int basic_editor::is_snapx () { return ((snap_what == SNAP_X) || (snap_what == SNAP_BOTH)); } int basic_editor::is_snapy () { return ((snap_what == SNAP_Y) || (snap_what == SNAP_BOTH)); } void basic_editor::snap (float& x, float& y) { x = win.mousex; y = win.mousey; if (is_snapx()) { float s = win.mousex / win_chunk.x; if (s < 0) s -= 0.5; else s += 0.5; x = (int) s * win_chunk.x; } if (is_snapy()) { float s = win.mousey / win_chunk.y; if (s < 0) s -= 0.5; else s += 0.5; y = (int)s * win_chunk.y; } } void basic_editor::project () { glMatrixMode (GL_MODELVIEW); glPushMatrix (); glLoadIdentity (); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); glOrtho (win.left, win.right, win.bottom, win.top, -1, 1); } void basic_editor::unproject () { glMatrixMode (GL_PROJECTION); glPopMatrix (); glMatrixMode (GL_MODELVIEW); glPopMatrix (); } void basic_editor::draw () { // must always be wrapped by project, unproject // draw_snaps (); } void basic_editor::draw_cursor () { glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); extern viewport view; glOrtho (0, view.xmax, 0, view.ymax, 0, 1); float wx, wy; snap (wx, wy); float cx, cy; win2obj (wx, wy, cx, cy); int vx, vy; win2view (wx, wy, vx, vy, win, view); glColor3f (1, 1, 1); sprintf (buf, " %.3f, %.3f", cx, cy); draw_string (buf, vx, vy); if (edit_sustain) { vy -= get_line_height (); extern gotog _gotog; sprintf (buf, " sustain @ %.3f", _gotog.g); draw_string (buf, vx, vy); } glPopMatrix (); glColor3f (0.4, 0.4, 0.4); glBegin (GL_LINE_STRIP); glVertex2f (win.left, wy); glVertex2f (wx, wy); glVertex2f (wx, win.bottom); glEnd (); } void basic_editor::draw_snaps () { // // draw snap lines // static const float sr = 0.1, sg = sr, sb = sg; // snap color glColor3f (sr, sg, sb); int l, r, b, t; if (update_snaps) { if (is_snapx()) { l = (int)(win.left / win_chunk.x); startx = l * win_chunk.x; r = (int)(win.right / win_chunk.x); endx = r * win_chunk.x; xlines.clear (); nxpts = 0; while (startx <= endx) { xlines.push_back (startx); xlines.push_back (win.bottom); xlines.push_back (startx); xlines.push_back (win.top); startx += win_chunk.x; nxpts += 2; } update_snaps = 0; } if (is_snapy ()) { b = (int)(win.bottom / win_chunk.y); starty = b * win_chunk.y; t = (int)(win.top / win_chunk.y); endy = t * win_chunk.y; ylines.clear (); nypts = 0; while (starty <= endy) { ylines.push_back (win.left); ylines.push_back (starty); ylines.push_back (win.right); ylines.push_back (starty); starty += win_chunk.y; nypts += 2; } } } glEnableClientState (GL_VERTEX_ARRAY); if (is_snapx()) { // lines along y glVertexPointer (2, GL_INT, 0, xlines.data ()); glDrawArrays (GL_LINES, 0, nxpts); } if (is_snapy()) { // lines along x glVertexPointer (2, GL_INT, 0, ylines.data ()); glDrawArrays (GL_LINES, 0, nypts); } glDisableClientState (GL_VERTEX_ARRAY); } void basic_editor::calc_visual_params () { if (id == KB_KB_ATTACK) susbox (susx - win.handle_radius, win.top - win.sus_handle_radius, susx + win.handle_radius, win.top); tb.refresh (this); update_snaps = 1; } void basic_editor::update_sustain (float f) { float ox = f, oy = 0; obj2win (ox, oy, susx, susy); calc_visual_params (); } din-5.2.1/src/curve_editor.cc0000644000175100017510000007644512114521143013016 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "input.h" #include "curve_editor.h" #include "curve_library.h" #include "console.h" #include "font.h" #include "utils.h" #include "random.h" #include "sine_mixer.h" #include "beat2value.h" #include "vector2d.h" #include "key_consts.h" #include "ansi_color_codes.h" #include "fft.h" #include "din.h" #include using namespace std; extern console cons; extern sine_mixer sinemixer; extern fft fft0; extern int lmb, rmb; console& operator<< (console& c, const hit_t& h) { const std::string what [] = {" nothing", " vertex", " L-tangent", " R-tangent"}; c << h.crv->name << what[h.what] << ' ' << h.id; return c; } curve_editor::curve_editor (const std::string& settingsf, const std::string& helpf) : helptext (helpf) { curcrv = 0; use_existing_hit = false; hlid = 0; todo = DO_NOTHING; is_waveform_editor = sine_enabled = fft_enabled = samples_enabled = 0; load (settingsf); overlay = 0; } curve_editor::~curve_editor () { save (); } void curve_editor::load (const std::string& fname) { // load settings from file extern std::string dotdin; std::string feditor = dotdin + fname; ifstream file (feditor.c_str (), ios::in); if (!file) { cout << FAIL << "!!! cannot open curve editor settings from: " << fname << " !!!" << ENDL; return; } else cout << LOAD << "<<< loading curve editor settings from: " << feditor; settings_filename = fname; std::string ignore; basic_editor::load (file); int ct; file >> ignore >> ct; carry_tangents = (bool) ct; int mt; file >> ignore >> mt; mirror_tangents = (bool) mt; file >> ignore >> sine_enabled; file >> ignore >> labelvertex; tb.load (file); file >> ignore >> fft_enabled; file >> ignore >> samples_enabled; file >> ignore >> hz >> ignore >> nperiods; if (hz <= 0) hz = 440; if (nperiods <= 0) nperiods = 2; cs.set (hz, nperiods); file >> ignore >> is_waveform_editor; cout << ", done >>>" << ENDL; } void curve_editor::save () { // save settings to file extern std::string dotdin; ofstream file ((dotdin + settings_filename).c_str(), ios::out); if (!file) { cout << "cannot save " << settings_filename << endl; return; } basic_editor::save (file); file << "carry_tangents " << carry_tangents << eol; file << "mirror_tangents " << mirror_tangents << eol; file << "sine_enabled " << sine_enabled << eol; file << "label_vertex " << labelvertex << eol; tb.save (file); file << "fft_enabled " << fft_enabled << eol; file << "samples_enabled " << samples_enabled << eol; file << "hz " << hz << eol; file << "nperiods " << nperiods << eol; file << "is_waveform_editor " << is_waveform_editor << eol; } bool curve_editor::handle_input () { basic_editor::handle_input (); // pan, zoom, snap etc if (keypressed (k_f)) { // move vertex/tangent if (todo) { todo = DO_NOTHING; clear_hit (mov); return true; } else { mov = hittest (); if (mov()) { undos.push_back (undo_t (mov.crv_id, *mov.crv, win)); curveinfo[mov.crv_id].lisner->selected (mov.crv_id); cons << console::green << "moving " << mov; if (keydown (k_lshift)) { todo = MOVE_ALL; cons << console::green << " and beyond"; } else todo = MOVE_PICKED; cons << eol; return true; } } } else { switch (todo) { case DO_NOTHING: break; case MOVE_PICKED: move (); return true; case MOVE_ALL: move (1); return true; } } // sine harmonic composer if (sine_enabled) if (sinemixer.handle_input ()) return true; if (fft_enabled) if (fft0.lev.handle_input() ) return true; if (library) { if (library->num_curves ()) { if (keypressedd (k_9)) { load_curve (-1); return true; } else if (keypressedd (k_0)) { load_curve (+1); return true; } else if (keypressed (k_minus)) { library->del (); return true; } } if (keypressed (k_equals)) { add_curve (); return true; } } if (keypressed (k_v)) { if (keydown (k_lctrl)) { // l_ctrl + v ie paste pik = hittest (); paste (pik); } else { // just v ; delete vertex/tanget del = hittest (); if (del()) { remove (); clear_hit (del); } } } else if (keypressed (k_i)) { // i to pick, i again to insert if (num_curves () == 1) { if (!ins()) ins = hit_t (curveinfo[0].curve, 0); insert (); clear_hit (ins); } else { if (!ins()) { ins = hittest(); if (ins()) cons << "press i again to insert vertex" << eol; else cons << console::red << "press i on a diamond to insert on that curve" << eol; } else { insert (); clear_hit (ins); } } } else if (keypressedd (k_z) && !mov()) { // undo & redo if (keydown (k_lshift)) // l_shift + z - redo dodo (redos, undos, "no more redos."); else dodo (undos, redos, "no more undos."); // just z, undo } else if (keypressedd (k_space) && sine_enabled) sine2curve (); // take sine from sine_mixer and make curve else if (keypressed (k_r)) { // create hit list, pick the top use_existing_hit = false; hittest (); if (pik()) { pick (pik.crv_id); use_existing_hit = true; cons << console::green << "picked " << pik << " [" << hlid+1 << '/' << hitlist.size() << ']' << eol; } } else if (keypressed (k_left)) { // browse hit list int n = hitlist.size (); if (n) { int l = n - 1; if (--hlid < 0) hlid = l; pik = hitlist[hlid]; calc_hit_params (pik); curveinfo [pik.crv_id].lisner->selected (pik.crv_id); use_existing_hit = true; cons << console::green << "picked " << pik << " [" << hlid+1 << '/' << hitlist.size() << ']' << eol; } } else if (keypressed (k_right)) { // browse hit list int n = hitlist.size(); if (n) { int l = n - 1; if (++hlid > l) hlid = 0; pik = hitlist[hlid]; calc_hit_params (pik); curveinfo [pik.crv_id].lisner->selected (pik.crv_id); use_existing_hit = true; cons << console::green << "picked " << pik << " [" << hlid+1 << '/' << hitlist.size() << ']' << eol; } } else if (keypressedd (k_t)) { // mirror about x mir = hittest (); if (mir()) { if (keydown (k_lshift)) mirror (1); // whole curve else mirror (); // only hit vertex clear_hit (mir); } } else if (keypressed (k_l)) { hit_t hit = hittest (); if (hit ()) { // turn hit curve into polyline by folding tangents into vertex // still bezier curve but looks like a polyline ie l_shift + k to go back to bezier curve // curve_info& ci = curveinfo [hit.crv_id]; multi_curve& crv = *ci.curve; undos.push_back (undo_t (hit.crv_id, crv, win)); if (keydown (k_lshift)) { // l_shift + l ie fold tangents of hit vertex only float vx, vy; crv.get_vertex (hit.id, vx, vy); crv.set_left_tangent (hit.id, vx, vy); crv.set_right_tangent (hit.id, vx, vy); crv.evaluate (); } else convert2_polyline (crv); ci.lisner->edited (this, hit.crv_id); } else labelvertex = !labelvertex; // no curve hit so turn on the labelling of vertices } else if (keypressed (k_k)) { hit_t hit = hittest (); if (hit()) { curve_info& ci = curveinfo [hit.crv_id]; multi_curve& crv = *ci.curve; undos.push_back (undo_t (hit.crv_id, crv, win)); const point& obj = get_obj_chunk (); if (keydown (k_lshift)) { // unfurl tangents of hit vertex float vx, vy; crv.get_vertex (hit.id, vx, vy); crv.set_left_tangent (hit.id, vx - obj.x, vy); crv.set_right_tangent (hit.id, vx + obj.x, vy); crv.evaluate (); } else convert2_catmull_rom (crv, max (obj.x, obj.y)); // turn bezier curve into 'catmull-rom' spline; still a bezier curve ci.lisner->edited (this, hit.crv_id); } } else if (keypressed (k_m)) { // mirror tangents ie move one tangent and the other mirrors it mirror_tangents = !mirror_tangents; if (mirror_tangents) cons << console::yellow << "tangents are mirrored." << eol; else cons << console::yellow << "tangents are not mirrored." << eol; } else if (keypressedd (k_left_bracket)) { // decrease curve resolution hit_t hit = hittest (); if (hit()) { resolution (hit.crv_id, +1); } } else if (keypressedd (k_right_bracket)) { // increase currve resolution hit_t hit = hittest (); if (hit()) { resolution (hit.crv_id, -1); } } else if (keypressedd (k_quote)) { // decrease num sine samples sine_mixer::set_sine_samples (sine_mixer::NUM_SINE_SAMPLES - 1); } else if (keypressedd (k_hash)) { // increase num sine samples sine_mixer::set_sine_samples (sine_mixer::NUM_SINE_SAMPLES + 1); } else if (keypressed (k_g)) { // draw scratch curve if (num_curves () == 1) { if (!rep()) { rep = hit_t (curveinfo[0].curve, 0); clear_scratch_curve (); cons << console::yellow << "g to add vertex, h to complete or abort" << eol; } show_scratch_curve = true; float sx, sy; snap (sx, sy); win_scratch_points.push_back (point (sx, sy)); float curvx, curvy; win2obj (sx, sy, curvx, curvy); curv_scratch_points.push_back (point(curvx, curvy)); } else { if (rep()) { show_scratch_curve = true; float sx, sy; snap (sx, sy); win_scratch_points.push_back (point (sx, sy)); float curvx, curvy; win2obj (sx, sy, curvx, curvy); curv_scratch_points.push_back (point(curvx, curvy)); } else { rep = hittest (); if (rep()) { clear_scratch_curve (); cons << console::yellow << "g to add vertex, h to complete or abort" << eol; } } } } else if (keypressed (k_h)) { // complete scratch curve if (rep()) { replace (); clear_hit (rep); show_scratch_curve = false; } } else if (keypressed (k_c)) { if (keydown (k_lctrl)) { // l_ctrl + c - copy curve hit_t hit = hittest (); if (hit()) { copy = *get_curve(hit.crv_id); cons << console::green << "copied curve." << eol; } } else { // carry tangents? carry_tangents = !carry_tangents; if (carry_tangents) cons << console::yellow << "vertices carry their tangents." << eol; else cons << console::yellow << "vertices desert their tangents" << eol; } } else if (keypressedd (k_semicolon)) { // change curve color hit_t hit = hittest (); if (hit()) get_curve(hit.crv_id)->set_color (); } else if (keypressed (k_comma)) { // toggle sine composer if (is_waveform_editor) sine_enabled = !sine_enabled; } else if (keypressed (k_period)) { // toggle FFT display if (is_waveform_editor) { fft_enabled = !fft_enabled; if (fft_enabled) { if (num_curves()) fft0.go (curveinfo[0].curve); } } } else if (keypressed (k_slash)) { // toggle samples display if (is_waveform_editor) { samples_enabled = !samples_enabled; if (samples_enabled) { if (num_curves()) cs.render (curveinfo[0].curve); } } } else if (keypressed (k_ralt)) { // mark curve segments hit_t hit = hittest (); if (hit()) { curve_info& ci = curveinfo [hit.crv_id]; ci.mark_segments = !ci.mark_segments; } } else if (keypressed (k_f8)) { // apply mouse capture hit_t hit = hittest (); if (mocap0() && hit()) { undos.push_back (undo_t (hit.crv_id, *get_curve(hit.crv_id), win)); macros.push_back (mouse_macro (mocap0, hit)); cons << console::green << "assigned mouse capture to " << hit << eol; } } else if (keydown (k_f9)) { // remove mouse capture hit_t hit = hittest (); if (hit()) { for (vector::iterator i = macros.begin(), j = macros.end(); i != j; ++i) { mouse_macro& m = *i; if (hit == m.hit) { macros.erase (i); cons << "detached mouse capture from " << hit << eol; break; } } } } else if (keypressed (k_o)) { // toggle overlay of current din instrument overlay = !overlay; if (overlay) cons << console::green << "Overlay is ON" << eol; else cons << console::red << "Overlay is OFF" << eol; } else if (keypressed (k_f1)) helptext(); // show help return true; } void curve_editor::sine2curve () { int cid = 0; if (pik()) cid = pik.crv_id; extern sine_mixer sinemixer; curve_info& ci = curveinfo[cid]; multi_curve& crv = *ci.curve; undos.push_back (undo_t (cid, crv, win)); sinemixer.make_curve (crv); ci.lisner->edited (this, cid); } void curve_editor::apply_mocap () { float dx, dy; for (int i = 0, j = macros.size(); i < j; ++i) { mouse_macro& m = macros[i]; hit_t& h = m.hit; m.mo.get (dx, dy); move (h, dx, dy); } } void curve_editor::pick (int i) { int ncurves = curveinfo.size (); if (i > -1 && i < ncurves) { curve_info& ci = curveinfo[i]; ci.lisner->selected (i); } } void curve_editor::calc_hit_params (hit_t& hit) { if (!hit()) return; multi_curve* crv = get_curve(hit.crv_id); float vx, vy, lx, ly, rx, ry; int id = hit.id; crv->get_vertex (id, vx, vy); crv->get_left_tangent (id, lx, ly); crv->get_right_tangent (id, rx, ry); direction (hit.left_tangent.x, hit.left_tangent.y, vx, vy, lx, ly); direction (hit.right_tangent.x, hit.right_tangent.y, vx, vy, rx, ry); hit.left_tangent_magnitude = magnitude (hit.left_tangent.x, hit.left_tangent.y); hit.right_tangent_magnitude = magnitude (hit.right_tangent.x, hit.right_tangent.y); } void curve_editor::hittest (multi_curve* crv, int crv_id, const points_array& points, unsigned int what) { for (int i = 0, j = points.size (); i < j; ++i) { const point& v = points[i]; float vdx, vdy; obj2win (v, vdx, vdy); float d2 = distance2 (vdx, vdy, win.mousex, win.mousey); if (d2 <= win.handle_radius2) hitlist.push_back (hit_t (crv, crv_id, what, i)); } } hit_t curve_editor::hittest () { hit_t hit; if (use_existing_hit) { use_existing_hit = false; return pik; } else { hitlist.clear (); hlid = 0; } for (int i = 0, j = curveinfo.size (); i < j; ++i) { curve_info& ci = curveinfo[i]; if (ci.disabled == false) { multi_curve* crv = ci.curve; hittest (crv, i, crv->vertices, hit_t::VERTEX); hittest (crv, i, crv->left_tangents, hit_t::LEFT_TANGENT); hittest (crv, i, crv->right_tangents, hit_t::RIGHT_TANGENT); } } int n = hitlist.size(); if (n) { pik = hitlist[0]; calc_hit_params (pik); } else pik = hit_t (); return pik; } bool curve_editor::move (hit_t& hit, float x, float y) { curve_info& ci = curveinfo [hit.crv_id]; multi_curve* crv = ci.curve; bool need_eval = false; switch (hit.what) { case hit_t::VERTEX: need_eval = crv->set_vertex (hit.id, x, y); if (carry_tangents && need_eval) { crv->set_left_tangent (hit.id, x + hit.left_tangent.x, y + hit.left_tangent.y); crv->set_right_tangent (hit.id, x + hit.right_tangent.x, y + hit.right_tangent.y); } break; case hit_t::LEFT_TANGENT: need_eval = crv->set_left_tangent (hit.id, x, y); if (mirror_tangents && need_eval) { float vx, vy, lvx, lvy; crv->get_vertex (hit.id, vx, vy); unit_vector (lvx, lvy, vx, vy, x, y); crv->set_right_tangent (hit.id, vx - hit.right_tangent_magnitude * lvx, vy - hit.right_tangent_magnitude * lvy); } break; case hit_t::RIGHT_TANGENT: need_eval = crv->set_right_tangent (hit.id, x, y); if (mirror_tangents && need_eval) { float vx, vy, rvx, rvy; crv->get_vertex (hit.id, vx, vy); unit_vector (rvx, rvy, vx, vy, x, y); crv->set_left_tangent (hit.id, vx - hit.left_tangent_magnitude * rvx, vy - hit.left_tangent_magnitude * rvy); } break; } if (need_eval) { crv->evaluate(); ci.lisner->edited (this, hit.crv_id); } return need_eval; } bool curve_editor::move () { float sx, sy; snap (sx, sy); float cx, cy; win2obj (sx, sy, cx, cy); return move (mov, cx, cy); } bool curve_editor::move (int) { float sx, sy; snap (sx, sy); float cx, cy; win2obj (sx, sy, cx, cy); curve_info& ci = curveinfo [mov.crv_id]; multi_curve* crv = ci.curve; float vx, vy; float dx, dy; switch (mov.what) { case hit_t::VERTEX: crv->get_vertex (mov.id, vx, vy); break; case hit_t::LEFT_TANGENT: crv->get_left_tangent (mov.id, vx, vy); break; case hit_t::RIGHT_TANGENT: crv->get_right_tangent (mov.id, vx, vy); break; } dx = cx - vx; dy = cy - vy; bool result = false; for (int i = mov.id, j = crv->num_vertices (); i < j; ++i) { crv->get_vertex (i, vx, vy); result |= crv->set_vertex (i, vx + dx, vy + dy); crv->get_left_tangent (i, vx, vy); result |= crv->set_left_tangent (i, vx + dx, vy + dy); crv->get_right_tangent (i, vx, vy); result |= crv->set_right_tangent (i, vx + dx, vy + dy); } if (result) { crv->evaluate(); ci.lisner->edited (this, mov.crv_id); } return result; } void curve_editor::remove () { curve_info& ci = curveinfo [del.crv_id]; multi_curve* crv = ci.curve; undos.push_back (undo_t (del.crv_id, *crv, win)); if (crv->remove (del.id)) { crv->evaluate(); ci.lisner->edited (this, del.crv_id); } else { cons << console::red << "cant delete curve: " << crv->name << eol; undos.pop_back (); } } void curve_editor::insert () { float sx, sy; snap (sx, sy); float cx, cy; win2obj (sx, sy, cx, cy); curve_info& ci = curveinfo [ins.crv_id]; multi_curve* crv = ci.curve; undos.push_back (undo_t (ins.crv_id, *crv, win)); const point& obj = get_obj_chunk (); if (crv->insert (cx, cy, obj.x, obj.y)) { crv->evaluate(); ci.lisner->edited (this, ins.crv_id); } else undos.pop_back (); } void curve_editor::replace () { if (curv_scratch_points.size () > 1) { curve_info& ci = curveinfo [rep.crv_id]; multi_curve& crv = *ci.curve; undos.push_back (undo_t (rep.crv_id, crv, win)); create_polyline (crv, curv_scratch_points); const point& obj = get_obj_chunk (); convert2_catmull_rom (crv, max (obj.x, obj.y)); ci.lisner->edited (this, rep.crv_id); cons << console::green << "applied scratch curve." << eol; } else cons << console::red << "aborted scratch curve" << eol; } void curve_editor::mirror (int whole_curve) { // mirrors vertex (or curve) about horizontal - useful when editing waveforms curve_info& ci = curveinfo [mir.crv_id]; multi_curve* crv = ci.curve; undos.push_back (undo_t (mir.crv_id, *crv, win)); float xx, yy; if (whole_curve) { int num_vertices = crv->num_vertices (); for (int i = 0; i < num_vertices; ++i) { crv->get_vertex (i, xx, yy); crv->set_vertex (i, xx, -yy); crv->get_left_tangent (i, xx, yy); crv->set_left_tangent (i, xx, -yy); crv->get_right_tangent (i, xx, yy); crv->set_right_tangent (i, xx, -yy); } crv->evaluate(); ci.lisner->edited (this, mir.crv_id); } else { switch (mir.what) { case hit_t::VERTEX: crv->get_vertex (mir.id, xx, yy); break; case hit_t::LEFT_TANGENT: crv->get_left_tangent (mir.id, xx, yy); break; case hit_t::RIGHT_TANGENT: crv->get_right_tangent (mir.id, xx, yy); break; } move (mir, xx, -yy); } } void curve_editor::resolution (int i, int dir) { curve_info& ci = curveinfo [i]; multi_curve* crv = ci.curve; float res = crv->get_resolution(); float newres = res + dir * get_obj_resolution (); if (newres > 0) { crv->set_resolution (newres); crv->evaluate(); ci.lisner->edited (this, i); } } void curve_editor::draw () { project (); draw_common (); draw_all (); if (sine_enabled) { draw_sine (); sinemixer.draw (); } if (fft_enabled) { extern fft fft0; fft0.lev.draw (); } unproject (); if (overlay) { extern din din0; din0.draw (); } } void curve_editor::draw_sine () { extern sine_mixer sinemixer; int n = sinemixer.norm.size (); float ox = 0, oy = 0, dx = 1. / (n - 1); glColor3f (0, 0, 1); glBegin (GL_LINE_STRIP); float wx, wy; for (int i = 0; i < n; ++i) { oy = sinemixer.norm[i]; obj2win (ox, oy, wx, wy); glVertex2f (wx, wy); ox += dx; } glEnd (); } void curve_editor::draw_common () { basic_editor::draw (); mark_curve_segments (); if (show_scratch_curve) draw_scratch_curve (); selector.draw (); } void curve_editor::draw_scratch_curve () { glColor3f (1, 1, 0.7); glBegin (GL_LINE_STRIP); float x, y; snap (x, y); for (int i = 0, j = win_scratch_points.size (); i < j; ++i) { const point& p = win_scratch_points[i]; x = p.x; y = p.y; glVertex2f (x, y); } glVertex2f (x, y); float sx, sy; snap (sx, sy); glVertex2f (sx, sy); glEnd (); } void curve_editor::draw_all () { // draw labels tb.draw (); tb.clear (); // draw curve profile, vertices, tangents and handles for (int i = 0, j = curveinfo.size(); i < j; ++i) { curve_info& ci = curveinfo[i]; multi_curve* crv = ci.curve; if (ci.disabled) { glColor3f (0.2, 0.2, 0.2); draw_curve (crv); draw_vertices (crv); } else { glColor3f (crv->r, crv->g, crv->b); if ((i == pik.crv_id) && (j > 1)) glLineWidth (2); draw_curve (crv); draw_vertices (crv); draw_tangents (crv); glLineWidth (1); } } // mark beat/value (gater, fm/am, octave shift) int n = bv.size (); if (n) { float nowx, nowy; float x, y; for (int i = 0; i < n; ++i) { nowx = bv[i]->now; nowy = bv[i]->sol (nowx); obj2win (nowx, nowy, x, y); multi_curve& crv = bv[i]->crv; glLineWidth (2); glColor3f (crv.r, crv.g, crv.b); glBegin (GL_LINES); glVertex2i (x - win_chunk.x, y); glVertex2i (x + win_chunk.x, y); glVertex2i (x, y - win_chunk.y); glVertex2i (x, y + win_chunk.y); glEnd (); glLineWidth (1); } } // label vertices if (labelvertex) { for (int i = 0, j = curveinfo.size (); i < j; ++i) { curve_info& ci = curveinfo[i]; multi_curve* crv = ci.curve; for (int m = 0, n = crv->num_vertices (); m < n; ++m) { point& vm = crv->vertices[m]; sprintf (buf, "%d", m); tb.add (text (buf, vm.x + 0.02, vm.y + 0.02, crv->r, crv->g, crv->b)); } tb.refresh (this); } } if (samples_enabled) draw_samples (); if (id == KB_KB_ATTACK) { glLineWidth (2); glEnable (GL_LINE_STIPPLE); glLineStipple (1, 0xF000); glColor3f (0, 0.5, 1); glBegin (GL_LINES); glVertex2i (susx, win.top); glVertex2i (susx, win.bottom); glEnd (); glDisable (GL_LINE_STIPPLE); glBegin (GL_POLYGON); glVertex2i (susbox.left, susbox.top); glVertex2i (susbox.midx, susbox.bottom); glVertex2i (susbox.right, susbox.top); glEnd (); glLineWidth (1); } draw_cursor (); } void curve_editor::mark_curve_segments () { // drop vertical lines from each curve profile point (dx, dy) to (dx, 0) glColor3f (0.2, 0.2, 0.2); for (int i = 0, j = curveinfo.size(); i < j; ++i) { curve_info& ci = curveinfo[i]; if (ci.mark_segments) { multi_curve* crv = ci.curve; vector& curv = crv->curv; for (int i = 0, j = curv.size(); i < j; ++i) { vector& vpts = curv[i].vpts; glBegin (GL_LINES); for (int p = 0, q = vpts.size (); p < q; ++p) { float dx, dy; obj2win (vpts[p].x, vpts[p].y, dx, dy); glVertex2f (dx, dy); glVertex2f (dx, 0); } glEnd (); } } } } void curve_editor::draw_handle (const point& p) { float x, y; obj2win (p, x, y); float handle [] = {x - win.handle_radius, y, x, y + win.handle_radius, x + win.handle_radius, y, x, y - win.handle_radius}; glBegin (GL_LINE_LOOP); glVertex2f (handle[0], handle[1]); glVertex2f (handle[2], handle[3]); glVertex2f (handle[4], handle[5]); glVertex2f (handle[6], handle[7]); glEnd (); } void curve_editor::draw_tangent (const point& p, const point& t) { float x, y; obj2win (p, x, y); float tx, ty; obj2win (t, tx, ty); glBegin (GL_LINES); glVertex2f (x, y); glVertex2f (tx, ty); glEnd (); } void curve_editor::draw_curve (multi_curve* crv) { vector& curv = crv->curv; for (int i = 0, j = curv.size(); i < j; ++i) { vector& vpts = curv[i].vpts; glBegin (GL_LINE_STRIP); for (int p = 0, q = vpts.size (); p < q; ++p) { float dx, dy; obj2win (vpts[p].x, vpts[p].y, dx, dy); glVertex2f (dx, dy); } glEnd (); } } void curve_editor::draw_samples () { float x = 0, y = 0; float ox, oy; obj2win (x, y, ox, oy); float r, g, b; curveinfo[0].curve->get_color (r, g, b); glColor3f (r, g, b); glBegin (GL_LINES); for (int i = 0; i < cs.n; ++i) { float dx, dy; obj2win (cs.x[i], cs.y[i], dx, dy); glVertex2i (dx, dy); glVertex2i (dx, oy); } glEnd (); } void curve_editor::draw_vertices (multi_curve* crv) { const points_array& vertices = crv->vertices; for (int p = 0, q = vertices.size(); p < q; ++p) { const point& v = vertices[p]; draw_handle (v); } } void curve_editor::draw_tangents (multi_curve* crv) { // draw tangents of ith curve const points_array& vertices = crv->vertices; const points_array& left_tangents = crv->left_tangents; const points_array& right_tangents = crv->right_tangents; for (int p = 0, q = vertices.size(); p < q; ++p) { const point& v = vertices[p]; const point& lt = left_tangents[p]; const point& rt = right_tangents[p]; draw_tangent (v, lt); draw_tangent (v, rt); draw_handle (lt); draw_handle (rt); } } void curve_editor::dodo (list& do1, list& do2, std::string mesg) { if (do1.size() > 0) { undo_t& last = do1.back (); if (last.i < num_curves ()) { curve_info& ci = curveinfo[last.i]; multi_curve* crv = ci.curve; do2.push_back (undo_t (last.i, *crv, win)); std::string name; float r, g, b; crv->get_color (r, g, b); *crv = last.curve; crv->set_color (r, g, b); ci.lisner->edited (this, last.i); win = last.win; do1.pop_back (); } hitlist.clear (); } else cons << console::red << mesg << eol; } void curve_editor::add (multi_curve* crv, curve_listener* lsnr) { curveinfo.push_back (curve_info (crv, lsnr)); } void curve_editor::clear () { curveinfo.clear (); hitlist.clear (); clear_hit (pik); } multi_curve* curve_editor::get_curve (int i) { if (i > -1 && i < (int) curveinfo.size()) { curve_info& ci = curveinfo [i]; return ci.curve; } cout << "could not get curve " << i << eol; return 0; } int curve_editor::num_curves () { return curveinfo.size (); } curve_info& curve_editor::get_curve_info (int i) { return curveinfo[i]; } void curve_editor::enter () { win.calc (); basic_editor::calc_visual_params (); } void curve_editor::clear_scratch_curve () { win_scratch_points.clear (); curv_scratch_points.clear (); scratch_curve.clear (); show_scratch_curve = false; } void curve_editor::attach_library (curve_library* lib) { library = lib; } void curve_editor::bg () { apply_mocap (); } curve_info::curve_info (multi_curve* c, curve_listener* l, bool dis) { curve = c; lisner = l; disabled = dis; mark_segments = false; } curve_info::curve_info () { curve = 0; lisner = 0; disabled = mark_segments = false; } hit_t::hit_t (multi_curve* cv, int cid, unsigned int w, int i) { crv = cv; crv_id = cid; what = w; id = i; } void hit_t::clear () { crv = 0; crv_id = -1; what = NONE; id = -1; } int hit_t::operator() () { return (crv_id != -1); } void curve_editor::clear_hit (hit_t& h) { h.clear (); use_existing_hit = false; } void curve_editor::load_curve (int dir) { if (!pik()) pik = hit_t (curveinfo[0].curve, 0); multi_curve& crv = *pik.crv; undos.push_back (undo_t (pik.crv_id, crv, win)); float cr, cg, cb; crv.get_color (cr, cg, cb); if (dir == 1) crv = library->next (); else crv = library->prev(); crv.set_color (cr, cg, cb); curveinfo[pik.crv_id].lisner->edited (this, pik.crv_id); cons.rollup (1); } void curve_editor::add_curve () { if (!pik()) pik = hit_t (curveinfo[0].curve, 0); curve_info& ci = curveinfo [pik.crv_id]; library->add (*ci.curve); } void curve_editor::insert_curve () { if (!pik()) pik = hit_t (curveinfo[0].curve, 0); library->insert (*get_curve (pik.crv_id)); } void curve_editor::replace_curve () { if (!pik()) pik = hit_t (curveinfo[0].curve, 0); library->replace (*get_curve (pik.crv_id)); } void curve_editor::paste (hit_t& hit) { if (hit()) { curve_info& ci = curveinfo [hit.crv_id]; multi_curve* crv = ci.curve; if (copy.num_vertices()) { undos.push_back (undo_t (hit.crv_id, *crv, win)); std::string cname; float cr, cg, cb; crv->get_color (cr, cg, cb); *crv = copy; crv->set_color (cr, cg, cb); ci.lisner->edited (this, hit.crv_id); cons << console::green << "pasted curve." << eol; } else cons << console::red << "no copy curve." << eol; } else cons << console::red << "pick a curve to paste." << eol; } std::string curve_editor::selection () { std::stringstream ss; const char* what [] = {"invalid", "v", "lt", "rt"}; for (int i = 0, j = hitlist.size (); i < j; ++i) { hit_t& h = hitlist[i]; multi_curve* c = h.crv; float x, y; switch (h.what) { case hit_t::VERTEX: c->get_vertex (h.id, x, y); break; case hit_t::LEFT_TANGENT: c->get_left_tangent (h.id, x, y); break; case hit_t::RIGHT_TANGENT: c->get_right_tangent (h.id, x, y); break; } ss << '{' << c->name << ' ' << what[h.what] << ' ' << h.id << ' ' << x << ' ' << y << "} "; } return ss.str (); } void curve_samples::render (multi_curve* crv) { solver ss (crv); float xx = -step, dxx = step; ss (xx, dxx, n, y); float dx = 1; for (int i = 0; i < n; ++i) { x[i] = dx; dx += step; } } void curve_samples::set (float zh, int p) { if (zh <= 0) zh = 440; if (p <= 0) p = 2; nperiods = p; hz = zh; hz2step (hz, step); int oldn = n; n = ceil (p * 1. / step); if (x) { if (n > oldn) { delete[] x; x = new float [n]; delete[] y; y = new float [n]; } } else { x = new float [n]; y = new float [n]; } int nsz = sizeof (float) * n; memset (x, 0, nsz); memset (y, 0, nsz); } din-5.2.1/src/listeners.cc0000644000175100017510000000453312111771577012340 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "din.h" #include "listeners.h" #include "beat2value.h" #include "delay.h" #include "keyboard_keyboard.h" #include "fft.h" #include "ui_list.h" extern fft fft0; void wave_listener::edited (curve_editor* ed, int i) { extern din din0; extern keyboard_keyboard keybd2; switch (which) { case DIN_BOARD: din0.wavsol.update (); break; case KEYBOARD_KEYBOARD: keybd2.update_waveform (); break; case DRONE: din0.update_drone_solvers (); break; } if (ed->fft_enabled) { fft0.go (ed->curveinfo[i].curve); } if (ed->samples_enabled) { ed->cs.render (ed->curveinfo[i].curve); } } drone_listener::drone_listener (din* dd) : d (dd) {} void drone_listener::edited (curve_editor* ed, int i) { d->update_drone_solvers (); } beat2value_listener::beat2value_listener (beat2value* bv) : beat2value0 (bv) {} void beat2value_listener::edited (curve_editor* ed, int i) { beat2value0->curve_edited (); } void morse_code_listener::edited (curve_editor* ed, int i) {} void delay_listener::edited (curve_editor* ed, int i) { sol->update (); float dx = 1./(dly->nsamples - 1), x = -dx; sol->operator()(x, dx, dly->nsamples, result); } attack_listener::attack_listener (keyboard_keyboard* kk) : k (kk) {} void attack_listener::edited (curve_editor* ed, int i) { k->update_attack (); } decay_listener::decay_listener (keyboard_keyboard* kk) : k (kk) {} void decay_listener::edited (curve_editor* ed, int i) { k->update_decay (); } void velocity_listener::edited (curve_editor* ed, int i) { k->velsol.update (); } din-5.2.1/src/console.cc0000644000175100017510000002135212122366444011763 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "console.h" #include "font.h" #include "input.h" #include "command.h" #include "tcl_interp.h" #include "tokenizer.h" #include "globals.h" #include "key_consts.h" #include "ansi_color_codes.h" #include "tcl_interp.h" #include "ui_list.h" #include using namespace std; #define buf cmdlst.buf extern cmdlist cmdlst; extern tcl_interp interpreter; extern ui_list uis; console::console () : ps1 ("->"), b_tips (8) { rollup_ = 0; command_mode = 0; curs_loc = 0; curs_locx = 0; hid = -1; clear (); // faders for tips display // faders[0].set (0, 1, 1, 4); // rise faders[1].set (1, 1, 1, 4); // stay faders[2].set (1, 0, 1, 4); // fall faders[3].set (0, 0, 1, 2); // rest cur_fdr = 0; b_tips_clicked = 0; b_tips.set_listener (this); b_tips.set_color (0.6, 0.6, 1); std::cout << PASS << "+++ initialised console +++" << ENDL; } void console::reset_tips () { get_tip = "get-tip " + uis.current->name; if (show_tips) { tip = interpreter (get_tip).result; l_tips.set_text (tip); cur_fdr = 0; faders[cur_fdr].restart (); } } console& console::operator<< (const color& c) { clr = c; return *this; } console& console::operator<< (const string& s) { cur_line.text += s; return *this; } console& console::operator<< (unsigned int i) { sprintf (buf, "%x", i); *this << buf; return *this; } console& console::operator<< (int i) { sprintf (buf, "%d", i); *this << buf; return *this; } console& console::operator<< (unsigned long i) { sprintf (buf, "%lu", i); *this << buf; return *this; } console& console::operator<< (unsigned long long i) { sprintf (buf, "%llux", i); *this << buf; return *this; } console& console::operator<< (float f) { sprintf (buf, "%f", f); *this << buf; return *this; } console& console::operator<< (double d) { sprintf (buf, "%f", d); *this << buf; return *this; } console& console::operator<< (char c) { if (c == '\n') { cur_line.clr = clr; add_line (cur_line); cur_line = mesg (); } else cur_line.text += c; return *this; } void console::del () { int len = cmd_line.text.length (); if (curs_loc > 0 && curs_loc <= len) { cmd_line.text.erase (cmd_line.text.begin() + curs_loc - 1); curs_locx = (int) get_char_width (cmd_line.text.substr (0, --curs_loc)); } } void console::calc_visual_params () { line_height = get_line_height (); char_width = fnt.max_char_width; lines_per_screen = (win.top - win.bottom) / line_height - GUTTER; startx = win.left + get_char_width (ps1); starty = win.top - 2 * line_height; int y1 = view.ymax - line_height; b_tips.set_pos (2, y1 + fnt.lift); l_tips.set_pos (startx, y1); } void console::draw () { glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); glOrtho (0, view.xmax, 0, view.ymax, -1, 1); static color black (0, 0, 0), full (0.6, 0.6, 1), result; blend_color (black, full, result, faders[cur_fdr].value ()); l_tips.set_color (result); b_tips.draw (); if (show_tips) l_tips.draw (); glPopMatrix (); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); glOrtho (win.left, win.right, win.bottom, win.top, -1, 1); // draw lines // int cx = startx, cy = starty; int n = 0, i = startl; while ((n++ < lines_per_screen) && (i < nlines)) { const mesg& linei = lines[i++]; const color& clr = linei.clr; glColor3f (clr.r, clr.g, clr.b); draw_string (linei.text, cx, cy); cy -= line_height; } // draw last line glColor3f (1, 1, 1); draw_string (ps1, win.left, cy); draw_string (cmd_line.text, cx, cy, 0); // draw cursor if (command_mode) { glColor3f (1, 0, 0); int px = cx + curs_locx, py = cy - 2; glBegin (GL_LINES); glVertex2i (px, py); glVertex2i (px + char_width, py); glEnd (); } glEnd (); glPopMatrix (); glMatrixMode (GL_MODELVIEW); glPopMatrix (); } void console::clear () { lines.clear (); cmd_line = mesg(); curs_loc = 0; curs_locx = 0; nlines = 0; startl = 0; } void console::set_window (const box& w) { win = w; calc_visual_params (); } void accept_keypress (int accept); void console::add_line (const mesg& ln) { lines.push_back (ln); ++nlines; last (); } void console::up (int i) { startl = max (0, startl - i); } void console::down (int i) { startl += i; if (startl >= nlines) startl = max (0, nlines - 1); } void console::pgdn () { down (lines_per_screen); } void console::pgup () { up (lines_per_screen); } void console::home () { startl = 0; } void console::end () { startl = max (0, nlines - 1); } void console::last () { // ensures last line is always displayed end (); if (!rollup_) up (lines_per_screen - 1); } void console::bg () { if (show_tips) { fader& fdr = faders [cur_fdr]; fdr.eval (); if (fdr.on == 0) { if (++cur_fdr >= 4) { cur_fdr = 0; if (b_tips_clicked) { show_tips = 0; b_tips_clicked = 0; tip = ""; l_tips.set_text (tip); } else { tip = interpreter (get_tip).result; // next tip l_tips.set_text (tip); } } faders[cur_fdr].restart (); } } } int console::handle_input () { b_tips.handle_input (); int ret = 0; extern char xkey; if (command_mode) { if (keypressed (k_esc)) { toggle_command_mode (); return 1; } ret = 1; if ((xkey > 9) && (xkey < 127) && (xkey != 13)) { cmd_line.text.insert (cmd_line.text.begin() + curs_loc, xkey); ++curs_loc; curs_locx = get_char_width (cmd_line.text.substr (0, curs_loc)); } xkey = 0; if (keypressed (k_enter)) { add_line (cmd_line); history.push_back (cmd_line.text); hid = history.size () - 1; operator() (cmd_line.text); cmd_line = mesg (); curs_loc = curs_locx = 0; } else if (keypressedd (k_left)) { if (--curs_loc < 1) curs_loc = curs_locx = 0; else curs_locx = (int) get_char_width (cmd_line.text.substr (0, curs_loc)); } else if (keypressedd (k_right)) { int len = cmd_line.text.length (); if (++curs_loc > len) curs_loc = len; curs_locx = (int) get_char_width (cmd_line.text.substr (0, curs_loc)); } if (hid > -1) { if (keypressedd (k_up)) { cmd_line.text = history [hid--]; curs_loc = cmd_line.text.length (); curs_locx = get_char_width (cmd_line.text); if (hid < 0) hid = history.size () - 1; } if (keypressedd (k_down)) { cmd_line.text = history [hid++]; curs_loc = cmd_line.text.length (); curs_locx = get_char_width (cmd_line.text); if (hid >= (int) history.size()) hid = 0; } } } static double sc0 = 0.5, sc1 = 1./128; static double pg0 = 0.5, pg1 = 1./32; int pure_tab = keypressed (k_tab) && !(keydown (k_lalt) || keydown (k_ralt)); if (pure_tab) toggle_command_mode (); else if (keypressedd (k_insert, sc0, sc1)) up(1); else if (keypressedd (k_delete, sc0, sc1)) down(1); else if (keypressed (k_home)) home (); else if (keypressed (k_end)) end(); else if (keypressedd (k_pgup, pg0, pg1)) pgup(); else if (keypressedd (k_pgdn, pg0, pg1)) pgdn(); else if (keypressedd (k_backspace)) { if (command_mode) del (); else clear(); } else if (keypressed (k_backquote) && !command_mode) { rollup (!rollup_); } return ret; } void console::rollup (int r) { rollup_ = r; last (); } int console::rollup () { return rollup_; } console& console::operator() (const string& cmd) { extern tcl_interp interpreter; into_lines (interpreter(cmd).result, *this); return *this; } void console::toggle_command_mode () { command_mode = !command_mode; accept_keypress (command_mode); last (); } void console::clicked (button& b) { if (&b == &b_tips) { if (show_tips == 0) { show_tips = 1; reset_tips (); *this << green << "showing tips" << eol; } else { b_tips_clicked = 1; *this << red << "tips hidden" << eol; } } } din-5.2.1/src/console_iterator.cc0000644000175100017510000000220212111771577013672 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "console_iterator.h" console_iterator::console_iterator (console& c, char dl) : con (c), delim (dl) {} console_iterator& console_iterator::operator++ () { con << delim; return *this; } console_iterator& console_iterator::operator++ (int) { con << delim; return *this; } console_iterator& console_iterator::operator* () { return *this; } din-5.2.1/src/help.cc0000644000175100017510000000247612122127153011247 00000000000000 /* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "help.h" #include "console.h" #include "command.h" #include "bot.h" #include using namespace std; extern console cons; extern string dotdin; help::help (const string& fname) { string s; ifstream file ((dotdin + fname).c_str(), ios::in); if (!file) text.push_back (fname); else while (getline(file, s)) text.push_back (s); } void help::operator() () { cons.rollup (0); for (int i = 0, j = text.size(); i < j; ++i) { cons << console::cyan << text[i] << eol; } cons.last (); } din-5.2.1/src/line.cc0000644000175100017510000000234712111771577011260 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "line.h" #include "dingl.h" void line::draw () { glBegin (GL_LINE_STRIP); for (int i = 0, j = points.size(); i < j; ++i) glVertex2f (points[i].x, points[i].y); glEnd (); } void line::set (int i, int x, int y) { points[i].x = x; points[i].y = y; } void line::insert (int i, int x, int y) { points.insert (points.begin() + i, point(x,y)); } int line::remove (int i) { points.erase (points.begin() + i); return points.size(); } din-5.2.1/src/font.cc0000644000175100017510000001337212111771577011277 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include #include #include using namespace std; #include "font.h" #include "ansi_color_codes.h" font::font (const string& filename) : modified (0) { xsize = 3; ysize = 3; charspc = xsize; headroom = ysize; fname = filename; load (fname); } font::~font () { if (modified) save (); } void font::load (const string& fn) { extern string dotdin; string ffname = dotdin + fname; ifstream file (ffname.c_str(), ios::in); if (!file) { cout << FAIL << "bad font file: " << ffname << ENDL; return; } else { cout << LOAD << "<<< loading font from: " << ffname; load (file); cout << ", done. >>>" << ENDL; } } void font::load (ifstream& file) { string ignore; characters.clear (); kern.clear (); file >> ignore >> name; file >> ignore >> nchars; int sum_char_width, sum_char_height; max_char_width = max_char_height = sum_char_width = sum_char_height = 0; for (int i = 0; i < nchars; i++) { char c; file >> c; glyph g; int nln; file >> nln; for (int l = 0; l < nln; ++l) { line ln; int npts; file >> npts; for (int s = 0; s < npts; ++s) { float x, y; file >> x >> y; ln.points.push_back (point(x * xsize, y * ysize)); } g.lines.push_back (ln); } g.find_width_height (); if (g.width > max_char_width) max_char_width = g.width; if (g.height > max_char_height) max_char_height = g.height; sum_char_width += g.width; sum_char_height += g.height; characters[c] = g; } avg_char_width = sum_char_width / nchars; avg_char_height = sum_char_height / nchars; lift = 2 * ysize; wordspc = 2 * charspc; int nkerns = 0; file >> ignore >> nkerns; for (int i = 0; i < nkerns; ++i) { char a, b; int k; file >> a >> b >> k; kern [a][b] = k * xsize; } } void font::save () { extern string dotdin; ofstream file ((dotdin + fname).c_str(), ios::out); if (!file) { cout << "cannot save font in: " << fname << endl; return; } else { cout << "saving font in: " << fname << endl; } stringstream ss1; int nc = 0; for (map::iterator i = characters.begin(), j = characters.end(); i != j; ++i) { glyph& g = (*i).second; vector& lines = g.lines; int nlines = lines.size (); if (nlines) { ss1 << (*i).first << ' '; ss1 << nlines << ' '; for (int s = 0; s < nlines; ++s) { vector < point >& points = lines[s].points; int npts = points.size (); ss1 << npts << ' '; for (int m = 0; m < npts; ++m) { point& pt = points[m]; ss1 << (int)(pt.x / xsize) << ' ' << (int)(pt.y / ysize) << ' '; } } ss1 << endl; ++nc; } } file << "name " << name << endl; file << "num_chars " << nc << endl; file << ss1.str(); stringstream ss2; int nk = 0; for (map >::iterator i = kern.begin(), j = kern.end(); i != j; ++i) { char a = (*i).first; map& m = (*i).second; for (map::iterator p = m.begin(), q = m.end(); p != q; ++p) { char b = (*p).first; int k = (*p).second; if (k != 0) { ss2 << a << ' ' << b << ' ' << k/xsize << '\n'; ++nk; } } } file << "num_kerns " << nk << endl; file << ss2.str(); } int font::char_width (char c) { return characters[c].width;} int font::char_height (char c) { return characters[c].height;} void font::draw_char (char c, int x, int y, int z) { const glyph& gl = characters[c]; const vector& lines = gl.lines; for (unsigned int i = 0, nlines = lines.size(); i < nlines; ++i) { const line& li = lines[i]; const vector< point >& points = li.points; unsigned int npts = points.size(); glBegin (GL_LINE_STRIP); for (unsigned int j = 0; j < npts; ++j) { const point& p = points[j]; glVertex3i(x + p.x, y + p.y, z); } glEnd (); } } const map& font::get_chars () { return characters; } void font::set_chars (const map& chars) { characters = chars; modified = 1; } int draw_string (const string& s, int x, int y, int z) { char prevc = ' '; for (int p = 0, q = s.length(); p < q; ++p) { char c = s[p]; if (c == ' ') x += fnt.wordspc; else { x += fnt.kern[prevc][c]; fnt.draw_char (c, x, y, z); x += (fnt.char_width (c) + fnt.charspc); } prevc = c; } return x; } int get_char_width (const string& s) { char prevc = ' '; int x = 0; for (int p = 0, q = s.length(); p < q; ++p) { char c = s[p]; if (c == ' ') x += fnt.wordspc; else { x += (fnt.kern[prevc][c] + fnt.char_width (c) + fnt.charspc); } prevc = c; } return x; } int get_max_char_height (const string& s) { int h = 0; for (int p = 0, q = s.length(); p < q; ++p) { char c = s[p]; int ch = fnt.char_height (c); if (ch > h) h = ch; } return h; } din-5.2.1/src/glyph.cc0000644000175100017510000000274312111771577011454 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "glyph.h" #include using namespace std; glyph::glyph (const vector& vl) : lines(vl) {} void glyph::find_width_height () { if (int nlines = lines.size ()) { int l, r, t; l = r = t = 0; vector< point >& points = lines[0].points; if (points.size()) { point& p = points[0]; l = r = p.x; t = p.y; } for (int i = 0; i < nlines; ++i) { vector< point >& points = lines[i].points; for (int p = 0, q = points.size(); p < q; ++p) { point& pt = points[p]; if (pt.x < l) l = pt.x; else if (pt.x > r) r = pt.x; if (pt.y > t) t = pt.y; } } width = r - l; height = t; } } din-5.2.1/src/oscilloscope.cc0000644000175100017510000001512312114471514013012 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "dingl.h" #include "oscilloscope.h" #include "console.h" #include "font.h" #include "viewwin.h" #include "input.h" #include #include using namespace std; extern console cons; oscilloscope::oscilloscope () : win (0, 0, 2 * MAX_SAMPLES, 250) { vertex_array = new float [8 * MAX_SAMPLES]; color_array = new float [16 * MAX_SAMPLES]; /*lr = 1; lg = 0.7; lb = 1; rr = 1; rg = 1; rb = 0.7;*/ viewr = 0; addr = 1; if (!load_last ()) { paused = false; visible = true; win (0, 0, 2 * MAX_SAMPLES, 250); } calc_draw_params (); } bool oscilloscope::load_last () { extern string dotdin; ifstream file ((dotdin + "oscilloscope").c_str(), ios::in); if (!file) return false; string ignore; int l, b, r, t; file >> ignore >> l >> b >> r >> t; win (l, b, r, t); file >> ignore >> paused >> ignore >> visible; return true; } oscilloscope::~oscilloscope () { delete[] vertex_array; delete[] color_array; save_last (); } bool oscilloscope::save_last () { extern string dotdin; ofstream file ((dotdin + "oscilloscope").c_str(), ios::out); if (!file) return false; file << "win " << win.left << ' ' << win.bottom << ' ' << win.right << ' ' << win.top << endl; file << "paused " << paused << endl; file << "visible " << visible << endl; return true; } void oscilloscope::calc_draw_params () { leftx = win.left; num_samples = min (win.width / 2, (int) MAX_SAMPLES); if (num_samples == 0) num_samples = 1; rightx = leftx + num_samples; base = (win.bottom + win.top)/2; ndraw = 4 * num_samples; endx = rightx + num_samples; int dheight = 5; pick_win (win.left, win.midy - dheight, win.right, win.midy + dheight); } bool oscilloscope::handle_input () { extern int lmb, rmb; static int clicked = 0, canmove = 0, rclicked = 0, canresize = 0; extern int mousex, mousey; extern viewport view; int x = mousex; int y = view.ymax - mousey; static int px = -1, py = -1; bool processed = false; if (lmb) { if (!clicked) { clicked = 1; if (inbox (pick_win, x, y)) { canmove = 1; if (px == -1) px = x; if (py == -1) py = y; } else { canmove = 0; } } else if (canmove) { win.move (x-px, y-py); calc_draw_params (); processed = true; } } else { clicked = 0; canmove = 0; } if (rmb) { if (!rclicked) { rclicked = 1; if (inbox (win, x, y)) { canresize = 1; if (px == -1) px = x; if (py == -1) py = y; } else canresize = 0; } else if (canresize) { win.resize (x-px, y-py); calc_draw_params (); processed = true; } } else { rclicked = 0; canresize = 0; } px = x; py = y; return processed; } void oscilloscope::toggle_pause () { paused = !paused; if (paused) cons << "scope is paused." << eol; else cons << "scope running." << eol; } void oscilloscope::toggle_visible () { visible = !visible; if (visible) cons << "scope is visible." << eol; else cons << "scope is hidden." << eol; } void oscilloscope::add_samples (float* outl, float* outr, int n) { for (int i = 0; i < n; ++i) { sample_t& sa = samples[addr]; float l = outl[i], r = outr[i]; sa.left = l; sa.right = r; sample_t::lmin = min (sa.left, sample_t::lmin); sample_t::lmax = max (sa.left, sample_t::lmax); sample_t::rmin = min (sa.right, sample_t::rmin); sample_t::rmax = max (sa.right, sample_t::rmax); if (++addr >= num_samples) { addr = 0; /*static int minner = 0, max_minner = 25; if (++minner > max_minner) { minner = 0;*/ sample_t::lmin = sample_t::lmax = sample_t::rmin = sample_t::rmax = 0; // ok for oscilloscope. //} } if (addr == viewr) if (++viewr >= num_samples) viewr = 0; } } void oscilloscope::draw () { int x1 = leftx, x2 = rightx, y0 = base; static const int label_delta = 20; glColor3f (lr , lg, lb); static char buf [256]; sprintf (buf, "min/max: %1.2f, %1.2f", sample_t::lmin, sample_t::lmax); draw_string (buf, x1, y0 + (int)(sample_t::lmax * win.height) + label_delta, 0); glBegin (GL_LINES); glVertex2i (leftx, win.midy); glVertex2i (rightx, win.midy); glEnd (); glColor3f (rr, rg, rb); sprintf (buf, "min/max: %1.2f, %1.2f", sample_t::rmin, sample_t::rmax); draw_string (buf, x2, y0 + (int)(sample_t::rmax * win.height) + label_delta, 0); glBegin (GL_LINES); glVertex2i (rightx, win.midy); glVertex2i (endx, win.midy); glEnd (); glEnableClientState (GL_VERTEX_ARRAY); glVertexPointer (2, GL_FLOAT, 0, vertex_array); glEnableClientState (GL_COLOR_ARRAY); glColorPointer (4, GL_FLOAT, 0, color_array); for (int i = 0, j = viewr, vi = 0, ci = 0; i < num_samples; ++i, vi += 8, ci += 16) { float l = samples[j].left, r = samples[j].right; float ly = l * win.height, ry = r * win.height; float lrr = lr, lgg = lg, lbb = lb; if (l > 1 || l < -1) { lrr = 1; lgg = 0; lbb = 0;} float rrr = rr, rgg = rg, rbb = rb; if (r > 1 || r < -1) { rrr = 1; rgg = 0; rbb = 0;} vertex_array [vi] = x1; vertex_array [vi+1] = y0; vertex_array [vi+2] = x1; vertex_array [vi+3] = y0 + ly; vertex_array [vi+4] = x2; vertex_array [vi+5] = y0; vertex_array [vi+6] = x2; vertex_array [vi+7] = y0 + ry; color_array [ci] = color_array[ci+4] = lrr; color_array [ci+1] = color_array[ci+5] = lgg; color_array [ci+2] = color_array[ci+6] = lbb; color_array [ci+3] = color_array[ci+7] = 1; color_array [ci+8] = color_array[ci+12] = rrr; color_array [ci+9] = color_array[ci+13] = rgg; color_array [ci+10] = color_array[ci+14] = rbb; color_array [ci+11] = color_array[ci+15] = 1; if (++j >= num_samples) j = 0; ++x1; ++x2; } glDrawArrays (GL_LINES, 0, ndraw); glDisableClientState (GL_VERTEX_ARRAY); glDisableClientState (GL_COLOR_ARRAY); } din-5.2.1/src/delay.cc0000644000175100017510000000456012111771577011426 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "delay.h" #include "utils.h" #include #include #include using namespace std; void delay::zero () { nsamples = 0; samples = 0; fbk = 0; vol = 0; id = 0; } delay::delay (float t, const string& fn, const string& vn) : fbk_fname (fn), vol_fname (vn), fbk_crv (fn), vol_crv (vn), fbk_lis (this, &fbk_sol, fbk), vol_lis (this, &vol_sol, vol) { zero (); fbk_sol (&fbk_crv); vol_sol (&vol_crv); set (t); } delay::~delay() { float* bf [3] = {samples, fbk, vol}; for (int i = 0; i < 3; ++i) if (bf[i]) { free (bf[i]); } fbk_crv.save (fbk_fname); vol_crv.save (vol_fname); } void delay::check_buffer () { static const float thou_1 = 1./1000; static const int size_of_float = sizeof (float); extern int SAMPLE_RATE; int n = (int) (msecs * SAMPLE_RATE * thou_1 + 0.5); if (n < 1) n = 1; if (n > nsamples) { float** nbf[3] = {&samples, &fbk, &vol}; for (int i = 0; i < 3; ++i) { if (nbf[i]) free (*nbf[i]); *nbf[i] = (float *) calloc (n, size_of_float); } } nsamples = n; clamp(0, id, nsamples); } void delay::set (float t) { msecs = t; check_buffer (); float dx = 1./(nsamples - 1), x = -dx; fbk_sol (x, dx, nsamples, fbk); vol_sol (x, dx, nsamples, vol); fbk_lis.result = fbk; vol_lis.result = vol; } void delay::get (float& t) { t = msecs; } void delay::operator() (float* out, int n, float fdr) { float f; for (int i = 0; i < n; ++i) { f = out[i] + fbk[id] * samples[id]; out[i] += (fdr * vol[id] * f); samples[id] = f; if (++id >= nsamples) id = 0; } } din-5.2.1/src/viewwin.cc0000644000175100017510000000705412111771577012021 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "dingl.h" #include "console.h" #include "viewwin.h" #include "main.h" #include "ansi_color_codes.h" #include using namespace std; void viewport::operator() (int w, int h) { if (w != width || h != height) { calc (w, h); cout << PASS << "+++ viewport: " << width << ' ' << height << " +++" << ENDL; } } void viewport::calc (int w, int h) { width = w; height = h; xmax = width - 1; ymax = height - 1; xmax_1 = 1.0 / xmax; ymax_1 = 1.0 / ymax; handle_factor = handle_radius * 1. / width; } viewport::viewport () { width = height = 0; xmax = ymax = 0; xmax_1 = ymax_1 = 0; } bool viewport::inside (int x, int y) { bool xi = (x >= 0) && (x <= xmax); bool yi = (y >= 0) && (y <= ymax); return (xi && yi); } void window::calc_panxy () { pan_x = PAN_AMOUNT * width; pan_y = PAN_AMOUNT * height; } void window::calc_handle_radius () { handle_radius = viewport::handle_factor * width; handle_radius2 = handle_radius * handle_radius; sus_handle_radius = 2 * handle_radius; } window::window () : box() { width_1 = height_1 = 0; aspect_ratio = 0; } window::window (float l, float b, float r, float t) { set (l, b, r, t); } void window::set (float l, float b, float r, float t) { operator() (l, b, r, t); width_1 = 1.0 / width; height_1 = 1.0 / height; aspect_ratio = width * height_1; calc_panxy (); calc_viewwin (); calc_handle_radius (); window::calc_repeats (); } void window::get (float& l, float& b, float& r, float& t) { l = left; b = bottom; r = right; t = top; } void window::panx (int dir) { float dpan = pan_x * dir; left = left + dpan; right = left + width; mousex += dpan; } void window::pany (int dir) { float dpan = pan_y * dir; bottom = bottom + pan_y * dir; top = bottom + height; mousey += dpan; } void window::zoom (int dir) { float dw = ZOOM_AMOUNT * width * dir, dh = dw / aspect_ratio, dw2 = dw / 2, dh2 = dh / 2; float l = left - dw2; float r = right + dw2; float b = bottom - dh2; float t = top + dh2; float w = r - l, h = t - b; if ((w > 0) && (h > 0)) { set (l, b, r, t); } } void window::locate_mouse () { extern viewport view; extern int mousex, mousey; view2win (mousex, mousey, window::mousex, window::mousey, view, *this); prev_mousex = mousex; prev_mousey = mousey; } void window::update_mouse () { extern int mousex, mousey; window::mousex += (mousex - prev_mousex) * vwx; window::mousey -= (mousey - prev_mousey) * vwy; prev_mousex = mousex; prev_mousey = mousey; } void window::calc_viewwin () { extern viewport view; vwx = width / view.xmax; vwy = height / view.ymax; locate_mouse (); } void window::calc_repeats () { if (PAN_RATE > 0) PAN_REPEAT = 1. / PAN_RATE; if (ZOOM_RATE > 0) ZOOM_REPEAT = 1. / ZOOM_RATE; } din-5.2.1/src/mocap.cc0000644000175100017510000000302612111771577011423 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "mocap.h" #include "basic_editor.h" #include using namespace std; mocap::mocap () { clear (); } void mocap::clear () { x.clear (); y.clear (); x.reserve (1); y.reserve (1); cur = 0; state = empty; } bool mocap::get (float& gx, float& gy) { if (cur >= x.size ()) cur = 0; gx = x[cur]; gy = y[cur++]; return true; } bool mocap::add (float wx, float wy) { x.push_back (wx); y.push_back (wy); state = capturing; return true; } void mocap::finish (basic_editor* b) { for (int i = 0, j = x.size (); i < j; ++i) { float wx = x[i], wy = y[i]; b->win2obj (wx, wy, x[i], y[i]); // win to obj space } cur = 0; state = finished; } int mocap::operator() () { return (state == finished); } din-5.2.1/src/beat2value.cc0000644000175100017510000000446512111771577012366 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "beat2value.h" #include "console.h" #include #include using namespace std; extern console cons; beat2value::beat2value (const string& n, const string& c) : name (n), crvname (c), crv (c) { now = 0; delta = 0; bpm = 45; set_bpm (bpm); sol(&crv); curve_edited (); style = "loop"; xmin = &_loopmin; xmax = &_loopmax; } beat2value::~beat2value () { crv.save (crvname); } void beat2value::operator() (float* soln, int n) { sol (now, delta, n, soln, *xmin, *xmax); } void beat2value::modulate (float* out, float* in, int n, float depth) { // modulate n in by depth and store in out sol (now, delta, n, in, *xmin, *xmax); for (int i = 0; i < n; ++i) out[i] = (depth * in [i]); } void beat2value::curve_edited () { sol.update (); } float beat2value::set_bpm (float n) { // check and set bpm and return bpm if (n >= 0) { // bpm cant be negative bpm = n; float bps = bpm / 60.0; // beats per sec // calculate delta for use in solvers int sgn = 1; if (delta < 0) sgn = -1; extern int SAMPLE_RATE; delta = sgn * bps * 1. / SAMPLE_RATE; } return bpm; } float beat2value::get_bpm () { return bpm; } // globals // void tween (float* buf1, float* buf2, int n, float amount) {// interpolate buf2 -> buf1 and store in buf1 for (int i = 0; i < n; ++i) { float b1 = buf1 [i], b2 = buf2[i]; buf1[i] = amount * b1 + (1 - amount) * b2; } } void multiply (float* out, float* mul, int n) { // multiply n muls with n outs and store in outs for (int i = 0; i < n; ++i) out[i] *= mul[i]; } din-5.2.1/src/scale_info.cc0000644000175100017510000000521712111771577012432 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "scalelist.h" #include "scale_info.h" #include "console.h" #include "tokenizer.h" #include "utils.h" #include "ansi_color_codes.h" #include #include using namespace std; bool scale_info::set_tonic (float s) { tonic = s; lo_tonic = tonic / 2.; hi_tonic = tonic * 2.; return true; } bool scale_info::set_scale (const string& n) { // scale exists? extern scalelist scalelst; scale r; if (scalelst.get (n, r) == false) return false; // scale exists name = r.name; num_ranges = r.num_notes - 1; last_range = num_ranges - 1; // load notes notes.resize (r.num_notes); tokenizer tz (r.notes); for (int i = 0; i < r.num_notes; ++i) tz >> notes[i]; // load custom tuning if it exists if (load_custom_tuning() == false) { // no, load default tuning extern map INTERVALS; intervals = INTERVALS; } return true; } bool scale_info::load_custom_tuning () { extern string dotdin; string filename = dotdin + name + ".intervals"; ifstream file (filename.c_str(), ios::in); if (!file) { cout << FAIL << "!!! couldnt load custom tuning from: " << filename << "; will use defaults. +++" << ENDL; return false; } string ignore; int n; file >> ignore >> n; for (int i = 0; i < n; ++i) { string c; float f; file >> c >> f; intervals [c] = f; } return true; } void scale_info::save_custom_tuning () { extern string dotdin; string filename = dotdin + name + ".intervals"; ofstream file (filename.c_str(), ios::out); if (!file) { cout << "!!! could not save custom tuning in " << filename << " !!!" << endl; return; } file << "num_intervals " << intervals.size () << endl; for (map::iterator i = intervals.begin(), j = intervals.end(); i != j; ++i) { pair p = *i; file << p.first << ' ' << p.second << endl; } } din-5.2.1/src/command.cc0000644000175100017510000007371012114472304011736 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "globals.h" #include "din.h" #include "command.h" #include "console.h" #include "math.h" #include "delay.h" #include "scalelist.h" #include "font.h" #include "glyph.h" #include "chrono.h" #include "utils.h" #include "ui_list.h" #include "curve_editor.h" #include "bot.h" #include "tokenizer.h" #include "tcl_interp.h" #include "chrono.h" #include "sine_mixer.h" #include "scale_info.h" #include "keyboard_keyboard.h" #include "main.h" #include "fft.h" #include using namespace std; #define buf cmdlst.buf #define result cmdlst.result extern console cons; extern cmdlist cmdlst; extern tcl_interp interpreter; extern keyboard_keyboard keybd2; extern ui_list uis; extern din din0; extern ui_list uis; extern string SCALE; extern string TUNING; extern float DELTA_BPM; extern int DRONE_HANDLE_SIZE; extern int TRAIL_LENGTH; extern int NUM_OCTAVES; extern float WAVE_VOLUME; extern float NOTE_VOLUME; extern float ATTACK_TIME; extern float DECAY_TIME; extern float DELTA_TIME; extern string INSTRUMENT; extern float PITCH_BEND; extern int NUM_NOTES; extern char* WESTERN_FLAT []; extern char* WESTERN_SHARP []; extern float WIKIPEDIA_KEY_FREQUENCIES []; template void get_data (const string& s, vector& data) { tokenizer tz (s); data.clear (); stringstream ss; string t; T tt; while (1) { ss.clear (); tz >> t; if (t == "") break; ss << t; ss >> tt; data.push_back (tt); } } void cmdlist::add (command* cmd) { cmds.push_back (cmd); ncmds = cmds.size (); } int set_var::set_scroll (string& varn, tokenizer& tz) { while (1) { tz >> varn; if (varn == "r" || varn == "rate") { tz >> d->dinfo.scroll.rate; d->dinfo.scroll.calc_repeat_time (); } else if (varn == "x") { tz >> d->dinfo.scroll.dx; } else if (varn == "y") { tz >> d->dinfo.scroll.dy; } else { if (varn != "") { result = varn + ": bad scroll param"; return 0; } else return 1; } } } int set_var::set_zoom_pan (int& rate, float& amount, string& varn, tokenizer& tz) { while (1) { tz >> varn; if (varn == "r" || varn == "rate") { tz >> rate; window::calc_repeats (); } else if (varn == "a" || varn == "amount") { tz >> amount; window::calc_repeats (); extern ui_list uis; if (uis.crved) uis.crved->win.calc_panxy (); } else { if (varn != "") { result = varn + ": bad zoom/pan param"; return 0; } else return 1; } } } bool set_var::operator() (tokenizer& tz) { string varn; int extract = 1; while (1) { if (extract) { tz >> varn; result = ""; } else extract = 1; if (varn == "fmd" || varn == "fm_depth") { tz >> d->fm_depth; hz2step (d->fm_depth, d->fm_step); } else if (varn == "amd" || varn == "am_depth") { tz >> d->am_depth; } else if (varn == "pb" || varn == "pitch_bend") { tz >> PITCH_BEND; uis.lfs_pitch_bend.set_val (PITCH_BEND); } else if (varn == "dmv" || varn == "drone_master_volume") { float f; tz >> f; d->update_drone_master_volume (f - d->drone_master_volume); } else if (varn == "at" || varn == "attack_time") { float dt; tz >> dt; if (dt <= 0) { cons << console::red << "bad attack time" << eol; return false; } else ATTACK_TIME = dt; uis.lfs_attack_time.set_val (ATTACK_TIME); } else if (varn == "dt" || varn == "decay_time") { float dt; tz >> dt; if (dt <= 0) { cons << console::red << "bad decay time" << eol; return false; } else DECAY_TIME = dt; uis.lfs_decay_time.set_val (DECAY_TIME); } else if (varn == "det" || varn == "delta_time") { float dt; tz >> dt; if (dt == 0) { cons << console::red << "bad delta time" << eol; return false; } else DELTA_TIME = dt; } else if (varn == "su" || varn == "sustain") { float g; tz >> g; _gotog.set (g); } else if (varn == "wv" || varn == "wave_volume") { tz >> WAVE_VOLUME; } else if (varn == "nv" || varn == "note_volume") { float nv; tz >> nv; if (nv > 0) NOTE_VOLUME = nv; else cons << console::red << nv << ": bad note volume" << eol; uis.lfs_note_volume.set_val (NOTE_VOLUME); keybd2.calc_visual_params (); } else if (varn == "dbpm" || varn == "delta_bpm") { tz >> DELTA_BPM; DELTA_BPM = fabs (DELTA_BPM); } else if (varn == "ins" || varn == "instrument") { tz >> INSTRUMENT; } else if (varn == "hz") { curve_editor* crved = uis.crved; if (crved) { tz >> crved->hz; crved->cs.set (crved->hz); crved->cs.render (crved->curveinfo[0].curve); } } else if (varn == "num_sine_samples" || varn == "nss") { int nss; tz >> nss; sine_mixer::set_sine_samples (nss); } else if (varn == "tu" || varn == "tuning") { extern load_globals lg; string name; tz >> name; string fname = name + ".tuning"; if (lg.load_intervals (fname)) { TUNING = name; result = name; d->restore_all_notes (); keybd2.setup_notes (); keybd2.setup_midi_notes (); keybd2.calc_visual_params (); cons ("list2var [get-intervals]"); } else { result = "bad tuning"; return false; } } else if (varn == "snap_drones" || varn == "sd") { tz >> d->snap_drones; } else if (varn == "sc" || varn == "scroll") { extract = set_scroll (varn, tz); } else if (varn == "zoom" || varn == "z") { extract = set_zoom_pan (window::ZOOM_RATE, window::ZOOM_AMOUNT, varn, tz); } else if (varn == "pan" || varn == "p") { extract = set_zoom_pan (window::PAN_RATE, window::PAN_AMOUNT, varn, tz); } else if (varn == "fps") { extern int FPS; tz >> FPS; if (FPS <= 0) FPS = 100; extern double FPS_T; FPS_T = 1.0 / FPS; } else if (varn == "usleep" || varn == "us") { extern int USLEEP; tz >> USLEEP; if (USLEEP < 0) USLEEP = 0; } else if (varn == "show_cursor_info" || varn == "sci") { int v; tz >> v; d->show_cursor_info = v; } else if (varn == "jog" || varn == "j") { tz >> phrasor::JOG; } else if (varn == "ps1" || varn == "prompt") { tz >> cons.ps1; cons.calc_visual_params (); } else if (varn == "dhs" || varn == "drone_handle_size") { tz >> DRONE_HANDLE_SIZE; d->update_drone_x (0, d->last_range); } else if (varn == "tl" || varn == "trail_length") { tz >> TRAIL_LENGTH; if (TRAIL_LENGTH < 1) TRAIL_LENGTH = 1; } else if (varn == "auto_connect_outputs" || varn == "aco") { tz >> audio_out::AUTO_CONNECT_OUTPUTS; } else { if (varn != "") { result = varn + ": not found."; return false; } else break; } } return true; } bool get_var::operator() (tokenizer& tz) { stringstream ss; string varn; while (1) { tz >> varn; if (varn == "fmd" || varn == "fm_depth") { ss << d->fm_depth << ' '; } else if (varn == "amd" || varn == "am_depth") { ss << d->am_depth << ' '; } else if (varn == "pb" || varn == "pitch_bend") { ss << PITCH_BEND << ' '; } else if (varn == "wv" || varn == "wave_volume") { ss << WAVE_VOLUME << ' '; } else if (varn == "nv" || varn == "note_volume") { ss << NOTE_VOLUME << ' '; } else if (varn == "at" || varn == "attack_time") { ss << ATTACK_TIME << ' '; } else if (varn == "dt" || varn == "decay_time") { ss << DECAY_TIME << ' '; } else if (varn == "det" || varn == "delta_time") { ss << DELTA_TIME << ' '; } else if (varn == "su" || varn == "sustain") { ss << _gotog.g << ' '; } else if (varn == "dbpm" || varn == "delta_bpm") { ss << DELTA_BPM << ' '; } else if (varn == "num_octaves" || varn == "no") { ss << NUM_OCTAVES << ' '; } else if (varn == "dmv" || varn == "drone_master_volume") { ss << d->drone_master_volume << ' '; } else if (varn == "hz") { curve_editor* crved = uis.crved; if (crved) { ss << crved->hz << ' '; } else ss << -1 << ' '; } else if (varn == "ins" || varn == "instrument") { ss << INSTRUMENT << ' '; } else if (varn == "sd" || varn == "snap_drones") { sprintf (buf, "%d", d->snap_drones); ss << d->snap_drones << ' '; } else if (varn == "tu" || varn == "tuning") { ss << TUNING << ' '; } else if (varn == "scale") { ss << SCALE << ' '; } else if (varn == "sc" || varn == "scroll") { sprintf (buf, "rate %d x %d y %d ", d->dinfo.scroll.rate, d->dinfo.scroll.dx, d->dinfo.scroll.dy); ss << buf; } else if (varn == "zoom") { ss << "rate " << window::ZOOM_RATE << " amount " << window::ZOOM_AMOUNT << ' '; } else if (varn == "pan") { ss << "rate " << window::PAN_RATE << " amount " << window::PAN_AMOUNT << ' '; } else if (varn == "fps") { extern int FPS; ss << FPS << ' '; } else if (varn == "usleep" || varn == "us") { extern int USLEEP; ss << USLEEP << ' '; } else if (varn == "num_sine_samples" || varn == "nss") { ss << sine_mixer::NUM_SINE_SAMPLES << ' '; } else if (varn == "show_cursor_info" || varn == "sci") { ss << d->show_cursor_info << ' '; } else if (varn == "jog" || varn == "j") { ss << phrasor::JOG << ' '; } else if (varn == "dhs" || varn == "drone_handle_size") { ss << DRONE_HANDLE_SIZE << ' '; } else if (varn == "tl" || varn == "trail_length") { ss << TRAIL_LENGTH << ' '; } else if (varn == "auto_connect_outputs" || varn == "aco") { ss << audio_out::AUTO_CONNECT_OUTPUTS << ' '; } else { if (varn != "") { result = varn + ": not found."; return false; } else break; } } result = ss.str().substr (0, ss.str().length() - 1); return true; } bool set_delay::operator() (tokenizer& tz) { string name; float value; delay* d[2] = {left, right}; delay** pd = d; int n = -1; tz >> name >> value; if (name == "a" || name == "all") n = 2; else if (name == "l" || name == "left") n = 1; else if (name == "r" || name == "right") { pd++; n = 1; } else { result = "bad delay name"; return false; } for (int i = 0; i < n; ++i, pd++) { (*pd)->set (value); } return true; } bool get_delay::operator() (tokenizer& tz) { delay* d; string s; tz >> s; if (s == "left" || s == "l") d = left; else if (s == "right" || s == "r") d = right; else { result = "bad delay name"; return false; } float t; d->get (t); sprintf (buf, "%0.2f", t); result = buf; return true; } int bpm_com::getid (const string& name) { for (int i = 0; i < NUM; ++i) { if (name == str[i]) { return i; } } return -1; } bool ls_bpm::operator() (tokenizer& tz) { static const char spc = ' '; for (int i = 0;i < NUM; ++i) { result = result + str[i] + spc; } return true; } bool set_bpm::operator() (tokenizer& tz) { vector names; vector bpms; string s; tz >> s; get_data (s, names); tz >> s; get_data (s, bpms); for (int i = 0, j = names.size (), k = bpms.size (), l = k - 1; i < j; ++i) { int id = getid (names[i]); if (id != -1) { if (i < k) bv[id]->set_bpm (bpms[i]); else if (l > -1) bv[id]->set_bpm (bpms[l]); } } return true; } bool get_bpm::operator() (tokenizer& tz) { vector names; string s; tz >> s; get_data (s, names); stringstream ss; for (int i = 0, j = names.size (); i < j; ++i) { int id = getid (names[i]); if (id != -1) ss << bv[id]->get_bpm () << ' '; } result = ss.str (); return true; } bool set_beat::operator() (tokenizer& tz) { vector names; vector nows; string s; tz >> s; get_data (s, names); tz >> s; get_data (s, nows); for (int i = 0, j = names.size (), k = nows.size (), l = k - 1; i < j; ++i) { int id = getid (names[i]); if (id != -1) { if (i < k) bv[id]->now = nows[i]; else if (l > -1) bv[id]->now = nows[l]; } } return true; } bool get_beat::operator() (tokenizer& tz) { vector names; stringstream ss; string s; tz >> s; get_data (s, names); string what; tz >> what; for (int i = 0, j = names.size (); i < j; ++i) { int id = getid (names[i]); if (id != -1) { if (what == "") ss << bv[id]->now << ' '; else if (what == "first") ss << bv[id]->sol.firstx << ' '; else if (what == "last") ss << bv[id]->sol.lastx << ' '; else if (what == "all") ss << '{' << bv[id]->now << ' ' << bv[id]->sol.firstx << ' ' << bv[id]->sol.lastx << "} "; } } result = ss.str (); return true; } bool set_style::operator() (tokenizer& tz) { vector names; vector styles; string s; tz >> s; get_data (s, names); tz >> s; get_data (s, styles); for (int i = 0, j = names.size (), k = styles.size (), l = k - 1; i < j; ++i) { int id = getid (names[i]); if (id != -1) { string style; if (i < k) style = styles[i]; else if (l > -1) style = styles[l]; xhandler *xmin = 0, *xmax = 0; if (style == "loop") { xmin = &_loopmin; xmax = &_loopmax; } else if (style == "pong") { xmin = &_pongmin; xmax = &_pongmax; } else { result = "bad style: " + style; return false; } beat2value* b = bv[id]; b->xmin = xmin; b->xmax = xmax; b->style = style; } } return true; } bool get_style::operator() (tokenizer& tz) { vector names; string s; tz >> s; get_data (s, names); stringstream ss; for (int i = 0, j = names.size (); i < j; ++i) { int id = getid (names[i]); if (id != -1) ss << bv[id]->style << ' '; } result = ss.str (); return true; } bool add_scale::operator() (tokenizer& tz) { extern scalelist scalelst; scalelst.add (tz); return true; } bool ls_scales::operator() (tokenizer& tz) { extern scalelist scalelst; scalelst.ls (); return true; } bool remove_scale::operator() (tokenizer& tz) { string nam; tz >> nam; if (nam != "") { extern scalelist scalelst; scalelst.remove (nam); return true; } result = "bad scale name"; return false; } bool load_scale::operator() (tokenizer& tz) { string name; tz >> name; if (name != "") { extern scalelist scalelst; scale r; if (scalelst.get (name, r)) { if (d->drones.size ()) { if (d->delete_all_drones()) { d->save_scale (); d->on_delete = "load-scale " + name; return true; } else return false; } extern scale_info scaleinfo; scaleinfo.set_scale (name); d->load_scale (); keybd2.setup_notes (); keybd2.setup_midi_notes (); keybd2.calc_visual_params (); SCALE = name; } else { result = name + ": not found"; return false; } } else { result = name + ": bad scale name"; return false; } result = "scale is " + name; return true; } bool ls_notes::operator() (tokenizer& tz) { string name; tz >> name; extern scalelist scalelst; scale r; if (scalelst.get (name, r)) { result = r.notes; return true; } else { result = name + ": bad scale"; return false; } } bool set_kern::operator() (tokenizer& tz) { extern font fnt; char a, b; int k; tz >> a >> b >> k; if (a == '.') { map& m = fnt.characters; for (map::iterator i = m.begin(), j = m.end(); i != j; ++i) fnt.kern[(*i).first][b] = k * fnt.xsize; fnt.modified = 1; } else if (b == '.') { map& m = fnt.characters; for (map::iterator i = m.begin(), j = m.end(); i != j; ++i) fnt.kern[a][(*i).first] = k * fnt.xsize; fnt.modified = 1; } else { fnt.kern[a][b] = k * fnt.xsize; fnt.modified = 1; } return true; } bool get_kern::operator() (tokenizer& tz) { extern font fnt; char a, b; int k; tz >> a >> b >> k; if (a == '.') { map& m = fnt.characters; for (map::iterator i = m.begin(), j = m.end(); i != j; ++i) { a = (*i).first; cons << a << ' ' << b << ' ' << fnt.kern[a][b] / fnt.xsize << eol; } } else if (b == '.') { map& m = fnt.characters; for (map::iterator i = m.begin(), j = m.end(); i != j; ++i) { b = (*i).first; cons << a << ' ' << b << ' ' << fnt.kern[a][b] / fnt.xsize << eol; } } else { cons << a << ' ' << b << ' ' << fnt.kern[a][b] / fnt.xsize << eol; } return true; } bool set_font_size::operator() (tokenizer& tz) { extern font fnt; int xsize, ysize, charspc, headroom; tz >> xsize >> ysize >> charspc >> headroom; if (xsize < 1) xsize = fnt.xsize; if (ysize < 1) ysize = fnt.ysize; if (charspc < 1) charspc = fnt.charspc; if (headroom < 1) headroom = fnt.headroom; fnt.xsize = xsize; fnt.ysize = ysize; fnt.load (fnt.fname); fnt.charspc = charspc; fnt.headroom = headroom; fnt.wordspc = 2 * fnt.charspc; cons.calc_visual_params (); din0.calc_range_label (); uis.update_widgets (); keybd2.calc_visual_params (); return true; } bool get_font_size::operator() (tokenizer& tz) { sprintf (buf, "%d %d %d %d", fnt.xsize, fnt.ysize, fnt.charspc, fnt.headroom); result = buf; return true; } int get_note_num (const string& s) { for (int i = 0; i < NUM_NOTES; ++i) { if (s == WESTERN_SHARP [i] || s == WESTERN_FLAT[i]) return i; } return -1; } bool note_distance::operator() (tokenizer& tz) { string note1, note2, verbose; tz >> note1 >> note2 >> verbose; if (note1.length() && note2.length()) { note1[0] = toupper (note1[0]); note2[0] = toupper (note2[0]); } else return false; static const char* dist1 [] = { "1", "2b", "2", "3b", "3", "4", "4#", "5", "6b", "6", "7b", "7", "8" }; static const char* dist2 [] = { "same", "minor_second", "second", "minor_third", "third", "perfect_fourth", "diminished_fifth", "perfect_fifth", "minor_sixth", "sixth", "minor_seventh", "seventh", "octave" }; int i = get_note_num (note1), j = get_note_num (note2); if (i == -1 || j == -1) return false; else { if (j <= i) j += 12; int ji = j - i; if (verbose.length()) { sprintf (buf, "%s %s", dist1[ji], dist2[ji]); result = buf; return true; } else { result = dist1[ji]; return true; } } } bool chord::operator() (tokenizer& tz) { string root, type; tz >> root >> type; if (root.length()) root[0] = toupper (root[0]); else return false; int nn = get_note_num (root); if (nn == -1) { result = root + ": bad note"; return false; }else { const int ntypes = 20; static const char* types[] = { "", // major "m", // minor "maj7", // major 7 "m7", // minor 7 "sus4", // suspended 4th "7sus4", // dominant 7th, suspended 4th "6", // major 6th "m6", // minor 6th "7", // dominant 7th "9", // dominant 9th "5", // power chord "69", // maj 6th, add 9 "11", // dominant 11th "13", // dominant 13th "add9", // major add 9th "m9", // minor 9th "maj9", // major 9th "+", // augmented "07", // diminished 7th "0" // diminished triad }; static const int steps[][7] = { {3, 0, 4, 7}, // num_notes, root, note1, note2.... {3, 0, 3, 7}, {4, 0, 4, 7, 11}, {4, 0, 3, 7, 10}, {3, 0, 5, 7}, {4, 0, 5, 7, 10}, {4, 0, 4, 7, 9}, {4, 0, 3, 7, 9}, {4, 0, 4, 7, 10}, {5, 0, 4, 7, 10, 14}, {2, 0, 7}, {5, 0, 4, 7, 9, 14}, {6, 0, 4, 7, 10, 14, 17}, {6, 0, 4, 7, 10, 14, 21}, {4, 0, 4, 7, 14}, {5, 0, 3, 7, 10, 14}, {5, 0, 4, 7, 11, 14}, {3, 0, 4, 8}, {4, 0, 3, 6, 10}, {3, 0, 3, 6} }; int t = -1; for (int i = 0; i < ntypes; ++i) { if (type == types[i]) { t = i; break; } } if (t == -1) return false; else { const int* ch = &steps[t][0]; stringstream ss1, ss2; for (int i = 0, j = ch[0], k = 1; i < j; ++i, ++k) { int p = (nn + ch[k]) % 12; ss1 << WESTERN_SHARP [p] << ' '; ss2 << WESTERN_FLAT [p] << ' '; } result = ss2.str () + " or " + ss1.str (); return true; } } } void key::find_nearest_note (string& note, float& frequency, float& dist) { float left = WIKIPEDIA_KEY_FREQUENCIES [0] / 2048, right = 2 * left; float tonic = d->get_tonic (); if (tonic < left) return; while (1) { if ((left <= tonic) && (right > tonic)) break; else { left*=2; right*=2; } } float oct = left / WIKIPEDIA_KEY_FREQUENCIES[0]; dist = tonic - left; int id = 0; float tone = 0; for (int i = 0; i < 13; ++i) { tone = WIKIPEDIA_KEY_FREQUENCIES[i] * oct; float newdist = tone - tonic; if (newdist < 0) newdist = -newdist; if (newdist < dist) { dist = newdist; id = i; } } string nn; if (WESTERN_FLAT[id] == WESTERN_SHARP[id]) nn = WESTERN_SHARP[id]; else nn = (string)WESTERN_FLAT[id] + "/" + (string)WESTERN_SHARP[id]; note = nn; frequency = WIKIPEDIA_KEY_FREQUENCIES[id] * oct; dist = tonic - frequency; d->set_key_id (id); } bool key::operator() (tokenizer& tz) { string note ("invalid-note"); float frequency, dist; string s; tz >> s; if (s == "") { // no args, just print key find_nearest_note (note, frequency, dist); sprintf (buf, "key %s @ %0.3f Hz, tonic@ %0.3f Hz & distance %0.3f Hz", note.c_str(), frequency, d->get_tonic(), dist); result = buf; return true; } else if (s == "value" || s == "v") { sprintf (buf, "%0.3f", d->get_tonic ()); result = buf; return true; } else if (s == "note" || s == "n") { find_nearest_note (note, frequency, dist); result = note; return true; } else { float freq = 0; int oct = 0; float val = atof (s.c_str()); if (val <= 0) { // a note if (s[0] != '.') { s[0] = toupper(s[0]); for (int i = 0; i < 12; ++i) { if ((s == WESTERN_SHARP[i]) || (s == WESTERN_FLAT[i])) { freq = WIKIPEDIA_KEY_FREQUENCIES[i]; break; } } } else freq = d->get_tonic (); } else { // a value freq = val; } // octave tz >> s; oct = atoi (s.c_str()); freq = freq * pow (2, oct); set_tonic (freq); find_nearest_note (note, freq, dist); } return false; } bool notation::operator () (tokenizer& tz) { string s; tz >> s; if (s == "numeric" || s == "n") d->set_notation ("numeric"); else if (s == "w" || s == "west" || s == "western") d->set_notation ("western"); else result = d->notation; return true; } bool echo::operator() (tokenizer& tz) { into_lines (tz.cur2end().c_str(), cons); return true; } multi_curve* get_curve (const string& name) { extern vector curve_list; multi_curve* crv = 0; for (int i = 0, j = curve_list.size (); i < j; ++i) { multi_curve* mc = curve_list[i]; if (mc->name == name) crv = mc; } return crv; } bool curve_value::operator() (tokenizer& tz) { string name; tz >> name; multi_curve* crv = get_curve (name); if (crv) { string what; int id; string sx, sy; tz >> what >> id >> sx >> sy; float x, y, xs = atof (sx.c_str()), ys = atof (sy.c_str()); if (what == "v") { int carry_tangents = 1; crv->get_vertex (id, x, y); if (sx == ".") crv->set_vertex (id, x, ys, carry_tangents); else if (sy == ".") crv->set_vertex (id, xs, y, carry_tangents); else crv->set_vertex (id, xs, ys, carry_tangents); crv->evaluate (); return true; } else if (what == "lt") { crv->get_left_tangent (id, x, y); if (sx == ".") crv->set_left_tangent (id, x, ys); else if (sy == ".") crv->set_left_tangent (id, xs, y); else crv->set_left_tangent (id, xs, ys); crv->evaluate (); return true; } else if (what == "rt") { crv->get_right_tangent (id, x, y); if (sx == ".") crv->set_right_tangent (id, x, ys); else if (sy == ".") crv->set_right_tangent (id, xs, y); else crv->set_right_tangent (id, xs, ys); crv->evaluate (); return true; } else { result = "bad target: must be v lt OR rt"; return false; } } result = "curve " + name + " not found"; return false; } bool curve_name::operator() (tokenizer& tz) { curve_editor* ced = uis.crved; if (ced && ced->pik()) { multi_curve* crv = ced->curveinfo[ced->pik.crv_id].curve; string name; tz >> name; if (name != "") crv->name = name; } return true; } bool curve__library::operator() (tokenizer& tz) { curve_editor* ced = uis.crved; if (!ced) { result = "not a curve editor"; return false; } curve_library* cl = ced->library; if (cl) { string cmd; tz >> cmd; if (cmd == "a" || cmd == "add") ced->add_curve (); else if (cmd == "d" || cmd == "delete") cl->del (); else if (cmd == "u" || cmd == "update") ced->replace_curve (); else if (cmd == "i" || cmd == "insert") ced->insert_curve (); else if (cmd == "+") {int n; tz >> n; cl->move (n);} else if (cmd == "-") {int n; tz >> n; cl->move (-n);} else { result = "bad sub-command. see help curve-library"; return false; } } else { result = "no curve library"; return false; } return true; } bool set_curve_editor::operator() (tokenizer& tz) { string name; int screen; tz >> name >> screen; if (uis.set_editor (name, screen)) { stringstream ss; ss << "update-editor " << name << ' ' << screen; interpreter (ss.str()); } return true; } bool set_scope::operator() (tokenizer& tz) { string name, color; tz >> name >> color; float r, g, b; stringstream ss (color); ss >> r >> g >> b; if (name == "left" || name == "l") { d->osc.lr = r; d->osc.lg = g; d->osc.lb = b; return true; } else if (name == "right" || name == "r") { d->osc.rr = r; d->osc.rg = g; d->osc.rb = b; return true; } else return false; } bool get_scope::operator() (tokenizer& tz) { string name; tz >> name; if (name == "left" || name == "l") { sprintf (buf, "%f %f %f", d->osc.lr, d->osc.lg, d->osc.lb); result = buf; return true; } else if (name == "right" || name == "r") { sprintf (buf, "%f %f %f", d->osc.rr, d->osc.rg, d->osc.rb); result = buf; return true; } else return false; } bool set_drone::operator() (tokenizer& tz) { string param; tz >> param; if (param == "volume" || param == "v") { vector ids; vector vols; string s; tz >> s; if (s != "") get_data (s, ids); else return false; tz >> s; if (s != "") get_data (s, vols); else return false; float v = 0; for (int i = 0, j = ids.size(), m = vols.size (); i < j; ++i) { int k = ids[i]; if (i < m) v = vols[i]; d.set_drone_volume (k, v); } return true; } else { result = "bad param"; return false; } } bool get_drone::operator() (tokenizer& tz) { int num_drones = d.drones.size (); string param; tz >> param; if (param == "n" || param == "num_drones") { sprintf (buf, "%d", num_drones); result = buf; return true; } else if (param == "volume" || param == "v") { stringstream ss; string s; tz >> s; if (s != "") { vector ids; get_data (s, ids); for (int i = 0, j = ids.size (); i < j; ++i) { int k = ids[i]; if (k > -1 && k < num_drones) ss << d.drones[k].vol << ' '; } result = ss.str (); return true; } else return false; } else if (param == "selected" || param == "s") { result = d.get_selected_drones (); return true; } return false; } bool set_text_color::operator() (tokenizer& tz) { tz >> cons.clr.r >> cons.clr.g >> cons.clr.b; return true; } bool load_tuning::operator() (tokenizer& tz) { extern load_globals lg; string name; tz >> name; string fname = name + ".tuning"; if (lg.load_intervals (fname)) { result = "tuning: " + name; d->restore_all_notes (); keybd2.setup_notes (); keybd2.setup_midi_notes (); return true; } else { result = "bad tuning file: " + fname + " or invalid tuning."; return false; } } bool paste_gater::operator() (tokenizer& tz) { if (curve_editor::copy.num_vertices ()) { extern din din0; float r, g, b; din0.gatr.crv.get_color (r, g, b); din0.gatr.crv = curve_editor::copy; din0.gatr.crv.set_color (r, g, b); din0.gatr.sol.update (); } return true; } bool get_selection::operator () (tokenizer& tz) { extern ui_list uis; if (uis.crved) result = uis.crved -> selection (); return true; } bool get_intervals::operator() (tokenizer& tz) { string what; tz >> what; stringstream ss; if (what == "piano") { for (int i = 0, j = NUM_NOTES - 1; i < j; ++i) { ss << WESTERN_FLAT[i] << ' ' << WIKIPEDIA_KEY_FREQUENCIES[i] << ' '; } result = ss.str (); } else { extern map INTERVALS; for (map::iterator i = INTERVALS.begin (), j = INTERVALS.end (); i != j; ++i) { const pair& p = *i; ss << p.first << ' ' << p.second << ' '; } } result = ss.str (); return true; } bool num_octaves::operator() (tokenizer& tz) { tz >> NUM_OCTAVES; if (NUM_OCTAVES < 1) NUM_OCTAVES = 1; d.setup_ranges (0); // 0 => dont load from disk d.update_drone_ranges (); d.update_drone_tone (); return true; } bool quit::operator() (tokenizer& tz) { extern int quit_now; quit_now = 1; return true; } din-5.2.1/src/scalelist.cc0000644000175100017510000000630712111771577012314 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include #include #include #include "scalelist.h" #include "console.h" #include "tokenizer.h" #include "command.h" using namespace std; extern console cons; extern cmdlist cmdlst; #define result cmdlst.result #define buf cmdlst.buf scalelist::scalelist () { load (); } scalelist::~scalelist () { save (); } int scalelist::add (tokenizer& tz) { // used by add-scale command, see command.cc string nam; tz >> nam; if (nam != "") { scale r; r.name = nam; string notes; while (1) { string s; tz >> s; if (s == "") break; else { notes = notes + s + " "; ++r.num_notes; } } if (r.num_notes > 1) { r.notes = notes; scales.push_back (r); result = nam + ": added"; return 1; } else { result = "need at least 2 notes."; return 0; } } result = "bad scale name"; return 0; } void scalelist::ls () { // used by ls-scale, see command.cc result = ""; for (int i = 0, j = scales.size(); i < j; ++i) { scale& r = scales[i]; result = result + r.name + eol; } } int scalelist::remove (const string& nam) { // used by remove-scale, see command.cc scale r; r.name = nam; vector::iterator i = find (scales.begin(), scales.end(), r); if (i != scales.end()) { scales.erase (i); result = nam + ": removed"; return 1; } result = nam + ": not found"; return 0; } void scalelist::load () { extern string dotdin; ifstream file ((dotdin + "scalelist").c_str(), ios::in); if (file) { int j; string ignore; file >> ignore >> j; for (int i = 0; i < j; ++i) { scale r; string nam; file >> nam; r.name = nam; file >> r.num_notes; for (int k = 0; k < r.num_notes; ++k) { string s; file >> s; r.notes = r.notes + s + ' '; } scales.push_back (r); } } else cout << "bad scalelist file" << endl; } void scalelist::save () { extern string dotdin; ofstream file ((dotdin + "scalelist").c_str(), ios::out); if (file) { int j = scales.size(); file << "num_scales " << j << eol; for (int i = 0; i < j; ++i) { scale& r = scales[i]; file << r.name << " " << r.num_notes << ' ' << r.notes << eol; } } } int scalelist::get (const string& n, scale& r) { r.name = n; vector::iterator i = find (scales.begin(), scales.end(), r); if (i != scales.end()) { r = *i; return 1; } return 0; } din-5.2.1/src/textboard.cc0000644000175100017510000000576212111771577012331 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "textboard.h" #include "dingl.h" #include "font.h" #include "basic_editor.h" #include using namespace std; void textboard::draw () { glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); extern viewport view; glOrtho (0, view.xmax, 0, view.ymax, -1, 1); for (int i = 0, j = texts.size(); i < j; ++i) { text& t = texts[i]; glColor3f (0.2, 0.2, 0.2); if (t.type == text::vlabel) { glBegin (GL_LINES); glVertex2i (t.vx, 0); glVertex2i (t.vx, view.ymax); glEnd (); } else if (t.type == text::hlabel) { glBegin (GL_LINES); glVertex2i (0, t.vy); glVertex2i (view.xmax, t.vy); glEnd (); } glColor3f (t.r, t.g, t.b); draw_string (t.txt, t.vx, t.vy); } glPopMatrix (); } void textboard::clear () { unsigned int i = 0; while (i < texts.size ()) { text& ti = texts[i]; if (ti.state == text::temporary) texts.erase (texts.begin() + i); else ++i; } } void textboard::erase (const string& s) { unsigned int i = 0; while (i < texts.size ()) { text& ti = texts[i]; if (ti.txt == s) { texts.erase (texts.begin() + i); break; } else ++i; } } void textboard::refresh (basic_editor* b) { for (int i = 0, j = texts.size (); i < j; ++i) { text& ti = texts[i]; extern viewport view; float wx, wy; b->obj2win (ti.wx, ti.wy, wx, wy); win2view (wx, wy, ti.vx, ti.vy, b->win, view); if (ti.type == text::hlabel) { ti.vx = 3; } else if (ti.type == text::vlabel) { ti.vy = 3; } } } void textboard::load (ifstream& file) { string ignore, txt; float r, g, b, wx, wy; int type, ntexts; file >> ignore >> ntexts; for (int i = 0; i < ntexts; ++i) { file >> txt >> wx >> wy >> r >> g >> b >> type; add (text (txt, wx, wy, r, g, b, text::permanent, type)); } } void textboard::save (ofstream& file) { static const char spc = ' '; int ntexts = texts.size (); file << "num_labels " << ntexts << endl; for (int i = 0, j = texts.size (); i < j; ++i) { text& ti = texts[i]; if (ti.type != text::none) { file << ti.txt << spc << ti.wx << spc << ti.wy << spc << ti.r << spc << ti.g << spc << ti.b << spc << ti.type << endl; } } } din-5.2.1/src/sine_mixer.cc0000644000175100017510000000603012111771577012464 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "sine_mixer.h" #include "viewwin.h" #include "input.h" #include "console.h" #include "dingl.h" #include #include using namespace std; extern console cons; sine_mixer::sine_mixer () : sine_levels ("sine_levels") { num_harmonics (sine_levels.nlev); } sine_mixer::~sine_mixer () {} void sine_mixer::num_harmonics (int h) { nharmonics = h; if (nharmonics < 1) nharmonics = 1; prep_harmonics (); } void sine_mixer::prep_harmonics () { harmonics.clear (); for (int i = 0, j = 1; i < nharmonics; ++i, ++j) { harmonics.push_back (vector()); vector& harmonic = harmonics[i]; harmonic.clear (); float dx = 2 * pi * j / (NUM_SINE_SAMPLES - 1); float x = 0; for (int p = 0; p < NUM_SINE_SAMPLES; ++p) { harmonic.push_back (sin(x)); x += dx; } } nonorm.clear (); for (int i = 0; i < NUM_SINE_SAMPLES; ++i) nonorm.push_back(0); mix (); } void sine_mixer::mix () { for (int p = 0, q = nonorm.size (); p < q; ++p) nonorm[p] = 0; for (int i = 0; i < nharmonics; ++i) { float lev = sine_levels.values[i]; if (lev != 0) { vector& harmonic = harmonics[i]; for (int p = 0, q = nonorm.size (); p < q; ++p) nonorm[p] += (lev * harmonic[p]); } } normalise (); } void sine_mixer::normalise () { norm = nonorm; int n = norm.size (); if (n) { float max = fabs (norm [0]); for (int i = 0; i < n; ++i) { float v = fabs (norm[i]); if (v > max) max = v; } if (max != 0) for (int p = 0; p < n; ++p) norm[p] /= max; } } bool sine_mixer::handle_input () { bool result = sine_levels.handle_input (); if (result) {mix (); return true;} return false; } void sine_mixer::draw () { sine_levels.draw (); } void sine_mixer::make_curve (multi_curve& c) { float dx = 1. / (NUM_SINE_SAMPLES - 1); float x = 0; c.clear (0); for (int i = 0, j = norm.size(); i < j; ++i) { float y = norm[i]; c.add_vertex (x, y); c.add_left_tangent (x, y); c.add_right_tangent (x, y); x += dx; } c.evaluate (); } void sine_mixer::set_sine_samples (int s) { NUM_SINE_SAMPLES = s; if (NUM_SINE_SAMPLES < MIN_SINE_SAMPLES) NUM_SINE_SAMPLES = MIN_SINE_SAMPLES; extern sine_mixer sinemixer; sinemixer.prep_harmonics (); } din-5.2.1/src/levels.cc0000644000175100017510000001356012111771577011622 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "key_consts.h" #include "main.h" #include "levels.h" #include "viewwin.h" #include "input.h" #include "console.h" #include "utils.h" #include "font.h" #include #include using namespace std; extern console cons; levels::levels (const string& s) { name = s; load (); } levels::~levels () { save (); } void levels::load () { extern string dotdin; ifstream file ((dotdin + name).c_str(), ios::in); string ignore; int left, bottom; if (!file) { cout << "cant read settings for " << name << ", using defaults." << endl; nlev = 10; elem_width = 10; height = 100; left = 0; bottom = 0; r = g = b = a = 1; editable = 0; saveable = 0; } else { file >> ignore >> nlev; lastlev = nlev - 1; file >> ignore >> left >> bottom; file >> ignore >> elem_width; file >> ignore >> height; file >> ignore >> r >> g >> b >> a; file >> ignore >> editable; file >> ignore >> saveable; } a0 = a / 4; bbox (left, bottom, left + nlev * elem_width, bottom + height); for (int i = 0; i < nlev; ++i) { values.push_back (0); heights.push_back (0); } if (saveable) { int savings; file >> ignore >> savings; for (int i = 0; i < savings; ++i) { file >> values[i]; heights[i] = (int)(values[i] * bbox.height); } } editing = edited = false; moving = false; } void levels::save () { extern string dotdin; ofstream file ((dotdin+name).c_str(), ios::out); if (file) { file << "num_levels " << nlev << endl; file << "lower_corner " << bbox.left << ' ' << bbox.bottom << endl; file << "element_width " << elem_width << endl; file << "height " << height << endl; file << "color " << r << ' ' << g << ' ' << b << ' ' << a << endl; file << "editable " << editable << endl; file << "saveable " << saveable << endl; if (saveable) { file << "savings " << nlev << ' '; for (int i = 0; i < nlev; ++i) file << values[i] << ' '; file << endl; } else { file << "savings 0" << endl; } } else cout << "!!! couldnt save levels !!!" << endl; } bool levels::handle_input () { static int dl, db, dr, dt; extern int mousex, mousey; extern viewport view; int mouseyy = view.ymax - mousey; edited = false; hover = false; if (inbox (bbox, mousex, mouseyy)) { hover = true; calc (); if (keypressed (k_f)) { if (moving == false) { moving = true; dl = bbox.left - mousex; dr = bbox.right - mousex; db = bbox.bottom - mouseyy; dt = bbox.top - mouseyy; } else { moving = false; } } if (moving) { bbox (mousex + dl, mouseyy + db, mousex + dr, mouseyy + dt); edited = true; } if (editable) { if (keydown (k_g)) { if (lev != -1) { set (lev, val, hgt); edited = true; } } if (keypressed (k_h)) { clear (); if (lev != -1) { set (lev, val, hgt); edited = true; } } if (keydown (k_c)) { if (lev != -1) { set (lev, 0, -1); edited = true; } } } } return edited; } void levels::calc () { extern viewport view; extern int mousex, mousey; int mouseyy = view.ymax - mousey; int dx = mousex - bbox.left; lev = dx / elem_width; if (lev > lastlev || lev < 0) lev = -1; hgt = mouseyy - bbox.bottom; val = hgt * bbox.height_1; clamp (0.0F, val, 1.0F); clamp (0, hgt, bbox.height); } void levels::clear () { for (int i = 0; i < nlev; ++i) values[i] = heights[i] = 0; } void levels::draw () { glMatrixMode (GL_MODELVIEW); glPushMatrix (); glLoadIdentity (); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); extern viewport view; glOrtho (0, view.xmax, 0, view.ymax, -1, 1); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); int i = 0, x = bbox.left, ds = elem_width - 2; if (bbox.left < 0) { i = -bbox.left / elem_width; x = 0; } for (;i < nlev; ++i) { int l = x + 1, r = x + ds; glColor4f (r, g, b, a0); glRecti (l, bbox.bottom, r, bbox.top); glColor4f (r, g, b, a); glRecti (l, bbox.bottom, r, bbox.bottom + heights[i]); x += elem_width; if (x > view.xmax) break; } glDisable (GL_BLEND); static char buf [256]; sprintf (buf, "%d/%.3f", lev+1, lev > -1? values[lev]:-1); draw_string (buf, bbox.left, bbox.top + 4, 0); glPopMatrix (); glMatrixMode (GL_MODELVIEW); glPopMatrix (); } void levels::set (int i, float v, int h) { values[i] = v; if (h == -1) heights[i] = (int)(v * bbox.height); else heights[i] = h; } void levels::chkpos () { extern viewport view; if (!view.inside (bbox.left, bbox.bottom)) bbox.lower_corner (0, 0); } din-5.2.1/src/chrono.cc0000644000175100017510000000275112111771577011620 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "chrono.h" chrono::chrono () { secs = delta_secs = 0; ticks = delta_ticks = 0; } chrono& chrono::operator++ () { ticks += delta_ticks; secs += delta_secs; return *this; } void nano_chrono::reset () { clock_gettime (CLOCK_MONOTONIC, &start); } void nano_chrono::tick () { clock_gettime (CLOCK_MONOTONIC, &now); find_elapsed (); } void nano_chrono::find_elapsed () { if (( now.tv_nsec - start.tv_nsec ) < 0) { delta.tv_sec = now.tv_sec - start.tv_sec - 1; delta.tv_nsec = now.tv_nsec + 1000000000 - start.tv_nsec; } else { delta.tv_sec = now.tv_sec - start.tv_sec; delta.tv_nsec = now.tv_nsec - start.tv_nsec; } secs = delta.tv_sec + delta.tv_nsec / 1000000000.0; } din-5.2.1/src/font_editor.cc0000644000175100017510000001235212111771577012642 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "font_editor.h" #include "font.h" #include "input.h" #include "console.h" #include "key_consts.h" #include #include using namespace std; extern console cons; font_editor::font_editor (font& f, const string& settingsf, const string& helpf) : curve_editor (settingsf, helpf), fn (f), glyphs (f.get_chars()), moving(false) { prep_edit (); edit_char (0); } font_editor::~font_editor () { //leave (); } void font_editor::leave () { //save_font (); } void font_editor::save_font () { save_char (ichar); prep_save (); } void font_editor::edit_char (int i) { if (i > -1 && i < (int) glyphs.size()) { char c = chars[i]; gl = glyphs[c]; lines = gl.lines; //cout << "char = " << c << endl; } } void font_editor::save_char (int i) { if (i > -1 && i < (int)glyphs.size()) { gl.lines = lines; glyphs[chars[i]] = gl; } } void font_editor::prep_edit () { chars.clear (); for (map::iterator i = glyphs.begin (), j = glyphs.end(); i != j; ++i) { const pair& p = *i; glyph g (p.second); vector& lines = g.lines; for (int s = 0, t = lines.size(); s < t; ++s) { vector < point >& points = lines[s].points; for (int m = 0, n = points.size(); m < n; ++m) { point& pt = points[m]; float wx, wy; basic_editor::obj2win (pt.x / fnt.xsize, pt.y / fnt.xsize, wx, wy); pt.x = wx; pt.y = wy; } } chars.push_back (p.first); glyphs[p.first] = g; } } void font_editor::prep_save () { map fg (glyphs); for (map::iterator i = fg.begin (), j = fg.end(); i != j; ++i) { const pair& p = *i; glyph g(p.second); vector& lines = g.lines; for (int s = 0, t = lines.size(); s < t; ++s) { vector < point >& points = lines[s].points; for (int m = 0, n = points.size(); m < n; ++m) { point& pt = points[m]; float ox, oy; basic_editor::win2obj (pt.x, pt.y, ox, oy); pt.x = ox * fnt.xsize; pt.y = oy * fnt.ysize; } } g.find_width_height (); fg[p.first] = g; } fn.set_chars (fg); } bool font_editor::handle_input () { basic_editor::handle_input (); if (keypressed (k_f)) { float x, y; snap (x, y); scratch_points.push_back (point(x, y)); } if (keypressed (k_g)) { if (scratch_points.size() > 1) lines.push_back (line(scratch_points)); scratch_points.clear (); } if (keypressed (k_r)) { if (moving) moving = false; else { cur = hittest (); if (cur()) moving = true; else cout << "no hit" << endl; } } else if (moving) move (); if (keypressed (k_i)) { if (ins()) { float x, y; snap (x, y); lines[ins.l].insert (ins.v, x, y); ins = line_hit(); } else ins = hittest (); } if (keypressed (k_v)) { del = hittest (); if (del()) { if (keydown (k_lshift)) lines.erase (lines.begin() + del.l); else { if (lines[del.l].remove (del.v) < 2) lines.erase (lines.begin() + del.l); } } } if (keypressed (k_g)) { save_font (); } if (keypressedd (k_left_bracket)) { if (ichar > 0) { save_char (ichar--); edit_char (ichar); } } if (keypressedd (k_right_bracket)) { if (ichar < ((int)chars.size() - 1)) { save_char (ichar++); edit_char (ichar); } } if (keypressed (k_enter)) { save_font (); } return true; } void font_editor::draw () { project (); basic_editor::draw (); draw_lines (); draw_scratch_line (); unproject (); } line_hit font_editor::hittest () { float x, y; snap (x, y); cout << x << ' ' << y << endl; for (int i = 0, j = lines.size(); i < j; ++i) { const line& l = lines[i]; for (int p = 0, q = l.points.size(); p < q; ++p) { const point& pt = l.points[p]; if ((pt.x == x) && (pt.y == y)) return line_hit (i, p); } } return line_hit (); } void font_editor::draw_scratch_line () { if (int npts = scratch_points.size ()) { float x, y; snap (x, y); glColor3f (0.7, 0.4, 0); glBegin (GL_LINE_STRIP); for (int i = 0; i < npts; ++i) glVertex2f (scratch_points[i].x, scratch_points[i].y); glVertex2f (x, y); glEnd(); } } void font_editor::draw_lines () { glColor3f (1, 0.8, 0); for (int i = 0, j = lines.size(); i < j; ++i) lines[i].draw (); } void font_editor::move () { float x, y; snap (x, y); lines[cur.l].set (cur.v, x, y); } din-5.2.1/src/phrasor.cc0000644000175100017510000000231212111771577011777 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "phrasor.h" #include "dingl.h" void phrasor::draw (unsigned int i, float r, float g, float b) { if (i < (unsigned int) sz) { glColor3f (r, g, b); draw_marker (data[i].x, data[i].y); } } void phrasor::draw_marker (int x, int y) { static const int msz = 25; glBegin (GL_LINES); glVertex2i (x - msz, y); glVertex2i (x + msz, y); glVertex2i (x, y - msz); glVertex2i (x, y + msz); glEnd (); } din-5.2.1/src/compressor.cc0000644000175100017510000000206212111771577012517 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "compressor.h" using namespace std; compressor::compressor (const string& f) : crv (f), lis (*this) { fname = f; apply (&crv); } void compressor_listener::edited (curve_editor* ed, int i) { c.apply (&c.crv); } compressor::~compressor () { crv.save (fname); } din-5.2.1/src/osc.cc0000644000175100017510000000604612111771577011115 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "osc.h" #include "din.h" #include "console.h" #include "command.h" #include "tokenizer.h" #include "tcl_interp.h" #include using namespace std; extern cmdlist cmdlst; bool oserver::operator() (tokenizer& tz) { string port; tz >> port; int pt = atoi (port.c_str()); const int MIN_VALID_PORT = 1024; if (pt < MIN_VALID_PORT) { cons << console::red << "bad port number: " << pt << ", minimum valid port = " << MIN_VALID_PORT << eol; return false; } float msecs; tz >> msecs; if (msecs <= 0) msecs = 1; if (server) { cons << console::yellow << "closing osc server" << eol; lo_server_free (server); } server = lo_server_new (port.c_str(), 0); lo_server_add_method (server, 0, 0, command_handler, 0); lo_fd = lo_server_get_socket_fd (server); if (lo_fd) { cons << console::green << "server started at " << port << ", command timeout is " << msecs << " msecs." << eol; tv.tv_sec = 0; tv.tv_usec = (__suseconds_t ) (msecs * 1000); enabled = true; msg = true; return true; } else cout << "could not create server" << endl; return false; } void oserver::handle_requests () { if (lo_fd > 0) { FD_ZERO (&rfds); FD_SET (lo_fd, &rfds); int retval = select (lo_fd + 1, &rfds, 0, 0, &tv); if (retval == -1) return; lo_server_recv_noblock (server, 0); } } void oserver::toggle () { enabled = !enabled; } oserver::~oserver () { if (server) lo_server_free (server); } int command_handler (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { cons (path); return 1; } bool oconnect::operator() (tokenizer& tz) { string ip, port; tz >> ip >> port; client = lo_address_new (ip.c_str(), port.c_str()); if (!client) { cons << console::red << "failed to connect: " << ip << " at " << port << eol; return false; } else cons << console::green << "connected to: " << ip << " at " << port << eol; return true; } bool osend::operator() (tokenizer& tz) { if (client) { string cmd (tz.cur2end ()); lo_send (client, cmd.c_str(), "s", cmd.c_str()); return true; } else { cons << console::red << "connect to osc server first" << eol; return false; } } void osc () { extern oserver srv; srv.handle_requests (); } din-5.2.1/src/globals.cc0000644000175100017510000000647612122367115011752 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "globals.h" #include #include #include #include "viewwin.h" #include "ansi_color_codes.h" using namespace std; extern string APP_NAME; extern int SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_DEPTH; extern int SAMPLE_RATE; extern float MIN_TONIC, MAX_TONIC; extern string TUNING; extern string INTERVALS_FILE; extern int NUM_INTERVALS; extern string FIRST_INTERVAL_NAME, LAST_INTERVAL_NAME; extern map INTERVALS; extern vector INTERVALS_SEQ; extern map NOTE_POS; extern int NUM_VOLUMES, LAST_VOLUME; extern float DELTA_VOLUME; extern int NUM_MICROTONES; extern int LEFT, BOTTOM, RIGHT, TOP, HEIGHT; extern string SCALE; extern int FPS, USLEEP; extern double FPS_T; extern float DELTA_BPM; extern int DRONE_HANDLE_SIZE; extern int NUM_OCTAVES; void calc_volume_vars (int h) { // for microtonal keyboard NUM_VOLUMES = h + 1; DELTA_VOLUME = 1./ h; LAST_VOLUME = h; } bool load_globals::load_intervals (const string& fname) { extern string dotdin; ifstream file ((dotdin + fname).c_str(), ios::in); if (file) { INTERVALS_FILE = fname; file >> ignore >> NUM_INTERVALS; INTERVALS.clear (); INTERVALS_SEQ.clear (); for (int i = 0, last = NUM_INTERVALS - 1, pos = 0; i < NUM_INTERVALS; ++i, ++pos) { string note_name; float value; file >> note_name >> value; if (i == 0) FIRST_INTERVAL_NAME = note_name; else if (i == last) LAST_INTERVAL_NAME = note_name; INTERVALS [note_name] = value; NOTE_POS [note_name] = pos; INTERVALS_SEQ.push_back (value); } return true; } else return false; } load_globals::load_globals () { extern string dotdin; string fname = dotdin + "globals"; ifstream file (fname.c_str(), ios::in); if (file) { cout << LOAD << "<<< loading globals"; APP_NAME = "DIN Is Noise 5.2.1"; file >> ignore >> SCREEN_WIDTH >> SCREEN_HEIGHT; file >> ignore >> INTERVALS_FILE; file >> ignore >> SCALE; file >> ignore >> LEFT >> BOTTOM; file >> ignore >> HEIGHT; file >> ignore >> NUM_MICROTONES; file >> ignore >> NUM_OCTAVES; file >> ignore >> viewport::handle_radius; cout << ", done >>>" << ENDL; } else { cout << "bad globals file, will use defaults " << endl; APP_NAME = "din"; SCREEN_WIDTH = 640; SCREEN_HEIGHT = 480; INTERVALS_FILE = "et.tuning"; SCALE = "minor"; LEFT = 0; BOTTOM = 150; HEIGHT = 300; NUM_MICROTONES = 150; } load_intervals (INTERVALS_FILE); TOP = BOTTOM + HEIGHT; calc_volume_vars (HEIGHT); } din-5.2.1/src/bot.cc0000644000175100017510000001557412111771577011123 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ /* * din irc bot * based on LGPLed code by Georgy Yunaev gyunaev@ulduzsoft.com * of libircclient.sourceforge.net. * * copyright (c) 2009-2011 S Jagannathan * distributed under gpl 3.0 affero license * */ #include #include "bot.h" #include "console.h" #include "command.h" #include "tokenizer.h" #include "tcl_interp.h" #include "utils.h" #include "ansi_color_codes.h" #include #include using namespace std; extern console cons; extern cmdlist cmdlst; extern tcl_interp interpreter; bot_t::bot_t (const string& ln, const string& sn) : command (ln, sn), sess (0), tid(0), prefixed (0), quitmsg ("i'm done.") { memset (&callbacks, 0, sizeof(callbacks)); callbacks.event_connect = event_connect; callbacks.event_join = event_join; callbacks.event_nick = dump_event; callbacks.event_quit = dump_event; callbacks.event_part = dump_event; callbacks.event_mode = dump_event; callbacks.event_topic = dump_event; callbacks.event_kick = dump_event; callbacks.event_channel = event_channel; callbacks.event_privmsg = event_privmsg; callbacks.event_notice = dump_event; callbacks.event_invite = dump_event; callbacks.event_umode = dump_event; callbacks.event_ctcp_rep = dump_event; callbacks.event_ctcp_action = dump_event; callbacks.event_unknown = dump_event; callbacks.event_numeric = event_numeric; callbacks.event_dcc_chat_req = irc_event_dcc_chat; callbacks.event_dcc_send_req = irc_event_dcc_send; sess = irc_create_session (&callbacks); if (!sess) { cout << FAIL << "!!! could not create IRC session !!!" << ENDL; exit(1); } else { cout << PASS << "+++ created an IRC session +++" << ENDL; irc_set_ctx (sess, this); } } bool bot_t::operator() (tokenizer& tz) { string cmd; tz >> cmd; if ((cmd == "prefix") || (cmd == "p")) { string value; tz >> value; if (value != "") { prefix = value + ": "; prefixed = 1; cmdlst.result = "will prefix " + prefix; } else { cmdlst.result = "wont prefix " + prefix; prefix = ""; prefixed = 0; } } else if ( (cmd == "connect") || (cmd == "c")) { tz >> srv >> nick >> chan >> passwd; // add # to channel name string s = "#"; s += chan; chan = s; nickolon = nick + ':'; len = nickolon.length (); kill (); make (); } else if ( (cmd == "disconnect") || (cmd == "d")) { quitmsg = tz.cur2end (); if (quitmsg == "") quitmsg = "i'm done."; kill (); cons << console::red << "disconnected" << eol; } else { // send as message to channel cmd = cmd + ' ' + tz.cur2end (); *this << cmd; } return true; } bot_t& bot_t::operator<< (const std::string& s) { if (tid && (s != "")) { std::string out (prefix + s.c_str()); irc_cmd_msg (sess, chan.c_str(), out.c_str()); } return *this; } void* irc_monitor (void* pb) { bot_t* b = (bot_t*) pb; irc_run (b->sess); return 0; } int bot_t::make () { if (sess && !tid) { // no previous bot if ( irc_connect (sess, srv.c_str(), 6667, 0, nick.c_str(), 0, 0) ) { cmdlst.result = srv + " not found."; return 0; } else { cmdlst.result = "connecting to: " + srv; pthread_create (&tid, 0, irc_monitor, this); return 1; } } return 0; } int bot_t::kill () { if (tid) { irc_cmd_quit (sess, quitmsg.c_str()); pthread_join (tid, 0); tid = 0; if (sess) irc_disconnect (sess); return 1; } return 0; } bot_t::~bot_t () { kill (); if (sess) irc_destroy_session (sess); } void dump_event (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count){} void event_join (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { bot_t* pbot = (bot_t *) irc_get_ctx (session); pbot->mesgs.push (get_nick (origin) + " has joined " + string(params[0])); irc_cmd_channel_mode (session, pbot->chan.c_str(), ""); } void event_connect (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { bot_t* pbot = (bot_t *) irc_get_ctx (session); pbot->mesgs.push ("connected."); irc_cmd_join (session, pbot->chan.c_str(), pbot->passwd.c_str()); } string get_nick (const char * origin) { static const int nickbufsize = 512; static char nickbuf [nickbufsize]; // irc_get_target_nick will truncate to this length irc_target_get_nick (origin, nickbuf, nickbufsize); return string (nickbuf); } void event_privmsg (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { bot_t* pb = (bot_t *) irc_get_ctx (session); pb->cmds.push (params[1]); } void event_channel (irc_session_t * session, const char * event, const char * origin, const char ** params, unsigned int count) { bot_t* pb = (bot_t *) irc_get_ctx (session); pb->mesg = params[1]; string tok (pb->mesg.substr (0, pb->len)); if (tok == pb->nickolon) { pb->mesg = pb->mesg.substr (pb->len, pb->mesg.length()); pb->cmds.push (pb->mesg); } else { string s (get_nick (origin) + "@" + pb->srv + ": " + pb->mesg); pb->mesgs.push (s); } } void bot_t::handle_input () { if (cmds.size()) { string& cmd = cmds.front (); into_lines (interpreter (cmd).result, *this); cmds.pop (); } if (mesgs.size()) { string& mesg = mesgs.front (); cons << mesg << eol; mesgs.pop (); } } void event_numeric (irc_session_t * session, unsigned int event, const char * origin, const char ** params, unsigned int count) { if (event == 324) { // channel mode hardcode for building in jaunty string mode (params[2]); if (mode.find ("k") == string::npos) { bot_t* pb = (bot_t *) irc_get_ctx (session); pb->cmds.push ("bot disconnect {will connect to password protected channel only}"); } } } void irc_event_dcc_chat (irc_session_t * session, const char * nick, const char * addr, irc_dcc_t dccid) {} void irc_event_dcc_send (irc_session_t * session, const char * nick, const char * addr, const char * filename, unsigned long size, irc_dcc_t dccid) {} din-5.2.1/src/tokenizer.cc0000644000175100017510000000610412111771577012336 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ // string tokenizer // based on initial code by Song Ho Ahn (song.ahn@gmail.com) #include "tokenizer.h" #include #include using namespace std; tokenizer::tokenizer() { str (""); del (DEFAULT_DELIMITER); } tokenizer::tokenizer(const std::string& s, const std::string& d) { str (s); del (d); } tokenizer::tokenizer (const std::vector& t) { vec (t); } void tokenizer::set (const std::string& s, const std::string& d) { str (s); del (d); } void tokenizer::str (const std::string& s) { buffer = s; blen = buffer.length (); init_cur (); tokens_available = 0; } void tokenizer::del (const std::string& d) { delimiter = d; dlen = delimiter.length (); } void tokenizer::vec (const std::vector& t) { tokens = t; tokens_available = 1; tokid = 0; } void tokenizer::init_cur () { if (blen) cur = 0; else cur = -1; } tokenizer& tokenizer::operator>> (std::string& s) { if (tokens_available) { if (tokid < tokens.size()) s = tokens[tokid++]; else { s = ""; cur = blen; } } else { token = ""; if (blen < 1) { s = token; } else { skip_ws (); while ((cur < blen) && !isdelim (buffer[cur])) { token += buffer[cur]; ++cur; } s = token; } } return *this; } tokenizer& tokenizer::operator>> (float& f) { string s; *this >> s; f = atof (s.c_str()); return *this; } tokenizer& tokenizer::operator>> (int& i) { string s; *this >> s; i = atoi (s.c_str()); return *this; } tokenizer& tokenizer::operator>> (char& c) { string s; *this >> s; if (s.length()) c = s[0]; return *this; } void tokenizer::skip_ws () { while (cur < blen) if (!isdelim (buffer[cur])) break; else ++cur; } bool tokenizer::isdelim (char c) { for (int i = 0; i < dlen; ++i) { if (delimiter[i] == c) return true; } return false; } string tokenizer::cur2end () { if (tokens_available) { string result; static const char spc = ' '; for (int i = tokid, j = tokens.size(); i < j; ++i) result = result + tokens[i] + spc; return result; } else { if (cur > -1) { return buffer.substr (cur, blen - 1); } else return ""; } } din-5.2.1/src/morse_code.cc0000644000175100017510000001213512111771577012444 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "morse_code.h" #include "tokenizer.h" #include "command.h" #include "ui_list.h" #include using namespace std; #define buf cmdlst.buf #define result cmdlst.result extern cmdlist cmdlst; extern ui_list uis; morse_code::morse_code (const string& ln, const string& sn) : command (ln, sn), dot ("dot.crv"), dash ("dash.crv"), inner_space ("inner.crv"), letter_space ("letter.crv"), word_space ("word.crv"), ed ("morse-code.ed") { load ("i8n_morse_code"); ed.add (&dot, &lis); ed.add (&dash, &lis); ed.add (&inner_space, &lis); ed.add (&letter_space, &lis); ed.add (&word_space, &lis); add_first_vertex = 1; // of pattern for first letter of sentence. otherwise continue pattern from last added vertex } morse_code::~morse_code() { dot.save ("dot.crv"); dash.save ("dash.crv"); inner_space.save ("inner_space.crv"); letter_space.save ("letter_space.crv"); word_space.save ("word_space.crv"); } bool morse_code::load (const string& fname) { extern string dotdin; ifstream file ((dotdin + fname).c_str(), ios::in); ncodes = 0; if (file) { char c; string dnd; string ignore; file >> ignore >> ncodes; code.clear (); for (int i = 0; i < ncodes; ++i) { file >> c >> dnd; code[c] = dnd; } return true; } else return false; } bool morse_code::operator() (tokenizer& tz) { // called when user executes morse-code [nbeats] float nbeats; string text; tz >> text >> nbeats; if (nbeats <= 0) nbeats = 1; std::transform (text.begin(), text.end(), text.begin(), (int(*)(int)) toupper); // morse is upper case return create_pattern (text, nbeats); } bool morse_code::create_pattern (const string& text, float tox) { multi_curve& morse = curve_editor::copy; morse.clear (); char prev_let = 0; for (int i = 0, j = text.length(); i < j; ++i) { char cur_let = text[i]; if (cur_let == ' ') { append (morse, word_space); // word complete prev_let = 0; } else { if (prev_let != 0) append (morse, letter_space); // letter complete prev_let = cur_let; string dnd (code[cur_let]); if (dnd != "") { char prev_in = 0, cur_in = 0; for (int m = 0, n = dnd.length(); m < n; ++m) { cur_in = dnd[m]; if (prev_in != 0) append (morse, inner_space); prev_in = cur_in; if (cur_in == '.') append(morse, dot); else append(morse, dash); } } } } scale_tox (morse, tox); morse.evaluate (); result = "Morse code on copy curve. Go paste"; add_first_vertex = 1; // prep for next time return true; } void morse_code::append (multi_curve& m, multi_curve& p) { int n = p.num_vertices (); if (!n) return; point v0 (p.vertices[0]); // first vertex of morse code pattern (dot, dash, letter, word or inner spacings) int start = 1; if (add_first_vertex) { // only when we start conversion of text -> morse code. org = v0; start = 0; add_first_vertex = 0; } else { // continue pattern from last added vertex in conversion org = vi; point rt0 (p.right_tangents[0]); m.set_right_tangent (m.num_vertices() - 1, vi.x + (rt0.x - v0.x), vi.y + (rt0.y - v0.y)); } // position the vertices & tangents of the pattern for (int i = start; i < n; ++i) { vi = p.vertices[i]; point& lt = p.left_tangents[i]; point& rt = p.right_tangents[i]; point ltv (lt.x - vi.x, lt.y - vi.y); point rtv (rt.x - vi.x, rt.y - vi.y); vi.x = org.x + vi.x - v0.x; vi.y = org.y + vi.y - v0.y; m.add_vertex (vi.x, vi.y); m.add_left_tangent (vi.x + ltv.x, vi.y + ltv.y); m.add_right_tangent (vi.x + rtv.x, vi.y + rtv.y); } } void morse_code::scale_tox (multi_curve& m, float tox) { // assumes x is increasing & first vertex x = 0 // // suitable when input curve is from waveform, gater, FM/AM and octave shift // int n = m.num_vertices (); if (!n) return; int last = n - 1; point vlast (m.vertices[last]); float factor = 1; if (vlast.x != 0); factor = tox / vlast.x; for (int i = 0; i < n; ++i) { vi = m.vertices[i]; point& lt = m.left_tangents[i]; point& rt = m.right_tangents[i]; m.set_vertex (i, vi.x * factor, vi.y); m.set_left_tangent (i, lt.x * factor, lt.y); m.set_right_tangent (i, rt.x * factor, rt.y); } } din-5.2.1/src/tcl_interp.cc0000644000175100017510000000527112111771577012473 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "tokenizer.h" #include "command.h" #include "tcl_interp.h" #include "ansi_color_codes.h" #include #include #include using namespace std; extern cmdlist cmdlst; void add_commands (Tcl_Interp* ti); int tcl_run (ClientData cd, Tcl_Interp* ti, int objc, Tcl_Obj* CONST objv[]) { command* cmdp = cmdlst.cmds [(intptr_t)cd]; if (cmdp) { cmdlst.result = ""; vector args; for (int i = 1; i < objc; ++i) args.push_back (Tcl_GetString(objv[i])); tokenizer tz (args); cmdp->operator() (tz); /*Tcl_Obj* obj = Tcl_NewStringObj (cmdlst.result.c_str(), -1); Tcl_SetObjResult (ti, obj);*/ Tcl_SetResult (ti, (char *) cmdlst.result.c_str(), TCL_STATIC); } return 0; } tcl_interp::tcl_interp () { cout << DOING << "*** creating Tcl interpreter ***" << ENDL; interp = Tcl_CreateInterp (); if (!interp) { cout << FAIL << "!!! Could not create Tcl interpreter !!!" << ENDL; exit (1); } Tcl_Init (interp); add_commands (interp); extern double MIDI_BPM, TAP_BPM, TIME_NOW, VOLUME; Tcl_LinkVar (interp, "midibpm", (char *) &MIDI_BPM, TCL_LINK_DOUBLE); Tcl_LinkVar (interp, "tapbpm", (char *) &TAP_BPM, TCL_LINK_DOUBLE); Tcl_LinkVar (interp, "timenow", (char *) &TIME_NOW, TCL_LINK_DOUBLE); Tcl_LinkVar (interp, "volume", (char *) &VOLUME, TCL_LINK_DOUBLE); cout << PASS << "+++ created Tcl interpreter +++" << ENDL; } tcl_interp& tcl_interp::operator () (const string& cmd) { Tcl_Obj* script = Tcl_NewStringObj (cmd.c_str(), -1); Tcl_IncrRefCount (script); Tcl_EvalObjEx (interp, script, 0); Tcl_DecrRefCount (script); result = Tcl_GetStringResult (interp); return *this; } tcl_interp::~tcl_interp () { if (interp) { Tcl_UnlinkVar (interp, "midibpm"); Tcl_UnlinkVar (interp, "tapbpm"); Tcl_UnlinkVar (interp, "timenow"); Tcl_UnlinkVar (interp, "volume"); Tcl_DeleteInterp (interp); } } din-5.2.1/src/ui.cc0000644000175100017510000003552612121205156010735 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "ui_list.h" #include "din.h" #include "morse_code.h" #include "console.h" #include "curve_editor.h" #include "tcl_interp.h" #include "command.h" #include "chrono.h" #include "font_editor.h" #include "key_consts.h" #include "keyboard_keyboard.h" #include "fft.h" #include "viewwin.h" #include "authors_note.h" using namespace std; extern console cons; extern cmdlist cmdlst; extern din din0; extern morse_code mc; extern curve_editor delayed; extern string dotdin; extern tcl_interp* p_interp; extern font fnt; extern curve_editor waved, comed, octed, veled, dmod_ed; extern authors_note anote; extern din din0; extern keyboard_keyboard keybd2; extern fft fft0; extern ui_list uis; extern audio_out aout; extern int quit_now; extern viewport view; extern float ATTACK_TIME; extern float DECAY_TIME; extern float PITCH_BEND; extern float NOTE_VOLUME; ui_list::ui_list () : fed (fnt, "font.ed"), d_parameters ("parameters"), lfs_attack_time (0, 50, "attack_time", 8, 70, 15, atv), lfs_decay_time (0, 30, "decay_time", 8, 70, 15, dkv), lfs_pitch_bend (0, 10, "pitch_bend", 8, 70, 15, pbv), lfs_note_volume (0, 20, "note_volume", 8, 70, 15, nvv), d_min_max ("min/max"), mml_min ("min"), mml_max ("max"), mmf_min (8), mmf_max(8), lmm_attack (lfs_attack_time), lmm_decay (lfs_decay_time), lmm_pitch_bend (lfs_pitch_bend), lmm_note_volume (lfs_note_volume) { current = 0; prev = 0; crved = 0; ui* scrs [] = { &din0, &din0.waved, &keybd2.waved, &din0.moded, &din0.gated, &delayed, &octed, &din0.droneed, &comed, &mc.ed, &dmod_ed, &fed, &keybd2.attacked, &keybd2.decayed, &keybd2.veled, 0 }; for (ui** p = scrs; *p != 0; ++p) { uis.push_back (*p); } esct = -1; setup_widgets (); } void ui_list::set_current (ui* u, int ised) { if (current) { current->leave (); prev = current; } current = u; cons << console::yellow << "@ " << current->name << eol; cons.reset_tips (); current->enter (); if (ised) { crved = dynamic_cast(u); if (crved->sine_enabled) fft0.go (crved->curveinfo[0].curve); } else { crved = 0; uis[0] = current; } } bool ui_list::handle_input () { current->calc_win_mouse (); din0.bg (); // bg for handling phrasor on microtonal-keyboard keybd2.bg (); // bg for removing decayed notes on keyboard-keyboard cons.bg (); // bg for tips display for (vector::size_type i = 1, j = uis.size(); i < j; ++i) uis[i]->bg (); // bg for editors // fade fx for voice, gater & delay // eval_fade (fdr_voice, w_voice); flash_gater (); // flashes in sync with gater value eval_fade (fdr_delay, w_delay); if (widget::focus == 0) { // find a widget that has focus for (vector::size_type i = 0, j = widgets.size (); i < j; ++i) { widget* wi = widgets[i]; if (wi->is_screen (current) && wi->visible () && wi->enabled ()) { if (wi->handle_input ()) { return true; } } } } else { // handle input of widget with focus widget* wf = widget::focus; if (wf->handle_input ()) return true; } current->handle_input (); if (keypressed (k_enter)) { // calc tap bpm extern nano_chrono ui_clk; extern double TAP_BPM; static double last_tapt = ui_clk.secs; double dt = ui_clk.secs - last_tapt; if (dt) TAP_BPM = 60.0 / dt; extern tcl_interp interpreter; if (keydown (k_lctrl)) cons ("set resetbeat 1"); Tcl_UpdateLinkedVar (interpreter.interp, "tapbpm"); last_tapt = ui_clk.secs; } extern string INSTRUMENT; if (keypressed (k_1)) { // switch instrument if (crved == 0) { if (current == &din0) { INSTRUMENT = "keyboard_keyboard"; set_current (&keybd2, 0); cons ("setup-editors"); } else { INSTRUMENT = "microtonal_keyboard"; set_current (&din0, 0); cons ("setup-editors"); } } else set_current (uis[0], 0); } else { for (int i = 0; i < MAX_EDITORS; ++i) { if (keypressed (key[i])) { if (ed[i]) set_current (ed[i]); break; } } } extern nano_chrono ui_clk; if (keypressed (k_esc)) { if (cons.command_mode || (current != uis[0])) { cons.command_mode = 0; set_current (uis[0], 0); esct = -1; } else { esc: if (esct == -1) { cons << console::red << "Press ESC again to quit" << eol; esct = ui_clk.secs; } else { static const float ESC_TIMEOUT = 1; // in seconds float dt = ui_clk.secs - esct; if (dt > ESC_TIMEOUT) { esct = -1; goto esc; } else { din0.save_scale (); din0.dinfo.save (); if (din0.delete_all_drones ()) { w_voice.turn_off (); w_delay.turn_off (); quit_now = 1; cons << console::green << "Goodbye!" << eol; } } } } } return true; } bool ui_list::set_editor (const string& name, int screen) { if (screen > 1) { ui* ei = 0; for (int i = 0, j = uis.size(); i < j; ++i) { if (uis[i]->name == name) { ei = uis[i]; break; } } if (ei) { ed [screen - 2] = ei; return true; } else { cmdlst.result = "bad editor name"; return false; } } else { cmdlst.result = "bad screen number (valid: 2 to 8)"; return false; } } void ui_list::draw () { glClear (GL_COLOR_BUFFER_BIT); current->draw (); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); glOrtho (0, view.xmax, 0, view.ymax, -1, 1); glMatrixMode (GL_MODELVIEW); glPushMatrix (); glLoadIdentity (); for (vector::size_type i = 0, j = widgets.size (); i < j; ++i) { widget* wi = widgets[i]; if (wi->is_screen (current) && wi->visible()) { wi->draw (); } } glPopMatrix (); glMatrixMode (GL_PROJECTION); glPopMatrix (); glMatrixMode (GL_MODELVIEW); } void ui_list::setup_widgets () { w_voice.add_screen (&din0); w_voice.set_listener (&vlis); w_gater.add_screen (&din0); w_gater.set_listener (&glis); w_delay.add_screen (&din0); w_delay.add_screen (&keybd2); w_delay.set_listener (&dlis); w_compress.add_screen (&din0); w_compress.add_screen (&keybd2); w_compress.set_listener (&clis); w_compress.color_blend (0); widgets.push_back (&w_voice); widgets.push_back (&w_gater); widgets.push_back (&w_delay); widgets.push_back (&w_compress); widget* chd [] = {&mml_min, &mml_max, &mmf_min, &mmf_max}; for (int i = 0; i < 4; ++i) { widget& w = *chd[i]; w.add_screen (&keybd2); d_min_max.add_child (&w); } d_min_max.add_screen (&keybd2); d_min_max.set_moveable (1); widgets.push_back (&d_min_max); for (int i = 0; i < 4; ++i) widgets.push_back (chd[i]); d_min_max.hide (); widget* pw1[5] = {&d_min_max, &mml_min, &mml_max, &mmf_min, &mmf_max}; widget_load ("d_min_max", pw1, 5); mmf_min.set_text (""); mmf_max.set_text (""); lfs_attack_time.set_color (0.45, 0.85, 1); lfs_decay_time.set_color (1, 0.65, 0.45); lfs_pitch_bend.set_color (0.7, 1, 0.4); lfs_note_volume.set_color (1, 0.7, 1); lfs_attack_time.add_screen (&keybd2); lfs_decay_time.add_screen (&keybd2); lfs_pitch_bend.add_screen (&keybd2); lfs_note_volume.add_screen (&keybd2); label_field_slider* lim[3] = {&lfs_attack_time, &lfs_decay_time, &lfs_note_volume}; ifstream flim ((dotdin + "d_parameter_limits").c_str(), ios::in); float lo, hi; string name; for (int i = 0, j = 3; i < j; ++i) { flim >> name >> lo >> hi; label_field_slider* lfs = lim[i]; lfs->set_name (name); lfs->set_limits (lo, hi); } int ilo, ihi; flim >> name >> ilo >> ihi; lfs_pitch_bend.set_name (name); lfs_pitch_bend.set_limits (ilo, ihi); d_parameters.add_screen (&keybd2); d_parameters.add_child (&d_min_max); d_parameters.add_child (&lfs_attack_time); d_parameters.add_child (&lfs_decay_time); d_parameters.add_child (&lfs_pitch_bend); d_parameters.add_child (&lfs_note_volume); widget* pw2[5] = {&d_parameters, &lfs_attack_time, &lfs_decay_time, &lfs_pitch_bend, &lfs_note_volume}; widget_load ("d_parameters", pw2, 5); d_parameters.set_moveable (1); widgets.push_back (&d_parameters); widgets.push_back (&lfs_attack_time); widgets.push_back (&lfs_decay_time); widgets.push_back (&lfs_pitch_bend); widgets.push_back (&lfs_note_volume); d_parameters.set_name ("parameters"); lfs_attack_time.set_name ("attack_time"); lfs_decay_time.set_name ("decay_time"); lfs_pitch_bend.set_name ("pitch_bend"); lfs_note_volume.set_name ("note_volume"); cons.add_screen (0); // 0 for all widgets.push_back (&cons); w_voice.set_state (din0.dinfo.voice); w_gater.set_state (din0.dinfo.gater); w_delay.set_state (din0.dinfo.delay); w_compress.set_state (din0.dinfo.compress); anote.setup_widgets (widgets); } void ui_list::update_widgets () { w_voice.set_label ("Voice"); w_gater.set_label ("Gater"); w_delay.set_label ("Delay"); w_compress.set_label ("Compressor"); d_min_max.set_text ("min/max"); mml_min.set_text ("min"); mml_max.set_text("max"); mmf_min.set_text (mmf_min.get_text()); mmf_max.set_text (mmf_max.get_text()); button* wd [] = {&w_voice, &w_gater, &w_delay, &w_compress}; int n = 4, dx = 50, w = 0; for (int i = 0; i < n; ++i) w += wd[i]->get_extents ().width; w += n * dx; int lh = get_line_height (); int x = (view.xmax - w) / 2, y = lh + 2; for (int i = 0; i < n; ++i) { button& b = *wd[i]; const box& e = b.get_extents (); b.set_extents (x, y, x + e.width, y + e.height); b.set_pos (x, y); x = e.right + dx; } lfs_attack_time.set_val (ATTACK_TIME); lfs_decay_time.set_val (DECAY_TIME); lfs_pitch_bend.set_val (PITCH_BEND); lfs_note_volume.set_val (NOTE_VOLUME); d_parameters.set_text ("parameters"); lfs_attack_time.update (); lfs_decay_time.update (); lfs_pitch_bend.update (); lfs_note_volume.update (); anote.update_widgets (); } void ui_list::flash_gater () { static color clr [2] = {checkbutton::off_color, checkbutton::on_color}; float dg = aout.gatr [aout.samples_per_channel - 1]; if (fdr_gater.eval ()) { w_gater.enable (0); w_gater.blend_on_off_color (fdr_gater.alpha); color& c = const_cast (w_gater.get_color ()); c *= dg; } else { w_gater.enable (1); int gi = din0.dinfo.gater; w_gater.set_color (dg * clr [gi].r, dg * clr [gi].g, dg * clr[gi].b); } } float ui_list::eval_fade (fader& fdr, checkbutton& cb) { if (fdr.eval ()) { cb.enable (0); cb.blend_on_off_color (fdr.alpha); } else cb.enable (1); return fdr.amount; } widget* ui_list::get_widget (const string& name) { for (size_vw i = 0, j = widgets.size (); i < j; ++i) { widget* wi = widgets[i]; if (wi->get_name() == name) return wi; } return 0; } void setup_fade (fader& fdr, int& target, int what) { if (fdr.on == 0) { target = what; if (what) fdr.set (0, 1); else fdr.set (1, 0); } } void voice__listener::changed (checkbutton& cb) { int what = cb.is_on (); setup_fade (uis.fdr_voice, din0.dinfo.voice, what); } void gater__listener::changed (checkbutton& cb) { int what = cb.is_on (); setup_fade (uis.fdr_gater, din0.dinfo.gater, what); } void delay__listener::changed (checkbutton& cb) { int what = cb.is_on (); setup_fade (uis.fdr_delay, din0.dinfo.delay, what); } void compress__listener::changed (checkbutton& cb) { din0.dinfo.compress = cb.is_on (); } ui_list::~ui_list () { widget* pw1[5] = {&d_parameters, &lfs_attack_time, &lfs_decay_time, &lfs_pitch_bend, &lfs_note_volume}; widget_save ("d_parameters", pw1, 5); widget* pw2[5] = {&d_min_max, &mml_min, &mml_max, &mmf_min, &mmf_max}; widget_save ("d_min_max", pw2, 5); label_field_slider* lim[3] = {&lfs_attack_time, &lfs_decay_time, &lfs_note_volume}; ofstream flim ((dotdin + "d_parameter_limits").c_str(), ios::out); float lo, hi; for (int i = 0, j = 3; i < j; ++i) { label_field_slider* lfs = lim[i]; lfs->get_limits (lo, hi); flim << lfs->get_name () << ' ' << lo << ' ' << hi << endl; } int ilo, ihi; lfs_pitch_bend.get_limits (ilo, ihi); flim << lfs_pitch_bend.get_name () << ' ' << ilo << ' ' << ihi << endl; } void attack_val::operator() (const float& f) { ATTACK_TIME = f; } void decay_val::operator() (const float& f) { DECAY_TIME = f; } void pitch_bend_val::operator() (const int& i) { PITCH_BEND = i; } void note_volume_val::operator() (const float& f) { NOTE_VOLUME = f; keybd2.calc_visual_params (); } template void widget_load (const string& fname, T** pw, int n) { ifstream f ((dotdin + fname).c_str(), ios::in); string ignore; int x, y; for (int i = 0; i < n; ++i) { f >> ignore >> x >> y; pw[i]->set_pos (x, y); } } template void widget_save (const string& fname, T** pw, int n) { ofstream f ((dotdin + fname).c_str(), ios::out); for (int i = 0; i < n; ++i) pw[i]->save (f); } template min_max_clicked::min_max_clicked (label_field_slider& _lfs) : lfs (_lfs) { lfs.set_button_listener (this); } template void min_max_clicked::clicked (button& b) { // toggle if (uis.d_min_max.visible ()) { if (&b == ui_list::mm_last) uis.d_min_max.hide (); } else { uis.d_min_max.show (); } // label min/max uis.d_min_max.set_text (lfs.get_text ()); // setup color widget* w [5] = {&uis.d_min_max, &uis.mml_min, &uis.mml_max, &uis.mmf_min, &uis.mmf_max}; const color& clr = lfs.get_color (); for (int i = 0; i < 5; ++i) w[i]->set_color (clr); // load min/max fields T low, high; lfs.get_limits (low, high); uis.mmf_min.set_text (low); uis.mmf_max.set_text (high); // setup listeners uis.mmf_min.set_listener (this); uis.mmf_max.set_listener (this); ui_list::mm_last = &b; } template void min_max_clicked::changed (field& f) { stringstream ss; ss << f.get_text (); T t; ss >> t; T l, h; lfs.get_limits (l, h); if (&f == &uis.mmf_min) { lfs.set_limits (t, h); } else { lfs.set_limits (l, t); } lfs.get_limits (l, h); uis.mmf_min.set_text (l); uis.mmf_max.set_text (h); } din-5.2.1/src/keyboard_keyboard.cc0000644000175100017510000003542212115673104014000 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "keyboard_keyboard.h" #include "scale_info.h" #include "input.h" #include "key_consts.h" #include "ui_list.h" #include "audio.h" #include "main.h" #include "din.h" #include "ansi_color_codes.h" #include "audio.h" #include using namespace std; extern int mousex, mousey; extern din din0; extern beat2value octave_shift; extern float ATTACK_TIME, DECAY_TIME, DELTA_TIME; extern float DELTA_BPM; extern float NOTE_VOLUME; extern float PITCH_BEND; static float bendx = 0; extern audio_out aout; extern viewport view; extern font fnt; extern chrono clk; extern ui_list uis; keyboard_keyboard::keyboard_keyboard () : wave ("waveform2.crv"), waved ("waveform2.ed"), wavlis (wave_listener::KEYBOARD_KEYBOARD), attackcrv ("attack.crv"), decaycrv ("decay.crv"), attacked ("attack.ed"), decayed ("decay.ed"), attacklis (this), decaylis (this), attacklib ("attack.lib", 1), decaylib ("decay.lib"), helptext ("keyboard-keyboard.hlp"), velcrv ("velocity.crv"), vellis (this), veled ("velocity.ed"), vellib ("velocity.lib"), velsol (&velcrv) { name = "keyboard-keyboard"; /* * assign computer keyboard keys to notes of the scale * * assumptions: * 3 octaves * scale must have 5 or 6 or 7 notes per octave */ vector ki; int ky [] = { // the keyboard keys k_t, k_r, k_e, k_w, k_q, k_a, k_s, k_d, k_f, k_g, k_h, k_j, k_k, k_l, k_semicolon, k_quote, k_right_bracket, k_left_bracket, k_p, k_o, k_i, k_u }; char kz [] = { // the keys as chars 't', 'r', 'e', 'w', 'q', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', ']', '[', 'p', 'o', 'i', 'u', }; // assign keys to scale for (int i = 5, j = 2; i < 8; ++i, --j) { ki.clear (); for (int k = 0, noct = 3, l = noct * i + 1; k < l; ++k) { int jk = j + k; ki.push_back ( key_info (ky [jk], kz [jk]) ); } scale2keybd [i] = ki; } // setup waveform extern curve_library wavlib; waved.add (&wave, &wavlis); waved.attach_library (&wavlib); wavlis.edited (&waved, 0); // setup attack curve attacked.add (&attackcrv, &attacklis); attacked.attach_library (&attacklib); // setup decay curve decayed.add (&decaycrv, &decaylis); decayed.attach_library (&decaylib); // setup velocity curve (used on MIDI triggered notes) veled.add (&velcrv, &vellis); veled.attach_library (&vellib); prev_mousex = prev_mousey = -1; } keyboard_keyboard::~keyboard_keyboard () { wave.save ("waveform2.crv"); attackcrv.save ("attack.crv"); decaycrv.save ("decay.crv"); velcrv.save ("velocity.crv"); cout << FAIL << "--- destroyed keyboard-keyboard ---" << ENDL; } void reduce (float& what, float& by, float limit) { what -= by; if (what <= limit) what = by; } void keyboard_keyboard::bg () { remove_finished_notes (); // kill notes decayed to silence } bool keyboard_keyboard::handle_input () { din0.dinfo.delay = uis.w_delay.is_on (); mouse_bend (); // pitch bend via mouse x movement // trigger notes // for (int i = 0, j = keys.size (); i < j; ++i) { key_info& ki = keys[i]; if (keypressed (ki.id)) { // pressed key of note attack_note (ki.id); // trigger note ki.attacked = 1; } else if (!keydown (ki.id) && ki.attacked) { // released key of note decay_note (ki.id); // decay ki.attacked = 0; } } // octave shift // if (keypressed (k_z)) modulate_up (); else if (keypressed (k_x)) modulate_down (); else if (keypressedd (k_f11)) { // decrease octave shift bpm octave_shift.set_bpm (octave_shift.get_bpm () - DELTA_BPM); cons << "octave shift bpm: " << octave_shift.get_bpm () << eol; } else if (keypressedd (k_f12)) { // increase octave bpm octave_shift.set_bpm (octave_shift.get_bpm () + DELTA_BPM); cons << "octave shift bpm: " << octave_shift.get_bpm () << eol; } else if (keypressedd (k_n)) { // reduce attack time reduce (ATTACK_TIME, DELTA_TIME, 0); cons << console::yellow << "attack time: " << ATTACK_TIME << eol; } else if (keypressedd (k_m)) { // increase attack time ATTACK_TIME += DELTA_TIME; cons << console::yellow << "attack time: " << ATTACK_TIME << eol; } else if (keypressedd (k_comma)) { // reduce decay time reduce (DECAY_TIME, DELTA_TIME, 0); cons << console::yellow << "decay time: " << DECAY_TIME << eol; } else if (keypressedd (k_period)) { // increase decay time DECAY_TIME += DELTA_TIME; cons << console::yellow << "decay time: " << DECAY_TIME << eol; } else if (keypressed (k_f1)) helptext(); // show help return true; } void keyboard_keyboard::setup_notes (int overwrite) { // setup 3 octaves worth of notes of the scale // notes.clear (); extern scale_info scaleinfo; vector& scale_notes = scaleinfo.notes; int nnotes = scale_notes.size () - 1; // bcos note & octave included in scale definition float tonic = scaleinfo.tonic / 2; // start from low octave extern map INTERVALS; // tuning // 3 octaves worth of notes for (int i = 0, noct = 3; i < noct; ++i) { for (int j = 0; j < nnotes; ++j) { std::string& name = scale_notes [j]; notes.push_back (note()); note& last = notes [notes.size() - 1]; last.name = name; last.set_frequency (tonic * INTERVALS [name]); } tonic *= 2; // next octave } // bring up the rear notes.push_back (note()); note& last = notes [notes.size() - 1]; last.name = "1"; last.set_frequency (tonic); memset (keybd2notes, 0, MAX_KEYS * sizeof (int)); if (overwrite) keys = scale2keybd [nnotes]; // green tonic key for (int i = 0, j = keys.size (), k = 0; i < j; ++i) { key_info& ki = keys[i]; keybd2notes [ki.id] = k; if (notes[k++].name == "1") { ki.r = ki.b = 0; } } } void keyboard_keyboard::attack_note (int ky) { int ni = keybd2notes [ky]; note& n = notes [ni]; key_info& ki = keys [ni]; static rnd rd (0, 1); float r = rd(), g = rd(), b = rd (); marker_x = mousex; triggered_notes.push_back (triggered_note (n, ky, &wave, &attackcrv, &decaycrv, NOTE_VOLUME, ki.x, ki.y, r, g, b, marker_x)); } void keyboard_keyboard::decay_note (int ky) { extern float DECAY_TIME; extern float SAMPLE_DURATION; for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) { triggered_note& ti = *i; if (ti.key == ky) { if (ti.state == triggered_note::ATTACK) { ti.state = triggered_note::DECAY; if (ti.volume_max == 0) { ti.state = triggered_note::FINISHED; } else { ti.decay_time = fabs (ti.decay_start_volume) / ti.volume_max * DECAY_TIME; if (ti.decay_time == 0) ti.state = triggered_note::FINISHED; else ti.delta_decay = SAMPLE_DURATION * 1. / ti.decay_time; ti.abs_decay = 0; } } } } } void keyboard_keyboard::update_attack () { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) (*i).attack.update (); } void keyboard_keyboard::update_decay () { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) (*i).decay.update (); } void keyboard_keyboard::update_waveform () { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) (*i).sol.update (); } triggered_note::triggered_note (const note& n, int k, multi_curve* wav, multi_curve* atk, multi_curve* dk, float vmax, float xx, float yy, float rr, float gg, float bb, int mox) { tn = n; start_hz = tn.hz; // for pitch bend sol (wav); player.set_step (tn.step); key = k; attack (atk); decay (dk); state = ATTACK; abs_attack = 0; extern float ATTACK_TIME; extern float SAMPLE_DURATION; delta_attack = SAMPLE_DURATION * 1. / ATTACK_TIME; x = xx; y = yy; r = rr; g = gg; b = bb; mx = mox; bendx = 0; volume_now = 0; volume_max = vmax; decay_time = 0; decay_start_volume = 0; } void triggered_note::eval (float* left, float* right, float* wav, float* vol, int n) { player.set_wave (&sol); extern audio_out aout; switch (state) { case ATTACK: attack (abs_attack, delta_attack, n, vol, _atmin, _gotog); for (int i = 0; i < n; ++i) vol[i] *= volume_max; volume_now = vol[n-1]; player.solve (wav, n); player (left, n, wav, vol); memcpy (right, left, aout.samples_channel_size); decay_start_volume = vol[n-1]; break; case DECAY: decay (abs_decay, delta_decay, n, vol, _atmin, _atmax); for (int i = 0; i < n; ++i) vol[i] *= decay_start_volume; player.solve (wav, n); player (left, n, wav, vol); memcpy (right, left, aout.samples_channel_size); volume_now = vol[n-1]; float x, y; decay.mcrv->get_vertex (decay.mcrv->num_vertices () - 1, x, y); if (abs_decay >= x) state = FINISHED; break; } } void triggered_note::set_frequency (float f) { tn.set_frequency (f); player.set_step (tn.step); } void keyboard_keyboard::render_audio (float* L, float* R) { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) { triggered_note& ti = *i; if (ti.state != triggered_note::FINISHED) ti.eval (L, R, aout.result, aout.vol, aout.samples_per_channel); } } void keyboard_keyboard::remove_finished_notes () { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j;) { triggered_note& ti = *i; if (ti.state == triggered_note::FINISHED) { list::iterator now = i, next = ++i; triggered_notes.erase (now); i = next; j = triggered_notes.end (); } else ++i; } } void keyboard_keyboard::calc_visual_params () { static const int pad = 4, halfpad = pad / 2; int nkeys = keys.size (); int delta = view.xmax / (nkeys + pad); int x = halfpad * delta; int half_height = view.ymax / 2; for (int i = 0; i < nkeys; ++i) { key_info& ki = keys[i]; ki.x = x; ki.y = half_height; x += delta; } extern float NOTE_VOLUME; arm = 0.35 * view.ymax / NOTE_VOLUME; int lh = get_line_height (); ymarker = 2 * lh + 2; ychars = ymarker + lh; if (nkeys) spacing = (view.width - 2 * keys[0].x) / 12; } void keyboard_keyboard::draw () { glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho (0, view.xmax, 0, view.ymax, -1, 1); glMatrixMode (GL_MODELVIEW); glLoadIdentity (); // mark midi notes glEnable (GL_LINE_STIPPLE); glLineStipple (1, 0x1010); glColor3f (1, 1, 1); if (aout.num_midi_con) { int startx = keys[0].x, starty = keys[0].y; int marker = 20; for (int i = 0, num_notes = 12; i < num_notes; ++i) { glBegin (GL_LINES); glVertex2i (startx - marker, starty); glVertex2i (startx + marker, starty); glVertex2i (startx, starty - marker); glVertex2i (startx, starty + marker); glEnd (); startx += spacing; } } glBegin (GL_LINES); glVertex2i (marker_x, 0); glVertex2i (marker_x, view.ymax); glEnd (); glDisable (GL_LINE_STIPPLE); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); const float alpha = 0.9; for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) { triggered_note& ti = *i; // fill glColor4f (ti.r, ti.g, ti.b, alpha); int arm1 = ti.volume_now * arm; glRecti (ti.x - arm1 - ti.bendx, ti.y - arm1, ti.x + arm1 + ti.bendx, ti.y + arm1); // outline glColor4f (alpha, alpha, alpha, alpha); int xp = ti.x + arm1 + ti.bendx, xm = ti.x - arm1 - ti.bendx, yp = ti.y + arm1, ym = ti.y - arm1; glLineWidth (2); glBegin (GL_LINE_LOOP); glVertex2i (xm, ym); glVertex2i (xp, ym); glVertex2i (xp, yp); glVertex2i (xm, yp); glEnd (); glLineWidth (1); } glDisable (GL_BLEND); for (int i = 0, j = keys.size (); i < j; ++i) { key_info& ki = keys[i]; glColor3f (ki.r, ki.g, ki.b); fnt.draw_char (ki.ch, ki.x, ychars); if (ki.attacked) { // hilite key that triggered last note glBegin (GL_LINES); glVertex2i (ki.x, ymarker); glVertex2i (ki.x + fnt.max_char_width, ymarker); glEnd (); } } } void keyboard_keyboard::setup_midi_notes () { const float middlec = 261.626; float start = middlec / 32; extern int NUM_INTERVALS; extern std::vector INTERVALS_SEQ; int id = 0; while (1) { int j = NUM_INTERVALS - 1; for (int i = 0; i < j; ++i) { if (id < MIDI_MAX) { midi_notes[id].set_frequency (start * INTERVALS_SEQ [i]); id++; } else return; } start = start * INTERVALS_SEQ [j]; } } void keyboard_keyboard::note_on (unsigned char id, unsigned char vel) { note& n = midi_notes [id]; int i12 = id % 12; int ci = color_index [i12]; float r = note_color[ci].r; float g = note_color[ci].g; float b = note_color[ci].b; marker_x = mousex; triggered_notes.push_back (triggered_note (n, id, &wave, &attackcrv, &decaycrv, velsol(vel) * NOTE_VOLUME, keys[0].x + i12 * spacing, keys[0].y, r, g, b, marker_x)); } void keyboard_keyboard::note_off (unsigned char id) { decay_note (id); } void keyboard_keyboard::pitch_bend (float v) { for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) { triggered_note& ti = *i; float pv = PITCH_BEND * v; ti.set_frequency (ti.start_hz + pv); bendx = fabs (pv); } } void keyboard_keyboard::mouse_bend () { float PITCH_BEND_PIXEL = 0.0075 * PITCH_BEND; int delta_x = 0; float pv = 0; for (list::iterator i = triggered_notes.begin (), j = triggered_notes.end (); i != j; ++i) { triggered_note& ti = *i; delta_x = mousex - ti.mx; pv = delta_x * PITCH_BEND_PIXEL; ti.set_frequency (ti.start_hz + pv); ti.bendx = fabs (pv); } } void keyboard_keyboard::leave () { prev_mousex = mousex; prev_mousey = mousey; } void keyboard_keyboard::enter () { if (prev_mousex == -1) warp_pointer_abs (view.xmax / 2, view.ymax / 2); else warp_pointer_abs (prev_mousex, prev_mousey); } din-5.2.1/src/fft.cc0000644000175100017510000000505612111771577011110 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "fft.h" #include "multi_curve.h" #include "solver.h" #include "math.h" #include "ansi_color_codes.h" #include #include using namespace std; fft::fft () : lev ("fft_levels") { n = 20; // 2 x number of harmonics halfn = n / 2; dx = 1. / n; x = 0; // use fftw library for fft in = (float *) fftwf_malloc (sizeof(float) * n); out = (fftwf_complex *) fftwf_malloc (sizeof (fftwf_complex) * (halfn + 1)); extern string dotdin; string fname = dotdin + "fftwf_wisdom"; FILE* wis = fopen (fname.c_str(), "r"); if (wis) { cout << DOING << "+++ using saved FFT wisdom +++" << ENDL; fftwf_import_wisdom_from_file (wis); fclose (wis); } plan = fftwf_plan_dft_r2c_1d (n, in, out, FFTW_MEASURE); cout << PASS << "+++ FFT setup complete +++ " << ENDL; } fft::~fft () { extern string dotdin; string fname = dotdin + "fftwf_wisdom"; FILE* wis = fopen (fname.c_str(), "w"); if (wis) { fftwf_export_wisdom_to_file (wis); fclose (wis); } fftwf_destroy_plan (plan); fftwf_free (in); fftwf_free (out); } void fft::go (multi_curve* crv) { // do fft on a bezier multi curve solver s (crv); x = 0; s (x, dx, n, in); fftwf_execute (plan); harms.clear (); for (int i = 1, j = halfn +1; i < j; ++i) { float x = out[i][0]; float y = out[i][1]; float x2 = x*x; float y2 = y*y; harms.push_back (sqrt (x2 + y2)); // ignore phase (atan2 (y2/x2)) for now, but have to add in later revision. } float m0 = *min_element (harms.begin(), harms.end()); float m1 = *max_element (harms.begin(), harms.end()); float mm = m1 - m0; if (m1 == m0) return; for (int i = 0, j = harms.size(); i < j; ++i) { float dm = harms[i] - m0; float y = dm / mm; lev.set (i, y); } } din-5.2.1/src/widget.cc0000644000175100017510000000726112115667302011606 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "widget.h" #include #include #include #include #include using namespace std; extern int mousex, mouseyy; extern int lmb, mmb, rmb; widget::widget (int left, int bottom, int right, int top) : extents (left, bottom, right, top), clr (1, 1, 1), movr (*this) { hover = 0; moveable = 0; posx = posy = 0; enable_ = 1; visible_ = 1; stringstream ss; ss << this; ss >> name; } int widget::handle_input () { if (inbox (extents, mousex, mouseyy)) hover = 1; else hover = 0; int mret = 0; if (moveable) mret = movr.handle_input (); return hover & mret ; } void widget::draw () { glColor3f (clr.r, clr.g, clr.b); } void widget::draw_bbox () { const box& e = get_extents (); glBegin (GL_LINE_LOOP); glVertex2i (e.left, e.bottom); glVertex2i (e.right, e.bottom); glVertex2i (e.right, e.top); glVertex2i (e.left, e.top); glEnd (); } void widget::set_pos (int x, int y) { posx = x; posy = y; set_extents (x, y, x + extents.width, y + extents.height); } void widget::get_pos (int& x, int& y) { x = posx; y = posy; } void widget::set_extents (int l, int b, int r, int t) { extents (l, b, r, t); } void widget::move (int dx, int dy) { // new position int x = posx + dx; int y = posy + dy; set_pos (x, y); // move children size_vw n = children.size (); if (n) for (size_vw i = 0; i < n; ++i) children[i]->move (dx, dy); } /*void widget::move_to (int x, int y) { int dx = x - posx, dy = y - posy; move (dx, dy); }*/ void widget::show () { visible_ = 1; for (size_vw i = 0, j = children.size (); i < j; ++i) children[i]->show (); } void widget::hide () { visible_ = 0; for (size_vw i = 0, j = children.size (); i < j; ++i) children[i]->hide (); } void widget::add_child (widget* w) { children.push_back (w); } void widget::add_screen (ui* scr) { screens.push_back (scr); for (vector::size_type i = 0, j = children.size (); i < j; ++i) children[i]->add_screen (scr); } int widget::is_screen (ui* scr) { for (vector::size_type i = 0, j = screens.size (); i < j; ++i) { ui* scri = screens[i]; if ( (scr == scri) || (scri == 0)) return 1; } return 0; } void widget::save (ofstream& file) { file << name << ' ' << posx << ' ' << posy << endl; } mover::mover (widget& _w, int* _pmb) : w (_w){ pmb = _pmb; } int mover::handle_input () { int ret = 0; int mb = *pmb; if (mb) { if (mb_clicked == 0) { if (move) { move = 0; widget::focus = 0; ret = 1; } else if (w.hovering()) { move = 1; widget::focus = &w; prevx = mousex; prevy = mouseyy; ret = 1; } mb_clicked = 1; } } else { if (move) { int dx = mousex - prevx, dy = mouseyy - prevy; w.move (dx, dy); prevx = mousex; prevy = mouseyy; ret = 1; } mb_clicked = 0; } return ret; } din-5.2.1/src/button.cc0000644000175100017510000000337312122177130011627 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "button.h" #include "font.h" using std::string; extern font fnt; extern int lmb; button::button (int px, int py, const string& l) : widget (px, py, px, py) { set_label (l); click = 0; lsnr = 0; } void button::set_label (const string& l) { label = l; int width = (int) get_char_width (label); const box& e = get_extents (); set_extents (e.left, e.bottom, e.left + width, e.bottom + get_max_char_height (label)); set_pos (e.left, e.bottom); } int button::handle_input () { widget::handle_input (); if (lmb) { if (hovering()) { click = almost_clicked; widget::focus = this; } } else { if (click == almost_clicked) { if (hovering()) { click = clicked_indeed; if (lsnr) lsnr->clicked (*this); return click; } } click = not_clicked; widget::focus = 0; } return click; } void button::draw () { widget::draw (); int x, y; get_pos (x, y); draw_string (label, x, y); } din-5.2.1/src/checkbutton.cc0000644000175100017510000000357612121070400012621 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "checkbutton.h" using namespace std; checkbutton::checkbutton (int left, int bottom, int what, const string& label, int clr_blnd) : button (left, bottom, label), state (-1), lsnr (0) { set_state (what); color_blend (clr_blnd); } int checkbutton::handle_input () { int ret = button::handle_input (); if (clicked ()) toggle (); return ret; } void checkbutton::draw () { button::draw (); } void checkbutton::turn_on () { if (state != 1) { state = 1; if (!color_blend ()) set_color (on_color); if (lsnr) lsnr->changed (*this); } } void checkbutton::turn_off () { if (state != 0) { state = 0; if (!color_blend ()) set_color (off_color); if (lsnr) lsnr->changed (*this); } } void checkbutton::set_state (int s) { if (s) turn_on (); else turn_off (); } void checkbutton::toggle () { if (is_on ()) turn_off (); else turn_on (); } void checkbutton::blend_on_off_color (float blend) { static color result; if (state) ::blend_color (off_color, on_color, result, blend); else ::blend_color (on_color, off_color, result, blend); set_color (result); } din-5.2.1/src/field.cc0000644000175100017510000001312212122313726011373 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "field.h" #include "font.h" #include "utils.h" #include "input.h" #include "key_consts.h" #include "utils.h" #include #include #include #include #include #include using namespace std; extern int lmb; extern int mousex, mouseyy; void accept_keypress (int); int field::handle_input () { widget::handle_input (); update (); extern int xkey; // locate mouse in field if (lmb && !clicked_lmb) { hittest (mousex, mouseyy); accept_keypress (focus); if (focus) widget::focus = this; else widget::focus = 0; clicked_lmb = 1; } else clicked_lmb = 0; if (focus) { // edit text if ((xkey > 9) && (xkey < 127) && (xkey != 13)) { // char from X if (mode == pushback) text.push_back (xkey); else text.insert (text.begin() + cursor, xkey); ++len; ++last; if (++cursor >= len) { cursor = len; mode = pushback; } calc_view (); } if (keypressed (k_enter) || keypressed (k_esc)) { // quit editing if (lsnr) lsnr->changed (*this); focus = 0; accept_keypress (focus); widget::focus = 0; return 1; } else if (keypressedd (k_left)) { // move cursor left mode = insert; if (--cursor < 0) cursor = 0; calc_view (); } else if (keypressedd (k_right)) { // move cursor right mode = insert; if (++cursor >= len) { cursor = len; mode = pushback; } calc_view (); } else if (keypressedd (k_backspace)) { // delete if (cursor) { --cursor; if (--left < 0) { left = 0; right = width - 1; } else --right; text.erase (text.begin () + cursor); --len; --last; calc_view (); } } xkey = 0; } return focus; } void field::set_text (const string& txt) { text = txt; len = text.length (); last = len - 1; cursor = len; left = 0; right = width - 1; calc_view_text (); mode = pushback; } void field::set_text (int i) { sprintf (sbuf, "%d", i); set_text (sbuf); } void field::set_text (float f) { sprintf (sbuf, "%.2f", f); set_text (sbuf); } void field::calc_view () { if (cursor < left) { --left; --right; } else if (cursor > right) { ++left; ++right; } calc_view_text (); calc_cursor (); } void field::calc_view_text () { int si = max (0, left); int sj = min (right, last); int sd = sj - si + 1; view_text = text.substr (si, sd); } void field::calc_cursor () { int cd = cursor - left; string cstr (view_text.substr (0, cd)); offset = get_char_width (cstr); } void field::update () { const box& e = get_extents (); set_extents (e.left, e.bottom, e.left + get_char_width (view_text) + fnt.max_char_width, e.bottom + fnt.avg_char_height); } void field::draw_cursor (int x, int y) { int cx = x + offset; int cy = y - fnt.headroom; const color& clr = get_color (); glColor3f (clr.r, clr.g, clr.b); glBegin (GL_LINES); glVertex2i (cx, y); glVertex2i (cx - fnt.avg_char_width, cy); glVertex2i (cx, y); glVertex2i (cx + fnt.avg_char_width, cy); glEnd (); } void field::draw () { widget::draw (); int x, y; get_pos (x, y); draw_string (view_text, x, y); if (focus) draw_cursor (x, y); //draw_bbox (); /*const box& e = get_extents (); glBegin (GL_LINES); glVertex2i (e.left, e.midy + 5); glVertex2i (e.left, e.midy - 5); glVertex2i (e.right, e.midy + 5); glVertex2i (e.right, e.midy - 5); glEnd ();*/ } field::field (int w) : width (w) { set_text (""); update (); clicked_lmb = 0; focus = 0; } field::field (int x, int y, const string& txt, int w) : width (w) { set_text (txt); update (); set_pos (x, y); clicked_lmb = 0; } field::operator int() const { return (atoi (text.c_str())); } field::operator float() const { return ((float) atof (text.c_str())); } void field::set_listener (change_listener *fl) { lsnr = fl; } int field::hittest (int x, int y) { const box& e = get_extents (); if (inbox (e, x, y)) { // in the box focus = 1; // so got focus int n = view_text.length (); if (n == 0) { cursor = 0; mode = pushback; calc_view (); return focus; } // locate cursor in text int l = e.left, r; for (int i = 0; i < n; ++i) { r = e.left + get_char_width (view_text.substr (0, i + 1)); if (inrange (l, x, r)) { // found! int xl = x - l, xr = r - x; if (xl < xr) cursor = left + i; else cursor = left + i + 1; mode = insert; calc_view (); return focus; } l = r; } // not found so place after last char cursor = len; mode = pushback; calc_view (); return focus; } focus = 0; return focus; } din-5.2.1/src/drone.cc0000644000175100017510000000361412111771577011436 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "drone.h" #include "din.h" extern int BOTTOM; extern float DELTA_VOLUME; void drone::set_xy (din& board, const int& xx, const int& yy) { // position x = xx; y = yy; // height, volume dy = y - BOTTOM; vol = dy * DELTA_VOLUME; // locate range on microtonal-keyboard range = board.find_range (x, range); // locate pitch on microtonal-keyboard ::range& dr = board.ranges[range]; int delta_left = x - dr.extents.left; if (board.snap_drones) { // pitch is either left or right notes of a range int delta_right = dr.extents.right - x; int note_num = 0; if (delta_right < delta_left) note_num = 1; if (note_num) { pos = 1; x = dr.extents.right; } else { pos = 0; x = dr.extents.left;} step = dr.notes[note_num].step; } else { pos = delta_left * 1. / dr.extents.width; float one_rpos = 1 - pos; step = one_rpos * dr.notes[0].step + pos * dr.notes[1].step; } calc_handle (); // update drone handle // update pitch & vol on drone's player float v = board.drone_master_volume * vol; player.set (step, v, v); } din-5.2.1/src/fader.cc0000644000175100017510000000326312121153546011377 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "fader.h" #include "chrono.h" #include "console.h" extern chrono clk; fader::fader (float vs, float ve) { set (vs, ve, 0); } void fader::set (float vs, float ve, int _on, float dt) { start = vs; end = ve; delta = end - start; if (delta < 0) flip = 1; else flip = 0; alpha = 0; amount = start; start_time = clk.secs; delta_time = dt; // secs on = _on; } int fader::eval () { if (on) { float dt = clk.secs - start_time; if (dt >= delta_time) { dt = delta_time; on = 0; if (post != "") { cons (post); post = ""; } } alpha = dt * 1. / delta_time; if (flip) amount = 1 - alpha; else amount = alpha; } return on; } void fader::restart () { on = 1; start_time = clk.secs; } void fader::set_post (const std::string& pst) { post = pst; } float fader::value () { return (1 - alpha) * start + end * alpha; } din-5.2.1/src/ticker_tape.cc0000644000175100017510000000335112121100754012577 00000000000000#include "ticker_tape.h" #include "viewwin.h" #include "font.h" #include "random.h" #include "color.h" #include "console.h" using namespace std; extern viewport view; const string ticker_tape::message ("-^- Many thanks to our donors so far: Jack Coghill ($100), Set Hallstrom ($76.19), Samuel Chintha ($50), Aaron Wolf ($28.41), Artem Popov ($10), Sebastian Thewes ($10), Louigi Verona ($10), Edward Diehl ($5) & Guido Lang ($5). To join this list of Donors, please click on Donate Now! -^-"); ticker_tape::ticker_tape () { show_text = 1; mr = 0.4; mg = 0.5; mb = 1; add_child (&toggle); toggle.set_listener (this); } void ticker_tape::clicked (button& b) { if (&b == &toggle) { toggle_text (); } } int ticker_tape::handle_input () { int ret = toggle.handle_input (); return ret; } void ticker_tape::toggle_text () { show_text = !show_text; const box& e = toggle.get_extents (); if (show_text) { toggle.set_pos (0, e.bottom); toggle.set_label (">>>"); } else { toggle.set_pos (view.xmax - e.width, e.bottom); toggle.set_label ("<<<"); } } void ticker_tape::draw () { toggle.draw (); if (!show_text) return; static int drip = 0; if (++drip >= 4) { if (--startx < leftxt) startx = rightxt; drip = 0; } glViewport (twin.left, 0, twin.width, twin.height + dy); glMatrixMode (GL_MODELVIEW); glPushMatrix (); glLoadIdentity (); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); glOrtho (twin.left, twin.right, twin.bottom - dy, twin.top, 1, -1); glColor3f (mr, mg, mb); draw_string (message, startx, twin.bottom); glPopMatrix (); glMatrixMode (GL_MODELVIEW); glPopMatrix (); extern viewport view; glViewport (0, 0, view.xmax, view.ymax); } din-5.2.1/src/label.cc0000644000175100017510000000115412111771577011403 00000000000000#include "label.h" #include "font.h" #include "viewwin.h" using namespace std; extern int mousex, mouseyy; extern viewport view; extern int lmb; label::label (const string& t) { set_text (t); } void label::set_text (const string& t) { text = t; int w = get_char_width (text), h = get_max_char_height (text); const box& e = get_extents (); set_extents (e.left, e.bottom, e.left + w, e.bottom + h); } void label::draw () { widget::draw (); int x, y; get_pos (x, y); draw_string (text, x, y); } int label::handle_input () { return widget::handle_input (); } void label::update () { set_text (text); } din-5.2.1/src/filled_button.cc0000644000175100017510000000222012121067027013136 00000000000000/* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ #include "filled_button.h" void filled_button::draw () { glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); const color& c = get_color (); const box& e = get_extents (); glColor4f (c.r, c.g, c.b, 0.25); glRecti (e.left, e.bottom, e.right, e.top); glColor4f (c.r, c.g, c.b, 1); draw_bbox (); glDisable (GL_BLEND); } din-5.2.1/src/authors_note.cc0000644000175100017510000000325712114500460013024 00000000000000#include "authors_note.h" #include "console.h" #include "font.h" #include "viewwin.h" #include "random.h" using namespace std; extern viewport view; extern console cons; extern void load_instrument (); void authors_note::enter () { cons ("show-authors-note"); cons.home (); } void authors_note::leave () { cons.clear (); cons << "Press F1 for help" << eol; cons << "Press TAB to enter command mode" << eol; } void authors_note::setup_widgets (vector& widgets) { donate_now.add_screen (this); im_a_donor.add_screen (this); ticker.add_screen (this); donate_now.set_listener (this); im_a_donor.set_listener (this); widgets.push_back (&donate_now); widgets.push_back (&im_a_donor); widgets.push_back (&ticker); } void authors_note::update_widgets () { int lh = get_line_height (); ticker.toggle.set_label (">>>"); ticker.toggle.set_pos (20, lh); const box& e = ticker.toggle.get_extents (); ticker.xstart = e.right; ticker.dy = get_line_height (); ticker.twin (ticker.xstart, e.bottom - ticker.dy, view.xmax, e.bottom + lh); ticker.startx = view.xmax; int msgw = get_char_width (ticker_tape::message); ticker.leftxt = -msgw; ticker.rightxt = view.xmax; donate_now.set_label ("Donate Now!"); donate_now.set_pos (20, 5 * lh); im_a_donor.set_label ("I'm a Donor!"); im_a_donor.set_pos (20, 3 * lh); seed_rand_gen (clock()); rnd rd (0.5, 1); donate_now.set_color (rd(), rd(), rd()); im_a_donor.set_color (rd(), rd(), rd()); ticker.set_color (rd(), rd(), rd()); } void authors_note::clicked (button& b) { if (&b == &donate_now) { cons ("source ~/.din/donate.tcl"); } else { load_instrument (); } } din-5.2.1/data/0000755000175100017510000000000012122367132010204 500000000000000din-5.2.1/data/Makefile.am0000644000175100017510000000477612122322567012201 00000000000000## Process this file with automake to produce Makefile.in dindatadir = $(datarootdir)/@PACKAGE@ dinicondir = $(datarootdir)/pixmaps dindeskdir = $(datarootdir)/applications dindata_DATA = \ drone.crv\ drone.ed\ waveform1.crv\ waveform1.ed\ waveform2.crv\ waveform2.ed\ waveforms.lib\ coml.crv\ comr.crv\ compressor.ed\ gater.crv\ gater-patterns.lib\ gater.ed\ fm.crv\ am.crv\ modulation.ed\ volume-l.crv\ volume-r.crv\ feedback-l.crv\ feedback-r.crv\ delay.ed\ octave-shift.crv\ octave-shift.ed\ octave-shift-patterns.lib\ dot.crv\ dash.crv\ inner.crv\ letter.crv\ word.crv\ i8n_morse_code\ morse-code.ed\ attack.crv\ decay.crv\ attack.ed\ decay.ed\ attack.lib\ decay.lib\ din_info\ globals\ ji.tuning\ pytha.tuning\ et.tuning\ shrutis.tuning\ scalelist\ sine_levels\ fft_levels\ m00\ oscilloscope\ jack_prefs\ init.tcl\ help.tcl\ save_settings.tcl\ settings.tcl\ scoper.help.tcl\ midimap.help.tcl\ droner.help.tcl\ morse-code.help.tcl\ curve-library.help.tcl\ curve-name.help.tcl\ curve-value.help.tcl\ get-selection.help.tcl\ load-patch.help.tcl\ list-patches.help.tcl\ set-curve-editor.help.tcl\ set-text-color.help.tcl\ echo.help.tcl\ add-scale.help.tcl\ remove-scale.help.tcl\ find-scale.help.tcl\ get-var.help.tcl\ set-var.help.tcl\ load-scale.help.tcl\ list-scales.help.tcl\ list-notes.help.tcl\ set-delay.help.tcl\ get-delay.help.tcl\ set-bpm.help.tcl\ reset-bpm.help.tcl\ get-bpm.help.tcl\ set-style.help.tcl\ get-style.help.tcl\ list-bpms.help.tcl\ set-beat.help.tcl\ get-beat.help.tcl\ set-scope.help.tcl\ get-scope.help.tcl\ get-drone.help.tcl\ set-font-size.help.tcl\ get-font-size.help.tcl\ set-kern.help.tcl\ note-distance.help.tcl\ get-kern.help.tcl\ notation.help.tcl\ key.help.tcl\ chord.help.tcl\ tuning.help.tcl\ bot.help.tcl\ set-drone.help.tcl\ num-octaves.help.tcl\ make-interval-note-vars.tcl\ window\ midimap.patch.tcl\ scoper.patch.tcl\ droner.patch.tcl\ start-end.patch.tcl\ start-end.help.tcl\ changer.patch.tcl\ changer.help.tcl\ 2600.patch.tcl\ 2600.help.tcl\ din.hlp\ curve_editor.hlp\ keyboard-keyboard.hlp\ jag.fnt\ font.ed\ velocity.crv\ velocity.ed\ velocity.lib\ dam.crv\ dfm.crv\ donate.tcl\ drone-modulation.ed\ d_min_max\ d_parameters\ d_parameter_limits\ checkdotdin.in\ tips.tcl dindesk_DATA = din.desktop dinicon_DATA = din.png dinbindir = ${prefix}/bin dinbin_DATA = checkdotdin $(dinbin_DATA): $(dinbin_DATA).in sed "s|\@datarootdir\@|$(datarootdir)|" $< > $@ EXTRA_DIST = $(dindata_DATA) $(dindesk_DATA) $(dinicon_DATA) $(dinbin_DATA) install-data-hook: ${DESTDIR}/$(prefix)/bin/checkdotdin chmod +x $^ din-5.2.1/data/Makefile.in0000644000175100017510000003777712122366546012226 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(dinbindir)" "$(DESTDIR)$(dindatadir)" \ "$(DESTDIR)$(dindeskdir)" "$(DESTDIR)$(dinicondir)" DATA = $(dinbin_DATA) $(dindata_DATA) $(dindesk_DATA) $(dinicon_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fftw3f_CFLAGS = @fftw3f_CFLAGS@ fftw3f_LIBS = @fftw3f_LIBS@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ jack_CFLAGS = @jack_CFLAGS@ jack_LIBS = @jack_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dindatadir = $(datarootdir)/@PACKAGE@ dinicondir = $(datarootdir)/pixmaps dindeskdir = $(datarootdir)/applications dindata_DATA = \ drone.crv\ drone.ed\ waveform1.crv\ waveform1.ed\ waveform2.crv\ waveform2.ed\ waveforms.lib\ coml.crv\ comr.crv\ compressor.ed\ gater.crv\ gater-patterns.lib\ gater.ed\ fm.crv\ am.crv\ modulation.ed\ volume-l.crv\ volume-r.crv\ feedback-l.crv\ feedback-r.crv\ delay.ed\ octave-shift.crv\ octave-shift.ed\ octave-shift-patterns.lib\ dot.crv\ dash.crv\ inner.crv\ letter.crv\ word.crv\ i8n_morse_code\ morse-code.ed\ attack.crv\ decay.crv\ attack.ed\ decay.ed\ attack.lib\ decay.lib\ din_info\ globals\ ji.tuning\ pytha.tuning\ et.tuning\ shrutis.tuning\ scalelist\ sine_levels\ fft_levels\ m00\ oscilloscope\ jack_prefs\ init.tcl\ help.tcl\ save_settings.tcl\ settings.tcl\ scoper.help.tcl\ midimap.help.tcl\ droner.help.tcl\ morse-code.help.tcl\ curve-library.help.tcl\ curve-name.help.tcl\ curve-value.help.tcl\ get-selection.help.tcl\ load-patch.help.tcl\ list-patches.help.tcl\ set-curve-editor.help.tcl\ set-text-color.help.tcl\ echo.help.tcl\ add-scale.help.tcl\ remove-scale.help.tcl\ find-scale.help.tcl\ get-var.help.tcl\ set-var.help.tcl\ load-scale.help.tcl\ list-scales.help.tcl\ list-notes.help.tcl\ set-delay.help.tcl\ get-delay.help.tcl\ set-bpm.help.tcl\ reset-bpm.help.tcl\ get-bpm.help.tcl\ set-style.help.tcl\ get-style.help.tcl\ list-bpms.help.tcl\ set-beat.help.tcl\ get-beat.help.tcl\ set-scope.help.tcl\ get-scope.help.tcl\ get-drone.help.tcl\ set-font-size.help.tcl\ get-font-size.help.tcl\ set-kern.help.tcl\ note-distance.help.tcl\ get-kern.help.tcl\ notation.help.tcl\ key.help.tcl\ chord.help.tcl\ tuning.help.tcl\ bot.help.tcl\ set-drone.help.tcl\ num-octaves.help.tcl\ make-interval-note-vars.tcl\ window\ midimap.patch.tcl\ scoper.patch.tcl\ droner.patch.tcl\ start-end.patch.tcl\ start-end.help.tcl\ changer.patch.tcl\ changer.help.tcl\ 2600.patch.tcl\ 2600.help.tcl\ din.hlp\ curve_editor.hlp\ keyboard-keyboard.hlp\ jag.fnt\ font.ed\ velocity.crv\ velocity.ed\ velocity.lib\ dam.crv\ dfm.crv\ donate.tcl\ drone-modulation.ed\ d_min_max\ d_parameters\ d_parameter_limits\ checkdotdin.in\ tips.tcl dindesk_DATA = din.desktop dinicon_DATA = din.png dinbindir = ${prefix}/bin dinbin_DATA = checkdotdin EXTRA_DIST = $(dindata_DATA) $(dindesk_DATA) $(dinicon_DATA) $(dinbin_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dinbinDATA: $(dinbin_DATA) @$(NORMAL_INSTALL) test -z "$(dinbindir)" || $(MKDIR_P) "$(DESTDIR)$(dinbindir)" @list='$(dinbin_DATA)'; test -n "$(dinbindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dinbindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dinbindir)" || exit $$?; \ done uninstall-dinbinDATA: @$(NORMAL_UNINSTALL) @list='$(dinbin_DATA)'; test -n "$(dinbindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(dinbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dinbindir)" && rm -f $$files install-dindataDATA: $(dindata_DATA) @$(NORMAL_INSTALL) test -z "$(dindatadir)" || $(MKDIR_P) "$(DESTDIR)$(dindatadir)" @list='$(dindata_DATA)'; test -n "$(dindatadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dindatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dindatadir)" || exit $$?; \ done uninstall-dindataDATA: @$(NORMAL_UNINSTALL) @list='$(dindata_DATA)'; test -n "$(dindatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(dindatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dindatadir)" && rm -f $$files install-dindeskDATA: $(dindesk_DATA) @$(NORMAL_INSTALL) test -z "$(dindeskdir)" || $(MKDIR_P) "$(DESTDIR)$(dindeskdir)" @list='$(dindesk_DATA)'; test -n "$(dindeskdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dindeskdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dindeskdir)" || exit $$?; \ done uninstall-dindeskDATA: @$(NORMAL_UNINSTALL) @list='$(dindesk_DATA)'; test -n "$(dindeskdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(dindeskdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dindeskdir)" && rm -f $$files install-diniconDATA: $(dinicon_DATA) @$(NORMAL_INSTALL) test -z "$(dinicondir)" || $(MKDIR_P) "$(DESTDIR)$(dinicondir)" @list='$(dinicon_DATA)'; test -n "$(dinicondir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dinicondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dinicondir)" || exit $$?; \ done uninstall-diniconDATA: @$(NORMAL_UNINSTALL) @list='$(dinicon_DATA)'; test -n "$(dinicondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(dinicondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(dinicondir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(dinbindir)" "$(DESTDIR)$(dindatadir)" "$(DESTDIR)$(dindeskdir)" "$(DESTDIR)$(dinicondir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dinbinDATA install-dindataDATA \ install-dindeskDATA install-diniconDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dinbinDATA uninstall-dindataDATA \ uninstall-dindeskDATA uninstall-diniconDATA .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-hook install-dinbinDATA install-dindataDATA \ install-dindeskDATA install-diniconDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-dinbinDATA uninstall-dindataDATA \ uninstall-dindeskDATA uninstall-diniconDATA $(dinbin_DATA): $(dinbin_DATA).in sed "s|\@datarootdir\@|$(datarootdir)|" $< > $@ install-data-hook: ${DESTDIR}/$(prefix)/bin/checkdotdin chmod +x $^ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: din-5.2.1/data/drone.crv0000644000175100017510000000051712111771600011747 00000000000000name drone num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0.0305722 0.176527 vertex 0.25 1 left_tangent 0.144441 1.01713 right_tangent 0.431242 0.994681 vertex 0.75 -1 left_tangent 0.569786 -1 right_tangent 0.858195 -1 vertex 1 0 left_tangent 0.962375 -0.212622 right_tangent 1 0 curve_resolution 0.000333308 color 0 0.7 0.7 din-5.2.1/data/drone.ed0000644000175100017510000000055712111771600011551 00000000000000id 1860 editor drone window -200.461 -989.788 2348.1 920.828 win_chunk 100 75 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 1 label_vertex 0 num_labels 5 silence 0 0 0 1 1 0 +max 0 1 1 0 0 0 -max 0 -1 1 0 0 0 start 0 0.5 1 1 0.5 1 end 1 0.5 1 1 0.5 1 fft_enabled 1 samples_enabled 0 hz 440 nperiods 2 is_waveform_editor 1 din-5.2.1/data/waveform1.crv0000644000175100017510000000050212111771600012541 00000000000000name voice num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0792088 -2.4 vertex 0.25 1 left_tangent 0.145813 1 right_tangent 0.515728 1 vertex 0.75 -1 left_tangent 0.680494 -1 right_tangent 0.835567 -1 vertex 1 0 left_tangent 0.864644 2.6 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 din-5.2.1/data/waveform1.ed0000644000175100017510000000061012111771600012337 00000000000000id 1870 editor microtonal-keyboard-waveform window -400.706 -1548.84 4341.07 2007.51 win_chunk 169 123 obj_chunk 0.05 0.1 snap 0 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 1 label_vertex 0 num_labels 5 silence 0 0 0 1 1 0 +max 0 1 1 0 0 0 -max 0 -1 1 0 0 0 start 0 0.5 1 1 0.5 1 end 1 0.5 1 1 0.5 1 fft_enabled 1 samples_enabled 0 hz 440 nperiods 2 is_waveform_editor 1 din-5.2.1/data/waveform2.crv0000644000175100017510000000055512114516205012553 00000000000000name mirrored-sine num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0305722 0.176527 vertex 0.25 1 left_tangent 0.144441 1.01713 right_tangent 0.433994 0.995295 vertex 0.75 -1 left_tangent 0.572047 -1.01741 right_tangent 0.858021 -1.00614 vertex 1 0 left_tangent 0.958874 -0.233656 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 din-5.2.1/data/waveform2.ed0000644000175100017510000000060612111771600012345 00000000000000id 1858 editor keyboard-keyboard-waveform window -400.706 -1548.84 4341.07 2007.51 win_chunk 169 123 obj_chunk 0.05 0.1 snap 0 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 1 label_vertex 0 num_labels 5 silence 0 0 0 1 1 0 +max 0 1 1 0 0 0 -max 0 -1 1 0 0 0 start 0 0.5 1 1 0.5 1 end 1 0.5 1 1 0.5 1 fft_enabled 1 samples_enabled 0 hz 440 nperiods 2 is_waveform_editor 1 din-5.2.1/data/waveforms.lib0000644000175100017510000017126612111771600012637 00000000000000num_curves 102 name voice num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0792088 -2.4 vertex 0.25 1 left_tangent 0.145813 1 right_tangent 0.515728 1 vertex 0.75 -1 left_tangent 0.680494 -1 right_tangent 0.835567 -1 vertex 1 0 left_tangent 0.864644 2.6 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name sine num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0305722 0.176527 vertex 0.25 1 left_tangent 0.144441 1.01713 right_tangent 0.433994 0.995295 vertex 0.75 -1 left_tangent 0.571722 -1.01341 right_tangent 0.858021 -1.00614 vertex 1 0 left_tangent 0.95306 -0.247936 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name sorta-sine-1 num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.1 0 vertex 0.25 1 left_tangent 0.2 1 right_tangent 0.3 1 vertex 0.5 0 left_tangent 0.4 0 right_tangent 0.6 0 vertex 0.75 -1 left_tangent 0.7 -1 right_tangent 0.8 -1 vertex 1 0 left_tangent 0.9 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name swan num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.05 1 left_tangent 0.05 1 right_tangent 0.05 1 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.5 0.8 vertex 0.5 -1 left_tangent 0.25 -1 right_tangent 0.5 -1 vertex 0.95 -1 left_tangent 0.95 -1 right_tangent 0.95 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.0269221 0.0421331 right_tangent 0.1 -0.7 vertex 0.173051 0.981211 left_tangent 0.1 0.8 right_tangent 0.25 0.9 vertex 0.536889 0.8 left_tangent 0.4 0.6 right_tangent 0.6 0.8 vertex 0.711535 -0.9 left_tangent 0.55 -0.6 right_tangent 0.95 -0.6 vertex 1 0 left_tangent 0.85 0.5 right_tangent 1.01504 -0.0476854 curve_resolution 0.000333301 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.0116127 0.2 vertex 0.0789214 1.00909 left_tangent 0.0342348 1.00909 right_tangent 0.176368 0.671402 vertex 0.210903 0.940542 left_tangent 0.170552 0.999595 right_tangent 0.298198 0.706666 vertex 0.519809 0.1 left_tangent 0.431218 -0.579655 right_tangent 0.611095 1.2712 vertex 0.833489 -0.962729 left_tangent 0.46693 -1.03267 right_tangent 0.979268 -0.637495 vertex 1 0 left_tangent 0.912757 -0.230228 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.75 1 left_tangent 0.7 0.9 right_tangent 0.8 1 vertex 0.9 -1 left_tangent 0.852432 -1.01036 right_tangent 0.952432 -1.01036 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.24508 0 vertex 0.25 1 left_tangent 0.2 1 right_tangent 0.418726 1 vertex 0.75 -1 left_tangent 0.383996 -1 right_tangent 0.8 -1 vertex 1 0 left_tangent 0.776586 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0522857 0.9 vertex 0.3 1 left_tangent 0.217225 0.941508 right_tangent 0.34468 -0.358492 vertex 0.6 -1 left_tangent 0.494344 -0.4 right_tangent 0.681492 0.4 vertex 1 0 left_tangent 0.73796 0.6 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.00389433 0.0498481 right_tangent 0.00847051 -0.397275 vertex 0.173051 0.981211 left_tangent 0.142173 0.75221 right_tangent 0.241795 0.848942 vertex 0.536889 0.8 left_tangent 0.457028 0.574223 right_tangent 0.586168 0.694171 vertex 0.75 -1 left_tangent 0.639392 -0.651736 right_tangent 0.869384 -0.690429 vertex 0.996984 0.0109847 left_tangent 0.969898 0.481361 right_tangent 1.01202 -0.0367007 curve_resolution 0.000333301 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.0269221 0.0421331 right_tangent 0.130231 -0.203811 vertex 0.173051 0.981211 left_tangent 0.0880576 0.910851 right_tangent 0.250405 0.953413 vertex 0.536889 0.8 left_tangent 0.410292 0.670955 right_tangent 0.599964 0.864295 vertex 0.7 -1 left_tangent 0.585702 -0.818115 right_tangent 0.86858 -0.988364 vertex 0.996984 0.0109847 left_tangent 0.850597 0.222119 right_tangent 1.01202 -0.0367007 curve_resolution 0.000333301 color 1 1 1 name pulse-25% num_vertices 4 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.25 -1 left_tangent 0.25 -1 right_tangent 0.25 -1 vertex 1 -1 left_tangent 1 -1 right_tangent 1 -1 curve_resolution 0.0005 color 1 1 1 name pulse-50% num_vertices 4 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.5 -1 left_tangent 0.5 -1 right_tangent 0.5 -1 vertex 1 -1 left_tangent 1 -1 right_tangent 1 -1 curve_resolution 0.0005 color 1 1 1 name pulse-75% num_vertices 4 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.75 -1 left_tangent 0.75 -1 right_tangent 0.75 -1 vertex 1 -1 left_tangent 1 -1 right_tangent 1 -1 curve_resolution 0.0005 color 1 1 1 name pulsy-slanty num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.0262409 1 left_tangent 0.0262409 0.9 right_tangent 0.226241 0.3 vertex 0.4 1 left_tangent 0.2 0.3 right_tangent 0.4 1 vertex 0.6 -1 left_tangent 0.6 -1 right_tangent 0.8 -0.3 vertex 0.979011 -1 left_tangent 0.779011 -0.3 right_tangent 0.979011 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 0.672323 0.282315 0.288357 name pulse-curvy num_vertices 4 vertex 0 1 left_tangent 0 0.9 right_tangent 0.2 0.3 vertex 0.5 1 left_tangent 0.3 0.3 right_tangent 0.5 1 vertex 0.5 -1 left_tangent 0.5 -1 right_tangent 0.7 -0.3 vertex 1 -1 left_tangent 0.8 -0.3 right_tangent 1 -1 curve_resolution 0.0005 color 1 1 1 name pulse-bezier-25% num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0 0 vertex 0.05 0.8 left_tangent 0.05 0.8 right_tangent 0.15 1 vertex 0.25 0.8 left_tangent 0.15 1 right_tangent 0.25 0.8 vertex 0.3 -0.8 left_tangent 0.3 -0.8 right_tangent 0.65 -1 vertex 0.95 -0.8 left_tangent 0.65 -1 right_tangent 0.95 -0.8 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 1 1 name pulse-bezier-50% num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0 0 vertex 0.05 0.8 left_tangent 0.05 0.8 right_tangent 0.2 1 vertex 0.4 0.8 left_tangent 0.25 1 right_tangent 0.4 0.8 vertex 0.5 -0.8 left_tangent 0.5 -0.8 right_tangent 0.65 -1 vertex 0.95 -0.8 left_tangent 0.85 -1 right_tangent 0.95 -0.8 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 1 1 name pulse-bezier-75% num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0 0 vertex 0.05 0.8 left_tangent 0.05 0.8 right_tangent 0.35 1 vertex 0.7 0.8 left_tangent 0.4 1 right_tangent 0.7 0.8 vertex 0.75 -0.8 left_tangent 0.75 -0.8 right_tangent 0.85 -1 vertex 0.95 -0.8 left_tangent 0.85 -1 right_tangent 0.95 -0.8 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 1 1 name pulse-beveled num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0 1 vertex 0.25 1 left_tangent 0 1 right_tangent 0.5 1 vertex 0.5 0 left_tangent 0.5 1 right_tangent 0.5 -1 vertex 0.75 -1 left_tangent 0.5 -1 right_tangent 1 -1 vertex 1 0 left_tangent 1 -1 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sorta-sine-2 num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.25 0 vertex 0.25 1 left_tangent 0.2 1 right_tangent 0.3 1 vertex 0.5 0 left_tangent 0.25 0 right_tangent 0.75 0 vertex 0.75 -1 left_tangent 0.7 -1 right_tangent 0.8 -1 vertex 1 0 left_tangent 0.75 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sorta-sine-3 num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.25 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.5 0 left_tangent 0.25 0 right_tangent 0.75 0 vertex 0.75 -1 left_tangent 0.75 -1 right_tangent 0.75 -1 vertex 1 0 left_tangent 0.75 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name 2-knobs num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0.05 1 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.5 0 left_tangent 0.45 1 right_tangent 0.55 -1 vertex 0.75 -1 left_tangent 0.75 -1 right_tangent 0.75 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name 2-sharp-knobs num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0 1 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.5 0 left_tangent 0.5 1 right_tangent 0.5 -1 vertex 0.75 -1 left_tangent 0.75 -1 right_tangent 0.75 -1 vertex 1 0 left_tangent 1 -1 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name 2nd-harm num_vertices 8 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.00947491 1 left_tangent 0.00947491 1 right_tangent 0.00947491 1 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.217807 -1 left_tangent 0.217807 -1 right_tangent 0.217807 -1 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.75823 -1 left_tangent 0.75823 -1 right_tangent 0.75823 -1 vertex 0.988218 -1 left_tangent 0.988218 -1 right_tangent 0.988218 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 1 1 name 2nd-harm num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.00947491 1 left_tangent 0.00947491 1 right_tangent 0.00947491 1 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.217807 -1 left_tangent 0.217807 -1 right_tangent 0.217807 -1 vertex 0.988218 -1 left_tangent 0.988218 -1 right_tangent 0.988218 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0145307 0.345051 vertex 0.22973 1 left_tangent 0.108788 0.891335 right_tangent 0.33253 0.647036 vertex 0.6 -1 left_tangent 0.55 -0.2 right_tangent 0.9 -1 vertex 1 0 left_tangent 0.638517 0.716702 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0599524 -0.155337 vertex 0.226605 1 left_tangent 0.105663 0.891335 right_tangent 0.380873 -0.0191311 vertex 0.6 -1 left_tangent 0.28263 -0.616609 right_tangent 0.708102 -0.940029 vertex 1 0 left_tangent 0.638517 0.716702 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0488244 -0.140501 vertex 0.17223 -0.423692 left_tangent 0.123383 -0.0973803 right_tangent 0.273951 -0.145069 vertex 0.536638 1.00139 left_tangent 0.385648 1.03793 right_tangent 0.575838 -0.473935 vertex 0.700061 -1.00247 left_tangent 0.662192 -0.6113 right_tangent 0.800871 -0.272961 vertex 1 0 left_tangent 0.68908 0.946583 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0401135 0.320824 vertex 0.230303 0.115283 left_tangent 0.181456 0.441594 right_tangent 0.332024 0.393906 vertex 0.536638 1.00139 left_tangent 0.385648 1.03793 right_tangent 0.615037 0.832394 vertex 0.700061 -1.00247 left_tangent 0.662192 -0.6113 right_tangent 0.800871 -0.272961 vertex 1 0 left_tangent 0.874914 -0.163339 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0416584 -0.286664 vertex 0.135934 0.389338 left_tangent 0.0870875 0.715649 right_tangent 0.147642 -0.0902581 vertex 0.294996 0.5 left_tangent 0.255077 0.32996 right_tangent 0.388645 0.964854 vertex 0.574386 0.978556 left_tangent 0.51931 0.594879 right_tangent 0.657953 0.9 vertex 0.876459 -1.00377 left_tangent 0.83859 -0.6126 right_tangent 0.926459 -0.703775 vertex 1 0 left_tangent 0.9 0.2 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0244546 -0.303204 vertex 0.184571 0.305774 left_tangent 0.0819353 0.371967 right_tangent 0.209789 -0.279923 vertex 0.425446 0.819115 left_tangent 0.27957 0.752922 right_tangent 0.538083 -0.623067 vertex 0.647449 1.00301 left_tangent 0.575761 0.967707 right_tangent 0.706663 0.60585 vertex 0.853894 -0.997221 left_tangent 0.623592 -0.846126 right_tangent 0.913943 -0.422489 vertex 1 0 left_tangent 0.925478 0.451399 right_tangent 1.00814 -0.0493322 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0412131 -0.2 vertex 0.070669 -1 left_tangent 0.0252992 -0.85 right_tangent 0.133789 -1 vertex 0.212983 0.995601 left_tangent 0.14501 0.8 right_tangent 0.335014 0.832324 vertex 0.367276 0.0909568 left_tangent 0.345985 0.398146 right_tangent 0.36663 -0.8 vertex 0.7 -1 left_tangent 0.6 -1 right_tangent 0.700463 -0.9 vertex 1.00063 0 left_tangent 0.909547 0.496943 right_tangent 1.05063 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.00389433 0.0498481 right_tangent 0.034429 -0.404304 vertex 0.173051 0.981211 left_tangent 0.150475 -0.333187 right_tangent 0.415804 1.36427 vertex 0.536889 0.8 left_tangent 0.340903 -0.169433 right_tangent 0.644317 0.769162 vertex 0.711535 -0.9 left_tangent 0.687481 0.0262744 right_tangent 0.852518 -0.85241 vertex 0.996984 0.0109847 left_tangent 0.874303 0.4 right_tangent 1.01202 -0.0367007 curve_resolution 0.137333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.232653 -0.9 vertex 0.300626 1.00188 left_tangent 0.210374 0.779838 right_tangent 0.515739 0.355969 vertex 0.842609 -1 left_tangent 0.388501 -0.878219 right_tangent 0.892609 -1 vertex 1 0 left_tangent 0.912006 0.138107 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0636249 0.200928 vertex 0.153602 -0.961394 left_tangent 0.0186364 -0.832724 right_tangent 0.315833 -0.931371 vertex 0.373091 -0.0607015 left_tangent 0.367638 -0.45958 right_tangent 0.450798 1.01155 vertex 0.792004 0.997056 left_tangent 0.585764 0.582651 right_tangent 0.841626 0.97397 vertex 0.889777 -1.00428 left_tangent 0.815512 -0.903576 right_tangent 0.952518 -0.887463 vertex 1 0 left_tangent 0.927729 0.231673 right_tangent 1.00814 -0.0493322 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0239526 0.5 vertex 0.260909 1 left_tangent 0.110707 1 right_tangent 0.434418 1 vertex 0.7 -1 left_tangent 0.228538 -1 right_tangent 0.949766 -1 vertex 1 0 left_tangent 0.9 -0.1 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0475718 -0.2 vertex 0.25 1 left_tangent 0.172466 0.990993 right_tangent 0.3 1 vertex 0.45 0 left_tangent 0.3 1 right_tangent 0.5 -1 vertex 0.75 -1 left_tangent 0.5 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 0.9 -0.2 right_tangent 1.05 0 curve_resolution 0.000333318 color 1 1 1 name noname num_vertices 7 vertex 0 0 left_tangent -0.05 0 right_tangent 0.102708 0.989607 vertex 0.249399 0.231057 left_tangent 0.125744 0.187573 right_tangent 0.275483 0.559601 vertex 0.35 1 left_tangent 0.296913 1.02826 right_tangent 0.381463 0.989607 vertex 0.562876 0.632074 left_tangent 0.449133 0.467802 right_tangent 0.60751 -0.16996 vertex 0.65 -1 left_tangent 0.585913 -1.05896 right_tangent 0.798668 -0.305243 vertex 0.872097 -0.686934 left_tangent 0.78571 -0.870532 right_tangent 0.899453 -0.155465 vertex 1 0 left_tangent 0.975762 -0.276254 right_tangent 1.05 0 curve_resolution 0.0043333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.219839 0 vertex 0.25 1 left_tangent 0.161377 1 right_tangent 0.344664 1 vertex 0.5 0 left_tangent 0.297263 0 right_tangent 0.6 0 vertex 0.75 -1 left_tangent 0.7 -1 right_tangent 0.8 -1 vertex 1 0 left_tangent 0.9 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 7 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0208143 -1.3 vertex 0.293879 0.2 left_tangent 0.293879 0.2 right_tangent 0.293879 0.2 vertex 0.35 1 left_tangent 0.313089 0.6 right_tangent 0.398658 0.6 vertex 0.562876 0.632074 left_tangent 0.513428 0.5 right_tangent 0.573774 0.1 vertex 0.687171 -0.4 left_tangent 0.619086 -0.1 right_tangent 0.759049 0.1 vertex 0.847396 -1 left_tangent 0.771399 -0.8 right_tangent 0.891946 -0.113066 vertex 1 0 left_tangent 0.925084 0.4 right_tangent 1.05 0 curve_resolution 0.000333299 color 1 1 1 name noname num_vertices 8 vertex 0 0 left_tangent -0.0140088 0.1 right_tangent -0.00398507 -0.2 vertex 0.0737822 -0.9 left_tangent 0.0186478 -0.5 right_tangent 0.18325 -0.4 vertex 0.221171 1 left_tangent 0.179135 1 right_tangent 0.286127 1 vertex 0.497866 0.8 left_tangent 0.467476 0.8 right_tangent 0.541261 0.8 vertex 0.610741 -0.6 left_tangent 0.561837 -0.6 right_tangent 0.695576 -0.4 vertex 0.71198 1 left_tangent 0.672943 0.7 right_tangent 0.771705 1 vertex 0.846505 -1 left_tangent 0.794338 -0.8 right_tangent 0.911617 -0.8 vertex 1 0 left_tangent 0.872524 0 right_tangent 1.05976 0 curve_resolution 0.000333299 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0677847 0.7 vertex 0.35 1 left_tangent 0.147872 0.9 right_tangent 0.677573 0.9 vertex 0.846505 -1 left_tangent 0.773116 0.8 right_tangent 0.986682 -0.9 vertex 1 0 left_tangent 0.92486 -0.1 right_tangent 1.05 0 curve_resolution 0.000333299 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0.05 -0.9 vertex 0.291475 -0.1 left_tangent 0.291475 -0.1 right_tangent 0.291475 -0.1 vertex 0.349691 1 left_tangent 0.299691 0.9 right_tangent 0.399691 1.1 vertex 0.65 0.4 left_tangent 0.587124 0.367926 right_tangent 0.687124 0.467926 vertex 0.773833 -1 left_tangent 0.685678 -0.5 right_tangent 0.815415 -0.7 vertex 1 0 left_tangent 0.925084 0.4 right_tangent 1.05 0 curve_resolution 0.000333299 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0342781 0.823066 vertex 0.236944 1 left_tangent 0.0580266 0.581235 right_tangent 0.332426 -0.446272 vertex 0.6 -1 left_tangent 0.475908 0.977192 right_tangent 0.886919 -0.255816 vertex 1 0 left_tangent 0.607809 0.941624 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.0458312 1 vertex 0.801673 1 left_tangent 0.0558867 1 right_tangent 0.895307 1 vertex 0.933155 -1 left_tangent 0.933155 -1 right_tangent 0.933155 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name triangle num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.75 -1 left_tangent 0.75 -1 right_tangent 0.75 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name saw-1 num_vertices 2 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0003333 color 1 1 1 name saw-2 num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.965603 1 left_tangent 0.965603 1 right_tangent 0.965603 1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name saw-3 num_vertices 3 vertex 0 0 left_tangent -0.05 0 right_tangent 0.166129 1 vertex 0.9 1 left_tangent 0.227477 1 right_tangent 0.976317 1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name saw num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 1 -1 left_tangent 1 -1 right_tangent 1 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name soft-saw num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.05 1 left_tangent 0.05 1 right_tangent 0.05 1 vertex 0.95 -1 left_tangent 0.95 -1 right_tangent 0.95 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name bezier-saw num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.5 1 vertex 0.9 -1 left_tangent 0.55 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name bezier-saw-1 num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 1 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.5 1 vertex 0.9 -1 left_tangent 0.55 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 1 -1 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name bezier-saw-2 num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0.05 1 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.35 1 vertex 0.9 -1 left_tangent 0.7 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name bezier-saw-3 num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0.05 1 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.65 1 vertex 0.9 -1 left_tangent 0.4 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name saw-pulse num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.85 -1 left_tangent 0.85 -1 right_tangent 0.85 -1 vertex 1 -1 left_tangent 1 -1 right_tangent 1 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.05 1 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0 1 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 1 0 left_tangent 1 -1 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.45 0 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 1 0 left_tangent 0.55 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent -0.05 0 right_tangent 0.5 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.5 -1 left_tangent 0.5 -1 right_tangent 0.5 -1 vertex 1 0 left_tangent 0.5 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.5 -1 left_tangent 0.5 -1 right_tangent 0.5 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0003333 color 1 1 1 name sulse num_vertices 4 vertex 0 0 left_tangent -0.05 -0.1 right_tangent 0 1 vertex 0.5 1 left_tangent 0 1 right_tangent 0.5 1 vertex 0.5 -1 left_tangent 0.5 -1 right_tangent 1 -1 vertex 1 0 left_tangent 1 -1 right_tangent 1.05 0.1 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.55 -1.6 vertex 0.45 1 left_tangent 0.25 0.7 right_tangent 0.6 0.8 vertex 0.75 -1 left_tangent 0.5 -0.9 right_tangent 0.8 1.7 vertex 1 0 left_tangent 0.95 -1.2 right_tangent 1.025 0.1 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0377022 0.3 vertex 0.173462 0.996883 left_tangent 0.0816246 1 right_tangent 0.2653 1 vertex 0.504877 0 left_tangent 0.319205 0 right_tangent 0.664595 0 vertex 0.822316 -1 left_tangent 0.738464 -1 right_tangent 0.914154 -1 vertex 1 0 left_tangent 0.974048 -0.2 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-12 num_vertices 6 vertex 0 0 left_tangent -0.0099453 -0.100106 right_tangent 0.0159214 0.160259 vertex 0.15 1 left_tangent 0.0832287 1.01805 right_tangent 0.230893 1.01805 vertex 0.406029 -0.205097 left_tangent 0.321551 -0.260694 right_tangent 0.469749 -0.231375 vertex 0.591382 0.209669 left_tangent 0.525359 0.210317 right_tangent 0.69248 0.209992 vertex 0.85 -1 left_tangent 0.764406 -0.987936 right_tangent 0.916563 -1.0063 vertex 1 0 left_tangent 0.980442 -0.198187 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-123 num_vertices 8 vertex 0 0 left_tangent -0.0099453 -0.100106 right_tangent 0.0131276 0.163512 vertex 0.104821 1.00008 left_tangent 0.0598223 0.997707 right_tangent 0.172899 0.972065 vertex 0.289104 -0.0911145 left_tangent 0.213961 -0.0967315 right_tangent 0.327821 -0.114385 vertex 0.422086 0.253163 left_tangent 0.377764 0.277168 right_tangent 0.477946 0.242572 vertex 0.577672 -0.249036 left_tangent 0.524939 -0.251373 right_tangent 0.62798 -0.265393 vertex 0.712378 0.0962617 left_tangent 0.67019 0.112556 right_tangent 0.786302 0.0899628 vertex 0.894378 -1 left_tangent 0.832839 -1.00226 right_tangent 0.945094 -0.998335 vertex 1 0 left_tangent 0.98877 -0.141535 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-16 num_vertices 131 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.00769231 0.170142 left_tangent 0.00769231 0.170142 right_tangent 0.00769231 0.170142 vertex 0.0153846 0.328073 left_tangent 0.0153846 0.328073 right_tangent 0.0153846 0.328073 vertex 0.0230769 0.462594 left_tangent 0.0230769 0.462594 right_tangent 0.0230769 0.462594 vertex 0.0307692 0.564455 left_tangent 0.0307692 0.564455 right_tangent 0.0307692 0.564455 vertex 0.0384615 0.627117 left_tangent 0.0384615 0.627117 right_tangent 0.0384615 0.627117 vertex 0.0461538 0.647298 left_tangent 0.0461538 0.647298 right_tangent 0.0461538 0.647298 vertex 0.0538462 0.62524 left_tangent 0.0538462 0.62524 right_tangent 0.0538462 0.62524 vertex 0.0615385 0.564682 left_tangent 0.0615385 0.564682 right_tangent 0.0615385 0.564682 vertex 0.0692308 0.472549 left_tangent 0.0692308 0.472549 right_tangent 0.0692308 0.472549 vertex 0.0769231 0.358367 left_tangent 0.0769231 0.358367 right_tangent 0.0769231 0.358367 vertex 0.0846154 0.233459 left_tangent 0.0846154 0.233459 right_tangent 0.0846154 0.233459 vertex 0.0923077 0.110002 left_tangent 0.0923077 0.110002 right_tangent 0.0923077 0.110002 vertex 0.1 1.3046e-06 left_tangent 0.1 1.3046e-06 right_tangent 0.1 1.3046e-06 vertex 0.107692 -0.0857131 left_tangent 0.107692 -0.0857131 right_tangent 0.107692 -0.0857131 vertex 0.115385 -0.138397 left_tangent 0.115385 -0.138397 right_tangent 0.115385 -0.138397 vertex 0.123077 -0.152125 left_tangent 0.123077 -0.152125 right_tangent 0.123077 -0.152125 vertex 0.130769 -0.124288 left_tangent 0.130769 -0.124288 right_tangent 0.130769 -0.124288 vertex 0.138462 -0.0558161 left_tangent 0.138462 -0.0558161 right_tangent 0.138462 -0.0558161 vertex 0.146154 0.0488967 left_tangent 0.146154 0.0488967 right_tangent 0.146154 0.0488967 vertex 0.153846 0.182357 left_tangent 0.153846 0.182357 right_tangent 0.153846 0.182357 vertex 0.161538 0.334592 left_tangent 0.161538 0.334592 right_tangent 0.161538 0.334592 vertex 0.169231 0.493985 left_tangent 0.169231 0.493985 right_tangent 0.169231 0.493985 vertex 0.176923 0.648237 left_tangent 0.176923 0.648237 right_tangent 0.176923 0.648237 vertex 0.184615 0.785394 left_tangent 0.184615 0.785394 right_tangent 0.184615 0.785394 vertex 0.192308 0.894844 left_tangent 0.192308 0.894844 right_tangent 0.192308 0.894844 vertex 0.2 0.9682 left_tangent 0.2 0.9682 right_tangent 0.2 0.9682 vertex 0.207692 1 left_tangent 0.207692 1 right_tangent 0.207692 1 vertex 0.215385 0.988158 left_tangent 0.215385 0.988158 right_tangent 0.215385 0.988158 vertex 0.223077 0.934141 left_tangent 0.223077 0.934141 right_tangent 0.223077 0.934141 vertex 0.230769 0.842844 left_tangent 0.230769 0.842844 right_tangent 0.230769 0.842844 vertex 0.238462 0.72218 left_tangent 0.238462 0.72218 right_tangent 0.238462 0.72218 vertex 0.246154 0.582416 left_tangent 0.246154 0.582416 right_tangent 0.246154 0.582416 vertex 0.253846 0.435323 left_tangent 0.253846 0.435323 right_tangent 0.253846 0.435323 vertex 0.261538 0.293182 left_tangent 0.261538 0.293182 right_tangent 0.261538 0.293182 vertex 0.269231 0.167767 left_tangent 0.269231 0.167767 right_tangent 0.269231 0.167767 vertex 0.276923 0.0693595 left_tangent 0.276923 0.0693595 right_tangent 0.276923 0.0693595 vertex 0.284615 0.00588815 left_tangent 0.284615 0.00588815 right_tangent 0.284615 0.00588815 vertex 0.292308 -0.0177302 left_tangent 0.292308 -0.0177302 right_tangent 0.292308 -0.0177302 vertex 0.3 -1.18324e-06 left_tangent 0.3 -1.18324e-06 right_tangent 0.3 -1.18324e-06 vertex 0.307692 0.0570239 left_tangent 0.307692 0.0570239 right_tangent 0.307692 0.0570239 vertex 0.315385 0.14792 left_tangent 0.315385 0.14792 right_tangent 0.315385 0.14792 vertex 0.323077 0.264344 left_tangent 0.323077 0.264344 right_tangent 0.323077 0.264344 vertex 0.330769 0.395731 left_tangent 0.330769 0.395731 right_tangent 0.330769 0.395731 vertex 0.338462 0.530183 left_tangent 0.338462 0.530183 right_tangent 0.338462 0.530183 vertex 0.346154 0.655457 left_tangent 0.346154 0.655457 right_tangent 0.346154 0.655457 vertex 0.353846 0.76 left_tangent 0.353846 0.76 right_tangent 0.353846 0.76 vertex 0.361538 0.833907 left_tangent 0.361538 0.833907 right_tangent 0.361538 0.833907 vertex 0.369231 0.869756 left_tangent 0.369231 0.869756 right_tangent 0.369231 0.869756 vertex 0.376923 0.863229 left_tangent 0.376923 0.863229 right_tangent 0.376923 0.863229 vertex 0.384615 0.813476 left_tangent 0.384615 0.813476 right_tangent 0.384615 0.813476 vertex 0.392308 0.72319 left_tangent 0.392308 0.72319 right_tangent 0.392308 0.72319 vertex 0.4 0.598384 left_tangent 0.4 0.598384 right_tangent 0.4 0.598384 vertex 0.407692 0.447895 left_tangent 0.407692 0.447895 right_tangent 0.407692 0.447895 vertex 0.415385 0.282645 left_tangent 0.415385 0.282645 right_tangent 0.415385 0.282645 vertex 0.423077 0.114738 left_tangent 0.423077 0.114738 right_tangent 0.423077 0.114738 vertex 0.430769 -0.0435476 left_tangent 0.430769 -0.0435476 right_tangent 0.430769 -0.0435476 vertex 0.438462 -0.180786 left_tangent 0.438462 -0.180786 right_tangent 0.438462 -0.180786 vertex 0.446154 -0.287347 left_tangent 0.446154 -0.287347 right_tangent 0.446154 -0.287347 vertex 0.453846 -0.356197 left_tangent 0.453846 -0.356197 right_tangent 0.453846 -0.356197 vertex 0.461538 -0.383488 left_tangent 0.461538 -0.383488 right_tangent 0.461538 -0.383488 vertex 0.469231 -0.368866 left_tangent 0.469231 -0.368866 right_tangent 0.469231 -0.368866 vertex 0.476923 -0.315502 left_tangent 0.476923 -0.315502 right_tangent 0.476923 -0.315502 vertex 0.484615 -0.229822 left_tangent 0.484615 -0.229822 right_tangent 0.484615 -0.229822 vertex 0.492308 -0.120961 left_tangent 0.492308 -0.120961 right_tangent 0.492308 -0.120961 vertex 0.5 -2.93282e-06 left_tangent 0.5 -2.93282e-06 right_tangent 0.5 -2.93282e-06 vertex 0.507692 0.120955 left_tangent 0.507692 0.120955 right_tangent 0.507692 0.120955 vertex 0.515385 0.229817 left_tangent 0.515385 0.229817 right_tangent 0.515385 0.229817 vertex 0.523077 0.315499 left_tangent 0.523077 0.315499 right_tangent 0.523077 0.315499 vertex 0.530769 0.368864 left_tangent 0.530769 0.368864 right_tangent 0.530769 0.368864 vertex 0.538462 0.383487 left_tangent 0.538462 0.383487 right_tangent 0.538462 0.383487 vertex 0.546154 0.356198 left_tangent 0.546154 0.356198 right_tangent 0.546154 0.356198 vertex 0.553846 0.287349 left_tangent 0.553846 0.287349 right_tangent 0.553846 0.287349 vertex 0.561539 0.18079 left_tangent 0.561539 0.18079 right_tangent 0.561539 0.18079 vertex 0.569231 0.0435525 left_tangent 0.569231 0.0435525 right_tangent 0.569231 0.0435525 vertex 0.576923 -0.114733 left_tangent 0.576923 -0.114733 right_tangent 0.576923 -0.114733 vertex 0.584616 -0.28264 left_tangent 0.584616 -0.28264 right_tangent 0.584616 -0.28264 vertex 0.592308 -0.44789 left_tangent 0.592308 -0.44789 right_tangent 0.592308 -0.44789 vertex 0.6 -0.59838 left_tangent 0.6 -0.59838 right_tangent 0.6 -0.59838 vertex 0.607693 -0.723187 left_tangent 0.607693 -0.723187 right_tangent 0.607693 -0.723187 vertex 0.615385 -0.813474 left_tangent 0.615385 -0.813474 right_tangent 0.615385 -0.813474 vertex 0.623077 -0.863229 left_tangent 0.623077 -0.863229 right_tangent 0.623077 -0.863229 vertex 0.63077 -0.869757 left_tangent 0.63077 -0.869757 right_tangent 0.63077 -0.869757 vertex 0.638462 -0.83391 left_tangent 0.638462 -0.83391 right_tangent 0.638462 -0.83391 vertex 0.646154 -0.760004 left_tangent 0.646154 -0.760004 right_tangent 0.646154 -0.760004 vertex 0.653847 -0.655462 left_tangent 0.653847 -0.655462 right_tangent 0.653847 -0.655462 vertex 0.661539 -0.530188 left_tangent 0.661539 -0.530188 right_tangent 0.661539 -0.530188 vertex 0.669231 -0.395736 left_tangent 0.669231 -0.395736 right_tangent 0.669231 -0.395736 vertex 0.676924 -0.264349 left_tangent 0.676924 -0.264349 right_tangent 0.676924 -0.264349 vertex 0.684616 -0.147924 left_tangent 0.684616 -0.147924 right_tangent 0.684616 -0.147924 vertex 0.692308 -0.0570268 left_tangent 0.692308 -0.0570268 right_tangent 0.692308 -0.0570268 vertex 0.700001 -4.24754e-07 left_tangent 0.700001 -4.24754e-07 right_tangent 0.700001 -4.24754e-07 vertex 0.707693 0.0177301 left_tangent 0.707693 0.0177301 right_tangent 0.707693 0.0177301 vertex 0.715385 -0.00588673 left_tangent 0.715385 -0.00588673 right_tangent 0.715385 -0.00588673 vertex 0.723078 -0.0693567 left_tangent 0.723078 -0.0693567 right_tangent 0.723078 -0.0693567 vertex 0.73077 -0.167763 left_tangent 0.73077 -0.167763 right_tangent 0.73077 -0.167763 vertex 0.738462 -0.293177 left_tangent 0.738462 -0.293177 right_tangent 0.738462 -0.293177 vertex 0.746155 -0.435317 left_tangent 0.746155 -0.435317 right_tangent 0.746155 -0.435317 vertex 0.753847 -0.582411 left_tangent 0.753847 -0.582411 right_tangent 0.753847 -0.582411 vertex 0.761539 -0.722175 left_tangent 0.761539 -0.722175 right_tangent 0.761539 -0.722175 vertex 0.769232 -0.84284 left_tangent 0.769232 -0.84284 right_tangent 0.769232 -0.84284 vertex 0.776924 -0.934139 left_tangent 0.776924 -0.934139 right_tangent 0.776924 -0.934139 vertex 0.784616 -0.988157 left_tangent 0.784616 -0.988157 right_tangent 0.784616 -0.988157 vertex 0.792309 -1 left_tangent 0.792309 -1 right_tangent 0.792309 -1 vertex 0.800001 -0.968202 left_tangent 0.800001 -0.968202 right_tangent 0.800001 -0.968202 vertex 0.807693 -0.894846 left_tangent 0.807693 -0.894846 right_tangent 0.807693 -0.894846 vertex 0.815386 -0.785397 left_tangent 0.815386 -0.785397 right_tangent 0.815386 -0.785397 vertex 0.823078 -0.64824 left_tangent 0.823078 -0.64824 right_tangent 0.823078 -0.64824 vertex 0.83077 -0.493989 left_tangent 0.83077 -0.493989 right_tangent 0.83077 -0.493989 vertex 0.838463 -0.334596 left_tangent 0.838463 -0.334596 right_tangent 0.838463 -0.334596 vertex 0.846155 -0.18236 left_tangent 0.846155 -0.18236 right_tangent 0.846155 -0.18236 vertex 0.853848 -0.0488996 left_tangent 0.853848 -0.0488996 right_tangent 0.853848 -0.0488996 vertex 0.86154 0.0558143 left_tangent 0.86154 0.0558143 right_tangent 0.86154 0.0558143 vertex 0.869232 0.124287 left_tangent 0.869232 0.124287 right_tangent 0.869232 0.124287 vertex 0.876925 0.152125 left_tangent 0.876925 0.152125 right_tangent 0.876925 0.152125 vertex 0.884617 0.138398 left_tangent 0.884617 0.138398 right_tangent 0.884617 0.138398 vertex 0.892309 0.0857149 left_tangent 0.892309 0.0857149 right_tangent 0.892309 0.0857149 vertex 0.900002 9.70867e-07 left_tangent 0.900002 9.70867e-07 right_tangent 0.900002 9.70867e-07 vertex 0.907694 -0.109999 left_tangent 0.907694 -0.109999 right_tangent 0.907694 -0.109999 vertex 0.915386 -0.233456 left_tangent 0.915386 -0.233456 right_tangent 0.915386 -0.233456 vertex 0.923079 -0.358364 left_tangent 0.923079 -0.358364 right_tangent 0.923079 -0.358364 vertex 0.930771 -0.472548 left_tangent 0.930771 -0.472548 right_tangent 0.930771 -0.472548 vertex 0.938463 -0.564681 left_tangent 0.938463 -0.564681 right_tangent 0.938463 -0.564681 vertex 0.946156 -0.625239 left_tangent 0.946156 -0.625239 right_tangent 0.946156 -0.625239 vertex 0.953848 -0.647298 left_tangent 0.953848 -0.647298 right_tangent 0.953848 -0.647298 vertex 0.96154 -0.627117 left_tangent 0.96154 -0.627117 right_tangent 0.96154 -0.627117 vertex 0.969233 -0.564455 left_tangent 0.969233 -0.564455 right_tangent 0.969233 -0.564455 vertex 0.976925 -0.462594 left_tangent 0.976925 -0.462594 right_tangent 0.976925 -0.462594 vertex 0.984617 -0.328072 left_tangent 0.984617 -0.328072 right_tangent 0.984617 -0.328072 vertex 0.99231 -0.170142 left_tangent 0.99231 -0.170142 right_tangent 0.99231 -0.170142 vertex 1 6.22992e-07 left_tangent 1 6.22992e-07 right_tangent 1 6.22992e-07 curve_resolution 0.0005 color 1 1 1 name harmonics-23 num_vertices 8 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.0100977 0.114161 vertex 0.0957599 1 left_tangent 0.05105 1.00078 right_tangent 0.158412 1.01775 vertex 0.2841 -0.635026 left_tangent 0.2136 -0.663766 right_tangent 0.34187 -0.633358 vertex 0.448199 0.116103 left_tangent 0.379181 0.135034 right_tangent 0.488468 0.1013 vertex 0.554444 -0.115779 left_tangent 0.511291 -0.106239 right_tangent 0.618123 -0.130011 vertex 0.717305 0.635344 left_tangent 0.665802 0.658863 right_tangent 0.786174 0.654593 vertex 0.903234 -1 left_tangent 0.841508 -0.998408 right_tangent 0.949688 -0.992709 vertex 1 0 left_tangent 0.986238 -0.195051 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-13 num_vertices 8 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.00849042 0.112187 vertex 0.0965029 1.00018 left_tangent 0.0535264 1.00354 right_tangent 0.150737 1.01388 vertex 0.25 0 left_tangent 0.193383 0.00171434 right_tangent 0.306882 0.00021855 vertex 0.40261 1.00134 left_tangent 0.3483 1.00205 right_tangent 0.47648 1.00134 vertex 0.6 -1 left_tangent 0.523116 -0.999487 right_tangent 0.650798 -0.992719 vertex 0.75 0 left_tangent 0.696095 0 right_tangent 0.806142 -0.0017423 vertex 0.903234 -1 left_tangent 0.849846 -1.00614 right_tangent 0.948995 -0.995362 vertex 1 0 left_tangent 0.984586 -0.19501 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 0.672323 0.282315 0.288357 name harmonics-13-variant num_vertices 8 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.0109575 0.1 vertex 0.109575 1 left_tangent 0.0516775 1 right_tangent 0.134508 1.04 vertex 0.249328 0.4 left_tangent 0.203409 0.4 right_tangent 0.307226 0.4 vertex 0.393074 1 left_tangent 0.33917 1 right_tangent 0.466944 1 vertex 0.606697 -1 left_tangent 0.531823 -1 right_tangent 0.662598 -1 vertex 0.74645 -0.4 left_tangent 0.692545 -0.4 right_tangent 0.800355 -0.4 vertex 0.892193 -1 left_tangent 0.844277 -1 right_tangent 0.942104 -1 vertex 1 0 left_tangent 0.982034 -0.2 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-13-variant-1 num_vertices 10 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.0163037 0.156416 vertex 0.0765821 0.665215 left_tangent 0.0139853 0.464062 right_tangent 0.118313 0.671131 vertex 0.178592 0.24516 left_tangent 0.132673 0.24516 right_tangent 0.23649 0.24516 vertex 0.3 1.00244 left_tangent 0.259736 0.978778 right_tangent 0.359427 1.00836 vertex 0.45 -0.139398 left_tangent 0.394358 -0.139398 right_tangent 0.5 -0.145314 vertex 0.5449 0.150499 left_tangent 0.50085 0.13275 right_tangent 0.60286 0.144583 vertex 0.68864 -1 left_tangent 0.640725 -1 right_tangent 0.735009 -0.985425 vertex 0.820789 -0.239975 left_tangent 0.774421 -0.251807 right_tangent 0.857884 -0.257724 vertex 0.922799 -0.654114 left_tangent 0.885705 -0.654114 right_tangent 0.966849 -0.636365 vertex 1 0 left_tangent 0.976122 -0.186728 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name harmonics-14 num_vertices 10 vertex 0 0 left_tangent -0.00769231 -0.0726109 right_tangent 0.00575479 0.0763907 vertex 0.0707953 0.729313 left_tangent 0.0384387 0.729234 right_tangent 0.111203 0.736139 vertex 0.184614 -0.0418618 left_tangent 0.141473 -0.04239 right_tangent 0.229927 -0.0253861 vertex 0.308483 1 left_tangent 0.267509 1.00804 right_tangent 0.360116 1.00617 vertex 0.447735 -0.334772 left_tangent 0.393814 -0.330726 right_tangent 0.486283 -0.324102 vertex 0.554601 0.334681 left_tangent 0.514402 0.332869 right_tangent 0.604816 0.318639 vertex 0.692308 -1 left_tangent 0.641589 -1.00384 right_tangent 0.733555 -0.995278 vertex 0.815651 0.0409256 left_tangent 0.770655 0.0313285 right_tangent 0.854411 0.0625919 vertex 0.928374 -0.728982 left_tangent 0.890403 -0.732018 right_tangent 0.962945 -0.727493 vertex 1 -1.56247e-05 left_tangent 0.994625 -0.0726407 right_tangent 1.00769 0.0725936 curve_resolution 0.0005 color 1 1 1 name mirrored-sine num_vertices 4 vertex 0 0 left_tangent -0.025 0.1 right_tangent 0.0305722 -0.176527 vertex 0.25 -1 left_tangent 0.144441 -1.01713 right_tangent 0.433994 -0.995295 vertex 0.75 1 left_tangent 0.572047 1.01741 right_tangent 0.858021 1.00614 vertex 1 0 left_tangent 0.958874 0.233656 right_tangent 1.025 -0.1 curve_resolution 0.000333308 color 1 1 1 name 2nd-half-mirror-sine num_vertices 4 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.0305722 0.176527 vertex 0.25 1 left_tangent 0.144441 1.01713 right_tangent 0.433994 0.995295 vertex 0.75 1 left_tangent 0.572047 0.982595 right_tangent 0.858021 0.99386 vertex 1 0 left_tangent 0.958874 -0.233656 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.1 0 left_tangent 0.05 0 right_tangent 0.1 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.2 -1 left_tangent 0.2 -1 right_tangent 0.2 -1 vertex 0.95 0 left_tangent 0.9 -1 right_tangent 1 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 8 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.1 0 left_tangent 0.05 0 right_tangent 0.1 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.4 0 left_tangent 0.35 1 right_tangent 0.45 -1 vertex 0.65 0 left_tangent 0.6 0.9 right_tangent 0.7 -1 vertex 0.9 -1 left_tangent 0.9 -1 right_tangent 0.9 -1 vertex 0.95 0 left_tangent 0.95 -1 right_tangent 1 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.05 0 left_tangent 0 0 right_tangent 0.05 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.9 -1 left_tangent 0.9 -1 right_tangent 0.9 -1 vertex 0.95 0 left_tangent 0.95 -1 right_tangent 1 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.3 0 left_tangent 0.25 0 right_tangent 0.3 1 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 0.7 0 left_tangent 0.7 -1 right_tangent 0.75 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.3 0 left_tangent 0.25 0 right_tangent 0.3 0.7 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 0.7 0 left_tangent 0.7 -0.8 right_tangent 0.75 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 1 vertex 0.45 1 left_tangent 0 1 right_tangent 0.6 1 vertex 0.7 -1 left_tangent 0.5 -1 right_tangent 0.7 1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name delta num_vertices 6 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.55 -1 left_tangent 0.55 -1 right_tangent 0.55 -1 vertex 0.7 0 left_tangent 0.7 0 right_tangent 0.7 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name pulse+ num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.95 1 left_tangent 0.95 1 right_tangent 0.95 1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 0.672323 0.282315 0.288357 name pulse+ num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000333308 color 1 1 1 name muffin num_vertices 3 vertex 0 0 left_tangent -0.05 0 right_tangent 0.05 0 vertex 0.5 1 left_tangent 0 1 right_tangent 1 1 vertex 1 0 left_tangent 0.95 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name half-sorta-saw num_vertices 3 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.05 0 vertex 0.15 1 left_tangent 0.05 1 right_tangent 0.25 1 vertex 1 0 left_tangent 0.95 0 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name great-white-teeth num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.0923415 1 left_tangent 0.0423415 1 right_tangent 0.142341 1 vertex 0.5 0 left_tangent 0.4 0 right_tangent 0.5 0 vertex 0.6 1 left_tangent 0.55 1 right_tangent 0.65 1 vertex 1 0 left_tangent 0.9 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.0923415 1 left_tangent 0.0423415 1 right_tangent 0.142341 1 vertex 0.502764 0.1 left_tangent 0.402764 0.1 right_tangent 0.602764 0.1 vertex 0.748269 0.4 left_tangent 0.698269 0.4 right_tangent 0.798269 0.4 vertex 1 0 left_tangent 0.9 0 right_tangent 1.05 0 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.0269221 0.0421331 right_tangent 0.0966827 0 vertex 0.132896 1 left_tangent 0.0479025 0.92964 right_tangent 0.381328 1.01879 vertex 0.560599 0.8 left_tangent 0.316695 0.6 right_tangent 0.611177 0.6 vertex 0.634193 -1 left_tangent 0.555926 -0.3 right_tangent 0.668983 -0.5 vertex 1 0 left_tangent 0.990484 0.3 right_tangent 1.01504 -0.0476854 curve_resolution 0.000333301 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.00641654 0.2 vertex 0.0802014 1 left_tangent 0.0355148 1 right_tangent 0.136319 1 vertex 0.354556 0.8 left_tangent 0.271418 0.9 right_tangent 0.413792 0.7 vertex 0.535381 0.1 left_tangent 0.46991 0.5 right_tangent 0.64346 -0.9 vertex 0.918854 -1 left_tangent 0.870938 -1 right_tangent 0.968765 -1 vertex 1 0 left_tangent 0.982034 -0.2 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.0116127 0.2 vertex 0.0781229 1 left_tangent 0.0334363 1 right_tangent 0.185961 0.64098 vertex 0.351439 0.8 left_tangent 0.311088 0.859053 right_tangent 0.412753 0.7 vertex 0.519809 0.1 left_tangent 0.43444 -0.604116 right_tangent 0.681762 1.41226 vertex 0.918854 -1 left_tangent 0.517565 -0.906282 right_tangent 0.968765 -1 vertex 1 0 left_tangent 0.987443 -0.2 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 10 vertex 0 0 left_tangent -0.00615942 -0.100673 right_tangent 0.0113956 0.264672 vertex 0.0615942 1.00673 left_tangent 0.0371733 0.979416 right_tangent 0.0760633 1.03547 vertex 0.144691 0.287435 left_tangent 0.116573 0.380306 right_tangent 0.172808 0.194564 vertex 0.342772 0.0780196 left_tangent 0.284903 0.178241 right_tangent 0.38483 0.0051795 vertex 0.444525 -0.837035 left_tangent 0.40935 -0.894262 right_tangent 0.489297 -0.764194 vertex 0.555776 0.838288 left_tangent 0.524572 0.788211 right_tangent 0.5858 0.886471 vertex 0.664314 -0.0813181 left_tangent 0.605722 0.0563053 right_tangent 0.718582 -0.208788 vertex 0.846114 -0.277076 left_tangent 0.818844 -0.186481 right_tangent 0.873384 -0.367671 vertex 0.937014 -0.987267 left_tangent 0.915306 -1.02824 right_tangent 0.966862 -0.964505 vertex 1 0 left_tangent 0.992639 -0.263418 right_tangent 1.0063 0.0987267 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 7 vertex 0 0 left_tangent -0.05 0 right_tangent 0.102708 0.989607 vertex 0.249399 0.231057 left_tangent 0.125744 0.187573 right_tangent 0.275483 0.559601 vertex 0.35 1 left_tangent 0.296913 1.02826 right_tangent 0.381463 0.989607 vertex 0.562876 0.632074 left_tangent 0.449133 0.467802 right_tangent 0.60751 -0.16996 vertex 0.65 -1 left_tangent 0.585913 -1.05896 right_tangent 0.798668 -0.305243 vertex 0.872097 -0.686934 left_tangent 0.78571 -0.870532 right_tangent 0.899453 -0.155465 vertex 1 0 left_tangent 0.975762 -0.276254 right_tangent 1.05 0 curve_resolution 0.0043333 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.0122647 -0.1 right_tangent 0.0122647 0.1 vertex 0.0861285 1.00825 left_tangent 0.0325034 1.01933 right_tangent 0.175891 1.01127 vertex 0.372119 -1 left_tangent 0.133185 -0.479545 right_tangent 0.579554 -0.856144 vertex 0.622756 1 left_tangent 0.471995 0.510769 right_tangent 0.759715 0.227158 vertex 0.871063 -1 left_tangent 0.640056 -0.539987 right_tangent 0.928474 -1.06101 vertex 1 0 left_tangent 0.9829 -0.623675 right_tangent 1.01289 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.00526666 -0.100981 right_tangent 0.0168283 0.343775 vertex 0.0574948 1 left_tangent 0.0208046 0.820257 right_tangent 0.164508 -0.511974 vertex 0.559539 0.809207 left_tangent 0.486158 -0.174316 right_tangent 0.657379 -0.782278 vertex 0.935613 -1 left_tangent 0.846944 0.432469 right_tangent 0.976889 -1 vertex 1 0 left_tangent 0.99065 -0.205827 right_tangent 1.00891 0.100725 curve_resolution 0.0003333 color 1 1 1 name noname num_vertices 5 vertex 0 0 left_tangent -0.025 -0.1 right_tangent 0.15486 0 vertex 0.173462 0.996883 left_tangent 0.0797342 1 right_tangent 0.216187 1 vertex 0.470694 0 left_tangent 0.35 -0.6 right_tangent 0.650002 0.891386 vertex 0.822316 -1 left_tangent 0.738464 -1 right_tangent 0.914154 -1 vertex 1 0 left_tangent 0.839348 0 right_tangent 1.025 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 6 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.017476 0.3 vertex 0.0538764 1 left_tangent 0.0147455 0.9 right_tangent 0.0917261 0.8 vertex 0.153877 -0.6 left_tangent 0.100254 -0.6 right_tangent 0.55 -0.6 vertex 0.65 1 left_tangent 0.599275 0.3 right_tangent 0.745653 0.7 vertex 0.920576 -1 left_tangent 0.65 -1 right_tangent 0.985794 -0.8 vertex 1 0 left_tangent 0.966953 -0.1 right_tangent 1.01078 0.1 curve_resolution 0.000333308 color 1 1 1 name noname num_vertices 9 vertex 0 0 left_tangent -0.0109575 -0.1 right_tangent 0.010069 0.2 vertex 0.0532641 1 left_tangent 0.020017 1 right_tangent 0.0865113 0.9 vertex 0.148689 -0.6 left_tangent 0.10436 -0.6 right_tangent 0.198457 -0.4 vertex 0.274398 0 left_tangent 0.192492 0.2 right_tangent 0.301344 -0.1 vertex 0.353206 0.6 left_tangent 0.320729 0.6 right_tangent 0.416161 0.3 vertex 0.451948 -1 left_tangent 0.393794 -0.7 right_tangent 0.689275 -0.7 vertex 0.85306 0.6 left_tangent 0.615971 0.1 right_tangent 0.897794 0.5 vertex 0.949983 -1 left_tangent 0.911232 -0.9 right_tangent 0.964894 -1 vertex 1 0 left_tangent 0.991734 -0.5 right_tangent 1.00136 0.10057 curve_resolution 3.74505e-05 color 1 1 1 name noname num_vertices 100 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.010101 0.344071 left_tangent 0.010101 0.344071 right_tangent 0.010101 0.344071 vertex 0.020202 0.644384 left_tangent 0.020202 0.644384 right_tangent 0.020202 0.644384 vertex 0.030303 0.865186 left_tangent 0.030303 0.865186 right_tangent 0.030303 0.865186 vertex 0.040404 0.985025 left_tangent 0.040404 0.985025 right_tangent 0.040404 0.985025 vertex 0.050505 1 left_tangent 0.050505 1 right_tangent 0.050505 1 vertex 0.0606061 0.92336 left_tangent 0.0606061 0.92336 right_tangent 0.0606061 0.92336 vertex 0.0707071 0.781663 left_tangent 0.0707071 0.781663 right_tangent 0.0707071 0.781663 vertex 0.0808081 0.608474 left_tangent 0.0808081 0.608474 right_tangent 0.0808081 0.608474 vertex 0.0909091 0.437114 left_tangent 0.0909091 0.437114 right_tangent 0.0909091 0.437114 vertex 0.10101 0.294117 left_tangent 0.10101 0.294117 right_tangent 0.10101 0.294117 vertex 0.111111 0.194821 left_tangent 0.111111 0.194821 right_tangent 0.111111 0.194821 vertex 0.121212 0.141936 left_tangent 0.121212 0.141936 right_tangent 0.121212 0.141936 vertex 0.131313 0.127202 left_tangent 0.131313 0.127202 right_tangent 0.131313 0.127202 vertex 0.141414 0.135488 left_tangent 0.141414 0.135488 right_tangent 0.141414 0.135488 vertex 0.151515 0.150131 left_tangent 0.151515 0.150131 right_tangent 0.151515 0.150131 vertex 0.161616 0.158076 left_tangent 0.161616 0.158076 right_tangent 0.161616 0.158076 vertex 0.171717 0.1535 left_tangent 0.171717 0.1535 right_tangent 0.171717 0.1535 vertex 0.181818 0.139075 left_tangent 0.181818 0.139075 right_tangent 0.181818 0.139075 vertex 0.191919 0.124659 left_tangent 0.191919 0.124659 right_tangent 0.191919 0.124659 vertex 0.20202 0.123899 left_tangent 0.20202 0.123899 right_tangent 0.20202 0.123899 vertex 0.212121 0.149775 left_tangent 0.212121 0.149775 right_tangent 0.212121 0.149775 vertex 0.222222 0.210336 left_tangent 0.222222 0.210336 right_tangent 0.222222 0.210336 vertex 0.232323 0.305836 left_tangent 0.232323 0.305836 right_tangent 0.232323 0.305836 vertex 0.242424 0.42803 left_tangent 0.242424 0.42803 right_tangent 0.242424 0.42803 vertex 0.252525 0.561826 left_tangent 0.252525 0.561826 right_tangent 0.252525 0.561826 vertex 0.262626 0.688824 left_tangent 0.262626 0.688824 right_tangent 0.262626 0.688824 vertex 0.272727 0.791764 left_tangent 0.272727 0.791764 right_tangent 0.272727 0.791764 vertex 0.282828 0.858665 left_tangent 0.282828 0.858665 right_tangent 0.282828 0.858665 vertex 0.292929 0.885516 left_tangent 0.292929 0.885516 right_tangent 0.292929 0.885516 vertex 0.30303 0.876766 left_tangent 0.30303 0.876766 right_tangent 0.30303 0.876766 vertex 0.313131 0.843478 left_tangent 0.313131 0.843478 right_tangent 0.313131 0.843478 vertex 0.323232 0.799638 left_tangent 0.323232 0.799638 right_tangent 0.323232 0.799638 vertex 0.333333 0.757632 left_tangent 0.333333 0.757632 right_tangent 0.333333 0.757632 vertex 0.343434 0.724163 left_tangent 0.343434 0.724163 right_tangent 0.343434 0.724163 vertex 0.353535 0.697807 left_tangent 0.353535 0.697807 right_tangent 0.353535 0.697807 vertex 0.363636 0.668962 left_tangent 0.363636 0.668962 right_tangent 0.363636 0.668962 vertex 0.373737 0.622366 left_tangent 0.373737 0.622366 right_tangent 0.373737 0.622366 vertex 0.383838 0.541614 left_tangent 0.383838 0.541614 right_tangent 0.383838 0.541614 vertex 0.393939 0.414585 left_tangent 0.393939 0.414585 right_tangent 0.393939 0.414585 vertex 0.404041 0.238328 left_tangent 0.404041 0.238328 right_tangent 0.404041 0.238328 vertex 0.414142 0.022061 left_tangent 0.414142 0.022061 right_tangent 0.414142 0.022061 vertex 0.424243 -0.212676 left_tangent 0.424243 -0.212676 right_tangent 0.424243 -0.212676 vertex 0.434344 -0.435008 left_tangent 0.434344 -0.435008 right_tangent 0.434344 -0.435008 vertex 0.444445 -0.610346 left_tangent 0.444445 -0.610346 right_tangent 0.444445 -0.610346 vertex 0.454546 -0.707494 left_tangent 0.454546 -0.707494 right_tangent 0.454546 -0.707494 vertex 0.464647 -0.705625 left_tangent 0.464647 -0.705625 right_tangent 0.464647 -0.705625 vertex 0.474748 -0.599523 left_tangent 0.474748 -0.599523 right_tangent 0.474748 -0.599523 vertex 0.484849 -0.401782 left_tangent 0.484849 -0.401782 right_tangent 0.484849 -0.401782 vertex 0.49495 -0.141357 left_tangent 0.49495 -0.141357 right_tangent 0.49495 -0.141357 vertex 0.505051 0.141335 left_tangent 0.505051 0.141335 right_tangent 0.505051 0.141335 vertex 0.515152 0.401763 left_tangent 0.515152 0.401763 right_tangent 0.515152 0.401763 vertex 0.525253 0.59951 left_tangent 0.525253 0.59951 right_tangent 0.525253 0.59951 vertex 0.535354 0.70562 left_tangent 0.535354 0.70562 right_tangent 0.535354 0.70562 vertex 0.545455 0.707497 left_tangent 0.545455 0.707497 right_tangent 0.545455 0.707497 vertex 0.555556 0.610358 left_tangent 0.555556 0.610358 right_tangent 0.555556 0.610358 vertex 0.565657 0.435025 left_tangent 0.565657 0.435025 right_tangent 0.565657 0.435025 vertex 0.575758 0.212696 left_tangent 0.575758 0.212696 right_tangent 0.575758 0.212696 vertex 0.585859 -0.0220413 left_tangent 0.585859 -0.0220413 right_tangent 0.585859 -0.0220413 vertex 0.59596 -0.238311 left_tangent 0.59596 -0.238311 right_tangent 0.59596 -0.238311 vertex 0.606061 -0.414572 left_tangent 0.606061 -0.414572 right_tangent 0.606061 -0.414572 vertex 0.616162 -0.541606 left_tangent 0.616162 -0.541606 right_tangent 0.616162 -0.541606 vertex 0.626263 -0.622363 left_tangent 0.626263 -0.622363 right_tangent 0.626263 -0.622363 vertex 0.636364 -0.668964 left_tangent 0.636364 -0.668964 right_tangent 0.636364 -0.668964 vertex 0.646465 -0.697811 left_tangent 0.646465 -0.697811 right_tangent 0.646465 -0.697811 vertex 0.656566 -0.724169 left_tangent 0.656566 -0.724169 right_tangent 0.656566 -0.724169 vertex 0.666667 -0.757638 left_tangent 0.666667 -0.757638 right_tangent 0.666667 -0.757638 vertex 0.676768 -0.799643 left_tangent 0.676768 -0.799643 right_tangent 0.676768 -0.799643 vertex 0.686869 -0.843482 left_tangent 0.686869 -0.843482 right_tangent 0.686869 -0.843482 vertex 0.69697 -0.876768 left_tangent 0.69697 -0.876768 right_tangent 0.69697 -0.876768 vertex 0.707071 -0.885517 left_tangent 0.707071 -0.885517 right_tangent 0.707071 -0.885517 vertex 0.717172 -0.858665 left_tangent 0.717172 -0.858665 right_tangent 0.717172 -0.858665 vertex 0.727273 -0.791762 left_tangent 0.727273 -0.791762 right_tangent 0.727273 -0.791762 vertex 0.737374 -0.688821 left_tangent 0.737374 -0.688821 right_tangent 0.737374 -0.688821 vertex 0.747475 -0.561822 left_tangent 0.747475 -0.561822 right_tangent 0.747475 -0.561822 vertex 0.757576 -0.428026 left_tangent 0.757576 -0.428026 right_tangent 0.757576 -0.428026 vertex 0.767677 -0.305833 left_tangent 0.767677 -0.305833 right_tangent 0.767677 -0.305833 vertex 0.777778 -0.210334 left_tangent 0.777778 -0.210334 right_tangent 0.777778 -0.210334 vertex 0.787879 -0.149775 left_tangent 0.787879 -0.149775 right_tangent 0.787879 -0.149775 vertex 0.79798 -0.123902 left_tangent 0.79798 -0.123902 right_tangent 0.79798 -0.123902 vertex 0.808081 -0.124665 left_tangent 0.808081 -0.124665 right_tangent 0.808081 -0.124665 vertex 0.818182 -0.139084 left_tangent 0.818182 -0.139084 right_tangent 0.818182 -0.139084 vertex 0.828283 -0.153511 left_tangent 0.828283 -0.153511 right_tangent 0.828283 -0.153511 vertex 0.838384 -0.158088 left_tangent 0.838384 -0.158088 right_tangent 0.838384 -0.158088 vertex 0.848485 -0.150142 left_tangent 0.848485 -0.150142 right_tangent 0.848485 -0.150142 vertex 0.858586 -0.135495 left_tangent 0.858586 -0.135495 right_tangent 0.858586 -0.135495 vertex 0.868687 -0.127205 left_tangent 0.868687 -0.127205 right_tangent 0.868687 -0.127205 vertex 0.878788 -0.141934 left_tangent 0.878788 -0.141934 right_tangent 0.878788 -0.141934 vertex 0.888889 -0.194814 left_tangent 0.888889 -0.194814 right_tangent 0.888889 -0.194814 vertex 0.898991 -0.294105 left_tangent 0.898991 -0.294105 right_tangent 0.898991 -0.294105 vertex 0.909092 -0.437099 left_tangent 0.909092 -0.437099 right_tangent 0.909092 -0.437099 vertex 0.919193 -0.608458 left_tangent 0.919193 -0.608458 right_tangent 0.919193 -0.608458 vertex 0.929294 -0.781649 left_tangent 0.929294 -0.781649 right_tangent 0.929294 -0.781649 vertex 0.939395 -0.92335 left_tangent 0.939395 -0.92335 right_tangent 0.939395 -0.92335 vertex 0.949496 -0.999995 left_tangent 0.949496 -0.999995 right_tangent 0.949496 -0.999995 vertex 0.959597 -0.985026 left_tangent 0.959597 -0.985026 right_tangent 0.959597 -0.985026 vertex 0.969698 -0.865193 left_tangent 0.969698 -0.865193 right_tangent 0.969698 -0.865193 vertex 0.979799 -0.644396 left_tangent 0.979799 -0.644396 right_tangent 0.979799 -0.644396 vertex 0.9899 -0.344087 left_tangent 0.9899 -0.344087 right_tangent 0.9899 -0.344087 vertex 1 -1.68359e-05 left_tangent 1 -1.68359e-05 right_tangent 1 -1.68359e-05 curve_resolution 0.000333308 color 0.672323 0.282315 0.288357 name noname num_vertices 11 vertex 0 0 left_tangent -0.005 -0.06 right_tangent 0.005 0.06 vertex 0.06286 0.604353 left_tangent 0.0315323 0.507303 right_tangent 0.12486 0.796422 vertex 0.2 1 left_tangent 0.163726 0.972485 right_tangent 0.231113 1.0236 vertex 0.300074 0.284655 left_tangent 0.259876 0.379567 right_tangent 0.351194 0.231786 vertex 0.464057 -0.167835 left_tangent 0.415564 0.04627 right_tangent 0.482561 -0.185493 vertex 0.536212 0.16728 left_tangent 0.513101 0.170148 right_tangent 0.559531 0.166094 vertex 0.660009 -0.243174 left_tangent 0.593138 -0.113869 right_tangent 0.678278 -0.296193 vertex 0.714534 -0.332146 left_tangent 0.697045 -0.255037 right_tangent 0.72899 -0.407324 vertex 0.789917 -0.98939 left_tangent 0.761812 -0.97148 right_tangent 0.82424 -1.01126 vertex 0.944367 -0.583206 left_tangent 0.916367 -0.689439 right_tangent 0.969657 -0.49572 vertex 1 0 left_tangent 0.979592 -0.289504 right_tangent 1.00642 0.06 curve_resolution 0.000333308 color 0.672323 0.282315 0.288357 name pulsey-1 num_vertices 5 vertex 0 0 left_tangent -0.05 0 right_tangent 0.05 0.998308 vertex 0.25 0.403982 left_tangent 0.2 1.40691 right_tangent 0.3 1.39762 vertex 0.5 0 left_tangent 0.45 1.01224 right_tangent 0.55 -1 vertex 0.75 -1 left_tangent 0.55 -1 right_tangent 0.95 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1.05 0 curve_resolution 0.0003333 color 0.672323 0.282315 0.288357 name rounded-pulse num_vertices 5 vertex 0 0 left_tangent 0 0 right_tangent 0.05 1 vertex 0.25 1 left_tangent 0.05 1 right_tangent 0.45 1 vertex 0.5 0 left_tangent 0.45 1 right_tangent 0.55 -1 vertex 0.75 -1 left_tangent 0.55 -1 right_tangent 0.95 -1 vertex 1 0 left_tangent 0.95 -1 right_tangent 1 0 curve_resolution 0.0003333 color 0.672323 0.282315 0.288357 din-5.2.1/data/coml.crv0000644000175100017510000000057312111771600011574 00000000000000name compress-L num_vertices 5 vertex -4.75 -0.95 left_tangent -4.75 -0.95 right_tangent -4.75 -0.95 vertex -0.9 -0.9 left_tangent -0.965463 -0.9587 right_tangent -0.9 -0.9 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.9 0.9 left_tangent 0.9 0.9 right_tangent 0.95 0.95 vertex 5.8 0.95 left_tangent 5.8 0.95 right_tangent 5.8 0.95 curve_resolution 0.0003333 color 1 0 0 din-5.2.1/data/comr.crv0000644000175100017510000000057312111771600011602 00000000000000name compress-R num_vertices 5 vertex -4.75 -0.95 left_tangent -4.75 -0.95 right_tangent -4.75 -0.95 vertex -0.9 -0.9 left_tangent -0.965463 -0.9587 right_tangent -0.9 -0.9 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.9 0.9 left_tangent 0.9 0.9 right_tangent 0.95 0.95 vertex 5.8 0.95 left_tangent 5.8 0.95 right_tangent 5.8 0.95 curve_resolution 0.0003333 color 0 1 0 din-5.2.1/data/compressor.ed0000644000175100017510000000040212111771600012623 00000000000000id 1864 editor compressor window -2846.62 -2297.35 3919.66 2777.35 win_chunk 100 100 obj_chunk 0.05 0.05 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 3 one 0 1 0 1 0 0 zero 0 0 1 0 0 0 -one 0 -1 0 1 0 0 din-5.2.1/data/gater.crv0000644000175100017510000000034712111771600011743 00000000000000name gate-r num_vertices 3 vertex 0 1 left_tangent -0.15 0.5 right_tangent 0 0 vertex 0.9 0 left_tangent 0.15 0 right_tangent 0.9 0.8 vertex 1 1 left_tangent 0.9 1 right_tangent 1.03 0.3 curve_resolution 0.00033331 color 0.4 1 0.4 din-5.2.1/data/gater-patterns.lib0000644000175100017510000005462112111771600013561 00000000000000num_curves 45 name gate-l num_vertices 2 vertex 0 1 left_tangent -0.1 1 right_tangent 0.1 1 vertex 1 1 left_tangent 0.9 1 right_tangent 1.1 1 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-l num_vertices 9 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0.0971729 1 vertex 0.123963 2.98023e-08 left_tangent 0.0739633 2.98023e-08 right_tangent 0.184093 2.98023e-08 vertex 0.25 1 left_tangent 0.156707 1 right_tangent 0.354178 1 vertex 0.378214 2.98023e-08 left_tangent 0.328214 2.98023e-08 right_tangent 0.441668 2.98023e-08 vertex 0.5 1 left_tangent 0.40225 1 right_tangent 0.618759 1 vertex 0.629334 2.98023e-08 left_tangent 0.563958 2.98023e-08 right_tangent 0.690866 2.98023e-08 vertex 0.75 1 left_tangent 0.65 1 right_tangent 0.85 1 vertex 0.870002 2.98023e-08 left_tangent 0.815201 2.98023e-08 right_tangent 0.920002 2.98023e-08 vertex 1 1 left_tangent 0.899806 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-l num_vertices 8 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0.0971729 1 vertex 0.123963 2.98023e-08 left_tangent 0.0739633 2.98023e-08 right_tangent 0.184093 2.98023e-08 vertex 0.378214 2.98023e-08 left_tangent 0.328214 2.98023e-08 right_tangent 0.441668 2.98023e-08 vertex 0.5 1 left_tangent 0.40225 1 right_tangent 0.618759 1 vertex 0.629334 2.98023e-08 left_tangent 0.563958 2.98023e-08 right_tangent 0.690866 2.98023e-08 vertex 0.75 1 left_tangent 0.65 1 right_tangent 0.85 1 vertex 0.870002 2.98023e-08 left_tangent 0.815201 2.98023e-08 right_tangent 0.920002 2.98023e-08 vertex 1 1 left_tangent 0.899806 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 8 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0.0971729 1 vertex 0.123963 2.98023e-08 left_tangent 0.0739633 2.98023e-08 right_tangent 0.184093 2.98023e-08 vertex 0.25 1 left_tangent 0.156707 1 right_tangent 0.354178 1 vertex 0.378214 2.98023e-08 left_tangent 0.328214 2.98023e-08 right_tangent 0.441668 2.98023e-08 vertex 0.5 1 left_tangent 0.40225 1 right_tangent 0.618759 1 vertex 0.629334 2.98023e-08 left_tangent 0.563958 2.98023e-08 right_tangent 0.690866 2.98023e-08 vertex 0.870002 2.98023e-08 left_tangent 0.815201 2.98023e-08 right_tangent 0.920002 2.98023e-08 vertex 1 1 left_tangent 0.899806 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 0 0 0 name gate-l num_vertices 7 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0.0971729 1 vertex 0.123963 2.98023e-08 left_tangent 0.0739633 2.98023e-08 right_tangent 0.184093 2.98023e-08 vertex 0.378214 2.98023e-08 left_tangent 0.328214 2.98023e-08 right_tangent 0.441668 2.98023e-08 vertex 0.5 1 left_tangent 0.40225 1 right_tangent 0.618759 1 vertex 0.629334 2.98023e-08 left_tangent 0.563958 2.98023e-08 right_tangent 0.690866 2.98023e-08 vertex 0.870002 2.98023e-08 left_tangent 0.815201 2.98023e-08 right_tangent 0.920002 2.98023e-08 vertex 1 1 left_tangent 0.899806 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 5 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0 0 vertex 0.123963 0 left_tangent 0.0739633 0 right_tangent 0.184093 0 vertex 0.65 0 left_tangent 0.6 0 right_tangent 0.713454 0 vertex 0.75 1 left_tangent 0.65225 1 right_tangent 0.8 1 vertex 1 1 left_tangent 0.9 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 0 0 0 name noname num_vertices 5 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0.00597193 0.749168 vertex 0.1 2.98023e-08 left_tangent 0.0500003 2.98023e-08 right_tangent 0.16013 2.98023e-08 vertex 0.4 2.98023e-08 left_tangent 0.35 2.98023e-08 right_tangent 0.463454 2.98023e-08 vertex 0.5 1 left_tangent 0.491559 0.798242 right_tangent 0.55 1 vertex 1 1 left_tangent 0.899806 1 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 0 0 0 name gate-l num_vertices 5 vertex 0 1 left_tangent -0.023963 0.1 right_tangent 0.026037 0.1 vertex 0.378214 1 left_tangent 0.35 0.1 right_tangent 0.4 0.1 vertex 0.5 0 left_tangent 0.40225 0 right_tangent 0.618759 0 vertex 0.629334 1 left_tangent 0.6 0.1 right_tangent 0.65 0.1 vertex 1 1 left_tangent 0.979998 0.1 right_tangent 1.03 0.1 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 7 vertex 0 1 left_tangent -0.023963 0.1 right_tangent 0.026037 0.1 vertex 0.25 0 left_tangent 0.156707 0 right_tangent 0.354178 0 vertex 0.378214 1 left_tangent 0.35 0.1 right_tangent 0.4 0.1 vertex 0.5 0 left_tangent 0.40225 0 right_tangent 0.618759 0 vertex 0.629334 1 left_tangent 0.6 0.1 right_tangent 0.65 0.1 vertex 0.75 0 left_tangent 0.661373 0 right_tangent 0.844044 0 vertex 1 1 left_tangent 0.979998 0.1 right_tangent 1.03 0.1 curve_resolution 0.00033331 color 0 0 0 name gate-l num_vertices 5 vertex 0 1 left_tangent -0.023963 0.1 right_tangent 0.026037 0.1 vertex 0.25 0 left_tangent 0.156707 0 right_tangent 0.354178 0 vertex 0.5 0 left_tangent 0.40225 0 right_tangent 0.618759 0 vertex 0.75 0 left_tangent 0.661373 0 right_tangent 0.844044 0 vertex 1 1 left_tangent 0.979998 0.1 right_tangent 1.03 0.1 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 7 vertex 0 1 left_tangent -0.00497519 1.04975 right_tangent 0 0.6 vertex 0.1 2.98023e-08 left_tangent 0.0500003 2.98023e-08 right_tangent 0.16013 2.98023e-08 vertex 0.378214 2.98023e-08 left_tangent 0.328214 2.98023e-08 right_tangent 0.45 2.98023e-08 vertex 0.5 1 left_tangent 0.5 0.8 right_tangent 0.5 0.8 vertex 0.6 2.98023e-08 left_tangent 0.534624 2.98023e-08 right_tangent 0.661532 2.98023e-08 vertex 0.9 2.98023e-08 left_tangent 0.845199 2.98023e-08 right_tangent 0.95 2.98023e-08 vertex 1 1 left_tangent 1 0.7 right_tangent 1.00742 1.04945 curve_resolution 0.00033331 color 0 0 0 name gate-r num_vertices 5 vertex 0 1 left_tangent -0.093293 1 right_tangent 0.2 1 vertex 0.25 0 left_tangent 0.221786 0.9 right_tangent 0.271786 0.9 vertex 0.5 1 left_tangent 0.40225 1 right_tangent 0.618759 1 vertex 0.75 0 left_tangent 0.720666 0.9 right_tangent 0.770666 0.9 vertex 1 1 left_tangent 0.8 1 right_tangent 1.05 0.9 curve_resolution 0.00033331 color 0.4 1 0.4 name noname num_vertices 5 vertex 0 1 left_tangent -0.023963 0.1 right_tangent 0.094266 1 vertex 0.378214 1 left_tangent 0.311283 1 right_tangent 0.4 0.1 vertex 0.5 0 left_tangent 0.40225 0 right_tangent 0.618759 0 vertex 0.629334 1 left_tangent 0.6 0.1 right_tangent 0.730711 1 vertex 0.95 1 left_tangent 0.855702 1 right_tangent 0.979998 0.1 curve_resolution 0.00033331 color 0 0 0 name gate-r num_vertices 11 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.1 0 left_tangent 0.1 0 right_tangent 0.1 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 vertex 0.6 1 left_tangent 0.6 1 right_tangent 0.6 1 vertex 0.7 0 left_tangent 0.7 0 right_tangent 0.7 0 vertex 0.8 1 left_tangent 0.8 1 right_tangent 0.8 1 vertex 0.9 0 left_tangent 0.9 0 right_tangent 0.9 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name noname num_vertices 10 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.1 0 left_tangent 0.1 0 right_tangent 0.1 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 vertex 0.6 1 left_tangent 0.6 1 right_tangent 0.6 1 vertex 0.7 0 left_tangent 0.7 0 right_tangent 0.7 0 vertex 0.8 1 left_tangent 0.8 1 right_tangent 0.8 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0 0 0 name gate-r num_vertices 6 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.494455 1 left_tangent 0.494455 1 right_tangent 0.494455 1 vertex 0.600517 0 left_tangent 0.600517 0 right_tangent 0.600517 0 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.9 0 left_tangent 0.9 0 right_tangent 0.9 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 7 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.2 0 left_tangent 0.15 0.3 right_tangent 0.65 0 vertex 0.75 1 left_tangent 0.7 1 right_tangent 0.8 1 vertex 0.8 0.1 left_tangent 0.8 0.4 right_tangent 0.85 0 vertex 0.95 0.1 left_tangent 0.9 0 right_tangent 0.95 0.4 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 6 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.1 0 left_tangent 0.1 0 right_tangent 0.1 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.8 1 left_tangent 0.8 1 right_tangent 0.8 1 vertex 0.9 0 left_tangent 0.9 0 right_tangent 0.9 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name noname num_vertices 2 vertex 0 1 left_tangent -0.15 0.8 right_tangent 0.3 -0.2 vertex 1 1 left_tangent 0.729998 -0.2 right_tangent 1.23 0.3 curve_resolution 0.00033331 color 0 0 0 name noname num_vertices 5 vertex 0.1 1 left_tangent 0 1 right_tangent 0.16013 1 vertex 0.378214 1 left_tangent 0.328214 1 right_tangent 0.45 1 vertex 0.5 0 left_tangent 0.5 0.2 right_tangent 0.5 0.2 vertex 0.6 1 left_tangent 0.534624 1 right_tangent 0.661532 1 vertex 0.95 1 left_tangent 0.895199 1 right_tangent 1 1 curve_resolution 0.00033331 color 0 0 0 name noname num_vertices 5 vertex 0 1 left_tangent -0.023963 0.1 right_tangent 0.126037 0 vertex 0.378214 1 left_tangent 0.25 0 right_tangent 0.4 0.1 vertex 0.5 0 left_tangent 0.45 1 right_tangent 0.55 1 vertex 0.629334 1 left_tangent 0.6 0.1 right_tangent 0.75 0 vertex 1 1 left_tangent 0.879998 0 right_tangent 1.03 0.1 curve_resolution 0.00033331 color 0 0 0 name gate-l num_vertices 3 vertex 0 1 left_tangent -0.15 0.5 right_tangent 0.8 1 vertex 0.9 0 left_tangent 0.45 0 right_tangent 1 0 vertex 1 1 left_tangent 0.945199 1 right_tangent 1.03 0.3 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 4 vertex 0 1 left_tangent -0.1 1 right_tangent 0.3 1 vertex 0.4 0 left_tangent 0.25 0 right_tangent 0.5 0 vertex 0.65 0 left_tangent 0.6 0 right_tangent 0.75 0 vertex 1 1 left_tangent 0.7 1 right_tangent 1.1 1 curve_resolution 0.00033331 color 0 0 0 name gate-l num_vertices 6 vertex 0 1 left_tangent -0.05 1 right_tangent 0 0.5 vertex 0.05 0 left_tangent 0 0 right_tangent 0.420617 0 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.65 1 left_tangent 0.65 1 right_tangent 0.65 1 vertex 0.95 0 left_tangent 0.65 0 right_tangent 1 0 vertex 1 1 left_tangent 1 0.6 right_tangent 1.05 1 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-l num_vertices 3 vertex 0 1 left_tangent -0.05 1 right_tangent 0 0 vertex 0.6 0 left_tangent 0 0 right_tangent 0.6 1 vertex 1 1 left_tangent 0.6 1 right_tangent 1.05 0.8 curve_resolution 0.00033331 color 1 0.4 0.4 name noname num_vertices 3 vertex 0 1 left_tangent -0.05 1 right_tangent 0 -0.5 vertex 0.6 0 left_tangent 0.6 1.8 right_tangent 0.9 0 vertex 1 1 left_tangent 0.6 1 right_tangent 1.05 0.8 curve_resolution 0.00033331 color 0 0 0 name gate-r num_vertices 3 vertex 0 1 left_tangent -0.15 0.5 right_tangent 0 0 vertex 0.9 0 left_tangent 0.15 0 right_tangent 0.9 0.8 vertex 1 1 left_tangent 0.9 1 right_tangent 1.03 0.3 curve_resolution 0.00033331 color 0.4 1 0.4 name noname num_vertices 5 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.7 0 left_tangent 0.65 0.8 right_tangent 0.75 0 vertex 0.95 0 left_tangent 0.95 0 right_tangent 0.95 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0 0 0 name gate-r num_vertices 13 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.4 1 left_tangent 0.35 1 right_tangent 0.40049 0.900005 vertex 0.409791 0 left_tangent 0.409791 0 right_tangent 0.409791 0 vertex 0.490706 0 left_tangent 0.490706 0 right_tangent 0.490706 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.65 1 left_tangent 0.65 1 right_tangent 0.65 1 vertex 0.66198 0 left_tangent 0.66198 0 right_tangent 0.66198 0 vertex 0.736044 0 left_tangent 0.736044 0 right_tangent 0.736044 0 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.9 1 left_tangent 0.9 1 right_tangent 0.9 1 vertex 0.909632 0 left_tangent 0.909632 0 right_tangent 0.909632 0 vertex 0.988325 0 left_tangent 0.988325 0 right_tangent 0.988325 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 11 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.25 1 left_tangent 0.2 1 right_tangent 0.26481 0.9 vertex 0.266048 0 left_tangent 0.266048 0 right_tangent 0.266048 0 vertex 0.33156 0 left_tangent 0.33156 0 right_tangent 0.33156 0 vertex 0.35 1 left_tangent 0.337007 1 right_tangent 0.4 1 vertex 0.65 1 left_tangent 0.65 1 right_tangent 0.65 1 vertex 0.672739 0 left_tangent 0.667745 0.8 right_tangent 0.684176 0 vertex 0.734827 0 left_tangent 0.725179 0 right_tangent 0.738572 0.8 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.9 1 left_tangent 0.9 1 right_tangent 0.9 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 10 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.182157 0 left_tangent 0.167239 0 right_tangent 0.193661 0 vertex 0.215273 0 left_tangent 0.201825 0 right_tangent 0.23065 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.438619 0 left_tangent 0.416846 0 right_tangent 0.447856 0 vertex 0.470529 0 left_tangent 0.462337 0 right_tangent 0.486389 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-l num_vertices 16 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 vertex 0.35 1 left_tangent 0.35 1 right_tangent 0.35 1 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.8 0 left_tangent 0.8 0 right_tangent 0.8 0 vertex 0.95 0 left_tangent 0.95 0 right_tangent 0.95 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 vertex 1.45 1 left_tangent 1.45 1 right_tangent 1.45 1 vertex 1.5 0 left_tangent 1.5 0 right_tangent 1.5 0 vertex 1.6 0 left_tangent 1.6 0 right_tangent 1.6 0 vertex 1.65 1 left_tangent 1.65 1 right_tangent 1.65 1 vertex 1.8 1 left_tangent 1.8 1 right_tangent 1.8 1 vertex 1.85 0 left_tangent 1.85 0 right_tangent 1.85 0 vertex 1.95 0 left_tangent 1.95 0 right_tangent 1.95 0 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-r num_vertices 13 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.182157 0 left_tangent 0.167239 0 right_tangent 0.193661 0 vertex 0.215273 0 left_tangent 0.201825 0 right_tangent 0.23065 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.438619 0 left_tangent 0.416846 0 right_tangent 0.447856 0 vertex 0.470529 0 left_tangent 0.462337 0 right_tangent 0.486389 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 1.25 1 left_tangent 1.2 1 right_tangent 1.6 1 vertex 1.7 0 left_tangent 1.67594 0.7 right_tangent 1.75 0 vertex 1.85 1 left_tangent 1.84047 0.2 right_tangent 1.9 1 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 17 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.1 1 vertex 0.15 0 left_tangent 0.15 0 right_tangent 0.15 0 vertex 0.45 0 left_tangent 0.45 0 right_tangent 0.45 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.8 1 left_tangent 0.8 1 right_tangent 0.8 1 vertex 0.85 0 left_tangent 0.85 0 right_tangent 0.85 0 vertex 0.95 0 left_tangent 0.95 0 right_tangent 0.95 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 vertex 1.05 1 left_tangent 1.05 1 right_tangent 1.05 1 vertex 1.1 0 left_tangent 1.1 0 right_tangent 1.1 0 vertex 1.25 0 left_tangent 1.25 0 right_tangent 1.25 0 vertex 1.3 1 left_tangent 1.3 1 right_tangent 1.3 1 vertex 1.65 1 left_tangent 1.65 1 right_tangent 1.65 1 vertex 1.7 0 left_tangent 1.7 0 right_tangent 1.7 0 vertex 1.95 0 left_tangent 1.95 0 right_tangent 1.95 0 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 18 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 vertex 0.35 1 left_tangent 0.35 1 right_tangent 0.35 1 vertex 0.55 0 left_tangent 0.55 1 right_tangent 0.55 1 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.8 0 left_tangent 0.8 0 right_tangent 0.8 0 vertex 0.95 0 left_tangent 0.95 0 right_tangent 0.95 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 vertex 1.25 0 left_tangent 1.25 1 right_tangent 1.25 1 vertex 1.45 1 left_tangent 1.45 1 right_tangent 1.45 1 vertex 1.5 0 left_tangent 1.5 0 right_tangent 1.5 0 vertex 1.6 0 left_tangent 1.6 0 right_tangent 1.6 0 vertex 1.65 1 left_tangent 1.65 1 right_tangent 1.65 1 vertex 1.8 1 left_tangent 1.8 1 right_tangent 1.8 1 vertex 1.85 0 left_tangent 1.85 0 right_tangent 1.85 0 vertex 1.95 0 left_tangent 1.95 0 right_tangent 1.95 0 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 16 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.15 0 left_tangent 0.15 0 right_tangent 0.15 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.4 1 left_tangent 0.4 1 right_tangent 0.4 1 vertex 0.45 0 left_tangent 0.45 0 right_tangent 0.45 0 vertex 0.55 0 left_tangent 0.55 0 right_tangent 0.55 0 vertex 0.6 1 left_tangent 0.6 1 right_tangent 0.6 1 vertex 1.45 1 left_tangent 1.45 1 right_tangent 1.45 1 vertex 1.5 0 left_tangent 1.5 0 right_tangent 1.5 0 vertex 1.6 0 left_tangent 1.6 0 right_tangent 1.6 0 vertex 1.65 1 left_tangent 1.65 1 right_tangent 1.65 1 vertex 1.8 1 left_tangent 1.8 1 right_tangent 1.8 1 vertex 1.85 0 left_tangent 1.85 0 right_tangent 1.85 0 vertex 1.95 0 left_tangent 1.95 0 right_tangent 1.95 0 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-l num_vertices 10 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.15 0 left_tangent 0.15 0 right_tangent 0.15 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.35 1 left_tangent 0.35 1 right_tangent 0.35 1 vertex 0.4 0 left_tangent 0.4 0 right_tangent 0.4 0 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 vertex 0.55 1 left_tangent 0.55 1 right_tangent 0.55 1 vertex 1.3 0 left_tangent 1.2 1.1 right_tangent 1.4 1.1 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-r num_vertices 10 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.15 0 left_tangent 0.15 0 right_tangent 0.15 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.35 1 left_tangent 0.35 1 right_tangent 0.35 1 vertex 0.4 0 left_tangent 0.4 0 right_tangent 0.4 0 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 vertex 0.55 1 left_tangent 0.55 1 right_tangent 0.55 1 vertex 1.3 0 left_tangent 0.6 0 right_tangent 1.95 0 vertex 2 1 left_tangent 2 1 right_tangent 2 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-l num_vertices 8 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.05 0 left_tangent 0.05 0 right_tangent 0.05 0 vertex 0.15 0 left_tangent 0.15 0 right_tangent 0.15 0 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.6 0 left_tangent 0.45 0.9 right_tangent 0.75 0.9 vertex 1.45 1 left_tangent 1.4 1 right_tangent 1.5 0.5 vertex 2.25 0 left_tangent 1.7 0 right_tangent 2.8 0 vertex 3 1 left_tangent 3 1 right_tangent 3 1 curve_resolution 0.00033331 color 1 0.4 0.4 name gate-r num_vertices 5 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.55 0 left_tangent 0.55 0 right_tangent 0.55 0 vertex 0.7 0 left_tangent 0.7 0 right_tangent 0.7 0 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 curve_resolution 0.00033331 color 0.4 1 0.4 name gate-r num_vertices 8 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.15 1 left_tangent 0.15 1 right_tangent 0.15 1 vertex 0.2 0 left_tangent 0.2 0 right_tangent 0.2 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.55 0 left_tangent 0.55 0 right_tangent 0.55 0 vertex 0.6 1 left_tangent 0.6 1 right_tangent 0.6 1 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 curve_resolution 0.00033331 color 0.4 1 0.4 name G00 num_vertices 13 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.2 1 left_tangent 0.2 1 right_tangent 0.2 1 vertex 0.225403 0 left_tangent 0.225403 0 right_tangent 0.225403 0 vertex 0.25 1 left_tangent 0.25 1 right_tangent 0.25 1 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.475178 0 left_tangent 0.475178 0 right_tangent 0.475178 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.7 1 left_tangent 0.7 1 right_tangent 0.7 1 vertex 0.725161 0 left_tangent 0.725161 0 right_tangent 0.725161 0 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 vertex 0.95 1 left_tangent 0.95 1 right_tangent 0.95 1 vertex 0.975209 0 left_tangent 0.975209 0 right_tangent 0.975209 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0.4 1 0.4 name G01 num_vertices 7 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.45 1 left_tangent 0.45 1 right_tangent 0.45 1 vertex 0.475178 0 left_tangent 0.475178 0 right_tangent 0.475178 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.95 1 left_tangent 0.95 1 right_tangent 0.95 1 vertex 0.975209 0 left_tangent 0.975209 0 right_tangent 0.975209 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0.4 1 0.4 name G02 num_vertices 4 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.7 1 left_tangent 0.7 1 right_tangent 0.7 1 vertex 0.72479 0 left_tangent 0.72479 0 right_tangent 0.72479 0 vertex 0.75 1 left_tangent 0.75 1 right_tangent 0.75 1 curve_resolution 0.0005 color 0.4 1 0.4 name G03 num_vertices 5 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.8 1 left_tangent 0.8 1 right_tangent 0.8 1 vertex 0.825163 0 left_tangent 0.825163 0 right_tangent 0.825163 0 vertex 0.85 1 left_tangent 0.85 1 right_tangent 0.85 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0.4 1 0.4 din-5.2.1/data/gater.ed0000644000175100017510000000044512111771600011540 00000000000000id 1867 editor gater window -346.573 -531.816 2040.23 1258.29 win_chunk 90 75 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 5 max 0 1 1 0 0 0 -max 0 -1 1 0 0 0 silence 0 0 0 1 1 0 zero 0 0 1 1 0.5 1 beat-1 1 0 1 1 0.5 1 din-5.2.1/data/fm.crv0000644000175100017510000000046312111771600011242 00000000000000name fm num_vertices 4 vertex 0 0 left_tangent -0.035 0 right_tangent 0.035 0 vertex 0.35 0 left_tangent 0.275 0 right_tangent 0.5 1.1 vertex 0.7 0 left_tangent 0.5 -1.1 right_tangent 0.765 0 vertex 1 0 left_tangent 0.975 0 right_tangent 1.025 0 curve_resolution 0.00033293 color 0.137519 0.698311 0.685209 din-5.2.1/data/am.crv0000644000175100017510000000043412111771600011233 00000000000000name am num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.1 1 left_tangent 0.1 1 right_tangent 0.1 1 vertex 0.9 -1 left_tangent 0.9 -1 right_tangent 0.9 -1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.000332919 color 0.883378 0.385058 0.855679 din-5.2.1/data/modulation.ed0000644000175100017510000000044612111771600012612 00000000000000id 1859 editor modulation window -524.145 -1075.37 2415.03 1129.1 win_chunk 75 84 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 5 zero 0 0 1 0 0 0 max 0 1 0 1 0 0 -max 0 -1 0 1 0 0 zero 0 0 1 1 0.5 1 beat-1 1 0 1 1 0.5 1 din-5.2.1/data/volume-l.crv0000644000175100017510000000027512122327524012405 00000000000000name volume-l num_vertices 2 vertex 0 -0.35 left_tangent -0.1 -0.35 right_tangent 0.4 -0.5 vertex 1 -0.35 left_tangent 0.55 -0.2 right_tangent 1.1 -0.35 curve_resolution 0.0005 color 1 0 0 din-5.2.1/data/volume-r.crv0000644000175100017510000000026712122327524012414 00000000000000name volume-r num_vertices 2 vertex 0 0.35 left_tangent -0.1 0.35 right_tangent 0.4 0.2 vertex 1 0.35 left_tangent 0.55 0.5 right_tangent 1.1 0.35 curve_resolution 0.0005 color 0 1 0 din-5.2.1/data/feedback-l.crv0000644000175100017510000000027712122327524012624 00000000000000name feedback-r num_vertices 2 vertex 0 -0.8 left_tangent -0.05 -0.8 right_tangent 0.45 -0.65 vertex 1 -0.8 left_tangent 0.55 -0.9 right_tangent 1.05 -0.8 curve_resolution 0.0005 color 0 1 1 din-5.2.1/data/feedback-r.crv0000644000175100017510000000027112122327524012624 00000000000000name feedback-r num_vertices 2 vertex 0 0.8 left_tangent -0.05 0.8 right_tangent 0.45 0.65 vertex 1 0.8 left_tangent 0.55 0.9 right_tangent 1.05 0.8 curve_resolution 0.0005 color 1 1 0 din-5.2.1/data/delay.ed0000644000175100017510000000055312122361235011535 00000000000000id 1866 editor delay window -14434.7 -15954 27761.1 15692.7 win_chunk 467 739 obj_chunk 0.05 0.05 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 5 max 0 1 1 0 0 0 silence 0 0 0 1 1 0 -max 0 -1 1 0 0 0 start 0 0 1 1 0.5 1 end 1 0 1 1 0.5 1 fft_enabled 0 samples_enabled 0 hz 440 nperiods 2 is_waveform_editor 0 din-5.2.1/data/octave-shift.crv0000644000175100017510000000024712111771600013234 00000000000000name os num_vertices 2 vertex 0 1 left_tangent -0.1 0.9 right_tangent 0.15 1.4 vertex 1 2 left_tangent 0.8 2 right_tangent 1.1 2.1 curve_resolution 0.0005 color 1 0 0 din-5.2.1/data/octave-shift.ed0000644000175100017510000000060412111771600013027 00000000000000id 1856 editor octave-shift window -546.714 -108.165 2539.96 2206.84 win_chunk 90 75 obj_chunk 0.05 0.1 snap 3 win_resolution 0 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 6 zero 0 0 1 1 0.5 1 beat-1 1 0 1 1 0.5 1 tone 0 1 0 1 1 0 octave 0 2 0 1 0 0 perfect-4th 0 1.33333 0 1 0 0 perfect-5th 0 1.5 0 1 0 0 fft_enabled 0 samples_enabled 0 hz 440 nperiods 2 din-5.2.1/data/octave-shift-patterns.lib0000644000175100017510000001141012111771600015040 00000000000000num_curves 15 name linear num_vertices 2 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 1 2 left_tangent 1 2 right_tangent 1 2 curve_resolution 0.0003333 color 1 0 0 name tone-5th-octave num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.1 1.5 vertex 0.4 1.5 left_tangent 0.4 1.5 right_tangent 0.4 1.5 vertex 0.7 1.5 left_tangent 0.7 1.5 right_tangent 0.7 1.5 vertex 1 2 left_tangent 0.9 1.5 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name tone-4th-5th-octave num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.203757 1.24138 vertex 0.402924 1.33293 left_tangent 0.352924 1.33293 right_tangent 0.617416 1.33395 vertex 0.7 1.5 left_tangent 0.478204 1.49977 right_tangent 0.75 1.5 vertex 1 2 left_tangent 0.9 1.5 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name tone-5th-4th-octave num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.44215 1.0087 vertex 0.4 1.5 left_tangent 0.35 1.5 right_tangent 0.660907 1.50016 vertex 0.701483 1.33164 left_tangent 0.699719 1.50016 right_tangent 1.00845 1.33296 vertex 1 2 left_tangent 0.95 1.5 right_tangent 1.05 2 curve_resolution 0.000333301 color 1 0 0 name octave_shift num_vertices 2 vertex 0 1 left_tangent -0.05 1 right_tangent 0.6 1 vertex 1 2 left_tangent 0.9 1 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.0186859 2.95045 vertex 0.2 1.5 left_tangent 0.2 1.5 right_tangent 0.2 1.5 vertex 0.85 1.5 left_tangent 0.85 1.5 right_tangent 0.85 1.5 vertex 1 2 left_tangent 0.961334 0.104383 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.0186859 2.95045 vertex 0.2 1.333 left_tangent 0.2 1.333 right_tangent 0.2 1.333 vertex 0.85 1.333 left_tangent 0.85 1.333 right_tangent 0.85 1.333 vertex 1 2 left_tangent 0.961334 0.104383 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 2 vertex 0 1 left_tangent -0.00146995 0.950022 right_tangent 0.05 2.7 vertex 1 2 left_tangent 0.95 0.2 right_tangent 1.00278 2.09996 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.0186859 2.95045 vertex 0.2 1.5 left_tangent 0.2 1.5 right_tangent 0.2 1.5 vertex 0.85 1.5 left_tangent 0.85 1.5 right_tangent 0.85 1.5 vertex 1 2 left_tangent 0.961334 0.104383 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 15 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.0279526 1.5 left_tangent 0.0279526 1.5 right_tangent 0.0279526 1.5 vertex 0.0604559 0.5 left_tangent 0.0604559 0.5 right_tangent 0.0604559 0.5 vertex 0.160374 1.5 left_tangent 0.160374 1.5 right_tangent 0.160374 1.5 vertex 0.25 0.5 left_tangent 0.25 0.5 right_tangent 0.25 0.5 vertex 0.377063 0.5 left_tangent 0.377063 0.5 right_tangent 0.377063 0.5 vertex 0.4 0.666 left_tangent 0.4 0.666 right_tangent 0.4 0.666 vertex 0.5 0.666 left_tangent 0.5 0.666 right_tangent 0.5 0.666 vertex 0.51791 0.5 left_tangent 0.51791 0.5 right_tangent 0.51791 0.5 vertex 0.623847 0.5 left_tangent 0.623847 0.5 right_tangent 0.623847 0.5 vertex 0.65 1.333 left_tangent 0.65 1.333 right_tangent 0.65 1.333 vertex 0.8 1.333 left_tangent 0.8 1.333 right_tangent 0.8 1.333 vertex 0.82609 0.5 left_tangent 0.82609 0.5 right_tangent 0.82609 0.5 vertex 0.95 0.5 left_tangent 0.95 0.5 right_tangent 0.95 0.5 vertex 1 2 left_tangent 1 2 right_tangent 1 2 curve_resolution 0.0003333 color 1 0 0 name octave_shift num_vertices 4 vertex 0 1 left_tangent -0.04 1 right_tangent 0.04 1 vertex 0.3 1 left_tangent 0.2 1 right_tangent 0.65 1 vertex 0.7 2 left_tangent 0.45 2 right_tangent 0.75 2 vertex 1 2 left_tangent 0.97 2 right_tangent 1.03 2 curve_resolution 0.0005 color 1 0 0 name octave_shift num_vertices 5 vertex 0 1 left_tangent -0.05 0.9 right_tangent 0.05 1.8 vertex 0.35 2 left_tangent 0.35 2 right_tangent 0.35 2 vertex 0.5 2 left_tangent 0.5 2 right_tangent 0.5 2 vertex 0.6 2 left_tangent 0.6 2 right_tangent 0.6 2 vertex 1 1 left_tangent 0.95 1.8 right_tangent 1.05 0.9 curve_resolution 0.0005 color 1 0 0 name octave-4th-octave num_vertices 4 vertex 0 1 left_tangent -0.05 1 right_tangent 0.0186859 2.95045 vertex 0.2 1.33333 left_tangent 0.2 1.33333 right_tangent 0.2 1.33333 vertex 0.8 1.33333 left_tangent 0.8 1.33333 right_tangent 0.8 1.33333 vertex 1 2 left_tangent 0.961334 0.104383 right_tangent 1.05 2 curve_resolution 0.0003333 color 1 0 0 name snap-octave num_vertices 2 vertex 0 2 left_tangent 0 2 right_tangent 0 2 vertex 1 2 left_tangent 1 2 right_tangent 1 2 curve_resolution 0.000333301 color 1 0 0 name snap-5th num_vertices 2 vertex 0 1.5 left_tangent 0 1.5 right_tangent 0 1.5 vertex 1 1.5 left_tangent 1 1.5 right_tangent 1 1.5 curve_resolution 0.000333301 color 1 0 0 din-5.2.1/data/dot.crv0000644000175100017510000000032112111771600011417 00000000000000name dot num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.05 1 left_tangent 0 1 right_tangent 0.1 1 vertex 0.1 0 left_tangent 0.1 0 right_tangent 0.1 0 curve_resolution 0.0005 color 1 0 0 din-5.2.1/data/dash.crv0000644000175100017510000000032412111771600011553 00000000000000name dash num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.15 1 left_tangent 0.1 1 right_tangent 0.2 1 vertex 0.3 0 left_tangent 0.3 0 right_tangent 0.3 0 curve_resolution 0.0005 color 0 1 0 din-5.2.1/data/inner.crv0000644000175100017510000000025312111771600011750 00000000000000name inner num_vertices 2 vertex 0.4 0 left_tangent 0.4 0 right_tangent 0.4 0 vertex 0.5 0 left_tangent 0.5 0 right_tangent 0.5 0 curve_resolution 0.000333308 color 0 0 1 din-5.2.1/data/letter.crv0000644000175100017510000000034612111771600012137 00000000000000name letter num_vertices 3 vertex 0.55 0 left_tangent 0.55 0 right_tangent 0.55 0 vertex 0.55 0 left_tangent 0.55 0 right_tangent 0.55 0 vertex 0.7 0 left_tangent 0.7 0 right_tangent 0.7 0 curve_resolution 0.000333308 color 0 1 1 din-5.2.1/data/word.crv0000644000175100017510000000026012111771600011606 00000000000000name word num_vertices 2 vertex 0.75 0 left_tangent 0.75 0 right_tangent 0.75 0 vertex 0.95 0 left_tangent 0.95 0 right_tangent 0.95 0 curve_resolution 0.000333308 color 1 1 0 din-5.2.1/data/i8n_morse_code0000644000175100017510000000037212111771600012743 00000000000000ncodes 36 A .- B -... C -.-. D -.. E . F ..-. G --. H .... I .. J .--- K -.- L .-.. M -- N -. O --- P .--. Q --.- R .-. S ... T - U ..- V ...- W .-- X -..- Y -.-- Z --.. 1 .---- 2 ..--- 3 ...-- 4 ....- 5 ..... 6 -.... 7 --... 8 ---.. 9 ----. 0 ----- din-5.2.1/data/morse-code.ed0000644000175100017510000000036112111771600012470 00000000000000id 1869 editor morse-code window -104.731 -671.986 1997.18 904.448 win_chunk 100 50 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 2 silence 0 0 0 1 1 0 max 0 1 1 0 0 0 din-5.2.1/data/attack.crv0000644000175100017510000000027412111771600012107 00000000000000name attack num_vertices 2 vertex 0 0 left_tangent -0.00598416 -0.1 right_tangent 0.0254984 0.9 vertex 1 1 left_tangent 0.109459 1 right_tangent 1 1 curve_resolution 0.0003333 color 0 1 0 din-5.2.1/data/decay.crv0000644000175100017510000000041612122331552011723 00000000000000name decay num_vertices 3 vertex 0 1 left_tangent -0.00454742 1.10051 right_tangent 0.0311074 0.312425 vertex 0.4 0.0648095 left_tangent 0.241206 0.105119 right_tangent 0.563347 0.0233442 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 0 0 din-5.2.1/data/attack.ed0000644000175100017510000000044712111771600011707 00000000000000id 1857 editor attack window -670.902 -395.193 3273.98 2562.24 win_chunk 125 200 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 0 sine_enabled 0 label_vertex 0 num_labels 5 silence 0 0 0 1 1 0 note 0 1 0 1 0 0 start 0 0 1 1 0.5 1 end 1 0 1 1 0.5 1 end 1 0 1 1 0.5 1 din-5.2.1/data/decay.ed0000644000175100017510000000042412111771600011520 00000000000000id 1853 editor decay window -694.035 -1317.18 6204.65 3856.84 win_chunk 300 300 obj_chunk 0.05 0.1 snap 3 win_resolution 1 carry_tangents 1 mirror_tangents 1 sine_enabled 0 label_vertex 0 num_labels 4 silence 0 0 0 1 1 0 note 0 1 0 1 0 0 start 0 0 1 1 0.5 1 end 1 0 1 1 0.5 1 din-5.2.1/data/attack.lib0000644000175100017510000000416512111771600012066 00000000000000num_curves 9 name attack num_vertices 2 vertex 0 0 left_tangent -0.1 -0.1 right_tangent 0.1 0.1 vertex 1 1 left_tangent 0.9 0.9 right_tangent 1.1 1.1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.05 1 left_tangent 0.05 1 right_tangent 0.05 1 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0 1 0 sustain 0.05 name attack num_vertices 3 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.9 0.1 left_tangent 0.8 -2.98023e-08 right_tangent 1 0.2 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 6 vertex 0 0 left_tangent -0.05 0 right_tangent 0 0.2 vertex 0.2 0.4 left_tangent 0.1 0.4 right_tangent 0.3 0.4 vertex 0.45 0 left_tangent 0.45 0.2 right_tangent 0.45 0.2 vertex 0.65 0.7 left_tangent 0.49666 0.7 right_tangent 0.84666 0.7 vertex 0.9 0 left_tangent 0.9 0.1 right_tangent 0.9 0.1 vertex 1 1 left_tangent 0.95 1 right_tangent 1.05 1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 3 vertex 0 0 left_tangent 0 -0.05 right_tangent 0 0.7 vertex 0.5 0.9 left_tangent 0.15 0.7 right_tangent 0.774563 1.05689 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 2 vertex 0 0 left_tangent -0.00706225 -0.141245 right_tangent 0.05 1 vertex 1 1 left_tangent 0.05 1 right_tangent 1.14142 1 curve_resolution 0.0005 color 0 1 0 sustain 1 name attack num_vertices 2 vertex 0 1 left_tangent -0.05 1 right_tangent 0.35 0.5 vertex 1 1 left_tangent 0.65 0.5 right_tangent 1.05 1 curve_resolution 0.0005 color 0 1 0 sustain 0 name attack num_vertices 4 vertex 0 0 left_tangent 0 0 right_tangent 0 0 vertex 0.5 1 left_tangent 0.5 1 right_tangent 0.5 1 vertex 0.75 0 left_tangent 0.7 0 right_tangent 0.8 0 vertex 1 1 left_tangent 1 1 right_tangent 1 1 curve_resolution 0.0005 color 0 1 0 sustain 0.5 din-5.2.1/data/decay.lib0000644000175100017510000000250412111771600011677 00000000000000num_curves 6 name decay num_vertices 3 vertex 0 1 left_tangent -0.0084979 1.10026 right_tangent 0.0611257 0.278859 vertex 0.413227 0.0400221 left_tangent 0.235697 0.094957 right_tangent 0.567402 -0.00768604 vertex 1 0 left_tangent 0.95 0 right_tangent 1.15532 0 curve_resolution 0.0005 color 1 0 0 name decay num_vertices 2 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 1 0 left_tangent 1 0 right_tangent 1 0 curve_resolution 0.0005 color 1 0 0 name decay num_vertices 2 vertex 0 1 left_tangent -0.0175412 1.14033 right_tangent 0.1 0.2 vertex 1 0 left_tangent 0.8 0 right_tangent 1.14142 0 curve_resolution 0.0005 color 1 0 0 name decay num_vertices 2 vertex 0 1 left_tangent 0 1 right_tangent 0 1 vertex 0.00162409 0 left_tangent 0.00162409 0 right_tangent 0.00162409 0 curve_resolution 0.0005 color 1 0 0 name decay num_vertices 3 vertex 0 1 left_tangent -0.0045689 1.10052 right_tangent 0.05 -0.1 vertex 0.5 -1 left_tangent 0.1 -1 right_tangent 0.7 -1 vertex 1 0 left_tangent 0.55 0 right_tangent 1.15532 0 curve_resolution 0.0005 color 1 0 0 name decay num_vertices 4 vertex 0 1 left_tangent -0.00289529 1.10058 right_tangent 0.0287865 0 vertex 0.4 0 left_tangent 0.251111 0 right_tangent 0.6 0 vertex 0.7 1 left_tangent 0.6 1 right_tangent 0.8 1 vertex 1 0 left_tangent 0.8 0 right_tangent 1.15532 0 curve_resolution 0.0005 color 1 0 0 din-5.2.1/data/din_info0000644000175100017510000000012212122341047011624 00000000000000board_height 355 rollup 0 delay 0 gater 0 compress 0 voice 1 anchor 1 show_tips 1 din-5.2.1/data/globals0000644000175100017510000000025412122326413011470 00000000000000screen 720 576 intervals_file et.tuning scale minor microtonal_keyboard_location 0 150 key_height 357 num_microtones 160 num_octaves 3 handle_size 9 // comments here only din-5.2.1/data/ji.tuning0000644000175100017510000000023012111771600011744 00000000000000num_intervals 13 1 1.00000 2b 1.06667 2 1.12500 3b 1.20000 3 1.25000 4 1.33333 5b 1.40625 5 1.50000 6b 1.60000 6 1.66667 7b 1.80000 7 1.87500 8 2.00000 din-5.2.1/data/pytha.tuning0000644000175100017510000000023012111771600012467 00000000000000num_intervals 13 1 1.00000 2b 1.05349 2 1.12500 3b 1.18518 3 1.26562 4 1.33333 5b 1.40466 5 1.50000 6b 1.58024 6 1.68750 7b 1.77777 7 1.89843 8 2.00000 din-5.2.1/data/et.tuning0000644000175100017510000000022412111771600011755 00000000000000num_intervals 13 1 1 2b 1.05946309 2 1.122462039 3b 1.18920710 3 1.25992 4 1.33484 5b 1.41421 5 1.49831 6b 1.5874 6 1.68179 7b 1.7818 7 1.88775 8 2 din-5.2.1/data/shrutis.tuning0000644000175100017510000000040712111771600013051 00000000000000num_intervals 23 s 1 r1 1.05349794 r2 1.06666667 R1 1.11111111 R2 1.12500 g1 1.18518519 g2 1.20 G1 1.25 G2 1.265625 M1 1.333333 M2 1.35 m1 1.40625 m2 1.42382812 P 1.5 d1 1.58024691 d2 1.6 D1 1.66666667 D2 1.6875 n1 1.77777778 n2 1.8 N1 1.87500 N2 1.8984375 S 2.0 din-5.2.1/data/scalelist0000644000175100017510000000132312111771600012026 00000000000000num_scales 27 bhairav 8 1 2b 3 4 5 6b 7 8 yaman 8 1 2 3 5b 5 6 7 8 todi 8 1 2b 3b 4 5 6b 7b 8 jog 7 1 3b 3 4 5 7b 8 multani 8 1 2b 3b 5b 5 6b 7 8 darbari 8 1 2 3b 4 5 6b 7b 8 minor 8 1 2 3b 4 5 6b 7b 8 malkauns 6 1 3b 4 6b 7b 8 bhoopali 6 1 2 3 5 6 8 shivaranjani 6 1 2 3b 5 6 8 marwa 7 1 2b 3 5b 6 7 8 blues 7 1 3b 4 5b 5 7b 8 all 13 1 2b 2 3b 3 4 5b 5 6b 6 7b 7 8 dorian 8 1 2 3b 4 5 6 7b 8 ionian 8 1 2 3 4 5 6 7 8 lydian 8 1 2 3 5b 5 6 7 8 mixolydian 8 1 2 3 4 5 6 7b 8 aeolian 8 1 2 3b 4 5 6b 7b 8 phrygian 8 1 2b 3b 4 5 6b 7b 8 locrian 8 1 2b 3b 4 5b 6b 7b 8 minor5 6 1 3b 4 5 7b 8 major5 6 1 3 4 5 7 8 5 3 1 5 8 45 4 1 4 5 8 457 5 1 4 5 7b 8 m6 8 1 2 3b 4 5 7b 7 8 major 8 1 2 3 4 5 6 7 8 din-5.2.1/data/sine_levels0000644000175100017510000000022412111771600012352 00000000000000num_levels 20 lower_corner 6 8 element_width 9 height 125 color 0 0 1 0.7 editable 1 saveable 1 savings 20 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 din-5.2.1/data/fft_levels0000644000175100017510000000015412111771600012175 00000000000000num_levels 20 lower_corner 189 6 element_width 9 height 125 color 0 1 0 0.7 editable 0 saveable 0 savings 0 din-5.2.1/data/m000000755000175100017510000000031112111771600010436 00000000000000#!/bin/sh ACCEL=`xset q | grep accel | cut -d' ' -f5 |cut -d'/' -f1` THRESHOLD=`xset q | grep thres | cut -d' ' -f11` xset m 0 0 echo "\033[1;30m<<< mouse parameters:`xset q | grep accel` >>> \033[0m" din-5.2.1/data/oscilloscope0000644000175100017510000000004612111771600012542 00000000000000win 48 213 591 319 paused 0 visible 1 din-5.2.1/data/jack_prefs0000644000175100017510000000004712111771600012154 00000000000000type audio_prefs num_samples_buffers 2 din-5.2.1/data/init.tcl0000644000175100017510000001134212122326543011575 00000000000000if {0} { /* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ } puts -nonewline {<<< loading Tcl init script: } ;# bring the math functions to use them LISP style eg., + 2 3 namespace import ::tcl::mathop::* ;# short for sourcing tcl scripts / patches proc src {name} { uplevel #0 source ~/.din/$name.tcl } ;# console colors set color(header) {set-text-color 1 0.75 0.5} set color(text) {set-text-color 0.8 1 0.8} set color(error) {set-text-color 1 0.6 0.6} set color(fine) {set-text-color 0.6 1 0.6} set resetbeat 0 proc tap-bpm-changed {name element op} { ;# tap bpm changed global taptarget tapbpm resetbeat set wr {} if $resetbeat { foreach i $taptarget { set-beat $i [get-beat $i first] } set wr {[+ reset]} set resetbeat 0 } set-bpm $taptarget $tapbpm echo "tap bpm: $tapbpm $wr" } trace add variable tapbpm write tap-bpm-changed ;# list files in ~/.din matching extension proc lsdotdin {{ext *} {orient h} } { set mapping [list .$ext {}] if {$orient eq "v" || $orient eq "vertical"} {lappend mapping { } \n} string map $mapping [lsort [glob -nocomplain -tails -directory ~/.din *.$ext]] } proc bad-sub-command {c} { upvar $c cmds set err "bad sub-command. should be: " foreach i [lrange $cmds 0 end-1] { append err "$i, " } append err "or [lindex $cmds end]" } proc exec-sub-command {ucmds uactions ucmd uargs} { upvar $ucmds cmds $uactions actions $ucmd cmd $uargs args set j 0 foreach i $cmds { if {$cmd eq $i} { return [{*}[lindex $actions $j] {*}$args] } incr j } bad-sub-command cmds } ;# find-scale command -> lists scales that match pattern proc find-scale {pattern} { lsort [lsearch -all -inline [list-scales] $pattern] } ;# tuning command -> list, set and get available tunings proc tuning {cmd args} { ;# tuning command set cmds {list set get} set actions {"lsdotdin tuning" "set-var tuning" "get-var tuning"} exec-sub-command cmds actions cmd args } ;# called when drones are deleted proc drones-deleted {args} {} ;# called once every din loop proc loop {} {} ;# required ;# list-patches command set lsp_body {{{v ""}} { lsdotdin patch.tcl $v }} eval "proc list-patches $lsp_body" eval "proc lp $lsp_body" ;# load-patch command set lop_body {{patch} { if [catch {src $patch.patch}] { set-text-color 1 0.5 0.5 echo "bad $patch" } else { set-text-color 0.5 1 0.5 echo "loaded $patch" echo "help $patch for more information" } }} eval "proc load-patch $lop_body" eval "proc lop $lop_body" ;# make interval note variables based on current tuning src make-interval-note-vars ;# load help displayer src help if {0} { make empty midi procs if user wants diagnostics, they can load midimap patch } proc make-midi name { uplevel #0 "proc $name args {}" } foreach i {midi-start midi-clock midi-note-on midi-note-off midi-pitch-bend midi-program-change midi-cc} { make-midi $i } proc setup-editors {} { set instrument [get-var instrument] set eds [set instrument]_editors global $eds set ids [array get $eds] foreach {i j} $ids { set-curve-editor $j $i } } proc update-editor {name screen} { set instrument [get-var instrument] set eds [set instrument]_editors global $eds array set $eds [list $screen $name] } proc exit {} {} proc show-authors-note {} { proc get-rand {{a 0.3} {b 1}} { return [expr {$a + ($b - $a) * rand ()}] } rename get-rand @ set-text-color [@] [@] [@] echo "Welcome to DIN Is Noise" echo "DIN has been in continous development for the last 6 years!" set-text-color 1 [@] [@] echo "But now, DIN needs your kind & generous support to continue." set-text-color [@] [@] [@] echo "So, if you can, please donate to the DIN Is Noise project." echo "No amount too small!" rename @ get-rand } puts {done. +++} proc getval {min max amount} { ;# get interpolated value from min to max set amount [/ $amount 127.0] return [expr { (1 - $amount) * $min + $amount * $max }] } source ~/.din/tips.tcl din-5.2.1/data/help.tcl0000644000175100017510000000366712111771600011571 00000000000000if {0} { /* * This file is part of din. * * din is copyright (c) 2006 - 2012 S Jagannathan * For more information, please visit http://dinisnoise.org * * din 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. * * din 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 din. If not, see . * */ command help display } proc help {{cmd ""}} { global color if { [catch {open ~/.din/$cmd.help.tcl r} f]} { if {$cmd ne ""} { eval $color(error) echo "$cmd: not found." } eval $color(header) echo "Available commands are:" eval $color(text) nago [lsort [lsdotdin help.tcl]] 4 eval $color(header) echo "Type help for help on a command." return } source ~/.din/$cmd.help.tcl set headers {NAME: {SHORT NAME:} PURPOSE: {HOW TO USE:} NOTES: EXAMPLES:} set keys {name short purpose invoke help examples} for {set i 0; set j [llength $keys]} {$i < $j} {incr i} { set text [lindex [array get $cmd [lindex $keys $i]] 1] if {[llength $text] > 0} { eval $color(header) echo [lindex $headers $i] eval $color(text) foreach l [split $text \n] {echo $l} } } } proc nago {target n} { set j 0 foreach i [lrange $target 0 end-1] { if {$j < $n} {incr j} else { echo $out unset out set j 0 } append out " $i, "; } append out "and [lindex $target end]" echo $out } din-5.2.1/data/save_settings.tcl0000644000175100017510000000401712114445360013511 00000000000000set f [open ~/.din/settings.tcl w] set set_cmd {set-bpm set-style set-var set-delay} set get_cmd {get-bpm get-style get-var get-delay} set runs { {fm am gr os} {fm am gr} {am_depth fm_depth pitch_bend delta_bpm} {left right}} set ncmds [llength $set_cmd] for {set i 0} {$i < $ncmds} {incr i} { set run [lindex $runs $i] foreach j $run { set setj [lindex $set_cmd $i] set getj [lindex $get_cmd $i] set str "$setj $j [$getj $j]" puts $f $str } } proc check-scale {} { set scalelist [list-scales] set currentscale [get-var scale] if {$currentscale in $scalelist} { return $currentscale } else { return minor } } foreach i { {"tuning set" "tuning get"} {load-scale check-scale} {key {key value}} {notation notation} {set-font-size get-font-size} {"set taptarget" "format {{%s}} [set taptarget]"} {"set-var scroll" "get-var scroll"} {"set-var zoom" "get-var zoom"} {"set-var pan" "get-var pan"} {"set-var fps" "get-var fps"} {"set-var usleep" "get-var usleep"} {"set-var num_sine_samples" "get-var num_sine_samples"} {"set-var show_cursor_info" "get-var show_cursor_info"} {"set-var jog" "get-var jog"} {"set-var delta_bpm" "get-var delta_bpm"} {"set-var drone_handle_size" "get-var drone_handle_size"} {"set-var trail_length" "get-var trail_length"} {"set-var wave_volume" "get-var wave_volume"} {"set-var note_volume" "get-var note_volume"} {"set-var attack_time" "get-var attack_time"} {"set-var sustain" "get-var sustain"} {"set-var decay_time" "get-var decay_time"} {"set-var delta_time" "get-var delta_time"} {"set-var instrument" "get-var instrument"} {"set-var auto_connect_outputs" "get-var auto_connect_outputs"} {"set-scope left" "format {{%s}} [get-scope left]"} {"set-scope right" "format {{%s}} [get-scope right]"} } { set setc [lindex $i 0] set getc [lindex $i 1] puts $f "$setc [eval $getc]" } foreach i {microtonal_keyboard_editors keyboard_keyboard_editors} { puts $f "array set $i {[array get $i]}" } close $f puts "+++ saved din variables +++" din-5.2.1/data/settings.tcl0000644000175100017510000000213212114445350012466 00000000000000set-bpm fm 90 set-bpm am 90 set-bpm gr 90 set-bpm os 120 set-style fm loop set-style am loop set-style gr loop set-var am_depth 0 set-var fm_depth 0 set-var pitch_bend 50 set-var delta_bpm 1 set-delay left 1000.00 set-delay right 1000.00 tuning set et load-scale blues key 261.626 notation numeric set-font-size 2 2 4 4 set taptarget gr set-var scroll rate 100 x 25 y 10 set-var zoom rate 100 amount 0.04 set-var pan rate 100 amount 0.03 set-var fps 120 set-var usleep 1 set-var num_sine_samples 100 set-var show_cursor_info 0 set-var jog 3 set-var drone_handle_size 7 set-var trail_length 1 set-var wave_volume 0.2 set-var note_volume 0.05 set-var attack_time 0.2 set-var sustain 1 set-var decay_time 5 set-var delta_time 0.1 set-var instrument keyboard_keyboard set-var auto_connect_outputs 1 set-scope left {0 1 1} set-scope right {1 1 0} array set microtonal_keyboard_editors {2 microtonal-keyboard-waveform 3 drone-modulation 4 modulation 5 gater 6 delay 7 octave-shift 8 drone} array set keyboard_keyboard_editors {2 keyboard-keyboard-waveform 3 attack 4 decay 5 velocity 6 delay 7 octave-shift 8 no-editor} din-5.2.1/data/scoper.help.tcl0000644000175100017510000000116612111771600013053 00000000000000set scoper(name) N/A set scoper(short) N/A set scoper(purpose) {change colors of left & right channels of oscilloscope} set scoper(invoke) { load-patch scoper } set scoper(help) { slider 1, 2 & 3 change red, green & blue components of left channel slider 4, 5 & 6 change red, green & blue components of right channel you must instruct JACK to route MIDI data to din for this to work: jackd -R -s -d alsa -r 44100 -X seq ;# -X seq allows din to get MIDI data use qjackctl to route MIDI data from your MIDI controller to din midi port edit ~/.din/scoper.patch.tcl to change slider ids } set scoper(examples) {} din-5.2.1/data/midimap.help.tcl0000644000175100017510000000101312115133730013167 00000000000000set midimap(name) N/A set midimap(short) N/A set midimap(purpose) {displays MIDI activity on console} set midimap(invoke) {load-patch midimap} set midimap(help) { On GNU/Linux, you must instruct JACK to route MIDI data to din for this to work: jackd -R -s -d alsa -r 44100 -X seq ;# -X seq allows din to get MIDI data use qjackctl to route MIDI data from your MIDI controller to din midi port midimap displays midi control change, program change, pitch bend & note on & off messages } set midimap(examples) {} din-5.2.1/data/droner.help.tcl0000644000175100017510000000161412115134175013053 00000000000000set droner(name) N/A set droner(short) N/A set droner(purpose) {assign drones to midi sliders and fade them in & out} set droner(invoke) {load-patch droner} set droner(help) { On GNU/Linux, you must instruct JACK to route MIDI data to din for this to work: jackd -R -s -d alsa -r 44100 -X seq ;# -X seq allows din to get MIDI data use qjackctl to route MIDI data from your MIDI controller to din midi port select a bunch of drones and assign to midi knob or slider with command: assign-drones OR asd id is the slider/knob id keep the slider/knobs at max (ie 127) when making assignment so you can fade them out and back in smoothly instead of jumping to a value command assign-drones without any arguments prints the current assignments } set droner(examples) { assign-drones ;# print current assignments asd 1 ;# assign selected drones to midi slider/knob with id = 1} din-5.2.1/data/morse-code.help.tcl0000644000175100017510000000174412115133672013624 00000000000000set morse-code(name) morse-code set morse-code(short) mc set morse-code(purpose) { convert text to a bezier curve pattern that can be pasted in any curve editor. generates the pattern using seed bezier curve patterns of morse code primitives: dot, dash, inner letter spacing, letter spacing and word spacing} set morse-code(invoke) {morse-code OR mc [nbeats]} set morse-code(help) { text can contain letters & numbers only. if nbeats is available the generated bezier curve pattern is quantised to nbeats. if nbeats is not available, the generated bezier curve pattern is quantised to 1 beat. the generated bezier curve pattern is placed into the copy curve. paste into any curve in any curve editor (press LCTRL + v).} set morse-code(examples) { morse-code sos ;# generate bezier curve pattern and place in copy curve morse-code sos 3 ;# generate bezier curve pattern quantised to 3 beats morse-code {a long piece of text} ;# just a longer piece of text} din-5.2.1/data/curve-library.help.tcl0000644000175100017510000000117112111771600014342 00000000000000set curve-library(name) curve-library set curve-library(short) cl set curve-library(purpose) {manipulate the curve library attached to current curve editor} set curve-library(invoke) {curve-library OR cl } set curve-library(help) { operation can be: add OR a -- add selected curve to library delete OR d -- delete current curve in library update OR u -- replace current curve in library with selected curve insert OR i -- insert selected curve into library at current curve position } set curve-library(examples) { cl d ;# delete current curve in library curve-library add ;# add selected curve to library} din-5.2.1/data/curve-name.help.tcl0000644000175100017510000000062112111771600013615 00000000000000set curve-name(name) curve-name set curve-name(short) cn set curve-name(purpose) {change name of the selected curve in the current curve editor} set curve-name(invoke) {curve-name OR cn } set curve-name(help) {selected curve renamed to name } set curve-name(examples) { curve-name bezier1 ;# name selected curve to bezier1 cn yet-another-bezier ;# name selected curve to yet-another-bezier} din-5.2.1/data/curve-value.help.tcl0000644000175100017510000000146212111771600014015 00000000000000set curve-value(name) curve-value set curve-value(short) cv set curve-value(purpose) {set x, y of a vertex or tangent of a curve} set curve-value(invoke) {curve-value OR cv } set curve-value(help) { what: v (for vertex) OR lt (for left tangent) OR rt (for right tangent) x, y: x, y position if you want x or y to remain same, put a . when setting values. } set curve-value(examples) { curve-value bezier1 v 0 0 0 ;# set 1st vertex of curve bezier1 to origin cv bezier1 lt 0 -1 0 ;# set left tangent of 1st vertex to -1, 0 cv bezier1 rt 0 1 0 ;# set right tangent of 1st vertex to 1, 0 ;# set 2nd vertex of octave shift curve. ;# x remains same curve-value os v 1 . 4 ;# set 2nd vertex of octave shift curve. ;# y remains same curve-value os v 1 2 .} din-5.2.1/data/get-selection.help.tcl0000644000175100017510000000117512111771600014322 00000000000000set get-selection(name) get-selection set get-selection(short) gsel set get-selection(purpose) {get list of selected vertices & tangents in a curve editor} set get-selection(invoke) {get-selection OR gsel} set get-selection(help) { format of list is: {curve-name what id x y}...{curve-name what id x y}...{curve-name what id x y} } set get-selection(examples) { get-selected ;# return list of selected vertices & tangents in curve editor ;# sample response: {L v 1 0 0} {L lt 1 0 0} {L rt 1 0 0} ;# 3 items selected ;# curve-name = L, what = v (vertex), lt (left tangent), rt (right tangent), id = 1, ;# x = 0, y = 0} din-5.2.1/data/load-patch.help.tcl0000644000175100017510000000046212111771600013572 00000000000000set load-patch(name) load-patch set load-patch(short) lop set load-patch(purpose) {load a patch in din} set load-patch(invoke) {load-patch } set load-patch(help) {} set load-patch(examples) { list-patches ;# lists all available patches on 1 line load-patch midimap ;# loads patch midimap} din-5.2.1/data/list-patches.help.tcl0000644000175100017510000000063112111771600014154 00000000000000set list-patches(name) list-patches set list-patches(short) lp set list-patches(purpose) {list patches available in din} set list-patches(invoke) {list-patches OR lp [style]} set list-patches(help) { style of listing can be: vertical or v default is horizontal listing } set list-patches(examples) { list-patches ;# lists all available patches on 1 line list-patches v ;# list 1 patch per line} din-5.2.1/data/set-curve-editor.help.tcl0000644000175100017510000000123512115133122014751 00000000000000set set-curve-editor(name) set-curve-editor set set-curve-editor(short) sced set set-curve-editor(purpose) {assign a curve editor to a screen} set set-curve-editor(invoke) {set-curve-editor OR sced } set set-curve-editor(help) { 7 screens are available (numbered 2 to 8). Each screen can have 1 editor. name can be microtonal-keyboard-waveform, keyboard-keyboard-waveform, drone-modulation, modulation, gater, delay, octave-shift, compressor, drone & morse-code. } set set-curve-editor(examples) { set-curve-editor modulation 2 ;# press 2 to switch to modulation editor set-curve-editor waveform 7 ;# press 7 to switch to waveform editor } din-5.2.1/data/set-text-color.help.tcl0000644000175100017510000000102712111771600014445 00000000000000set set-text-color(name) set-text-color set set-text-color(short) stc set set-text-color(purpose) {set color of text coming next on console} set set-text-color(invoke) {set-text-color r g b} set set-text-color(help) { r - red g - green b - blue r, g, b must be in range 0 to 1 } set set-text-color(examples) { set-text-color 1 0 0 ;# red echo "this will be printed in red" stc 0 1 0 ;# green, command name in short form echo "this will be in green" set-text-color 0 0 1 ;# blue echo "and this will be in blue"} din-5.2.1/data/echo.help.tcl0000644000175100017510000000074512111771600012500 00000000000000set echo(name) {echo} set echo(short) {echo} set echo(purpose) {echoes text on the console} set echo(invoke) {echo } set echo(help) {echo uses current text color to output text. change this color with set-text-color command } set echo(examples) { echo word ;# prints word echo {a fairly long sentence} ;# prints a fairly long sentence echo "2 + 2 is = [expr 2 + 2]" ;# prints 2 + 2 is = 4 echo "we have [get-drone n] drones in din" ;# prints the number of drones in din} din-5.2.1/data/add-scale.help.tcl0000644000175100017510000000136412111771600013375 00000000000000set add-scale(name) add-scale set add-scale(short) as set add-scale(purpose) {adds a scale to din} set add-scale(invoke) {add-scale OR as } set add-scale(help) { valid note names depend on tuning (see help tuning) but usually are: 1 = key note 2b = minor second 2 = second 3b = minor third 3 = third 4 = perfect fourth 5b = diminished fifth 5 = perfect fifth 6b = minor sixth 6 = sixth 7b = minor seventh 7 = seventh 8 = octave notes 1 and 8 must be used. } set add-scale(examples) { add-scale everything 1 2b 2 3b 3 4 5b 5 6b 6 7b 7 8 ;# a scale with all available notes add-scale major 1 2 3 4 5 6 7 8 ;# add major scale as minor5 1 3b 4 5 7b 8 ;# add minor pentatonic scale} din-5.2.1/data/remove-scale.help.tcl0000644000175100017510000000063212111771600014137 00000000000000set remove-scale(name) remove-scale set remove-scale(short) rs set remove-scale(purpose) {removes a scale from din} set remove-scale(invoke) {remove-scale OR rs } set remove-scale(help) {the scale must exist.} set remove-scale(examples) { remove-scale bad1 ;# removes scale bad1 rs wrong1 ;# removes scale wrong1 rs boring1 ;# removes scale boring1 rs duplicate ;# removes scale duplicate} din-5.2.1/data/find-scale.help.tcl0000644000175100017510000000067012111771600013564 00000000000000set find-scale(name) find-scale set find-scale(purpose) {find a scale matching a pattern} set find-scale(invoke) {find-scale } set find-scale(help) { pattern is a regular expression. } set find-scale(examples) { find-scale m* ;# find scales with name starting with letter m find-scale {[0-9]*} ;# find all scales with name starting with a number find-scale ???? ;# find all scales with exactly 4 characters in their name.} din-5.2.1/data/get-var.help.tcl0000644000175100017510000000370012115134054013121 00000000000000set get-var(name) get-var set get-var(short) gv set get-var(purpose) {get value of variables in din} set get-var(invoke) {get-var ... } set get-var(help) { prints the value of requested variables. available variables are: wave_volume or wv -- lead voice volume note_volume or nv -- note volume on keyboard-keyboard attack_time or at -- attack time in seconds for a note on keyboard-keyboard decay_time or dt -- decay time in seconds for a note on keyboard-keyboard sustain or su -- position on attack curve where note starts to sustain drone_master_volume or dmv -- drone master volume fm_depth or fmd -- FM depth am_depth or amd -- AM depth delta_bpm or dbpm -- amount to increase/decrease when changing bpm of gater, fm, am & octave shift modules num_sine_samples or nss -- number of samples used when converting sine waveform to bezier waveform drone_handle_size or dhs -- handle size of drones used for display/selection snap_drones or sd -- drones snapped to notes? 1 = yes or 0 = no scroll or sc -- scroll rate, amount in x and amount in y for wsad key press zoom -- zoom of all curve editors. returns rate and amount pan -- pan on all curve editors. returns rate and amount show_cursor_info or sci -- show frequency/volume under mouse cursor? 1 = yes, 0 = no jog or j -- number of samples to jump upon <- and -> key presses when phrasor is playing fps -- number of times din refreshes the ui every second usleep -- number of microseconds din sleeps to allow processor do other tasks scale -- name of current scale tuning or tu -- name of current tuning auto_connect_outputs (GNU/Linux only) -- auto connect din audio outputs to system audio output?} set get-var(examples) { get-var scroll ;# print scroll parameters of din board get-var fmd amd ;# get both fm_depth & am_depth gv fmd amd ;# short form get-var fmd amd tuning ;# returns 2 numbers (fmd & amd) & 1 string (name of tuning)} din-5.2.1/data/set-var.help.tcl0000644000175100017510000000633412111771600013143 00000000000000set set-var(name) set-var set set-var(short) sv set set-var(purpose) { set value of variables in din } set set-var(invoke) { set-var ... } set set-var(help) { sets the value of variables. available variables are: wave_volume or wv -- lead voice volume note_volume or nv -- note volume on keyboard-keyboard attack_time or at -- attack time in seconds for a note on keyboard-keyboard decay_time or dt -- decay time in seconds for a note on keyboard-keyboard sustain or su -- position on attack curve where note starts to sustain drone_master_volume or dmv -- drone master volume fm_depth or fmd -- FM depth am_depth or amd -- AM depth delta_bpm or dbpm -- amount to increase/decrease when changing bpm of gater, fm, am & octave shift modules num_sine_samples or nss -- number of samples used when converting sine waveform to bezier waveform drone_handle_size or dhs -- handle size of drones used for display/selection snap_drones or sd -- drones snapped to notes? 1 = yes or 0 = no scroll or sc -- scroll rate, amount in x and amount in y for wsad key press zoom -- zoom of all curve editors. returns rate and amount pan -- pan on all curve editors. returns rate and amount show_cursor_info or sci -- show frequency/volume under mouse cursor? 1 = yes, 0 = no jog or j -- number of samples to jump upon <- and -> key presses when phrasor is playing fps -- number of times din refreshes the ui every second usleep -- number of microseconds din sleeps to allow processor do other tasks scale -- name of current scale tuning or tu -- name of current tuning auto_connect_outputs -- auto connect din audio outputs to system audio output?} set set-var(examples) { set-var scroll rate 100 x 25 y 3;# scroll 25 units in x & 3 units in y upto 100 times a second on wasd key presses set-var amd 0 ;# set am_depth to 0 set-var fmd 0 ;# set fm_depth to 0 set-var am_depth -0.5 fm_depth 100 ;# set am_depth to -0.5 and fm_depth to 100 set-var delta_bpm 5 ;# change bpm of gaters, fm, am & octave shift by 5 beats when asked set-var drone_master_volume 0.9 ;# very loud drones. careful. set-var dmv 0 ;# silence all drones set-var snap_drones 1 ;# snap new drones or moved drones to notes set-var drone_handle_size 14 ;# twice the size of default drone handles which is 7 set-var zoom rate 100 amount 0.03 ;# zoom 100 times a second at 0.03 units per zoom in all curve editors set-var pan amount 0.03 rate 100 ;# pan 100 times a second at 0.03 units per pan in all curve editors set-var fps 30 ;# refresh din ui 30 times a second set-var usleep 0 ;# dont sleep at all - max processor usage but ultra performance (in theory) set-var num_sine_samples 100 ;# number of samples for converting sine waveform -> bezier waveform set-var jog 10 ;# jump 10 samples when jogging the phrasor set-var wave_volume 0.1 ;# volume of lead voice set-var attack_time 1 ;# note on keyboard-keyboard attacks in 1 second set-var decay_time 10 ;# note on keyboard-keyboard decays in 1 second set-var note_volume [expr 0.75 * [get-var wave_volume]] ;# max note volume is 75% of lead voice set-var sustain 1.0 ;# position on attack curve where sustain begins ie at 1.0 (default)} din-5.2.1/data/load-scale.help.tcl0000644000175100017510000000067412111771600013567 00000000000000set load-scale(name) load-scale set load-scale(short) los set load-scale(purpose) {loads a scale} set load-scale(invoke) {load-scale OR los } set load-scale(examples) { load-scale major ;# loads major scale load-scale minor ;# loads minor scale load-scale dorian ;# loads the dorian church mode load-scale bhairav ;# loads raga bhairav load-scale [lindex [list-scales] 1] ;# loads 2nd scale from list of available scales} din-5.2.1/data/list-scales.help.tcl0000644000175100017510000000032712111771600014001 00000000000000set list-scales(name) list-scales set list-scales(short) ls set list-scales(purpose) {lists scales available in din} set list-scales(invoke) {list-scales OR ls} set list-scales(help) {} set list-scales(examples) {} din-5.2.1/data/list-notes.help.tcl0000644000175100017510000000076412111771600013664 00000000000000set list-notes(name) list-notes set list-notes(short) ln set list-notes(purpose) {list notes of a scale} set list-notes(invoke) {list-notes OR ln } set list-notes(help) {} set list-notes(examples) { list-scales ;# prints list of scales in din list-notes [get-var scale] ;# lists notes of the current scale llength [list-notes minor5] ;# prints number of notes in the scale minor5 list-notes major ;# lists notes of major scale list-notes minor5 ;# lists notes of minor5 scale} din-5.2.1/data/set-delay.help.tcl0000644000175100017510000000106712115132715013451 00000000000000set set-delay(name) set-delay set set-delay(short) sd set set-delay(purpose) {set duration of a delay line} set set-delay(invoke) {set-delay OR sd } set set-delay(help) { delay name can be: left or l right or r msecs is duration in milliseconds. } set set-delay(examples) { set-delay left 1000 ;# set left channel delay to 1 second. set-delay right 5000 ;# set right channel delay to 5 seconds. set-delay l 250 ;# set left channel delay to quarter of a second. set-delay r 500 ;# set right channel delay to half a second.} din-5.2.1/data/get-delay.help.tcl0000644000175100017510000000073112111771600013430 00000000000000set get-delay(name) get-delay set get-delay(short) gd set get-delay(purpose) {get duration of a delay} set get-delay(invoke) {get-delay OR gd } set get-delay(help) { delay name can be: left or l right or r returns delay duration in milliseconds } set get-delay(examples) { get-delay l ;# get duration of left channel delay get-delay left ;# ditto get-delay r ;# get duration of right channel delay gd right ;# ditto gd r ;# ditto again} din-5.2.1/data/set-bpm.help.tcl0000644000175100017510000000073612111771600013131 00000000000000set set-bpm(name) set-bpm set set-bpm(short) sb set set-bpm(purpose) {set bpm of a component} set set-bpm(invoke) {set-bpm OR sb } set set-bpm(help) { component name can be: gr = gater am = amplitude modulater fm = frequency modulater os = octave shifter } set set-bpm(examples) { set-bpm gr 10 ;# set gater bpm to 10 sb gr 10;# ditto but short form set-bpm {fm am} {120 240} ;# set fm bpm to 120, am bpm to 240} din-5.2.1/data/reset-bpm.help.tcl0000644000175100017510000000125112111771600013451 00000000000000set reset-bpm(name) reset-bpm set reset-bpm(short) rb set reset-bpm(purpose) {set now of a component. now is in beat units ie its the beat position} set reset-bpm(invoke) { reset-bpm } set reset-bpm(help) { component name can be: fm am os gl gr fm = frequency modulater am = amplitude modulater os = octave shifter gl = left channel gater gr = right channel gater} set reset-bpm(examples) { reset-bpm {gl gr} 0 ;# set now of gl and gr to 0 ie for same bpm gl and gr will be in sync rb {gl gr} {0 0.25} ;# set now of gl and gr to 0 and 0.25 ie quarter beat apart for same bpm reset-bpm {fm am} {0 1} ;# set fm and am a beat apart} din-5.2.1/data/get-bpm.help.tcl0000644000175100017510000000067612111771600013120 00000000000000set get-bpm(name) get-bpm set get-bpm(short) gb set get-bpm(purpose) {get the bpm of a component} set get-bpm(invoke) {get-bpm OR gb } set get-bpm(help) { component can be: gr - gater fm - frequency modulator am - amplitude modulator os - octave shifter } set get-bpm(examples) { get-bpm fm ;# get bpm of frequency modulator get-bpm gr ;# get bpm of gater gb am ;# get bpm of amplitude modulator} din-5.2.1/data/set-style.help.tcl0000644000175100017510000000132512111771600013506 00000000000000set set-style(name) set-style set set-style(short) ss set set-style(purpose) {set style of beat progression} set set-style(invoke) {set-style OR ss