Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] python swig wrapper

Date2006-12-25 20:07
FromVictor Lazzarini
SubjectRe: [Cs-dev] python swig wrapper
you will find some in /examples

I prefer to use the Csound class and possibly
its derivatives. Here's a quick example (with
threads):

import csnd
cs = csnd.Csound()
cs.Compile("examples/trapped.csd", "-odac")
perf = csnd.CsoundPerformanceThread(cs)
perf.Play()
# perf.Pause() to pause
# perf.Stop() to stop/reset
# perf.Join() + cs.Reset() to end

Victor
>
>
> Oh, shame on me, I've just found out class CsoundArgVList
> in cs_glue.hpp. But still, is there any basic example of
> python binding usage? In general, should I use CppSound
> api or plain csound.h? A simple example showing expected
> practices would be very valuable to get started.
> Thank you in advance.
> Cheers,
> Carlos
>
>
> > Hi all,
> > I've been toying a bit with csound 5 python interface.
> > The binding feels quite low level, with all those char**
> > and int* directly exposed to python. Perhaps I'm facing
> > it the wrong way but as I haven't found any example I
> just assumed that the binding is meant to be used just
> > like the C host api. Anyway as neither cpointer.i nor
> > carrays.i are included in the swig interface definition
> > I see no way to create those char** that signatures like
> > that of csoundInitialize expect. I'm pretty comfortable
> with swig, I've written a number of advanced bindings, so
> > I think I could help improving the python binding if
> > this is desired. What do you say?
> > Cheers,
> > Carlos
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Pregunt. Respond. Descubr.
> > Todo lo que queras saber, y lo que ni imaginabas,
> > est en Yahoo! Respuestas (Beta).
> > Probalo ya!
> > http://www.yahoo.com.ar/respuestas
> >
> >
> >
> >
> ----------------------------------------------------------
> > --------------- Take Surveys. Earn Cash. Influence the
> > Future of IT Join SourceForge.net's Techsay panel and
> > you'll get the chance to share your opinions on IT &
> > business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
>
>
>
> ----------------------------------------------------------
> --------------- Take Surveys. Earn Cash. Influence the
> Future of IT Join SourceForge.net's Techsay panel and
> you'll get the chance to share your opinions on IT &
> business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net