Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] CsoundAPI - how to synchronize and other findings

Date2005-03-11 19:48
FromMichael Gogins
SubjectRe: [Cs-dev] CsoundAPI - how to synchronize and other findings
For my own work I prefer the temporary files to hang around, I sometimes need them to reconstruct pieces for which I've lost the scripts or other materials. Add a line to your own code to delete them if you need to.

Item 2 I will look it, these functions may have broken since I last used them (over a year ago).

For item 3, this is a real problem caused by the fact that CsoundVST spawns a native thread to run performances in. This is not OK with the Java virtual machine. I have a fix in mind that I can try in the next day or so.

-----Original Message-----
From: Jean-Pierre Lemoine 
Sent: Mar 11, 2005 2:26 PM
To: csound-devel@lists.sourceforge.net
Subject: Re: [Cs-dev] CsoundAPI - how to synchronize and other findings

Some more findings and test

1) temporary files -sco and orc) are generated and the following 
sequence seems mandatory
        cs.load( aCsdFile );
        boolean b = cs.exportForPerformance();
        cs.compile();
I have tried to remove exportForPerformance and was surprised to hear 
something, but this is coming from old temporary files.
This bring another question:  are these temporary files erased at some 
point in time? et why using this mecanism with csd file (legacy parser I 
presume)?

2) Thanks for your suggestion Michael
I have tested this
        cs.setScorePending(1);
        cs.rewindScore();
        cs.perform();
I dont' see how to use setScoreOffsetSeconds as the parameter is a SWIG 
type, and from the SWIG documentation, this type is not expected to be 
used directly. so ?????
I don't see any difference by doing this. Is it sure than cs.perform() 
is not going to compute anything and will just start playing the first 
score event?

3) Strange stuff
I launch CsoundVST from Java
                        Process exec = Runtime.getRuntime().exec(cmd);
                        BufferedReader input = new BufferedReader( new 
InputStreamReader(exec.getInputStream()));
                        String line = null;
                        while( (line = input.readLine() ) != null) {
                            CsoundMessageViewPart.display( line );
                        }
                        input.close();
CsoundVST is launched with  the csd file as a parameter (cmd string). 
The rendering is not started automaticly and when I click on "perfom" 
button CsoudnVST hangs. The same code works with CsoundAV.
Anyway I am now using csound.exe and it's ok.

Sorry if I am bringing more work for you, but I am with you on having a 
solid common Csound platform for all.

jean-pierre



Michael Gogins wrote:

> CppCsound.isScorePending, .setScorePending, .rewindScore, and 
> .setScoreOffsetSeconds, and .getScoreOffsetSeconds and be used to 
> control this. See the CoundVST.cpp code and the CppSound.hpp header file.
>





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net