Commit 1b3b1b2a authored by IOhannes m zmölnig's avatar IOhannes m zmölnig

New upstream version 18.0

parent 3bd9e412
Snd change log
9-Jan-18: Snd-18.0.
2018 ----------------------------------------------------------------
1-Dec: Snd 17.9.
16-Oct: Snd 17.8.
11-Sep: Snd 17.7.
......@@ -8,7 +12,7 @@ Snd change log
6-May: Snd 17.4. New clm optimizer.
28-Mar: Snd 17.3.
22-Feb: Snd 17.2.
16-Jan: Snd 17.1.
16-Jan-17: Snd 17.1.
2017 ----------------------------------------------------------------
......
Snd 17.9:
Snd 18.0:
various bugs fixed.
many Forth/Ruby improvements thanks to Mike.
checked: FC 27, gsl 2.4, gtk 3.92.1, sbcl 1.4.1, OSX 10.13.1, Ubuntu 17.10
in Snd, xg.c is no longer included automatically. The changes for
gtk 4 are very extensive.
Thanks!: Tito Latini, Michael Edwards
added snd.desktop and tools/auto-tester.scm.
checked: sbcl 1.4.2|3, gtk 3.93.0
Thanks!: Mike Scholz, Kjetil Matheussen, Yuri, Daniel Hensel
......@@ -4,11 +4,11 @@ Snd is a sound editor. It currently runs on nearly all
Unix-based systems, including Mac OSX and Cygwin.
To build Snd, get the sources from
ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz
ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-18.tar.gz
gzip -d snd-17.tar.gz
tar xf snd-17.tar
cd snd-17
gzip -d snd-18.tar.gz
tar xf snd-18.tar
cd snd-18
./configure
make
......@@ -62,7 +62,7 @@ The configure script has a bunch of arguments:
--with-jack use the Jack library which needs libsamplerate
--with-pulseaudio use PulseAudio (untested)
--with-pulseaudio use PulseAudio (untested), libpulse-dev in debian, puleaudio-libs-devel in Fedora
--without-audio do not include audio support. This also affects the
GUI (play buttons are omitted).
......@@ -164,7 +164,7 @@ Authors:
Bill Schottstaedt
Michael Scholz
Rick Taube, Andrew Burnson, Donny Ward: C++ and Windows wizardry.
Rick Taube, Andrew Burnson, Donny Ward, Greg Santucci: C++ and Windows wizardry.
Kjetil S. Matheussen: the Jack support and many other improvements.
Dave Phillips: the tutorial, new-effects.scm, and many other files.
Fernando Lopez-Lezcano: the current ALSA support.
......@@ -194,7 +194,7 @@ Plus many other contributions from
In terms of number of lines, the languages used in Snd/Sndlib are:
C, Scheme, Ruby, Forth, Emacs Lisp, Fortran, and Lua (altogether about 750k lines).
C, Scheme, Ruby, Forth, Emacs Lisp, Fortran, and Lua (altogether about 850k lines).
----------------------------------------------------------------
......
......@@ -89,7 +89,8 @@
#define MUS_MAX_CHANS 256
#include "sndlib.h"
#include "xen.h"
#include "vct.h"
#if (HAVE_EXTENSION_LANGUAGE) /* make sndinfo for example sets this to 0 but does not change mus-config.h */
#include "xen.h"
#include "vct.h"
#endif
#endif
......@@ -5129,6 +5129,7 @@ int mus_audio_write(int line, char *buf, int bytes)
{
int error;
pa_simple_write(pa_out, (unsigned char *)buf, (size_t)bytes, &error);
return(error);
}
......@@ -5138,6 +5139,7 @@ int mus_audio_close(int line)
pa_simple_drain(pa_out, &error);
pa_simple_free(pa_out);
pa_out = NULL;
return(error);
}
......
\ bird.fsm -- clm/bird.clm
\ Translator: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: Tue Dec 12 03:26:27 CET 2006
\ Changed: Wed Nov 21 22:48:47 CET 2012
\ Created: 06/12/12 03:26:27
\ Changed: 17/12/02 03:07:58
\
\ @(#)bird.fsm 1.14 12/2/17
\ Usage: <'> bird-test with-sound
\ or ws-bird-test
......
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for snd 17.9.
# Generated by GNU Autoconf 2.69 for snd 18.0.
#
# Report bugs to <bil@ccrma.stanford.edu>.
#
......@@ -579,9 +579,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='snd'
PACKAGE_TARNAME='ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz'
PACKAGE_VERSION='17.9'
PACKAGE_STRING='snd 17.9'
PACKAGE_TARNAME='ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-18.tar.gz'
PACKAGE_VERSION='18.0'
PACKAGE_STRING='snd 18.0'
PACKAGE_BUGREPORT='bil@ccrma.stanford.edu'
PACKAGE_URL=''
......@@ -750,6 +750,9 @@ with_extension_language
with_s7
with_forth
with_ruby
with_pure_s7
with_s7_history
with_s7_profiling
with_gsl
with_fftw
with_gmp
......@@ -1321,7 +1324,7 @@ 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 snd 17.9 to adapt to many kinds of systems.
\`configure' configures snd 18.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1371,7 +1374,7 @@ Fine tuning of the installation directories:
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root
[DATAROOTDIR/doc/ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz]
[DATAROOTDIR/doc/ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-18.tar.gz]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
......@@ -1392,7 +1395,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of snd 17.9:";;
short | recursive ) echo "Configuration of snd 18.0:";;
esac
cat <<\_ACEOF
......@@ -1421,6 +1424,9 @@ Optional Packages:
--with-s7 use S7, default=yes
--with-forth use Forth as the extension language
--with-ruby use Ruby as the extension language
--with-pure-s7 s7 WITH_PURE_S7
--with-s7-history s7 WITH_HISTORY
--with-s7-profiling s7 WITH_PROFILE
--with-gsl use GSL, default=yes
--with-fftw use fftw, default=yes
--with-gmp include multiprecision arithmetic via gmp, mpfr, and mpc, default=no
......@@ -1508,7 +1514,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
snd configure 17.9
snd configure 18.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1969,7 +1975,7 @@ 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 snd $as_me 17.9, which was
It was created by snd $as_me 18.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3316,7 +3322,7 @@ LOCAL_LANGUAGE="None"
GRAPHICS_TOOLKIT="None"
PACKAGE=Snd
VERSION=17.9
VERSION=18.0
#--------------------------------------------------------------------------------
# configuration options
......@@ -3332,7 +3338,10 @@ VERSION=17.9
# --with-gui make Snd with(out) any graphics support
# --with-forth use Forth as the extension language
# --with-ruby use Ruby as the extension language
# --with-s7 use S7 as the extension language (default = yes)
# --with-s7 use s7 as the extension language (default = yes)
# --with-pure-s7 s7 WITH_PURE_S7
# --with-s7-history s7 WITH_HISTORY
# --with-s7-profiling s7 WITH_PROFILE
# --with-extension-language use some extension language (default=yes)
# --with-temp-dir directory to use for temp files
# --with-save-dir directory to use for saved-state files
......@@ -3447,6 +3456,25 @@ fi
# Check whether --with-pure-s7 was given.
if test "${with_pure_s7+set}" = set; then :
withval=$with_pure_s7;
fi
# Check whether --with-s7-history was given.
if test "${with_s7_history+set}" = set; then :
withval=$with_s7_history;
fi
# Check whether --with-s7-profiling was given.
if test "${with_s7_profiling+set}" = set; then :
withval=$with_s7_profiling;
fi
# Check whether --with-gsl was given.
if test "${with_gsl+set}" = set; then :
withval=$with_gsl;
......@@ -5193,6 +5221,42 @@ fi
if test "$with_ruby" = yes ; then
if test x$PKG_CONFIG != xno ; then
if test "$ac_snd_extension_language" = none ; then
if $PKG_CONFIG ruby-2.5 --exists ; then
$as_echo "#define HAVE_RUBY 1" >>confdefs.h
XEN_CFLAGS="-fPIC `$PKG_CONFIG ruby-2.5 --cflags`"
# this depends on building ruby itself with the --enable-shared flag
XEN_LIBS="`$PKG_CONFIG ruby-2.5 --libs`"
LOCAL_LANGUAGE="Ruby"
ac_snd_extension_language=Ruby
fi
fi
if test "$ac_snd_extension_language" = none ; then
if $PKG_CONFIG ruby-2.4 --exists ; then
$as_echo "#define HAVE_RUBY 1" >>confdefs.h
XEN_CFLAGS="-fPIC `$PKG_CONFIG ruby-2.4 --cflags`"
# this depends on building ruby itself with the --enable-shared flag
XEN_LIBS="`$PKG_CONFIG ruby-2.4 --libs`"
LOCAL_LANGUAGE="Ruby"
ac_snd_extension_language=Ruby
fi
fi
if test "$ac_snd_extension_language" = none ; then
if $PKG_CONFIG ruby-2.3 --exists ; then
$as_echo "#define HAVE_RUBY 1" >>confdefs.h
XEN_CFLAGS="-fPIC `$PKG_CONFIG ruby-2.3 --cflags`"
# this depends on building ruby itself with the --enable-shared flag
XEN_LIBS="`$PKG_CONFIG ruby-2.3 --libs`"
LOCAL_LANGUAGE="Ruby"
ac_snd_extension_language=Ruby
fi
fi
if test "$ac_snd_extension_language" = none ; then
if $PKG_CONFIG ruby-2.2 --exists ; then
$as_echo "#define HAVE_RUBY 1" >>confdefs.h
......@@ -6186,6 +6250,31 @@ if test "$enable_deprecated" = no ; then
fi
#--------------------------------------------------------------------------------
# pure-s7
#--------------------------------------------------------------------------------
if test "$with_pure_s7" = yes ; then
CFLAGS="-DWITH_PURE_S7 $CFLAGS"
fi
#--------------------------------------------------------------------------------
# s7-history
#--------------------------------------------------------------------------------
if test "$with_s7_history" = yes ; then
CFLAGS="-DWITH_HISTORY $CFLAGS"
fi
#--------------------------------------------------------------------------------
# s7-profiling
#--------------------------------------------------------------------------------
if test "$with_s7_profiling" = yes ; then
CFLAGS="-DWITH_S7_PROFILE $CFLAGS"
fi
#--------------------------------------------------------------------------------
# output
......@@ -6703,7 +6792,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by snd $as_me 17.9, which was
This file was extended by snd $as_me 18.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -6765,7 +6854,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
snd config.status 17.9
snd config.status 18.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -5,7 +5,7 @@
# gmp, mpfr, and mpc deliberately have none!
AC_INIT(snd, 17.9, bil@ccrma.stanford.edu, ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz)
AC_INIT(snd, 18.0, bil@ccrma.stanford.edu, ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-18.tar.gz)
AC_CONFIG_SRCDIR(snd.c)
AC_CANONICAL_HOST # needed by case $host below
......@@ -24,7 +24,7 @@ LOCAL_LANGUAGE="None"
GRAPHICS_TOOLKIT="None"
PACKAGE=Snd
VERSION=17.9
VERSION=18.0
#--------------------------------------------------------------------------------
# configuration options
......@@ -40,7 +40,10 @@ VERSION=17.9
# --with-gui make Snd with(out) any graphics support
# --with-forth use Forth as the extension language
# --with-ruby use Ruby as the extension language
# --with-s7 use S7 as the extension language (default = yes)
# --with-s7 use s7 as the extension language (default = yes)
# --with-pure-s7 s7 WITH_PURE_S7
# --with-s7-history s7 WITH_HISTORY
# --with-s7-profiling s7 WITH_PROFILE
# --with-extension-language use some extension language (default=yes)
# --with-temp-dir directory to use for temp files
# --with-save-dir directory to use for saved-state files
......@@ -74,6 +77,10 @@ AC_ARG_WITH(s7, [ --with-s7 use S7, default=yes])
AC_ARG_WITH(forth, [ --with-forth use Forth as the extension language])
AC_ARG_WITH(ruby, [ --with-ruby use Ruby as the extension language])
AC_ARG_WITH(pure-s7, [ --with-pure-s7 s7 WITH_PURE_S7])
AC_ARG_WITH(s7-history, [ --with-s7-history s7 WITH_HISTORY])
AC_ARG_WITH(s7-profiling, [ --with-s7-profiling s7 WITH_PROFILE])
AC_ARG_WITH(gsl, [ --with-gsl use GSL, default=yes])
AC_ARG_WITH(fftw, [ --with-fftw use fftw, default=yes])
AC_ARG_WITH(gmp, [ --with-gmp include multiprecision arithmetic via gmp, mpfr, and mpc, default=no])
......@@ -371,9 +378,11 @@ fi
# Ruby
#--------------------------------------------------------------------------------
# Yuri suggests: ruby -r rbconfig -e 'C = RbConfig::CONFIG' -e 'puts C["ruby_version"]' | sed -E 's|([[:digit:]]+\.[[:digit:]]+).*|\1|'
if test "$with_ruby" = yes ; then
if test x$PKG_CONFIG != xno ; then
m4_foreach([ruby_version], [[ruby-2.2], [ruby-2.1], [ruby-2.0], [ruby], [ruby-1.9.3], [ruby-1.9], [ruby-1.8]],
m4_foreach([ruby_version], [[ruby-2.5], [ruby-2.4], [ruby-2.3], [ruby-2.2], [ruby-2.1], [ruby-2.0], [ruby], [ruby-1.9.3], [ruby-1.9], [ruby-1.8]],
[
if test "$ac_snd_extension_language" = none ; then
if $PKG_CONFIG ruby_version --exists ; then
......@@ -796,6 +805,31 @@ if test "$enable_deprecated" = no ; then
fi
#--------------------------------------------------------------------------------
# pure-s7
#--------------------------------------------------------------------------------
if test "$with_pure_s7" = yes ; then
CFLAGS="-DWITH_PURE_S7 $CFLAGS"
fi
#--------------------------------------------------------------------------------
# s7-history
#--------------------------------------------------------------------------------
if test "$with_s7_history" = yes ; then
CFLAGS="-DWITH_HISTORY $CFLAGS"
fi
#--------------------------------------------------------------------------------
# s7-profiling
#--------------------------------------------------------------------------------
if test "$with_s7_profiling" = yes ; then
CFLAGS="-DWITH_S7_PROFILE $CFLAGS"
fi
#--------------------------------------------------------------------------------
# output
......
......@@ -2,9 +2,9 @@
\ Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 05/12/18 23:36:09
\ Changed: 14/04/28 03:52:17
\ Changed: 17/12/02 03:19:40
\
\ @(#)draw.fs 1.19 4/28/14
\ @(#)draw.fs 1.20 12/2/17
\ make-current-window-display ( -- )
\ close-current-window-display ( -- )
......
......@@ -2,9 +2,9 @@
\ Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 05/12/30 04:52:13
\ Changed: 14/04/28 03:52:17
\ Changed: 17/12/02 03:19:40
\
\ @(#)dsp.fs 1.51 4/28/14
\ @(#)dsp.fs 1.52 12/2/17
\ src-duration ( en -- dur )
\ src-fit-envelope ( e1 target-dur -- e2 )
......
......@@ -2,9 +2,9 @@
\ Translator/Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 05/10/16 23:04:30
\ Changed: 14/04/28 03:52:17
\ Changed: 17/12/15 06:30:08
\
\ @(#)effects.fs 1.56 4/28/14
\ @(#)effects.fs 1.59 12/15/17
\ General (nogui/motif/gtk)
\
......@@ -40,7 +40,7 @@
\
\ Requires --with-motif|gtk
\
\ Tested with Snd 14.x
\ Tested with Snd 18.x
\ Fth 1.3.x
\ Motif 2.3.3 X11R6
\
......@@ -554,43 +554,9 @@ previous
\ effects-cross-synthesis ( snd amp fftsize r -- prc; inval self -- res )
\ effects-cross-synthesis-1 ( snd amp fft r :optional beg dur snd chn -- res )
: effects-cross-synthesis ( snd amp fftsize r -- prc; inval self -- res )
{ snd amp fftsize r }
fftsize 2/ { freq-inc }
fftsize 0.0 make-vct { fdr }
fftsize 0.0 make-vct { fdi }
freq-inc 0.0 make-vct { spectr }
1.0 r fftsize f/ f- { radius }
#f srate fftsize / { bin }
freq-inc make-array map!
:radius radius :frequency bin i * make-formant
end-map spectr make-formant-bank { formants }
1 proc-create ( inctr ) 0 , ( ctr ) freq-inc ,
fdr , fdi , spectr , formants , snd , amp , ( prc )
does> { inval self -- res }
self @ { inctr }
self 1 cells + @ { ctr }
self 2 cells + @ { fdr }
self 3 cells + @ { fdi }
self 4 cells + @ { spectr }
self 5 cells + @ { formants }
self 6 cells + @ { snd }
self 7 cells + @ { amp }
fdr vct-length { fftsize }
spectr vct-length { freq-inc }
0.0 { outval }
ctr freq-inc = if
inctr fftsize snd 0 #f channel->vct self 2 cells + ! ( fdr )
inctr freq-inc + self ! ( inctr )
fdr fdi #f 2 spectrum drop
fdr spectr vct-subtract! drop
fdr freq-inc 1/f vct-scale! drop
0 self 1 cells + ! ( ctr=0 )
then
ctr 1+ self 1 cells + ! ( ctr++ )
spectr fdr 0 vct-add! drop
formants inval formant-bank amp f*
;
\ cross-synthesis from examp.fs
<'> cross-synthesis
alias effects-cross-synthesis ( snd amp fftsize r -- prc; y self -- res )
: effects-cross-synthesis-1
<{ csnd amp fftsize r :optional beg 0 dur #f snd #f chn #f -- res }>
......
......@@ -2,9 +2,9 @@
\ Translator/Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 05/10/27 04:51:42
\ Changed: 14/04/28 03:52:17
\ Changed: 17/12/02 03:19:40
\
\ @(#)env.fs 1.25 4/28/14
\ @(#)env.fs 1.26 12/2/17
\ From env.scm|rb with original comments and doc strings from env.scm.
\
......
\ enved.fs -- enved object type
\ Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: Sun Nov 13 13:59:42 CET 2005
\ Changed: Mon Nov 19 06:06:33 CET 2012
\ Created: 05/11/13 13:59:42
\ Changed: 17/12/02 02:57:20
\
\ @(#)enved.fs 1.19 12/2/17
\ Commentary:
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
# Translator/Author: Michael Scholz <mi-scholz@users.sourceforge.net>
# Created: 02/09/04 18:34:00
# Changed: 15/01/29 23:09:30
# Changed: 17/12/24 22:01:05
# module Examp (examp.scm)
# selection_rms
......@@ -1378,10 +1378,21 @@ map_channel(cross_synthesis(1, 0.5, 128, 6.0))")
inctr = 0
ctr = freq_inc
radius = 1.0 - r / fftsize.to_f
bin = srate() / fftsize.to_f
osr = mus_srate()
csr = srate()
bin = csr / fftsize
# The comment from examp.scm applies of course here as well:
# ;; if mus-srate is 44.1k and srate is 48k, make-formant
# ;; thinks we're trying to go past srate/2
# ;; and in any case it's setting its formants incorrectly
# ;; for the actual output srate
# begin of temporary mus-srate
set_mus_srate(csr)
fmts = make_array(freq_inc) do |i|
make_formant(i * bin, radius)
end
set_mus_srate(osr)
# end of temporary mus-srate
formants = make_formant_bank(fmts, spectr)
lambda do |inval|
if ctr == freq_inc
......@@ -1411,8 +1422,13 @@ Turns a vocal sound into whispering: voiced2unvoiced(1.0, 256, 2.0, 2.0)")
noi = make_rand(:frequency, srate(snd) / 3.0)
inctr = 0
ctr = freq_inc
osr = mus_srate()
csr = srate()
# See cross_synthesis above.
# begin of temporary mus-srate
set_mus_srate(csr)
radius = 1.0 - r.to_f / fftsize
bin = srate(snd).to_f / fftsize
bin = csr / fftsize
len = framples(snd, chn)
outlen = (len / tempo).floor
hop = (freq_inc * tempo).floor
......@@ -1420,6 +1436,8 @@ Turns a vocal sound into whispering: voiced2unvoiced(1.0, 256, 2.0, 2.0)")
fmts = make_array(freq_inc) do |i|
make_formant(i * bin, radius)
end
set_mus_srate(osr)
# end of temporary mus-srate
formants = make_formant_bank(fmts, spectr)
old_peak_amp = new_peak_amp = 0.0
outlen.times do |i|
......@@ -1453,44 +1471,44 @@ Turns a vocal sound into whispering: voiced2unvoiced(1.0, 256, 2.0, 2.0)")
add_help(:pulse_voice,
"pulse_voice(cosin, freq=440.0, amp=1.0, fftsize=256, r=2.0, \
snd=false, chn=false) \
Uses sum-of-cosines to manipulate speech sounds.")
Use ncos to manipulate speech sounds.")
def pulse_voice(cosin, freq = 440.0, amp = 1.0,
fftsize = 256, r = 2.0, snd = false, chn = false)
freq_inc = fftsize / 2
fdr = make_vct(fftsize)
fdi = make_vct(fftsize)
spectr = make_vct(freq_inc)
pulse = make_sum_of_cosines(cosin, freq)
inctr = 0
ctr = freq_inc
radius = 1.0 - r / fftsize
bin = srate(snd) / fftsize
len = framples(snd, chn)
out_data = make_vct(len)
old_peak_amp = new_peak_amp = 0.0
osr = mus_srate()
csr = srate(snd)
# See cross_synthesis above.
# begin of temporary mus-srate
set_mus_srate(csr)
bin = csr / fftsize
radius = 1.0 - (r.to_f / fftsize)
fmts = make_array(freq_inc) do |i|
make_formant(i * bin, radius)
make_formant(:radius, radius, :frequency, i * bin)
end
formants = make_formant_bank(fmts, spectr)
out_data.map do |i|
outval = 0.0
if ctr == freq_inc
set_mus_srate(osr)
# end of temporary mus-srate
old_peak_amp = 0.0
pulse = make_ncos(freq, cosin)
fdr = nil
inctr = 0
fdi = make_vct(fftsize)
inv_freq_inc = 1.0 / freq_inc
out_data = make_vct!(len) do |i|
if i.modulo(freq_inc) == 0
fdr = channel2vct(inctr, fftsize, snd, chn)
pk = vct_peak(fdr)
if pk > old_peak_amp then old_peak_amp = pk end
old_peak_amp = [vct_peak(fdr), old_peak_amp].max
spectrum(fdr, fdi, false, 2)
inctr += freq_inc
vct_subtract!(fdr, spectr)
vct_scale!(fdr, 1.0 / freq_inc)
ctr = 0
vct_scale!(fdr, inv_freq_inc)
inctr += freq_inc
end
ctr += 1
vct_add!(spectr, fdr)
outval = formant_bank(formants, sum_of_cosines(pulse))
if outval.abs > new_peak_amp then new_peak_amp = outval.abs end
outval
formant_bank(formants, ncos(pulse))
end
vct_scale!(out_data, amp * (old_peak_amp / new_peak_amp))
vct_scale!(out_data, (old_peak_amp / vct_peak(out_data)) * amp)
vct2channel(out_data, 0, len, snd, chn)
end
# pulse_voice(80, 20.0, 1.0, 1024, 0.01)
......
......@@ -2,9 +2,9 @@
\ Translator/Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 05/12/18 19:21:00
\ Changed: 14/12/03 17:15:55
\ Changed: 17/12/02 03:19:40
\
\ @(#)extensions.fs 1.50 12/3/14
\ @(#)extensions.fs 1.51 12/2/17
\ With comments and doc strings from extensions.scm.
\
......
......@@ -5736,7 +5736,7 @@ void Init_libgl(void)
define_integers();
define_functions();
Xen_provide_feature("gl");
Xen_define("gl-version", C_string_to_Xen_string("28-Nov-17"));
Xen_define("gl-version", C_string_to_Xen_string("01-Jan-18"));
gl_already_inited = true;
}
}
......
......@@ -468,8 +468,8 @@ const char *mus_sample_type_short_name(mus_sample_t samp_type)
}
#if HAVE_RUBY
#define TO_LANG(Str) (const char *)xen_scheme_constant_to_ruby(Str)
#if (HAVE_EXTENSION_LANGUAGE) && (HAVE_RUBY) /* HAVE_EXTENSION_LANGUAGE is not redundant -- make sndinfo for example */
#define TO_LANG(Str) (const char *)xen_scheme_constant_to_ruby(Str)
#else
#define TO_LANG(Str) Str
#endif
......
......@@ -2,9 +2,9 @@
\ Author: Michael Scholz <mi-scholz@users.sourceforge.net>
\ Created: 06/08/08 23:27:50
\ Changed: 15/02/27 22:24:42
\ Changed: 17/12/02 03:14:03
\
\ @(#)hooks.fs 1.25 2/27/15
\ @(#)hooks.fs 1.26 12/2/17
\ snd-hooks Array with all Snd hooks.
\ reset-all-hooks ( -- )
......
......@@ -15,12 +15,12 @@ and if one is found, and the Snd documentation can be found, calls *html-program
((and (string? *html-dir*)
(file-exists? (string-append *html-dir* "/snd.html")))
*html-dir*)
((file-exists? "/usr/share/doc/snd-18/snd.html") "/usr/share/doc/snd-18")
((file-exists? "/usr/local/share/doc/snd-18/snd.html") "/usr/local/share/doc/snd-18")
((file-exists? "/usr/doc/snd-18/snd.html") "/usr/doc/snd-18")
((file-exists? "/usr/share/doc/snd-17/snd.html") "/usr/share/doc/snd-17")
((file-exists? "/usr/local/share/doc/snd-17/snd.html") "/usr/local/share/doc/snd-17")
((file-exists? "/usr/doc/snd-17/snd.html") "/usr/doc/snd-17")
((file-exists? "/usr/share/doc/snd-16/snd.html") "/usr/share/doc/snd-16")
((file-exists? "/usr/local/share/doc/snd-16/snd.html") "/usr/local/share/doc/snd-16")
(else (and (file-exists? "/usr/doc/snd-16/snd.html") "/usr/doc/snd-16")))))
(else (and (file-exists? "/usr/doc/snd-17/snd.html") "/usr/doc/snd-17")))))
(if dir
(system