Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] CppSound and CsoundPerformanceThread..

Date2008-01-31 16:52
FromMichael Gogins
SubjectRe: [Cs-dev] CppSound and CsoundPerformanceThread..
You need a dummy orc and sco name in the options to export to, e.g.:

csound -odevaudio -b10 -idevaudio  temp.orc temp.sco

I always use a complete command line of the sort that I would type on the console.

Hope this helps,
Mike


-----Original Message-----
>From: Rory Walsh 
>Sent: Jan 31, 2008 10:31 AM
>To: Developer discussions 
>Subject: [Cs-dev] CppSound and CsoundPerformanceThread..
>
>CppSound and CsoundPerformanceThread work fine for me until I try the 
>setCSD() and exportForPerformance() methods. What am I missing from the 
>code below?
>
>Rory.
>
>
>
>int main()
>{
>std::string csdText = " \
> \
>-odevaudio -b10 -idevaudio \
> \
> \
>sr = 44100 \
>kr = 44100 \
>ksmps = 1 \
>nchnls = 1 \
>instr 1 \
>a1 oscil 10000, 440, 1 \
>out a1 \
>endin  \
>  \
> \
>f1 0 1024 10 1 \
>i1 0 100   \
> \
>";
>
>CppSound csound;
>csound.PreCompile();
>csound.setCSD(csdText);
>csound.exportForPerformance();
>
>/*works with the standard compile method
>csound.Compile("basic1.csd");*/
>
>CsoundPerformanceThread thread(csound.getCsound());
>thread.Play();
>while(!thread.GetStatus());
>}
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel
You 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-31 17:01
FromRory Walsh
SubjectRe: [Cs-dev] CppSound and CsoundPerformanceThread..
Thanks Mike, and Cesare for your help. Do the temp files get deleted 
afterwards? I thought using these methods would allow me to do away with 
temp files altogether. If users run one of my frontends without write 
access to a particular disk the program will fail. I guess the same 
thing can happen using these methods or am I wrong?

Rory.




Michael Gogins wrote:
> You need a dummy orc and sco name in the options to export to, e.g.:
> 
> csound -odevaudio -b10 -idevaudio  temp.orc temp.sco
> 
> I always use a complete command line of the sort that I would type on the console.
> 
> Hope this helps,
> Mike
> 
> 
> -----Original Message-----
>> From: Rory Walsh 
>> Sent: Jan 31, 2008 10:31 AM
>> To: Developer discussions 
>> Subject: [Cs-dev] CppSound and CsoundPerformanceThread..
>>
>> CppSound and CsoundPerformanceThread work fine for me until I try the 
>> setCSD() and exportForPerformance() methods. What am I missing from the 
>> code below?
>>
>> Rory.
>>
>>
>>
>> int main()
>> {
>> std::string csdText = " \
>>  \
>> -odevaudio -b10 -idevaudio \
>>  \
>>  \
>> sr = 44100 \
>> kr = 44100 \
>> ksmps = 1 \
>> nchnls = 1 \
>> instr 1 \
>> a1 oscil 10000, 440, 1 \
>> out a1 \
>> endin  \
>>   \
>>  \
>> f1 0 1024 10 1 \
>> i1 0 100   \
>>  \
>> ";
>>
>> CppSound csound;
>> csound.PreCompile();
>> csound.setCSD(csdText);
>> csound.exportForPerformance();
>>
>> /*works with the standard compile method
>> csound.Compile("basic1.csd");*/
>>
>> CsoundPerformanceThread thread(csound.getCsound());
>> thread.Play();
>> while(!thread.GetStatus());
>> }
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> You 
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-31 17:11
FromCesare Marilungo
SubjectRe: [Cs-dev] CppSound and CsoundPerformanceThread..
At least on *nix, you can put them in /tmp (..../tmp/temp.orc 
/tmp/temp.sco).

-c.

Rory Walsh wrote:
> Thanks Mike, and Cesare for your help. Do the temp files get deleted 
> afterwards? I thought using these methods would allow me to do away with 
> temp files altogether. If users run one of my frontends without write 
> access to a particular disk the program will fail. I guess the same 
> thing can happen using these methods or am I wrong?
>
> Rory.
>
>
>
>
> Michael Gogins wrote:
>   
>> You need a dummy orc and sco name in the options to export to, e.g.:
>>
>> csound -odevaudio -b10 -idevaudio  temp.orc temp.sco
>>
>> I always use a complete command line of the sort that I would type on the console.
>>
>> Hope this helps,
>> Mike
>>
>>
>> -----Original Message-----
>>     
>>> From: Rory Walsh 
>>> Sent: Jan 31, 2008 10:31 AM
>>> To: Developer discussions 
>>> Subject: [Cs-dev] CppSound and CsoundPerformanceThread..
>>>
>>> CppSound and CsoundPerformanceThread work fine for me until I try the 
>>> setCSD() and exportForPerformance() methods. What am I missing from the 
>>> code below?
>>>
>>> Rory.
>>>
>>>
>>>
>>> int main()
>>> {
>>> std::string csdText = " \
>>>  \
>>> -odevaudio -b10 -idevaudio \
>>>  \
>>>  \
>>> sr = 44100 \
>>> kr = 44100 \
>>> ksmps = 1 \
>>> nchnls = 1 \
>>> instr 1 \
>>> a1 oscil 10000, 440, 1 \
>>> out a1 \
>>> endin  \
>>>   \
>>>  \
>>> f1 0 1024 10 1 \
>>> i1 0 100   \
>>>  \
>>> ";
>>>
>>> CppSound csound;
>>> csound.PreCompile();
>>> csound.setCSD(csdText);
>>> csound.exportForPerformance();
>>>
>>> /*works with the standard compile method
>>> csound.Compile("basic1.csd");*/
>>>
>>> CsoundPerformanceThread thread(csound.getCsound());
>>> thread.Play();
>>> while(!thread.GetStatus());
>>> }
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>       
>> You 
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>     
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>   


-- 
www.cesaremarilungo.com 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-31 17:12
FromRory Walsh
SubjectRe: [Cs-dev] CppSound and CsoundPerformanceThread..
Good point. It would still be nice not to have to write any temp files. 
Thanks again,

Rory.


Cesare Marilungo wrote:
> At least on *nix, you can put them in /tmp (..../tmp/temp.orc 
> /tmp/temp.sco).
> 
> -c.
> 
> Rory Walsh wrote:
>> Thanks Mike, and Cesare for your help. Do the temp files get deleted 
>> afterwards? I thought using these methods would allow me to do away with 
>> temp files altogether. If users run one of my frontends without write 
>> access to a particular disk the program will fail. I guess the same 
>> thing can happen using these methods or am I wrong?
>>
>> Rory.
>>
>>
>>
>>
>> Michael Gogins wrote:
>>   
>>> You need a dummy orc and sco name in the options to export to, e.g.:
>>>
>>> csound -odevaudio -b10 -idevaudio  temp.orc temp.sco
>>>
>>> I always use a complete command line of the sort that I would type on the console.
>>>
>>> Hope this helps,
>>> Mike
>>>
>>>
>>> -----Original Message-----
>>>     
>>>> From: Rory Walsh 
>>>> Sent: Jan 31, 2008 10:31 AM
>>>> To: Developer discussions 
>>>> Subject: [Cs-dev] CppSound and CsoundPerformanceThread..
>>>>
>>>> CppSound and CsoundPerformanceThread work fine for me until I try the 
>>>> setCSD() and exportForPerformance() methods. What am I missing from the 
>>>> code below?
>>>>
>>>> Rory.
>>>>
>>>>
>>>>
>>>> int main()
>>>> {
>>>> std::string csdText = " \
>>>>  \
>>>> -odevaudio -b10 -idevaudio \
>>>>  \
>>>>  \
>>>> sr = 44100 \
>>>> kr = 44100 \
>>>> ksmps = 1 \
>>>> nchnls = 1 \
>>>> instr 1 \
>>>> a1 oscil 10000, 440, 1 \
>>>> out a1 \
>>>> endin  \
>>>>   \
>>>>  \
>>>> f1 0 1024 10 1 \
>>>> i1 0 100   \
>>>>  \
>>>> ";
>>>>
>>>> CppSound csound;
>>>> csound.PreCompile();
>>>> csound.setCSD(csdText);
>>>> csound.exportForPerformance();
>>>>
>>>> /*works with the standard compile method
>>>> csound.Compile("basic1.csd");*/
>>>>
>>>> CsoundPerformanceThread thread(csound.getCsound());
>>>> thread.Play();
>>>> while(!thread.GetStatus());
>>>> }
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by: Microsoft
>>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>       
>>> You 
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>     
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>   
> 
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net