Csound Csound-dev Csound-tekno Search About

[Cs-dev] scsort and scxtract

Date2005-10-27 16:46
FromAnthony Kozar
Subject[Cs-dev] scsort and scxtract
from prototyp.h:

PUBLIC  void    scsort(CSOUND *, FILE *, FILE *);
PUBLIC  int     scxtract(CSOUND *, FILE *, FILE *, FILE *);


Should these two declarations be given "API-like" names and put into
csound.h instead??  I think they would be nice additions to the API and are
apparently already being exported.

Perhaps

PUBLIC  void    csoundScoreSort(CSOUND *, FILE *, FILE *);
PUBLIC  int     csoundScoreExtract(CSOUND *, FILE *, FILE *, FILE *);

I think it would be nice also to have a score extraction call in the API
where the parameters to the extraction could be passed to the function
instead of being read from a file.


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

Date2005-10-27 18:18
FromIstvan Varga
SubjectRe: [Cs-dev] scsort and scxtract
Anthony Kozar wrote:

> PUBLIC  void    scsort(CSOUND *, FILE *, FILE *);
> PUBLIC  int     scxtract(CSOUND *, FILE *, FILE *, FILE *);

Those functions are only PUBLIC to fix build errors in the utilities
that use them. I am not sure if they are ready for being added to the
main API, it is likely that more changes would be needed than just
renaming the functions.


-------------------------------------------------------
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

Date2005-10-27 19:42
FromAnthony Kozar
SubjectRe: [Cs-dev] scsort and scxtract
I assume that you mean util/[sx]main.c here.  OK, I will hold off on changes
for now, but I would like to do some testing and see if these functions can
be made reliable for the Cs5 release.

I note that you have already modified the main stubs above to create Csound
instances, etc., which I anticipated.  Are you aware of anything else
specifically that needs to be done?  The [sx]main.c files seem like good
models to me for how to use scsort() and scxtract() from a host app.  And
these stubs are similar to what I did to cscormai.c and I think that it
mostly works.

Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://akozar.spymac.net/


Istvan Varga wrote on 10/27/05 1:18 PM:

> Anthony Kozar wrote:
> 
>> PUBLIC  void    scsort(CSOUND *, FILE *, FILE *);
>> PUBLIC  int     scxtract(CSOUND *, FILE *, FILE *, FILE *);
> 
> Those functions are only PUBLIC to fix build errors in the utilities
> that use them. I am not sure if they are ready for being added to the
> main API, it is likely that more changes would be needed than just
> renaming the functions.



-------------------------------------------------------
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

Date2005-10-27 20:57
FromIstvan Varga
SubjectRe: [Cs-dev] scsort and scxtract
Anthony Kozar wrote:
> I assume that you mean util/[sx]main.c here.  OK, I will hold off on changes
> for now, but I would like to do some testing and see if these functions can
> be made reliable for the Cs5 release.
> 
> I note that you have already modified the main stubs above to create Csound
> instances, etc., which I anticipated.  Are you aware of anything else
> specifically that needs to be done?

It depends on how the functions are intended to be used. One possiblity
is using an existing CSOUND* instance and calling them from the host
application between csoundPreCompile() and csoundReset(); in this case,
the existing functions may be suitable with a few minor changes (such
as saving, setting up, and restoring exitjmp in CSOUND, and returning an
integer error code).
Alternatively, I could write functions that wrap scsort/scxtract by
creating a Csound instance, calling csoundPreCompile(), setting exitjmp,
running scsort or scxtract, and finally destroying the temporary instance;
in this case, the new API functions would not take a CSOUND* pointer, only
the files.
Of course, there may be other options as well. What do you suggest ?


-------------------------------------------------------
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