[CM] scheme, snd, cm_patterns.scm

2015-07-12 Thread James Hearon
Hi,Yes.  This is helpful, insightful.  I'm still trying to get used to scheme 
in snd.Thanks,Jim



> 
> Message: 1
> Date: Sat, 11 Jul 2015 12:12:00 +0200
> From: anders.vin...@bek.no
> To: cmdist@ccrma.Stanford.EDU
> Subject: Re: [CM] scheme, snd, cm_patterns.scm
> Message-ID: <87io9rf1fz@bek.no>
> 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:
> 
>  http://commonmusic.sourceforge.net/cm/res/doc/cm.html#patterns
> 
> 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
> Cmdist@ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
> 
> 
> End of Cmdist Digest, Vol 87, Issue 7
> *
> 
  ___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist


Re: [CM] how to set the working directory in grace?

2015-07-12 Thread Johannes Quint
what about

(chdir "~/michael/Desktop")

johannes

Am 12.07.2015 um 12:08 schrieb Michael Winkler:

> 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.
> 
> best,
> Michael
> 
> OSX 10.10.3, Common Music 3.9.0
> ___
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
> 

 

Johannes Quint
www.johannes-quint.de

___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist


[CM] how to set the working directory in grace?

2015-07-12 Thread Michael Winkler

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.


best,
Michael

OSX 10.10.3, Common Music 3.9.0
___
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist