[Csnd] conditional
Date | 2019-10-11 09:09 |
From | fra |
Subject | [Csnd] conditional |
Hi all, i have a UDO (if i am correct from Heinz) that using csound from git (yesterday) give me error in this: kTimer = kTrig == 1 ? 0 : kTimer (complete UDO at the end) i have try this as solution if kTrig==1 then kTimer = 0 endif and seem to work but i would like to ask if i'm correct. Thanks, ciao, francesco. opcode Trigger, kk, ai ainput, iTimeWait xin iThresh = 0.1 iWait = kr*iTimeWait kTimer init (kr*iTimeWait) + 1 kRms rms ainput, 20 iSampTim = 0.01 kRmsPrev delayk kRms, iSampTim kChange = kRms - kRmsPrev if(kTimer>iWait) then if kChange > iThresh then kTrig = 1 gkNoteNumber += 1 else kTrig = 0 endif kTimer = (kTrig == 1 ? 0 : kTimer) else kTimer += 1 kTrig = 0 endif xout kTrig, gkNoteNumber endop 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 | 2019-10-11 11:31 |
From | Tarmo Johannes |
Subject | Re: [Csnd] conditional |
Hi, Check the parenthesis, try kTimer = (kTrig == 1)? 0 : kTimer Tarmo R, 11. oktoober 2019 11:09 fra <francescoarmandoporta@gmail.com> kirjutas: Hi all, |
Date | 2019-10-11 14:57 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] conditional |
I use: kTimer = (kTrig == 1? 0 : kTimer) On Fri, Oct 11, 2019 at 6:31 AM Tarmo Johannes <trmjhnns@gmail.com> wrote:
|
Date | 2019-10-12 07:59 |
From | fra |
Subject | Re: [Csnd] conditional |
Thanks Tarmo and Arthur, but both give me this error: error: condition expression types do not match from file cond_test.csd (1) thanks, ciao, francesco. 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 | 2019-10-12 15:04 |
From | John ff |
Subject | Re: [Csnd] conditional |
Are you using a recent version? This sounds like a problem with the new code. Can you send me a csd which gives the error so I can look?
Sent from TypeApp
On 12 Oct 2019, at 08:00, fra <francescoarmandoporta@gmail.com> wrote: Thanks Tarmo and Arthur, |
Date | 2019-10-12 17:04 |
From | fra |
Subject | Re: [Csnd] conditional |
yes, from git yesterday (on Ubuntu 16.06). Thanks. here is my csd: |
Date | 2019-10-12 18:00 |
From | John ff |
Subject | Re: [Csnd] conditional |
Think it is fixed in GitHub as of an hour or so. Try it. ==John ff Sent from TypeApp On Oct 12, 2019, 17:05, at 17:05, fra |
Date | 2019-10-13 08:20 |
From | fra |
Subject | Re: [Csnd] conditional |
Hello John, with latest csound git (today) i get this: error: Unable to find opcode entry for '=' with matching argument types: Found: i = k #i6 = kTimer ... Line: 0 Parsing failed due to syntax errors Stopping on parser failure Can you test with my csd? Maybe i'm wronging something ... Thanks, ciao, francesco. |
Date | 2019-10-13 14:57 |
From | john |
Subject | Re: [Csnd] conditional |
Found something. Version in github works for me. a nasty fix but I think I can improve it a bit ==John ff On Sun, 13 Oct 2019, fra wrote: > Hello John, > > with latest csound git (today) i get this: > > error: Unable to find opcode entry for '=' with matching argument types: > Found: i = k > #i6 = kTimer ... > Line: 0 > Parsing failed due to syntax errors > Stopping on parser failure > > Can you test with my csd? > > Maybe i'm wronging something ... > > Thanks, > > ciao, > > francesco. > > > |
Date | 2019-10-14 10:54 |
From | fra |
Subject | Re: [Csnd] conditional |
Thanks John, it is working again. Many thanks, ciao, francesco. 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 |