James Hearon | 1 Mar 00:08 2015
Picon

analog-filter.scm



> Date: Sat, 28 Feb 2015 11:51:43 -0800
> From: "Bill Schottstaedt" <bil <at> ccrma.Stanford.EDU>
> Subject: Re: [CM] analog-filter.scm
> To: James Hearon <j_hearon-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>, "cmdist-Q5CBQdYaXkD3fQ9qLvQP4Q@public.gmane.orgnford.EDU"
> <cmdist-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org>
> Message-ID: <20150228195009.M14338-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org>
> Content-Type: text/plain; charset=iso-8859-1
>
> They're in mus-config.h. SNDLIB_CONFIG_path is very obsolete --
> it has no effect on anything. I tried fc21 with all those settings
> and it worked fine. I don't know what the problem is.

Hi,
Thanks Bill.  I tried this and it seems working now.

./configure  --with-s7 --with-gsl --with-motif --with-alsa CFLAGS=HAVE_COMPLEX_NUMBERS CFLAGS=HAVE_COMPLEX_TRIG CFLAGS="-I/usr/include/linux/param.h" SNDLIB_CONFIG_path=/opt/sndlib

------
(load "/opt/snd-15.4/analog-filter.scm")

(define (filter-sweep flt)
  (let ((phase 0.0)
    (freq 0.0)
    (incr (/ (* 2 pi) 144000.0))
        (samps (seconds->samples 0.5)))
    (do ((i 0 (+ i 1)))
    ((= i samps))
      (let ((sval (* .8 (sin phase))))
    (set! phase (+ phase freq))
    (set! freq (+ freq incr))
    (outa i (flt sval))
    (outb i (flt sval))  ))))

(with-sound (:output "test.wav" :srate 48000 :channels 2
                     :header-type  mus-riff)
  ;(filter-sweep (make-butterworth-lowpass 8 .1))
  (filter-sweep (make-bessel-lowpass 8 .2))
  ;(filter-sweep (make-chebyshev-lowpass 8 .1))
  ;(filter-sweep (make-inverse-chebyshev-lowpass 8 .1))
  ;(filter-sweep (make-elliptic-lowpass 8 .01))
  )




_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
James Hearon | 28 Feb 18:56 2015
Picon

analog-filter.scm


> Message: 3
> Date: Fri, 27 Feb 2015 10:49:33 -0800
> From: "Bill Schottstaedt" <bil-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org>
> Subject: Re: [CM] analog-filter.scm
> To: James Hearon <j_hearon-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>, "cmdist-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org"
> <cmdist-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org>
> Message-ID: <20150227184704.M76841-Q5CBQdYaXkCY9Qp+Rujo2eW1CriLhL8O@public.gmane.org>
> Content-Type: text/plain; charset=iso-8859-1
>
> gsl-roots needs HAVE_COMPLEX_NUMBERS and HAVE_COMPLEX_TRIG
> in s7, which means it can't work in Windows, c++, or FreeBSD.
> If you aren't in that group, I need to know how you built Snd,
> and what those flags are. gsl-roots is used in the Bessel filter
> section, but is not related to the gsl Bessel function stuff.

Hi,
Thanks for the info.  I've built Snd-15.4 on f21, and not seeing anything about HAVE_COMPLEX_NUMBERS or HAVE_COMPLEX_TRIG from the build output.  Is that something I need to add when running make or gcc?


[jhearon <at> localhost snd-15.4]$ ./configure --with-s7 --with-gsl --with-motif --with-alsa SNDLIB_CONFIG_path=/opt/sndlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 8
checking for pkg-config... /usr/bin/pkg-config
checking for fftw3... yes
checking for gsl... yes
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for oggdec... /usr/bin/oggdec
checking for oggenc... /usr/bin/oggenc
checking for mpg123... no
checking for mpg321... no
checking for speexdec... no
checking for speexenc... no
checking for flac... no
checking for timidity... no
checking for ttaenc... no
checking for wavpack... /usr/bin/wavpack
checking for wvunpack... /usr/bin/wvunpack
checking for audio system... ALSA
configure: creating ./config.status
config.status: creating makefile
config.status: creating mus-config.h
config.status: mus-config.h is unchanged

  Options selected
  -------------------------
  Snd version ...........: 15.4
  CFLAGS ................: -O2 -I. -g -O2
  LDFLAGS ...............: -Wl,-export-dynamic
  LIBS...................:  -lm -ldl
  prefix.................: /usr/local
  extension language.....: s7
  audio system...........: ALSA
  graphics toolkit.......: Motif
  optional libraries.....: fftw3 gsl
  random features........:
  environs...............: x86_64-unknown-linux-gnu gcc

