schedkwhen/schedwhen not working as expected?
Date | 2016-11-05 18:21 |
From | Richard |
Subject | schedkwhen/schedwhen not working as expected? |
I am trying to 'buffer' some score events in a k rate loop and schedkwhen or schedwhen. But what I get is not what I expected. In the following csd the schedkwhen code triggers instrument 10 immediately, not 1 second apart as I would expect. If I comment out the schedkwhen and use the schedwhen, instrument 10 is only called once... Richard |
Date | 2016-11-05 19:43 |
From | John ff |
Subject | Re: schedkwhen/schedwhen not working as expected? |
Ido not see the point of the loop. kindex run 0 to 9 on each k-cycle which feels odd. But perhaps I misunderstand what you want.
Sent from TypeApp
On 5 Nov 2016, at 18:22, Richard <zappfinger@GMAIL.COM> wrote: I am trying to 'buffer' some score events in a k rate loop and |
Date | 2016-11-05 19:57 |
From | Richard |
Subject | Re: schedkwhen/schedwhen not working as expected? |
The idea is that I have some events that need to be triggered. I
get them from a file or database.
... So the sched(k)when arguments will vary greatly. This was just a
test if sched(k)when could be just for that. Richard On 05/11/16 20:43, John ff wrote:
|
Date | 2016-11-05 20:58 |
From | jpff |
Subject | Re: schedkwhen/schedwhen not working as expected? |
Still trying to understand First schedwhen is at i time so can only generate 1 instance; in effect it is not in the loop So in the example given kIndex as values 0, 1, 2, ...8, 9 so trigger is set 9 times. So the only ting left that confuses me is you set the number of i10 to 1 which seems not to be the case ?On the other and it works for me SECTION 1: kCycle = 1 instr 10: p2 = 1.000 p3 = 1.000 instr 10: p2 = 2.000 p3 = 1.000 instr 10: p2 = 3.000 p3 = 1.000 instr 10: p2 = 4.000 p3 = 1.000 instr 10: p2 = 5.000 p3 = 1.000 instr 10: p2 = 6.000 p3 = 1.000 instr 10: p2 = 7.000 p3 = 1.000 instr 10: p2 = 8.000 p3 = 1.000 instr 10: p2 = 9.000 p3 = 1.000 On Sat, 5 Nov 2016, Richard wrote: > I am trying to 'buffer' some score events in a k rate loop and schedkwhen or > schedwhen. But what I get is not what I expected. > In the following csd the schedkwhen code triggers instrument 10 immediately, > not 1 second apart as I would expect. > If I comment out the schedkwhen and use the schedwhen, instrument 10 is only > called once... > > Richard > > |
Date | 2016-11-05 21:01 |
From | jpff |
Subject | Re: schedkwhen/schedwhen not working as expected? |
Of course there is only zero instances of i10 running so the limit is not breached 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 | 2016-11-05 22:12 |
From | Richard |
Subject | Re: schedkwhen/schedwhen not working as expected? |
"So the only ting left that confuses me is you set the number of i10 to 1 which seems not to be the case" I use: ;schedkwhen ktrigger, kmintim, kmaxnum, kinsnum, kwhen, kdur schedkwhen kIndex, 0, 1, 10, kIndex, 1 So kinsnum = 10, kwhen (p2)= 0, 1, 2, etc, kdur (p3)= 1 I also get this output: instr 10: p2 = 1.000 p3 = 1.000 instr 10: p2 = 2.000 p3 = 1.000 instr 10: p2 = 3.000 p3 = 1.000 instr 10: p2 = 4.000 p3 = 1.000 instr 10: p2 = 5.000 p3 = 1.000 instr 10: p2 = 6.000 p3 = 1.000 instr 10: p2 = 7.000 p3 = 1.000 instr 10: p2 = 8.000 p3 = 1.000 instr 10: p2 = 9.000 p3 = 1.000 But as you see form the output, it happens at once. I would expect each line to be one second apart, since kwen (p2) = 1, 2, 3 , etc Richard On 05/11/16 21:58, jpff wrote: > So the only ting left that confuses me is you set the number of i10 to > 1 which seems not to be the 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 | 2016-11-05 23:42 |
From | jpff |
Subject | Re: schedkwhen/schedwhen not working as expected? |
What make you think they are not 1sec apart? 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 | 2016-11-06 08:21 |
From | Richard |
Subject | Re: schedkwhen/schedwhen not working as expected? |
Because the text output appeared at once. But now I've changed a bit and it seems to work now. Below is the new csd, that also outputs sound. There are some differences with the previous version: -odac is used now previous version only had ksmps =32, no sr and kr sound is output now |
Date | 2016-11-06 14:45 |
From | jpff |
Subject | Re: schedkwhen/schedwhen not working as expected? |
The text arrrved immediately as you were not geerating realtime audio so time could run ahead. Do you yeally need sr=kr? On Sun, 6 Nov 2016, Richard wrote: > Because the text output appeared at once. But now I've changed a bit and it > seems to work now. > Below is the new csd, that also outputs sound. There are some differences > with the previous version: > -odac is used now > previous version only had ksmps =32, no sr and kr > sound is output now > > |
Date | 2016-11-06 14:51 |
From | Richard |
Subject | Re: schedkwhen/schedwhen not working as expected? |
No that was just copy and paste from an example... On 06/11/16 15:45, jpff wrote: > The text arrrved immediately as you were not geerating realtime audio > so time could run ahead. > > Do you yeally need sr=kr? > > On Sun, 6 Nov 2016, Richard wrote: > >> Because the text output appeared at once. But now I've changed a bit >> and it seems to work now. >> Below is the new csd, that also outputs sound. There are some >> differences with the previous version: >> -odac is used now >> previous version only had ksmps =32, no sr and kr >> sound is output now >> >> |