[Csnd] Large numbers of input arguments to opcodes
| Date | 2019-01-06 21:35 |
| From | John |
| Subject | [Csnd] Large numbers of input arguments to opcodes |
Currently released csound version have a defacto limit to the number
of arguments of about 2000, but it is not policed, leading to
crashes. So the version in github does check this limit. That opens
a question of how to initialise an array with more that 2000 entries
and possibly other reasonable uses.
We are experimenting with two possible solutions.
ia[] fillarray "file name"
which reads data from an external file as text
or
ia[] fillarray {{ 1 2 3 4 5}}
for arbitrary long strings.
Anyone have arguments for either of these?
==John ffitch
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 | 2019-01-06 22:54 |
| From | Eduardo Moguillansky |
| Subject | Re: [Csnd] Large numbers of input arguments to opcodes |
I prefer the second version, as it allows to keep all data within a .csd file. The first version is already possible with a table reading a file and then copying to an array. On So, Jan 6, 2019 at 10:35 PM, John |
| Date | 2019-01-06 23:22 |
| From | Mauro Giubileo |
| Subject | Re: [Csnd] Large numbers of input arguments to opcodes |
|
I think a separated txt file is useful because it make your csd easy to read and mantain (you don't have to scroll a long list of numbers before getting to the instruments code). But sometimes you just want to have all in a single file, so I think both are valid solutions and I would be glad to have both of them. :-) --- Il 2019-01-06 22:35 John ha scritto:
|
| Date | 2019-01-06 23:43 |
| From | Steven Yi |
| Subject | Re: [Csnd] Large numbers of input arguments to opcodes |
I'm not a fan of #2 as it looks like array literals but uses a string. (Array literals are already implemented in the CS7 code.) Is the question about number of arguments or filling an array? (The title and subject are a bit at odds.) #1 has options already. Eduardo mentioned the read->ftable->array approach. hdf5 opcodes are another possibility. On Sun, Jan 6, 2019 at 4:35 PM John |
| Date | 2019-01-07 08:53 |
| From | Richard Dobson |
| Subject | Re: [Csnd] Large numbers of input arguments to opcodes |
I would certainly have a use for the first one, for the pruposes of data
sonification. When I was involved in the LHCsound project, we were sent
particle collision data files up to 10,000 lines, each with up to five
columns of numbers - and I was once asked if I could work with 20
columns. So, (relatively) huge data sets; and more to the point,
multiple data sets in the same format. I had to write little perl
scripts to convert them directly to Csound score lines.
An optional flag to ignore/skip non-numeric fields would also be useful,
and so on...
Richard Dobson
On 06/01/2019 21:35, John wrote:
> Currently released csound version have a defacto limit to the number
> of arguments of about 2000, but it is not policed, leading to
> crashes. So the version in github does check this limit. That opens
> a question of how to initialise an array with more that 2000 entries
> and possibly other reasonable uses.
>
> We are experimenting with two possible solutions.
>
> ia[] fillarray "file name"
> which reads data from an external file as text
>
> or
>
> ia[] fillarray {{ 1 2 3 4 5}}
> for arbitrary long strings.
>
> Anyone have arguments for either of these?
> ==John ffitch
>
> 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
>
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 | 2019-01-07 19:51 |
| From | joachim heintz |
| Subject | Re: [Csnd] Large numbers of input arguments to opcodes |
if this is a temporal solution, and the restriction will not be there anymore in csound 7, i'd volte also for #1. if there is no perspective that the limitation can be resolved in csound 7, i'd vote for both possibilities. joachim On 07/01/19 00:43, Steven Yi wrote: > I'm not a fan of #2 as it looks like array literals but uses a string. > (Array literals are already implemented in the CS7 code.) > > Is the question about number of arguments or filling an array? (The > title and subject are a bit at odds.) > > #1 has options already. Eduardo mentioned the read->ftable->array > approach. hdf5 opcodes are another possibility. > > > > > > On Sun, Jan 6, 2019 at 4:35 PM John |