[Csnd] multi-dimensional arrays
Date | 2020-04-19 14:17 |
From | sjakops |
Subject | [Csnd] multi-dimensional arrays |
Hello! I am using three-dimensional arrays and experiencing some strange results - could this be a bug? |
Date | 2020-04-19 14:43 |
From | John ff |
Subject | Re: [Csnd] multi-dimensional arrays |
Version number/platform? This area of code was revised recently Sent from TypeApp On Apr 19, 2020, 14:18, at 14:18, sjakops |
Date | 2020-04-19 15:26 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
I'm using Win10 with 64-bit Csound 6.10.0 (I think I had some issue with the latest version, so using this older version). Søren On 4/19/20, John ff |
Date | 2020-04-19 15:59 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
That code was corrected on Sun Jan 27 21:45:06 2019 which means it was distributed in 6.13 I ran your example and it looks good to me. What problems were you having with current versions? On Sun, 19 Apr 2020, sjakops wrote: > Hello! I am using three-dimensional arrays and experiencing some strange > results - could this be a bug? > > |
Date | 2020-04-19 17:40 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
I see, good! My problem with the latest Csound in relation to the Csound API - I get a popup saying that 'inflateValidate' wasn't found in image.dll.. I also get this message when I open CsoundQT. On 4/19/20, john |
Date | 2020-04-19 18:00 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
The problem with image.dll hs been reported elsewhere. One response was I ran into the same issue and resolved it by deleting the copy of "zlib64.dll" that was located in "C:\Program Files\Intel\WiFi\bin". The is in issue #1288 https://github.com/csound/csound/issues/1288 On Sun, 19 Apr 2020, Søren Jakobsen wrote: > I see, good! My problem with the latest Csound in relation to the > Csound API - I get a popup saying that 'inflateValidate' wasn't found > in image.dll.. I also get this message when I open CsoundQT. > > On 4/19/20, john |
Date | 2020-04-19 18:23 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
I think there might still be an issue with arrays - my previous example works with Csound 6.14, but the following doesn't (the second i-statement seems to overwrite the previously set values): |
Date | 2020-04-19 20:19 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
I get the output for thecurrent code new alloc for instr 1: instr 1: #i4 = 1.000 #i5 = 2.000 #i6 = 3.000 #i7 = 4.000 instr 1: #i8 = 0.000 #i9 = 0.000 #i10 = 0.000 #i11 = 0.000 instr 1: #i4 = 1.000 #i5 = 2.000 #i6 = 3.000 #i7 = 4.000 instr 1: #i8 = 5.000 #i9 = 6.000 #i10 = 7.000 #i11 = 8.000 Score finished in csoundPerform(). which looks cirrect to me.I would ecxpect te seouf score i to overwrite the array as it is in the same k-cycle. Sorry to be obtuse but can you say what you expect? On Sun, 19 Apr 2020, Søren Jakobsen wrote: > I think there might still be an issue with arrays - my previous > example works with Csound 6.14, but the following doesn't (the second > i-statement seems to overwrite the previously set values): > > |
Date | 2020-04-19 20:35 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
Did you run the code I last posted? When I run it I get: new alloc for instr 1: i 1 time 0.00000: 0.00000 i 1 time 0.00000: 0.00000 i 1 time 0.00000: 0.00000 i 1 time 0.00000: 0.00000 i 1 time 1.00000: 0.00000 i 1 time 1.00000: 0.00000 i 1 time 1.00000: 0.00000 i 1 time 1.00000: 0.00000 If I remove the line "i 1 0 -1 1 5 6 7 8" and run the code again I get: new alloc for instr 1: i 1 time 0.00000: 1.00000 i 1 time 0.00000: 2.00000 i 1 time 0.00000: 3.00000 i 1 time 0.00000: 4.00000 i 1 time 1.00000: 1.00000 i 1 time 1.00000: 2.00000 i 1 time 1.00000: 3.00000 i 1 time 1.00000: 4.00000 In would expect that the output in both cases should be as in the last case? On 4/19/20, john |
Date | 2020-04-19 21:00 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
As I said I was being obtuse. I get the same output as you but at present I cannot understand an way it could do that. Apart from anything else I would expect eight numbers to be printed at each second rather than 4. Time for the heavyweight debugger. On Sun, 19 Apr 2020, Søren Jakobsen wrote: > Did you run the code I last posted? When I run it I get: > > new alloc for instr 1: > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > > > If I remove the line "i 1 0 -1 1 5 6 7 8" and run the code again I get: > > new alloc for instr 1: > i 1 time 0.00000: 1.00000 > i 1 time 0.00000: 2.00000 > i 1 time 0.00000: 3.00000 > i 1 time 0.00000: 4.00000 > i 1 time 1.00000: 1.00000 > i 1 time 1.00000: 2.00000 > i 1 time 1.00000: 3.00000 > i 1 time 1.00000: 4.00000 > > > In would expect that the output in both cases should be as in the last case? > 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 | 2020-04-19 21:19 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
It is not arrays per se. If I define instr2 as rte same as instr1 and adjust the score i get i 1 time 0.00000: 1.00000 i 1 time 0.00000: 2.00000 i 1 time 0.00000: 3.00000 i 1 time 0.00000: 4.00000 i 2 time 0.00000: 1.00000 i 2 time 0.00000: 2.00000 i 2 time 0.00000: 3.00000 i 2 time 0.00000: 4.00000 i 1 time 1.00000: 1.00000 i 1 time 1.00000: 2.00000 i 1 time 1.00000: 3.00000 i 1 time 1.00000: 4.00000 i 2 time 1.00000: 1.00000 i 2 time 1.00000: 2.00000 i 2 time 1.00000: 3.00000 i 2 time 1.00000: 4.00000 which is expected. It looks as if having two instances at the same time is allowing them to interfere with each other -- but that is madness. I am running low on time today but will hack away for a short time Calling instr1 and 1.1 works oK as expeted too On Sun, 19 Apr 2020, Søren Jakobsen wrote: > Did you run the code I last posted? When I run it I get: > > new alloc for instr 1: > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 0.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > i 1 time 1.00000: 0.00000 > > > If I remove the line "i 1 0 -1 1 5 6 7 8" and run the code again I get: > > new alloc for instr 1: > i 1 time 0.00000: 1.00000 > i 1 time 0.00000: 2.00000 > i 1 time 0.00000: 3.00000 > i 1 time 0.00000: 4.00000 > i 1 time 1.00000: 1.00000 > i 1 time 1.00000: 2.00000 > i 1 time 1.00000: 3.00000 > i 1 time 1.00000: 4.00000 > > > In would expect that the output in both cases should be as in the last case? > > On 4/19/20, john |
Date | 2020-04-19 21:22 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
If you change te -1 to 2 it works also With the -1 it does not create wo instances in instr1. Hummmmm 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 | 2020-04-19 21:28 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
OK found it. This is as the manual says "A held note may be succeeded either by another held note or by a note of finite duration. A held note will continue to perform across section endings (see s statement). It is halted only by turnoff or by an i statement with negative matching p1 or by an e statement. " So your second i stops the first from runnig as they are both hel noes. So this is user error (and developer ignornce) make te secnf i inti i 1,1... and you have two held notes 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 | 2020-04-20 08:29 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
Ok! So if the first note stops the array is somehow reset? That seems kind of unintuitive to me, considering that this is a global array (and since the second note doesn't change any of the previously set values). On 4/19/20, john |
Date | 2020-04-20 11:35 |
From | John ff |
Subject | Re: [Csnd] multi-dimensional arrays |
No. The first I statement is removed when the second starts so it writes to the second part of the array. Actually nothing to do with arrays. You can only have one held note at any time for a given instrument number. So either change one of the i1 to i1.1 or do not use did notes. Sent from TypeApp On Apr 20, 2020, 08:30, at 08:30, "Søren Jakobsen" |
Date | 2020-04-20 12:35 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
But even if the note/instrument is removed I was thinking the *global* array (and it's data, however it has been set by any instrument) should remain?? On 4/20/20, John ff |
Date | 2020-04-20 12:54 |
From | John ff |
Subject | Re: [Csnd] multi-dimensional arrays |
It is but the first i1 never gets to run it is removed by the second i1 BEFORE it has got to a perf stage
On 20 Apr 2020, at 12:36, "Søren Jakobsen" <sorenkj@gmail.com> wrote: But even if the note/instrument is removed I was thinking the *global* |
Date | 2020-04-20 15:50 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
Ok, sorry, I understand. But then why does the first note actually seem to have an effect (is not removed) when the global array is instead i-rate..? I think such behaviour is more intuitive - I am expecting that I can use the i-statement like a 'typical' function call (and I don't think the excerpt from the documentation implies that the first note will not have any effect at all). |
Date | 2020-04-20 16:00 |
From | john |
Subject | Re: [Csnd] multi-dimensional arrays |
The insertion of the first i runs the initialisation pass so i-rate stuff gets done. At least that is my belief but not got time to check it all. Personally I do not use held notes so I had to check it all in the manual/code On Mon, 20 Apr 2020, Søren Jakobsen wrote: > Ok, sorry, I understand. But then why does the first note actually > seem to have an effect (is not removed) when the global array is > instead i-rate..? > I think such behaviour is more intuitive - I am expecting that I can > use the i-statement like a 'typical' function call (and I don't think > the excerpt from the documentation implies that the first note will > not have any effect at all). > > > |
Date | 2020-04-20 16:19 |
From | Søren Jakobsen |
Subject | Re: [Csnd] multi-dimensional arrays |
Ok, yes actually there is no need for the notes to be held... anyway, thanks for the help:) Best regards, Søren On 4/20/20, john |