| I guess so.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 9 Nov 2015, at 12:12, Oeyvind Brandtsegg wrote:
>
> So yet another reason to use chnset/get instead of zak?
>
> 2015-11-09 10:21 GMT+01:00 Victor Lazzarini :
>> I am not sure that zak would write to the variable at i-time (it shouldn’t, but it might do). In this case,
>> the k-variable will be 0 until perf time. If the same instance of instrs 2/3 is reused, then at i-time
>> the k-variable will have whatever value it held at the final k-cycle in the previous performance.
>>
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>>> On 9 Nov 2015, at 07:48, Oeyvind Brandtsegg wrote:
>>>
>>> As Victor and John says the value will be zero the first time (if you
>>> run instr 2 and 3 at time zero). But if you delay the start of instr 2
>>> and 3 until instr 1 have run a few cycles (and writing something to
>>> the zak channel), then it should work.
>>> I haven't tried to run the code, but wonder why you start instr 2 and
>>> 3 from the score *and* trigger them via schedkwhen? It seems perhaps
>>> only the schedkwhen triggering is what you want? Also, it is generally
>>> recommended to use chn channels in place of zak. (zak being an
>>> intermediate workaround born at a time when chn channels and arrays
>>> was not implemented in Csound yet).
>>>
>>> best
>>> Oeyvind
>>>
>>> 2015-11-08 23:51 GMT+01:00 Victor Lazzarini :
>>>> I am not sure what you mean in terms of “working”. The value for ifr is going to be 0 whether you
>>>> use comb or reson. Except that reson will not give you an init error for that.
>>>>
>>>> The reason for 0 has already been explained here. It is the value of kcpsL at i-time the first time you
>>>> run the instrument. You will see that print ifr prints 0.
>>>>
>>>> ========================
>>>> Dr Victor Lazzarini
>>>> Dean of Arts, Celtic Studies and Philosophy,
>>>> Maynooth University,
>>>> Maynooth, Co Kildare, Ireland
>>>> Tel: 00 353 7086936
>>>> Fax: 00 353 1 7086952
>>>>
>>>>> On 8 Nov 2015, at 22:22, christos wrote:
>>>>>
>>>>> sure (but comb doesn't work, reson does, as in the orc below. if is use comb
>>>>> instead of reson it doesn't work), thanks a lot! :
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> sr = 44100
>>>>> ksmps = 128
>>>>> nchnls = 2
>>>>> 0dbfs = 1.0
>>>>>
>>>>> zakinit 5, 5
>>>>>
>>>>>
>>>>> instr 1;
>>>>>
>>>>> ktime timeinsts
>>>>> outvalue "ktime", ktime
>>>>>
>>>>> aL, aR soundin "level5.wav"
>>>>>
>>>>> ktim line 0, p3, 120
>>>>>
>>>>> kgain1 ctrl7 1, 0, 0, 1
>>>>> kgain1 portk kgain1, 0.1
>>>>> outvalue "kgain1", kgain1
>>>>>
>>>>> krmsrL, krmsoL, kerrL, kcpsL lpread ktim, "level5L.lp"
>>>>> krmsrR, krmsoR, kerrR, kcpsR lpread ktim, "level5R.lp"
>>>>>
>>>>> ;printks "krmsrL = %f, kcpsL = %f\\n", 0.5, krmsrL, kcpsL
>>>>>
>>>>> if (krmsrL > 1) then
>>>>> ktrigL = 1
>>>>> elseif (krmsrL <1) then
>>>>> ktrigL = 0
>>>>> endif
>>>>>
>>>>> if (krmsrR > 1) then
>>>>> ktrigR = 1
>>>>> elseif (krmsrR <1) then
>>>>> ktrigR = 0
>>>>> endif
>>>>>
>>>>> schedkwhen ktrigL, 0, 15, 2, 0, 13
>>>>> schedkwhen ktrigR, 0, 15, 3, 0, 13
>>>>>
>>>>> outs aL*kgain1, aR*kgain1
>>>>>
>>>>> zaw aL, 1
>>>>> zaw aR, 2
>>>>> zkw kcpsL, 1
>>>>> zkw kcpsR, 2
>>>>> zkw krmsrL, 3
>>>>> zkw krmsrR, 4
>>>>>
>>>>> endin
>>>>>
>>>>> instr 2; reson filter on L channel
>>>>>
>>>>> seed 0
>>>>>
>>>>> irand random 7, 12.9
>>>>>
>>>>> kcpsL zkr 1
>>>>> ifr = i(kcpsL)
>>>>> print ifr
>>>>>
>>>>> aL zar 1
>>>>> krmsrL zkr 3
>>>>>
>>>>> kgain2 ctrl7 1, 1, 0, 1
>>>>> kgain2 portk kgain2, 0.1
>>>>> outvalue "kgain2", kgain2
>>>>>
>>>>> aL = aL*kgain2
>>>>>
>>>>> kenv expseg 0.001, 0.5, 1, irand-0.5, 0.0001
>>>>>
>>>>> acL compress aL, aL, 1, 30, 50, 80, 0.01, 0.1, 0.1
>>>>> acL pareq acL, 800, ampdb(-30), sqrt(.5), 2
>>>>> acL butterhp acL, 70
>>>>> acL reson acL, ifr, ifr/10
>>>>> acL balance acL, aL
>>>>>
>>>>> acL = acL*kenv
>>>>>
>>>>> apL, apR pan2 acL, krmsrL/1.6
>>>>>
>>>>> outs apL, apR
>>>>>
>>>>> endin
>>>>>
>>>>> instr 3; reson filter on R channel
>>>>>
>>>>> seed 0
>>>>>
>>>>> irand random 6, 12.9
>>>>>
>>>>> kcpsR zkr 2
>>>>> ifr = i(kcpsR)
>>>>> print ifr
>>>>>
>>>>> aR zar 2
>>>>> krmsrR zkr 4
>>>>>
>>>>> kgain3 ctrl7 1, 2, 0, 1
>>>>> kgain3 portk kgain3, 0.1
>>>>> outvalue "kgain3", kgain3
>>>>>
>>>>> aR = aR*kgain3
>>>>>
>>>>> kenv expseg 0.001, 0.5, 1, irand-0.5, 0.0001
>>>>>
>>>>> acR compress aR, aR, 1, 30, 50, 80, 0.01, 0.1, 0.1
>>>>> acR pareq acR, 800, ampdb(-30), sqrt(.5), 2
>>>>> acR butterhp acR, 70
>>>>> acR reson aR, ifr, ifr/10
>>>>> acR balance acR, aR
>>>>>
>>>>> acR = acR*kenv
>>>>>
>>>>> apL, apR pan2 acR, 1-(krmsrR/1.6)
>>>>>
>>>>> outs apL, apR
>>>>>
>>>>> endin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> f1 0 16384 10 1
>>>>>
>>>>> i 1 0 140
>>>>> i 2 0 140
>>>>> i 3 0 140
>>>>>
>>>>> e
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> Christos Carras
>>>>> --
>>>>> View this message in context: http://csound.1045644.n5.nabble.com/i-tp5744946p5744952.html
>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>
>>>>> 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
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://flyndresang.no/
>>> http://www.partikkelaudio.com/
>>> http://soundcloud.com/brandtsegg
>>> http://soundcloud.com/t-emp
>>>
>>> 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
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://flyndresang.no/
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://soundcloud.com/t-emp
>
> 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 |