Bill Schottstaedt | 24 May 2013 23:34
Picon

Snd 13.7

Snd 13.7.

s7: r7rs changes: flush-output-port, vector-append, read|write-string, 
       boolean=?, symbol=?, exit, emergency-exit (see s7.html for the rest).
       added destination/start/end args to copy.

Snd: new gtk listener, split out as glistener.c/h, 
       tests in tools/gcall.c and tools/gtest.scm.

checked: sbcl 1.1.7, gtk 3.9.0

Thanks!: Nando, Jason Ripley, James Hearon
tossel | 24 May 2013 21:48
Picon

Trouble with sndlplay

Greetings!

I'm trying to learn clm library but the key program, sndplay returns with an error:

"ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
open pcm default for stream 1: Invalid argument
open pcm plughw:0 for stream 1: No such file or directory
open pcm hw:0 for stream 1: No such file or directory
open pcm hw:0 for stream 1: No such file or directory
open pcm plughw:0 for stream 1: No such file or directory
open pcm hw:0 for stream 1: No such file or directory"

Maybe the error is caused by the fact that my soundcard is present in the system as device #1, not #0. So before debugging into sndlib I want to try easier ways.

1. I've read in the documentation that by changing clm:*clm-player* I can set an alternative player. Are there some players under Linux that support that format?

OR

2. Maybe there is a way to change alsa device, sndlib uses by default.

Will be grateful for any help.

--
Anton Gerasimov
_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
James Hearon | 23 May 2013 20:47
Picon
Favicon

build clm-4



 The compilation looks ok. Id check if things happen in the right
 packages. Try evaluating:

