[CM] send in grace

Heinrich Taube taube at uiuc.edu
Sun Jan 11 06:45:49 PST 2009


yes, its not a bug.  sndlib isnt realtime (at least not yet...)  so  
you need a 'with-sound' context in order to generate sound. so simply  
evaling an instrument expression (in scheme or sal) wont do anything  
because no audio file is open for the instrument to write to, ie

   (wave 0 1 440 .1)
   or
   send "wave", 0, 1 440 .1

wont work.  For non-process audio in scheme you do

(with-sound () (wave 0 1 440 .1))

right now I dont have a 'with-sound' equivalent in SAL. I havent added  
it yet beause i dont know what it should look like. I looked at the  
ruby and forth equivalents in Snd docs and they dont look very nice to  
me. (with-sound is a really lispy notion....)

One idea i had was simply to have an "Audio Buffer" option in the  
editor that implemented an implicit with-sound  for each eval you do.  
So If you turned on "Audio Buffer" for a given buffer  then any  
expression you evaled would be evaluated in the context of a with- 
sound that used your preferences settings for controlling the  
options.   But  It could get fancier if it could also use comments in  
the buffer that let you specify this into

;;-*- output: sec1.wav;  srate:22050  *-*

send "wave", 0, 1, 440 .1

;-*- output: sec2.wav;  channels :22050  *-*

send "wave", 0, 1, 440 .1
send "wave", 0, 1, 440 .1
send "wave", 0, 1, 440 .1
send "wave", 0, 1, 440 .1


any ideas or comments about this welcome!



On Jan 11, 2009, at 8:24 AM, Johannes Quint wrote:

> rick,
> when i try to hear a clm-instrument in sal via send, nothing happens.
>
> i.e.
> send "wave", 0,1,440,0.1
>
> inside of a process, everything works fine.
>
> thanks for an answer, johannes
>
> _______________________________________________
>
> Johannes Quint
> Rilkestr.55
> D-53225 Bonn
> 0228 468256
> johannes.quint at web.de
> http://www.johannes-quint.de
>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist



More information about the Cmdist mailing list