Csound Csound-dev Csound-tekno Search About

[Cs-dev] [ csound-Bugs-1200682 ] Calling Csound VST method scoreEvent() from Python

Date2010-04-26 01:50
From"SourceForge.net"
Subject[Cs-dev] [ csound-Bugs-1200682 ] Calling Csound VST method scoreEvent() from Python
Bugs item #1200682, was opened at 2005-05-12 09:17
Message generated for change (Comment added) made by gogins
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=1200682&group_id=81968

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: csound5
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Michael Gogins (gogins)
Summary: Calling Csound VST method scoreEvent() from Python

Initial Comment:
As requested by Michal Gogins:

"I suspect this method works in C++ but not in Python
since SWIG generates a binding to a special pointer
wrapper, and not to a list. I also think this could
easily be fixed. Could you please enter this as a bug
at SourceForge?"

This was his answer to my question about how to call
scoreEvent() from python.

	csound.scoreEvent("i", [3, 0, 1, -2.2])

gives me the following error:

  File "CsoundVST.py", line 612, in scoreEvent
    def scoreEvent(*args): return
_CsoundVST.CppSound_scoreEvent(*args)
TypeError: Expected a pointer

----------------------------------------------------------------------

>Comment By: Michael Gogins (gogins)
Date: 2010-04-25 19:50

Message:
This should work:

pfields = csnd.doubleArray(n)
pfields[0] = x
pfields[1] = y
pfields[n-1] = z
csound.ScoreEvent('i', pfields, n)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=564599&aid=1200682&group_id=81968

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net