tarmo
(Tarmo Johannes)
1
Hi!
Can I and how can I declare an array of struct objects in Csound 7?
Tarmo
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
vlz
(vlz)
2
tarmo
(Tarmo Johannes)
3
This is very, very nice, thanks!
Now, if I want to fill the array, there is probably not other way than somethilng like:
var[0].imaginary = 1
var[0].real=2
var[1].imaginary = 3
var[1].real=4
etc? Of course, I could have an one-dimensional array like
iValues fillarray 1,2, 3, 4
and to write a couple lines of code ot fill the array.
It probably still makes sense as it makes the overall code more readable.
Best!
tarmo
Kontakt vlz (<viclazzarini@gmail.com>) kirjutas kuupäeval L, 8. märts 2025 kell 12:59:
Absolutely
https://github.com/csound/csound/blob/develop/tests/commandline/structs/test_struct_arrays.csd
Prof. Victor Lazzarini
Maynooth University
Ireland
Hi!
Can I and how can I declare an array of struct objects in Csound 7?
Tarmo
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
vlz
(vlz)
4
Fillarray will likely give you a syntax error if you try to use it with anything but the types it’s designed for (like i-, k-)
Prof. Victor Lazzarini
Maynooth University
Ireland