| OK, thanks for the info.
We already have the ability in the API to send real-time events to Csound. This could of course be done with an entire score.
CsoundFile and CScore are not completely overlapping because CsoundFile works with an entire in-memory CSD file including the orchestra code and command-line options.
If I could think of way to dump the score part of CsoundFile in favor of CScore I would, but I'm not betting on it.
One could of course use CsoundFile to store and play with orcs, and use CScore to build up scos.
Regards,
Mike
-----Original Message-----
From: Anthony Kozar
Sent: Oct 28, 2005 3:04 PM
To: New Csound Developer list
Subject: Re: [Cs-dev] scsort and scxtract
Michael Gogins wrote on 10/28/05 2:38 PM:
> I am only interested in supporting the second mode. Is that OK with you?
That's good. I don't think that it really makes any sense to try to support
writing a cscore() callback in other languages.
> I agree that the code should be changed to omit the requirement for an input
> score.
OK. I will look into what needs to be done to accomplish this.
> As you may or may not be aware, CsoundVST contains a CsoundScore class which
> facilities for reading, modifying or creating, and writing orc, sco, and csd
> files. There is obviously some overlap in functionality with CScore.
> CsoundScore works in the following way: the API user programmatically sets
> orchestra text, then programmatically adds score lines to the score, then
> calls CsoundFile::exportForPerformance which writes out an orc and sco file.
> You then call csoundPerform to render the exported files.
I think I was dimly aware of this but I have never looked at the code. I
expected that there will be some overlap with this and with other libraries
written in scripting languages such as Python. Some of these facilities
were written before the API existed (like OMDE/pmask). I wonder if it makes
sense to revise these compositional tools to use the Cscore API since Cscore
is very "low-level" score manipulation but has the advantage of using
Csound's own score-reading code.
> What happens if you call CScore functions while a performance is running?
> CsoundFile does nothing in this case.
Calling Cscore functions from a host during performance will produce
undefined behavior. Cscore reads directly from the open score file
referenced by Csound's global variable scfp.
Calling Cscore functions during the usual Compile/Perform cycle is possible
if you set a cscore() callback (with csoundSetCscoreCallback()) and specify
the "-C" flag in the arguments to Csound. The Cscore API may then be used
in the callback. Event lists can be immediately performed by calling
cscoreListPlay().
However, there are serious limitations presently to this approach due to the
historical way in which this worked. The cscore() callback is called from
musmon() which is called during csoundCompile(). If you perform the score
at this time using cscoreListPlay() then all performance happens immediately
with no external control. If the host afterwards calls csoundPerform*(), it
returns immediately saying "score finished."
If you do not call cscoreListPlay() from the callback, put use
cscoreListPut() instead, then I think the modified score gets written back
out to a file, then gets read back in by coundPerform*() and rendered.
Either way, it is not really possible to manipulate a score this way in
real-time. And using Cscore with real-time events is not possible as far as
I know.
The whole situation with cscoreListPlay() really needs to be rethought and
redesigned. I just haven't taken the time yet to figure out how this can be
done.
Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://akozar.spymac.net/
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |