[CM] defining Csound ftables

peiman khosravi peimankhosravi at gmail.com
Sat Nov 20 10:14:40 PST 2010


On 20 November 2010 18:08, peiman khosravi <peimankhosravi at gmail.com> wrote:
> I put the string in the score file with cs:f. Below is my entire code.
>
> Thanks
>
> ;;;;;;;
> ;; process that sends csound data
>
> load ("ports.scm") ;load the variable cs:f_statement definition due to
> the current bug
>
> define variable sound = "\"china_single impuls_cl.aif\""
> ;returns "\\\"china_single impuls_cl.aif\\\""
>
> send ("cs:f", 1, 0, 32768, 10, 1) ;set f_table 1
>
> send ("cs:f", 2, 0, 32768, 1, sound, 0, 0, 0) ;set f_table 2
>
> ;;;send ("cs:i", 2, 0, 32768, 1, sound, 0, 0, 0) ;set f_table
>
>
> process csound(len, p2, seg)
>  for frq = between( 220, 5000)
>  for t = elapsed(#t) ; get true score time
>  for a = interp( t, seg)
>  while t < len
>  send( "cs:i", 1, t, .1, frq)
>  wait a
> end
>
>
> sprout( csound(10, 0.05, {0 0.01 10 0.05}), "test.sco")
>
> ;;;;;;;;;;;;;;;;;
> ;;;;;;;;;;;;;;;;;
>
>
> On 20 November 2010 18:01, Heinrich Taube <taube at uiuc.edu> wrote:
>> that might be the  editor doing that. hmm.
>>
>> how do you put that string in the score file?
>>
>>
>>
>>
>> On Nov 20, 2010, at 11:23 AM, peiman khosravi wrote:
>>
>>> Thanks. It doesn't work either :-(
>>>
>>> define variable sound = "\"china_single impuls_cl.aif\""
>>> ;returns "\\\"china_single impuls_cl.aif\\\""
>>>
>>> In the score file I get this:
>>>
>>> f 2 0.000 32768 1 \"china_single impuls_cl.aif\" 0 0 0
>>>
>>> Peiman
>>>
>>>
>>> On 20 November 2010 17:10, Heinrich Taube <taube at uiuc.edu> wrote:
>>>>>
>>>>> Is there an escape character i
>>>>
>>>> try:
>>>>
>>>> define variable sound = "\"china_single impuls_cl.aif\""
>>>>
>>>> On Nov 20, 2010, at 10:14 AM, peiman khosravi wrote:
>>>>
>>>>> Thanks very much. I am going to learn to build from source, I think
>>>>> that's the easiest option :-)
>>>>>
>>>>> There is one more issue that I cannot work out.
>>>>>
>>>>> I am trying to load sound-files into f-tables but csound requires the
>>>>> sound-file names to be inside double quotes but for obvious reasons
>>>>> this does not work:
>>>>>
>>>>> "define variable sound = "china_single impuls_cl.aif""
>>>>>
>>>>> Thanks again.
>>>>>
>>>>> Peiman
>>>>>
>>>>>
>>>>> On 20 November 2010 16:03, Heinrich Taube <taube at uiuc.edu> wrote:
>>>>>>
>>>>>> Ok i fixed the bugs including the incorrect doc name "cs:data", its
>>>>>> called
>>>>>> "cs:event"
>>>>>> its in svn so if you build from sources you can get things working
>>>>>> right
>>>>>> away. otherwise if you need me to build a binary i can maybe do it
>>>>>> sometime
>>>>>> next week (making all the binarys and adding a new release on
>>>>>> sourceforge
>>>>>> is
>>>>>> a fairly labor intensive affair and i  dont like to do it all that
>>>>>> often...)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Nov 20, 2010, at 8:51 AM, peiman wrote:
>>>>>>
>>>>>>>
>>>>>>> OK,
>>>>>>>
>>>>>>> I downloaded the source and did a search for f_statement. In the file
>>>>>>> ports.scm the variable cs:i_statement is not defined (or mistakenly
>>>>>>> defined
>>>>>>> as cs:e_statement):
>>>>>>>
>>>>>>> (define cs:i_statement 1)
>>>>>>> (define cs:e_statement 2)
>>>>>>>
>>>>>>> I change the file and loaded it in Grace. Now cs:f works!!
>>>>>>>
>>>>>>> Note that the statement cs:data also is not recognized, but I cannot
>>>>>>> work
>>>>>>> out the problem in the source.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>> PS is there anyway to auto load files upon launching grace?
>>>>>>>
>>>>>>>
>>>>>>> peiman wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am trying to define a csound f table using this line:
>>>>>>>>
>>>>>>>> send ("cs:f", 1, 0, 4096, 10, 1)
>>>>>>>>
>>>>>>>> But I get an error:
>>>>>>>>
>>>>>>>>>>> Error: cs:f_statement: unbound variable
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Cmdist mailing list
>>>>>>>> Cmdist at ccrma.stanford.edu
>>>>>>>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/defining-Csound-ftables-tp30259516p30265847.html
>>>>>>> Sent from the CCRMA - CMdist mailing list archive at Nabble.com.
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Cmdist mailing list
>>>>>>> Cmdist at ccrma.stanford.edu
>>>>>>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
>



More information about the Cmdist mailing list