Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] starting/stopping performance thread...

Date2008-06-11 14:47
FromMichael Gogins
SubjectRe: [Cs-dev] starting/stopping performance thread...
Look at the several Python example applications in the Csound examples directory. The most recent one is the Chua's oscillator application. On Windows, at any rate, they all permit performances to be repeatedly stopped and re-started. The C++ code in CsoundVSTShell (i.e., in CsoundVST) also does this. The CsoundVST code does this very reliably.

Hope this helps,
Mike

-----Original Message-----
>From: Rory Walsh 
>Sent: Jun 11, 2008 7:04 AM
>To: Developer discussions 
>Subject: [Cs-dev] starting/stopping performance thread...
>
>Can anyone advise me on the best way to start and stop performance 
>threads. I've been using the pause method which works fine but recently 
>I've been wanting to stop a performance, change the CsOptions, recompile 
>and then run it again with the same thread object. What must I do after 
>calling the performance thread Stop() method in order to start the 
>thread again?
>
>Rory.
>
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 14:49
FromRory Walsh
SubjectRe: [Cs-dev] starting/stopping performance thread...
Thanks Mike, I will check it out.

Rory.


Michael Gogins wrote:
> Look at the several Python example applications in the Csound examples directory. The most recent one is the Chua's oscillator application. On Windows, at any rate, they all permit performances to be repeatedly stopped and re-started. The C++ code in CsoundVSTShell (i.e., in CsoundVST) also does this. The CsoundVST code does this very reliably.
> 
> Hope this helps,
> Mike
> 
> -----Original Message-----
>> From: Rory Walsh 
>> Sent: Jun 11, 2008 7:04 AM
>> To: Developer discussions 
>> Subject: [Cs-dev] starting/stopping performance thread...
>>
>> Can anyone advise me on the best way to start and stop performance 
>> threads. I've been using the pause method which works fine but recently 
>> I've been wanting to stop a performance, change the CsOptions, recompile 
>> and then run it again with the same thread object. What must I do after 
>> calling the performance thread Stop() method in order to start the 
>> thread again?
>>
>> Rory.
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 14:59
FromRory Walsh
SubjectRe: [Cs-dev] starting/stopping performance thread...
Hi Mike. I can't see any difference between what you do in
ChuasOscillatorFrame.py and what I'm doing, that is stopping the thread 
and then calling Join(). My application is pretty complex. I will see if 
I can produce a simplified version of it and post the code. Thanks again,

Rory.



Michael Gogins wrote:
> Look at the several Python example applications in the Csound examples directory. The most recent one is the Chua's oscillator application. On Windows, at any rate, they all permit performances to be repeatedly stopped and re-started. The C++ code in CsoundVSTShell (i.e., in CsoundVST) also does this. The CsoundVST code does this very reliably.
> 
> Hope this helps,
> Mike
> 
> -----Original Message-----
>> From: Rory Walsh 
>> Sent: Jun 11, 2008 7:04 AM
>> To: Developer discussions 
>> Subject: [Cs-dev] starting/stopping performance thread...
>>
>> Can anyone advise me on the best way to start and stop performance 
>> threads. I've been using the pause method which works fine but recently 
>> I've been wanting to stop a performance, change the CsOptions, recompile 
>> and then run it again with the same thread object. What must I do after 
>> calling the performance thread Stop() method in order to start the 
>> thread again?
>>
>> Rory.
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 15:38
FromRory Walsh
SubjectRe: [Cs-dev] starting/stopping performance thread...
Although I can't seem to reproduce the crash I am getting I did whip up 
a minimal example that doesn't seem to work as I would expect. The 
following code(below) will start a performance, stop the performance and 
then recompile. After the recompile, Play() is called but this time 
doesn't do anything. The program just sits in silence until 4 seconds 
are up and then exits. Surely I'm doing something wrong, anyone care to 
enlighten me?

Rory.


#include "csound.hpp"
#include "csPerfThread.hpp"
#include "windows.h" //sleep function...

int main()
{
Csound* csound = new Csound;
csound->PreCompile();
csound->Compile("basic.csd");
CsoundPerformanceThread* perf = new CsoundPerformanceThread(csound);

perf->Play();
Sleep(1000);
perf->Stop();
perf->Join();
csound->PreCompile();
csound->Compile("basic.csd");
perf->Play();
Sleep(4000);

perf->Stop();
delete csound, perf;
}



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 15:50
From"Andres Cabrera"
SubjectRe: [Cs-dev] starting/stopping performance thread...
AttachmentsNone  None  None  None