[Csnd] find item in array

Hi

I was sure there was an opcode to find an item in an array, but searching through the manual, I can’t seem to find it. Is there one?
What I mean is something like strindex, but for arrays.
In Python, it would be the index() function of a list, which would return the first index where the item can be found

best
Øyvind

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

https://csound-plugins.github.io/csound-plugins/opcodes/findarray.html

It will return the index of the first element found. It is part of the ‘else’ plugin (risset install else)

Excellent. Thank you!
Øyvind

ons. 12. juni 2024 kl. 13:25 skrev Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

https://csound-plugins.github.io/csound-plugins/opcodes/findarray.html

It will return the index of the first element found. It is part of the ‘else’ plugin (risset install else)

Hi

I was sure there was an opcode to find an item in an array, but searching through the manual, I can’t seem to find it. Is there one?
What I mean is something like strindex, but for arrays.
In Python, it would be the index() function of a list, which would return the first index where the item can be found

best
Øyvind

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

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

btw, this inspired me to test risset too, but I get an error with the zip file

C:\Projects\efx_experiments\rhythm_ratio_analyzer\player>risset install else
0.0** Error: Error while getting plugin dll (plugin: else): Error while extracting else.dll from zip C:\Users\Oeyvind\AppData\Local\Temp\csound-plugins–win64.zip: File is not a zip file

This is on Windows.
The zip file is present in the given path, but it is of size 0 KB

I can install the plugins from the compiled binaries at https://github.com/csound-plugins/csound-plugins/releases so I’m all good.
Just wanted to report that there might be an issue with risset.

Øyvind

ons. 12. juni 2024 kl. 14:33 skrev Oeyvind Brandtsegg <obrandts@gmail.com>:

Excellent. Thank you!
Øyvind

ons. 12. juni 2024 kl. 13:25 skrev Eduardo Moguillansky <eduardo.moguillansky@gmail.com>:

https://csound-plugins.github.io/csound-plugins/opcodes/findarray.html

It will return the index of the first element found. It is part of the ‘else’ plugin (risset install else)

Hi

I was sure there was an opcode to find an item in an array, but searching through the manual, I can’t seem to find it. Is there one?
What I mean is something like strindex, but for arrays.
In Python, it would be the index() function of a list, which would return the first index where the item can be found

best
Øyvind

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

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