(package-name (symbol-package 'fm-violin))
 and see if its the same as the package youre working in:
(package-name *package*)

-anders

-------
Hi,

I get
COMMON-LISP-USER by evaluating the above expressions in sbcl on fedora 18.

But  if I just do:

 (compile-file "v.ins")
 (load "v")

I get:
The variable FM-VIOLIN is unbound.

Also if I go on to the 2nd example from the CL/CLM manual online:

(definstrument simp (start-time duration frequency amplitude) (let* ((beg (floor (* start-time *srate*))) (end (+ beg (floor (* duration *srate*)))) (j 0)) (run (loop for i from beg below end do (outa i (* amplitude (sin (* j 2.0 pi (/ frequency *srate*))))) (incf j)))))
I get:The variable SIMP is unbound.So maybe SBCL is not the best choice for lisp for CLM?  I tried Clisp but the CLM/README.clm file shows several problems with Clisp so I removed it and installed SBCL before compiling CLM.  SBCL seemed to have the most uptodate status in README.clm, but also mentions something about sbcl - fix.lisp from R Mattes.  I wonder if that could help?Regards,Jim

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
James Hearon | 22 May 2013 02:33
Picon
Favicon

build clm-4

Hi,
I'm trying to build clm-4 for lisp on fedora18, and not sure everything compiled.

After compilation I tried:
(compile-file "v.ins") (load "v") (with-sound () (fm-violin 0 1 440 .1))

But get: The function COMMON-LISP-USER::FM-VIOLIN is undefined.

I'm wondering if I have it right and everything was built
since only exe I see in the clm-4 folder is sndplay.

[fedora2 <at> localhost clm-4]$ sbcl
This is SBCL 1.1.2-1.fc18, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (load "all.lisp")
;   using existing configuration file mus-config.h
; Compiling "/opt/clm-4/io.c"
; Compiling "/opt/clm-4/headers.c"
; Compiling "/opt/clm-4/audio.c"
; Compiling "/opt/clm-4/sound.c"
; Compiling "/opt/clm-4/clm.c"
; Compiling "/opt/clm-4/cmus.c"
; Creating "/opt/clm-4/libclm.so"
;;gcc  -shared -fPIC -o /opt/clm-4/libclm.so /opt/clm-4/headers.o /opt/clm-4/audio.o /opt/clm-4/io.o /opt/clm-4/sound.o /opt/clm-4/clm.o /opt/clm-4/cmus.o -lasound

;compiling /opt/clm-4/clm-package.lisp
;loading /opt/clm-4/clm-package.fasl
;compiling /opt/clm-4/initmus.lisp
;loading /opt/clm-4/initmus.fasl
;compiling /opt/clm-4/sndlib2clm.lisp
;loading /opt/clm-4/sndlib2clm.fasl
;compiling /opt/clm-4/defaults.lisp
;loading /opt/clm-4/defaults.fasl; Building sndplay program: "/opt/clm-4/sndplay"

;compiling /opt/clm-4/ffi.lisp
;loading /opt/clm-4/ffi.fasl
;compiling /opt/clm-4/mus.lisp
;loading /opt/clm-4/mus.fasl
;compiling /opt/clm-4/run.lisp
;loading /opt/clm-4/run.fasl
;compiling /opt/clm-4/sound.lisp
;loading /opt/clm-4/sound.fasl
;compiling /opt/clm-4/defins.lisp
;loading /opt/clm-4/defins.fasl
;compiling /opt/clm-4/env.lisp
;loading /opt/clm-4/env.fasl
;compiling /opt/clm-4/export.lisp
;loading /opt/clm-4/export.fasl
;compiling /opt/clm-4/clm1.lisp
;loading /opt/clm-4/clm1.fasl
T
*


_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
Antoine | 21 May 2013 09:18

stop and sprout in one block

Hello,

I would like to stop all running processes and then sprout the next ones
 on a single evaluation. 

(define (proc)
 (process repeat 100 do
          (print (pick 1 2))
          (wait .5)
  ))

(begin
(stop)
(sprout (proc))
)

This seems to even stop (proc) from being sprouted!
I can't use id's because it would be too much of a trouble naming 
and keeping track of all the 
processes I am sprouting each time... I just would like to "flush" 
and keep on.

Thank you for your time and your reply!

Antoine
Bill Schottstaedt | 19 May 2013 00:56
Picon

live coding with common music

There's an interesting live coding music video:

 http://vimeo.com/66448855

comments here:

http://www.reddit.com/r/lisp/comments/1ekpfs/livecoding_on_clozurecl/

(reddit lisp -- not sure these urls will actually work).
James Hearon | 16 May 2013 03:50
Picon
Favicon

s7, simple listener

Hi,
Trying to run the simple listener example from s7 manual under FFI.

$ gcc -c s7.c -I.

ok.

$ gcc -o doc7 doc7.c s7.o -lm -I.

s7.o: In function `g_load':
s7.c:(.text+0x4a177): undefined reference to `dlopen'
s7.c:(.text+0x4a192): undefined reference to `dlsym'
s7.c:(.text+0x4a1b6): undefined reference to `dlerror'
s7.c:(.text+0x4a1e9): undefined reference to `dlclose'
s7.c:(.text+0x4a1f0): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status

I tried just including dlfcn.h in s7.c but that didn't fix it.  Wondering what lib or headers I'm missing.  I do have a ld-2.16.so in usr/lib if that's what it needs.

thanks,
Jim Hearon

_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
Bill Schottstaedt | 13 May 2013 22:41
Picon

gtk snd listener

I'm unicodizing the gtk version of snd's listener, so if you
use the cvs stuff or the daily tarball, expect the unexpected.
I'll have it back to normal in no time...
Antoine | 9 May 2013 09:30

optional arguments in Scheme

Hello,

I am having a hard time understanding optional arguments 
in Scheme and could use a little help.
I want to pass optional arguments, without having to write 
the keywords and it seems that in that 
case "&optkey" becomes an argument!...

(define* (hiho a &optkey (b 0) (c 0))
  (+ a b c))

(hiho 1 12)

=> 1

(hiho 1 12 1 1)

=> 3

Neither s7 documentation nor Common Music's reference 
or examples give an overview of the syntax 
for optionals and rests arguments. Could you be kind enough 
to point me the right direction? :)
Thank you!
Jean | 5 May 2013 10:14
Picon
Picon
Favicon

Installing snd and s7 on MacOS-X Mountain Lion

Hi !
New to cmdist. Is there any easy way to install s7 scheme and snd on Mac-OSX Mountain Lion ?
Thanks a lot,

   roy
Jason Ripley | 4 May 2013 00:17
Picon
Gravatar

S7 scheme running on Android in NDK

Hi,

I have just added s7 scheme to a C++ project on Android, and I ran into a couple of issues that I would like to post in case anyone else runs into them.

1 - android doesn't seem to support the log2 function.  Easy fix:  fx = log((double)ix)/log(2.0);

2 - It seems that arm based architectures have issues with aligned access.  I discovered this when calling s7_init to create a second scheme vm.  The fix for this is to simply add __ANDROID__ to the __bfin__ check.


here is the diff of the changes for s7.c:

4021c4021
< #if (__bfin__)
---
> #if (__bfin__ || __ANDROID__)
10216a10217,10219
> #if (__ANDROID__)
>           fx = log((double)ix)/log(2.0);
> #else
10217a10221
> #endif


Are there any other spots in s7 where unaligned access may occur?  They are rather difficult to debug.


Sincerely,
Jason Ripley
_______________________________________________
Cmdist mailing list
Cmdist@...
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Gmane