[jhearon <at> localhost snd-15.4]$ make
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      s7.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      headers.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      audio.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      io.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      sound.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      clm.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      xen.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      vct.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      sndlib2xen.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      clm2xen.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-io.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-utils.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-listener.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-completion.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-menu.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-axis.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-data.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-fft.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-marks.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-file.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-edits.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-chn.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-dac.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-region.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-select.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-find.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-snd.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-help.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-main.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-print.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-trans.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-mix.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-env.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-xen.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-ladspa.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-kbd.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-sig.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-draw.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-gxbitmaps.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-gxcolormaps.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      snd-motif.c
gcc -c -DSCRIPTS_DIR=\"/usr/local/share/snd\"   -O2 -I. -g -O2      xm.c
gcc -Wl,-export-dynamic -O2 -I. -g -O2 s7.o headers.o audio.o io.o sound.o clm.o xen.o vct.o sndlib2xen.o clm2xen.o snd-io.o snd-utils.o snd-listener.o snd-completion.o snd-menu.o snd-axis.o snd-data.o snd-fft.o snd-marks.o snd-file.o snd-edits.o snd-chn.o snd-dac.o snd-region.o snd-select.o snd-find.o snd-snd.o snd-help.o snd-main.o snd-print.o snd-trans.o snd-mix.o snd.o snd-env.o snd-xen.o snd-ladspa.o snd-kbd.o snd-sig.o snd-draw.o snd-gxbitmaps.o snd-gxcolormaps.o snd-motif.o xm.o  -o snd   -lSM -lICE -lXm -lXt -lX11  -lXext -lSM -lICE -lXft -lXpm   -lasound -lfftw3  -lgsl -lgslcblas -lm   -lm -ldl



_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
James Hearon | 27 Feb 19:11 2015
Picon

analog-filter.scm

Hi,
Using Snd and getting unbound variable error on analog-filter.scm for line 309 gsl-roots.

I configured Snd --with-gsl, and have gsl and gsl-devel on my machine.  I also compiled a simple
exampl.c in gsl using bessel functions and it compiles and runs o.k.

I'm wondering what might be going wrong or why it's not able to get to gsl?

Thank-you.
Jim

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
Bill Schottstaedt | 27 Feb 17:42 2015
Picon

Snd 15.4

Snd 15.4

before-save-as-hook arg order changed, also new-sound, save-region, save-selection, save-sound-as

deprecated output-name-hook, info-popup-hook, peak-env-hook, start-hook

changed s7_new_type_x args

