Csound Csound-dev Csound-tekno Search About

Re: python api call

Date2005-10-14 14:57
FromMichael Gogins
SubjectRe: python api call
What do you mean "boa constructor not working?"

Regards,
Mike

-----Original Message-----
From: Iain Duncan 
Sent: Oct 14, 2005 2:59 AM
To: csound@lists.bath.ac.uk
Subject: Re: [Csnd] python api call

Did you see the examples of the python front end that Michael and I 
made? They should be in the example directory somewhere. Might help, I 
haven't looked at the python ones in ages though. When I finish the C 
examples I'm currently working on I'd like to port them again though. I 
got kinda frustrated with boa constructor not working and decided fltk 
was pretty cool.

Iain

James Hearon wrote:
>  Hi,
> Trying to use some api calls in python and can't get it quite right.  
> Anyone happen to know what the correct use is?  I think I'm supposed 
> create an instance of csound, then have that, a string, and a value as 
> params for SetInputValueCallback in order to use invalue opcode in 
> .orc.  But I get AttributeError, name which I'm not understanding.
> 
> 
> ...from python
> 
>          csound.create(NULL)
> 
> 
>        def OnSlider1Move(self, event):
>            print "You moved the slider to %d" % event.GetInt()
>            self.volume = event.GetInt()
>        csound.SetInputValueCallback(csound,"OnSlider1Move",self.volume);
> 
> 
> python error message:
>    csound.SetInputValueCallback(csound,"OnSlider1Move", self.volume);
>  File "C:\Temp\CsoundPythonProj\CsoundVST.py", line 1451, in 
>    __getattr__ = lambda self, name: _swig_getattr(self, CppSound, name)
>  File "C:\Temp\CsoundPythonProj\CsoundVST.py", line 27, in _swig_getattr
>    raise AttributeError,name
> AttributeError: SetInputValueCallback
> 
> 
> Thanks.
> 
> 
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk


Date2005-10-14 19:28
FromIain Duncan
SubjectRe: python api call
> What do you mean "boa constructor not working?"

Last time I was using it the linux build was very buggy. These may have 
been fixed though.

I'm quite enamoured of fluid though, so if Boa is happy on linux I'll 
certainly give it another crack.

Iain