| That is the order I'm doing it in, the only other thing I'm doing is
calling PreCompile(), here is my exact code:
CppSound csound;
csound.PreCompile();
csound.setCSD(csdText);
csound.exportForPerformance();
csound.compile();
CsoundPerformanceThread thread(csound.getCsound());
thread.Play();
while(!thread.GetStatus());
The CsOptions section of my csd string looks like this:
temp.orc temp.sco -odevaudio -b10 -idevaudio \n\
Rory.
p.s. I get the same resuls when I leave out the call to precompile()
Cesare Marilungo wrote:
> Sounds like you're not calling ExportForPerformance().
>
> Please, try using this exact order:
>
> CppSound csound;
> csound.setCSD(csdText);
> csound.exportForPerformance();
> csound.compile();
> CsoundPerformanceThread thread(csound.getCsound());
> thread.Play();
> while(!thread.GetStatus());
>
> -c.
>
> Rory Walsh wrote:
>> That results in an error saying cannot open orch file temp.orc...
>>
>>
>> Cesare Marilungo wrote:
>>
>>> No, I think you should pass two names for the temp .orc and .sco files
>>> it will create. You should add them in the tag of your csd
>>> string.
>>>
>>> -c.
>>>
>>> Rory Walsh wrote:
>>>
>>>> Thanks Cesare. I forgot about compiling. Anyhow that still doesn't work,
>>>> instead csound gives me a message saying "Csound Command ERROR: no
>>>> orchestra name". I'd assumed that using setCSD() and
>>>> exportForPerformance() would mean that I don't need to pass a name.
>>>>
>>>> Rory.
>>>>
>>>>
>>>>
>>>> Cesare Marilungo wrote:
>>>>
>>>>
>>>>> Hi Rory,
>>>>>
>>>>> So far I have used the api only from python. So, I don't know if I can
>>>>> help you.
>>>>>
>>>>> Anyway, I would have done:
>>>>>
>>>>> CppSound csound;
>>>>> csound.setCSD(csdText);
>>>>> csound.exportForPerformance();
>>>>> csound.compile();
>>>>> ...
>>>>>
>>>>>
>>>>> Best,
>>>>>
>>>>> -c.
>>>>>
>>>>> Rory Walsh wrote:
>>>>>
>>>>>
>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> -------------------------------------------------------------------------
>>>> 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 |