Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Interfaces

Date2005-10-27 14:17
FromMichael Gogins
SubjectRe: [Cs-dev] Interfaces
I will commit the SWIG-generated files. You may have to modify your SConstruct to omit the .i source and include the .cc generated file directly.

I am on SWIG 1.3.27.

Regards,
Mike

-----Original Message-----
From: Anthony Kozar 
Sent: Oct 27, 2005 1:46 AM
To: New Csound Developer list 
Subject: Re: [Cs-dev] Interfaces

Mike, 

This is great!  I would like to try the Python interfaces here on my MacOS 9
machine.

I just successfully compiled and loaded an example Python module that comes
with SWIG.  But I am either not using SWIG correctly with Csound or there
are problems with the OS 9 version of SWIG.  (I have MacSwig 1.3.19.
Perhaps this is too old.  It also seems difficult to correctly set all of
the include directories and defines needed with the MacSwig GUI ...)

Anyways, would it be possible for you to either commit the SWIG-generated
files or to email them directly to me so that I may try them here?

Thanks.

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


Michael Gogins wrote on 10/24/05 10:30 PM:

> Tonight the csnd interfaces library and CsoundVST built for me on Linux and
> Windows.



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

Date2005-10-27 15:13
FromAnthony Kozar
SubjectRe: [Cs-dev] Interfaces
Michael Gogins wrote on 10/27/05 9:17 AM:

> I will commit the SWIG-generated files. You may have to modify your SConstruct
> to omit the .i source and include the .cc generated file directly.

Thanks.  I appreciate that :)

> I am on SWIG 1.3.27.

I've looked around some more and 1.3.19 is the last version of MacSwig that
I can find.  Beyond that though, it seems likely to me after more testing
that -I options to set include dirs just are not working correctly in
MacSwig (with Unix or Mac path syntax).  I tried a simple test involving
moving one file into a subdirectory from one of the SWIG examples that
worked fine as long as all of the files were side-by-side.  No matter how I
seem to specify the path, it cannot find it.

*shrug*

I should be be able to get by fine if the SWIG output is maintained in CVS.

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:34
FromAnthony Kozar
SubjectRe: [Cs-dev] Interfaces
Anthony Kozar wrote on 10/27/05 10:13 AM:

> I've looked around some more and 1.3.19 is the last version of MacSwig that I
> can find.  Beyond that though, it seems likely to me after more testing that
> -I options to set include dirs just are not working correctly in MacSwig (with
> Unix or Mac path syntax).  I tried a simple test involving moving one file
> into a subdirectory from one of the SWIG examples that worked fine as long as
> all of the files were side-by-side.  No matter how I seem to specify the path,
> it cannot find it.

Correction:  Relative paths do not work because they are always relative to
the MacSwig application, not the interface file.  But if I specify full
pathnames (which I think cannot contain spaces either so I had to rename
some directories) then Swig can find the included files.

So, after some experimentation I got SWIG to process the python_interface.i
file for Csound and built the Python library named _csnd and the import
module csnd.py.  "import csnd" works and I was able to render a minute of
"Trapped" using Istvan's suggested test code!

Way cool!! :)

Big thanks to Mike for this fabulous addition to Csound!

(And to the Python and Swig crews for their amazing cross-platform tools :)

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 19:57
FromAnthony Kozar
SubjectRe: [Cs-dev] Interfaces
BTW,  I had to change the last line of python_interface.i from

%include 

%include 

in order to process it with SWIG.  MacSwig will not interpret Unix-style
relative paths.  (Includes like this in C source files are OK though).

Will this cause any problems for other platforms if I check it in?

Also, is there a reason that all of the includes in this file use <> instead
of ""?  Seems to me that they should be the later.

Anthony

Anthony Kozar wrote on 10/27/05 1:34 PM:

> So, after some experimentation I got SWIG to process the python_interface.i
> file for Csound and built the Python library named _csnd and the import module
> csnd.py.  "import csnd" works and I was able to render a minute of "Trapped"
> using Istvan's suggested test code!



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