Bill Schottstaedt | 11 Sep 16:35 2015

Snd 15.9

Snd 15.9:

procedure-signature, c-object?, proper-list?, float?
list? is now "pair or null" -- use proper-list? for R5RS list?
(*s7* 'float-format-precision)
libutf8proc.scm (bindings for the utf8proc library)
The clm optimizer revision is about 2/3 done

checked: sbcl 1.2.14|15, gtk 3.17.6|7|8

Thanks!: Greg Santucci, Caio Giovaneti de Barros, Carlos Carrasco
Martin Jaroszewicz | 26 Aug 01:34 2015

CM in Yosemite


I tried to compile CM with fomus and sdif in OS X 10.10.5 (after some changes in source code and updating the Juce library) got the following error:

ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/usr/local/lib/' for architecture x86_64
Is sndlib i386 only or a compiler flag needs to be set?

BTW, It did compile (after some work ) in Ubuntu 14.04 with Fomus, sdif and jack but it would be great to have a dmg for OS X with all the libraries included.


Cmdist mailing list
John Rigg | 24 Aug 19:30 2015

[snd] Is there a way to add dc offset to a file?

Snd newb here. I'm editing some impulse files for use in a convolver and
some of them have unwanted LF superimposed on them. As a result the
part of the impulse I'm interested in is further away from zero than
I'd like, making it difficult to trim the ends without a discontinuity.
I tried a HPF but it changes the shape of the impulse too much. Is there
a simple way to add a constant dc value to every sample?

Wonderful program BTW.

Matti Koskinen | 21 Aug 11:28 2015

s7 on raspberry pi


I'm trying to compile only s7 on Pi, but if (Bill for sure) or someone 
else  knows, how to create mus-config.h with Pi, without premake or 
other stuff using just make and gcc, I'd glady would like to know.

Pi has audio out, also possibility to use usb-audio sticks & others. 
Chipkit Max32 (Arduino improved) works fine, so it's much easier for me 
to use arduino code to read and write i/o, as I haven't checked yet GPIO 
of Pi. I got Pi only few days ago, but ssh to Pi via WiFi works fine, my 
Pi usb <-> Chipkit works fine, too.

And also is there good (and cheap) ssh-client for Android? It would 
easier to use tablet for controlling Pi, than always MBP or Ubuntu laptop.

Python is out of question, I just know almost nothing of it.


Caio Giovaneti de Barros | 18 Aug 21:58 2015

Setting Y axis label position in Snd

Hi everyone!
Is there a way to change the Y axis label position in Snd?

I'm using, for instance, (set! (y-axis-label 0 0 transform-graph) 
"frequency") to create a label to make it clear that the sonogram is a 
graphing time in the x-axis and frequency in the y-axis, but the new 
label is created to close to the axis line! I want to move it slightly 
to the left. How can I do it?

Caio G. de Barros
Syd Phillips | 2 Aug 02:01 2015

SuperCollider Example Not Working

Hello All,  I'm new to Common Music and have been going through the examples and tutorials with fair success.  I'm stuck on getting the SuperCollider example to work, though. I *think* I'm stuck on this recommendation in the code: "Make sure SC booted port 57100 in the Post window." I've not been able to locate instructions for how to set the port.   I would appreciate any tips!

Thanks and can't wait to start coding some music!

Syd Phillips
MacBook Pro 3Gz i7
Yosemite 10.10.4
16 GB Memory
Cmdist mailing list
Bill Schottstaedt | 1 Aug 17:26 2015

Snd 15.8

Snd 15.8:

changed make-iterator with a closure argument -- the closure
  is now called without any arguments, and it should
  contain a variable named 'iterator? with a non-false value.

s7 now calls setlocale(LC_NUMERIC, "C") at startup.

What used to be called the run macro (clm optimizer) has been
  completely rewritten for about the sixth time; many changes
  in s7.h, etc. 

  1990: CL version (from Mus10 from MusicN)
  1993: CL + FFI
  1994: CL->C
  2002: Guile+Snd run macro
  2008: s7+sndlib
  2015: This time for sure!

  This change is about 1/3 complete, so view this version of
  Snd with grave suspicion.  

checked: gtk 3.17.4|5, sbcl 1.2.13

Thanks!: Anders Vinjar, Tito Latini, Greg Santucci, Mike Scholz
James Hearon | 12 Jul 21:16 2015

scheme, snd, cm_patterns.scm

Yes.  This is helpful, insightful.  I'm still trying to get used to scheme in snd.

