[Csnd] arrays wish list
Date | 2013-05-24 01:14 |
From | peiman khosravi |
Subject | [Csnd] arrays wish list |
I've had a bit of time looking at arrays today and would really like to see two things (I think joachim might have mentioned these already):
1- arrays as arguments to UDOs
2- dynamic arrays that don't need to be initialised with a fixed size 3- Passing arrays as arguments to pycall.
Best, Peiman |
Date | 2013-05-24 14:36 |
From | Ben Hackbarth |
Subject | Re: [Csnd] arrays wish list |
On Fri, May 24, 2013 at 2:14 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
+1. I think that it would be great to have pycall support passing (and returning) arrays. If anyone were to look into augmenting the pycall* opcodes, I think that the ability accept/return strings would be splendid as well. -- ben |
Date | 2013-05-24 14:51 |
From | Mark Brophy |
Subject | Re: [Csnd] arrays wish list |
Wouldn't dynamic arrays require a major architectural change? Passing an array in pycall would be good as long as it's a numpy array. Python ordinarily doesn't support arrays and would be worthless for scientific software without numpy. On Thu, May 23, 2013 at 7:14 PM, peiman khosravi <peimankhosravi@gmail.com> wrote:
|
Date | 2013-05-24 16:15 |
From | Ben Hackbarth |
Subject | Re: [Csnd] arrays wish list |
well, csound arrays could be passed/returned to/from python as tuples (which are native). i agree that numpy is super useful. however, a disadvantage of requiring numpy is that not everyone has it. and it would make the process of compiling/distributing the py opcode plugin more complicated since one would have to worry both about which python version to use as well as which numpy version. if a developer were interested in sprucing up the py opocdes a bit, perhaps options could be added to the pyinit opcode so that the user could parameterize how python is to behave. for instance:iUseNumpy = use numpy for csound arrays. iDieOnError = make csound die if python throws an error (not currently the case) iRecastIntsAsFloats = automatically convert returned ints to floats (instead of throwing a csound error, as is currently the case) -- ben
On Fri, May 24, 2013 at 3:51 PM, Mark Brophy <mark@brophyworld.com> wrote:
|