Csound API (Python) - SetInputChannelCallback()
| Date | 2016-04-20 07:25 |
| From | Søren Jakobsen |
| Subject | Csound API (Python) - SetInputChannelCallback() |
Dear all (very sorry if I am reposting, my messages don't seem to get through)
I really need some help to get started with SetInputChannelCallback()
on Csound API, using Python - I couldn't find any examples so I'm
trying the following little test, which doesn't work.
import csnd6
def foo(a, b, c, d):
c[0] = 440.0
print "hello"
c = csnd6.Csound()
c.SetOption("-odac")
c.CompileOrc("""
sr=44100
ksmps=32
nchnls=2
0dbfs=1
instr 1
kfreq invalue "freq"
kenv linsegr 0, .05, 1, .05, 0
aout vco2 kenv, kfreq
outs aout, aout
endin
""")
c.SetInputChannelCallback(foo)
c.ReadScore("i1 0 0.2 \n i1 0.5 0.2")
c.Start()
while (c.PerformKsmps() == 0):
pass
c.Stop()
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2016-04-20 08:53 |
| From | Anders Genell |
| Subject | Re: Csound API (Python) - SetInputChannelCallback() |
Just wanted to confirm all your messages got through. I am sorry to say I am not skilled enough to answer you question, but I'm sure someone will do so soon. Regards, Anders > 20 apr. 2016 kl. 08:25 skrev Søren Jakobsen |
| Date | 2016-04-20 09:21 |
| From | Victor Lazzarini |
| Subject | Re: Csound API (Python) - SetInputChannelCallback() |
I didn’t get the original message. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 20 Apr 2016, at 08:53, Anders Genell |
| Date | 2016-04-20 09:28 |
| From | Anders Genell |
| Subject | Re: Csound API (Python) - SetInputChannelCallback() |
Ah, yes, I probably didn't either, but I at least got three of them. Regards, Anders On Wed, Apr 20, 2016 at 10:21 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: I didn’t get the original message. |
| Date | 2016-04-20 10:03 |
| From | Tarmo Johannes |
| Subject | Re: Csound API (Python) - SetInputChannelCallback() |
Hi Sören, Hardly it helps but you can a have alook how it is done in C by CsoundQt: https://github.com/CsoundQt/CsoundQt/blob/develop/src/csoundengine.cpp lines 164 etc and 1005 etc Probably Python guys can help you further... Also it could help if you can provide more info than "doesn't work" - what is your outuput, what do you expect etc. greetings, tarmo 2016-04-20 11:28 GMT+03:00 Anders Genell <anders.genell@gmail.com>:
|