> Message: 1
> Date: Sat, 11 Jul 2015 12:12:00 +0200
> From:
> To:
> Subject: Re: [CM] scheme, snd, cm_patterns.scm
> Message-ID: <>
> Content-Type: text/plain
> Hi James.
> The beauty of the pattern-streams is they are 'streams', embodying a
> pattern (eg. a 'heap' in the above example) together with a promise to
> deliver the next item whenever you need it.
> Typically you set up a generator and store a pointer to that, just like
> you've done:
> (define aaa (make-heap '(160 600.345 1000 400)))
> After that,
> (next aaa)
> will return the next item from aaa anytime you want one.
> Using a slightly modified version of your example, you could do
> something like:
> (let ((aaa (make-heap '(160 600.345 1000 400)))) ;set up a stream
> (with-sound (:output "MyTest.wav" :srate 48000 :channels 2
> :header-type mus-riff :statistics #t)
> (do ((st 0 (+ st 0.25)))
> ((>= st 2))
> (examp1 st 0.25
> (next aaa) ; next item from aaa
> 0.5 48000))))
> You'll find a general doc about Ricks patterns here:
> Many files included with CMs docs, esp. "doc/patterns1.scm" and
> "doc/patterns2.scm" - provide examples of setting up patterns and
> using these.
> -anders
> ------------------------------
> _______________________________________________
> Cmdist mailing list
> End of Cmdist Digest, Vol 87, Issue 7
> *************************************
Cmdist mailing list
Michael Winkler | 12 Jul 12:08 2015

how to set the working directory in grace?

Hi List

How can I set my working directory by code?

(set-working-directory! "/users/michael/Desktop") gives me an Error: 
set-working-directory! unbound variable

If I just open grace, there is no working directory by default, so I 
would like to make a load-file with, amongst others, this command.


OSX 10.10.3, Common Music 3.9.0
James Hearon | 9 Jul 19:31 2015

scheme, snd, cm_patterns.scm

re: finding myself s7 challenged for CM_patterns.scm in Snd without Grace process, sprout etc.

I've kept digging with this and got something working, but it's not very pretty.  It uses 'list-ref'
in with-sound (), but that could be improved, I'm sure.

(load "snd/CM_patterns.scm")

(definstrument (examp1 start-time duration frequency amplitude sampling-rate)
  (let* ((beg (floor (* start-time sampling-rate)))
     (end (+ beg (floor (* duration sampling-rate))))
     (sine-wave (make-oscil :frequency frequency)))
     (do ((i beg (+ i 1)))
         ((= i end))
     (outa i (* amplitude (oscil sine-wave)))
     (outb i (* amplitude (oscil sine-wave)))

 (define xxx '(160.0  600.345  1000.0  400))
 (define aaa (make-heap xxx))
 (define bbb (next aaa #t))

(with-sound (:output "MyTest.wav" :srate 48000 :channels 2
             :header-type  mus-riff :statistics #t)
  (do (( i 0.0 (+ i 2.0)))
      ((>= i 2.0))
 (examp1   0        0.25    (list-ref bbb 0)    0.5 48000)
 (examp1   (+ i 1.0)    0.25    (list-ref bbb 2)    0.5 48000)
 (examp1   (+ i 2.0)    0.25    (list-ref bbb 3)    0.5 48000)
 (examp1   (+ i 3.0)    0.25    (list-ref bbb 1)    0.5 48000)
Cmdist mailing list
James Hearon | 2 Jul 20:09 2015

s7, cm_patterns

I'm finding myself  s7 challenged, trying to do an example using CM_patterns.scm in Snd using the listener. 

Seems that Snd doesn't have process, sprout etc. which Grace allows for working with patterns, so trying to figure out how to set up a control loop in with-sound in Snd using the patterns, but getting a bit confused.

I understand with-sound can use do for a control structure
(with-sound ( )
    (do ((k 0 (+ k 1)))
    ((= k 10))

But I'm confused about getting from the CM_patterns.scm prototype into a with-sound control loop.

 (define xxx '(100.0  22.345  3000.0  400))
 (define aaa (make-heap xxx))
 (next aaa #t)

I tried something like this just to test, but it prints everything, not just the heap pattern values.
(define (do-loop n)
 (do ((i 0 (+ i 1)))
  ((= i n))
 (next aaa #t)
  (display aaa))

(lambda (n) (do-loop n))
(list 10 20))

I'm wondering if anyone might have a simple working example to share?

Cmdist mailing list