mus-audio* deprecated (these haven't worked at all for a long time)
mus_set_name (and mus-set-name) deprecated

in CLM, Juan Reyes added sbcl support for gnuplot in dlocsig.lisp

checked: sbcl 1.2.8, gtk 3.15.5|7|8|9

Thanks!: Mike Scholz, Juan Reyes, Anders Vinjar, Michel Dutat
Richard Wentk | 12 Feb 14:10 2015

Loop bug?

I’m working through the examples using the Mac App Store version of Grace. 

This example in midioutput.scm produces an unbound variable error for ‘chord':

(loop with chord = (transpose (pick '(0 3 7)
                                    '(0 4 7)
                                    '(0 3 7 10)
                                    '(0 4 7 10)
                                    '(0 4 7 11))
                              (between 48 80))
      for k in chord
      do (mp:midi :key k))

A simplified version does the same thing for q:

(loop with q = '(1 2 3) for i in q do (print i))

Is this a bug, or am I missing something obvious? AFAICT the code is valid in Scheme and should work...

The equivalent SAL example works fine.

Thanks!

Richard

_______________________________________________
Cmdist mailing list
Cmdist <at> ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
Jason Ripley | 12 Feb 03:46 2015
Picon

s7 - howto use s7_define_function_star in a C++ project.

Hello, 

I am trying to use s7_define_function_star in C++ to create a c-side define.  I am not having any luck though.  I am getting nonsense values back.

Is there a sample project that does this?  I grepped through CM and didn't find any references to s7_define_function_star in the *.cpp files.


Thank you for any information,
Jason
_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
anders.vinjar | 11 Feb 13:25 2015
Picon

snd: x-zoom and :track-and-return cursor

Hi Bill.  I'm getting some issues w. snd (latest from ccrma-ftp)

trying to do:

(set! (with-tracking-cursor) :track-and-return)
(begin
  (set! (cursor) 80000)
  (let ((here (cursor)))
    (play :start (cursor))
    (format #f "here: ~A there: ~A " here (cursor))))

and stopping playback from the sound-graph (ie. C-g or C-t), makes snd
jump back to 0, whereas i'd expect it go back to 4200.

The output of the above is:
"here: 80000 there: 0 "

Another issue:

  (set! (zoom-focus-style) zoom-focus-middle)
  (set! (x-zoom-slider) (* (x-zoom-slider) 1.1))

seems to leave to zoom-focus at the left edge of the window, even if im
in the middle of a sound somewhere.

When moving the control-panel zoom-slider it behaves as expected
(ie. middle-centered).

Cheers,

-anders
cellstorm | 30 Jan 00:44 2015

cm: compiled on linux 64, no jack?


hello, 

I tried to compile cm with jack, but its controls do not show up in audio-preferences;
ubuntu 14.04 64; 

  wget http://sourceforge.net/projects/sdif/files/sdif/SDIF-3.11.4/SDIF-3.11.4-src.zip
  unzip SDIF-3.11.4-src.zip
  mv SDIF-3.11.4-src SDIF-3.11.4
  cd SDIF-3.11.4
  ./configure --prefix=`pwd` --enable-shared=no --enable-pthreads=no
  make
  make install

sudo apt-get install
libfreetype6-dev libx11-dev libxinerama-dev libxcursor-dev mesa-common-dev libasound2-dev freeglut3-dev
 libxcomposite-dev libsamplerate0-dev fomus

premake4 --with-sdif=../SDIF-3.11.4/ --with-fomus=/usr --with-oscpack --with-jack 

make

is there no way to make release? the .make files are set to debug automatically; I changed that to release,
and tried to add jack by hand, because it was not added automatically, by
adding -DJUCE_JACK=1 at  DEFINES   
 -ljack  at  LIBS
, but no avail.

what am I doing wrong?
Bill Schottstaedt | 24 Jan 22:57 2015
Picon

Snd 15.3

Snd 15.3

s7 procedure-documentation no longer refers to an optional string that happens
  to be the first thing in a procedure body, but to the value of a variable
  named 'documentation' in the procedure's environment.

procedure-arity is deprecated, s7_procedure_arity replaced by s7_arity.
  procedure-name is deprecated. data-format removed (see snd15.scm).

format has another control directive: ~N or ~n which gets a numeric argument
  from the argument list: (format #f "~nD" 20 123)

with-sound argument order changed slightly. It is now: output channels srate.
  Ideally, other Snd functions like new-sound would follow the same argument
  order -- let me know if this change would cause you problems.

float-vector-equal? -- relative difference of two float-vectors.

make-iterator, iterate, iterator? -- replace make-hash-table-iterator and 
  hash-table-iterator? These are generic functions to traverse sequences.

if (*s7* 'safety) > 1, optimization is turned off
(*s7* 'maximum-stack-size) is now (*s7* 'max-stack-size)
(*s7* 'print-length) replaces *vector-print-length*
(*s7* 'bignum-precision) replaces *bignum-precision*
(*s7* 'stacktrace-defaults) replaces *stacktrace*

checked: sbcl 1.2.7, gtk 3.15.4
René Bastian | 9 Jan 19:08 2015

cmn: glissando bug ?

Hello Bill,

It seems there is a bug in this code:

(c5 (rq 1.0) no-stem begin-glissando (begin-slur
	(slur-direction :down))) 
(f5 (rq 3.0) no-stem end-glissando begin-glissando) 
(e5 (rq 0.5) no-stem end-glissando begin-glissando)
(b5 (rq 0.5) no-stem end-glissando begin-glissando)
(a4 (rq 0.5) no-stem end-glissando begin-glissando)
(c5 (rq 0.5) no-stem end-glissando begin-glissando)
(f5 (rq 0.5) no-stem end-glissando begin-glissando)
(e5 (rq 0.5) no-stem end-glissando begin-glissando)
(b5 (rq 0.5) no-stem end-glissando begin-glissando)  
(a4 (rq 0.5) no-stem end-slur end-glissando)
(bar)
(line-break)

the glissando-line from f5 to e5 should be descending.

What is wrong?

Thanks, 
--

-- 
René Bastian
www.pythoneon.org

_______________________________________________
Cmdist mailing list
Cmdist <at> ccrma.stanford.edu
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
Bill Schottstaedt | 9 Jan 17:03 2015
Picon

Fw: Re: embedding s7 in a C++ application

From: etienne cella <etienne.p.cella@...>
To: Bill Schottstaedt <bil@...>
Sent: Thu, 8 Jan 2015 17:43:50 -0500
Subject: Re: embedding s7 in a C++ application

I was looking for a simple use of s7 to get started,
and thought about using it in Pure Data.
Pd's list based messaging makes Scheme integration fairly easy,
demo: https://vimeo.com/116267279
code: https://github.com/etienne-p/Pd_Scheme

Attachment: application/octet-stream, 1599 bytes
_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Gmane