| They are not deleted afterwards. Personally, I want them around to document the rendering so I can recreate it or modify it later. There are number of pieces that I have lost because I did not do this, or did not lose because I still had the temporary files around (I used to do each rendering in its own directory, now I change the temp filenames to match a master filename).
In addition to this personal philosophical preference for the temporary files, there is a technical reason. The Csound orchestra and score parsers need the orc and sco to be files on a disk. This should probably be changed -- not everyone is like me. You would like to create the orc and sco in memory and render from that, correct?
For now, if you are writing a front end, I suggest you create a RAM disk and write to that. This might or might not work for you: http://www.cenatek.com/product_page_ramdisk_download.php
You may also be able to find open source for a RAM disk somewhere.
It would actually be a very useful addition to Csound to be able to render from memory; contemporary computers usually have much more than enough RAM for these text files.
It might also be possible to change the Csound internals to be able to use pre-allocated memory buffers for this, or file handles that belong to a memory stream. I will look at this latter idea again to see if it is possible. It is easily possible in C++ but I do not know about C.
Hope this helps,
Mike
-----Original Message-----
>From: Rory Walsh
>Sent: Jan 31, 2008 12:01 PM
>To: Developer discussions
>Subject: Re: [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
>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 |