[Csnd] Csound 6 behavior of timeinsts within UDO
Date | 2014-03-28 16:51 |
From | cognition |
Subject | [Csnd] Csound 6 behavior of timeinsts within UDO |
I wondered if some of you on the list might be able to have a look at the code I've written, and perhaps provide an explanation of why it doesn't work the way I expect it to with Csound 6. For some reason, when I use timeinsts in a user defined opcode, it gives an output of zero. I've copied the csd file below. Thanks for the help!
<CsoundSynthesizer> <CsOptions> -n ; NO SOUND </CsOptions> <CsInstruments> ; HEADER sr = 44100 kr = 4410 ksmps = 10 nchnls = 2 ; USER DEFINED OPCODES opcode testtime, 0, kk kinput, kthresh xin ktime timeinsts if (kinput > kthresh) then printk2 ktime endif endop instr 1 kthresh = 0.9999 knoise rand 1, 4 ktime timeinsts ; COMMENT THESE LINES TO TEST USER DEFINED OPCODE ; if (knoise > kthresh) then ; ; printk2 ktime ; ; endif ; ; testtime knoise, kthresh ; USER DEFINED OPCODE endin </CsInstruments> <CsScore> i 1 0 120 ; RUN instr 1 FOR 2 MINUTES </CsScore> </CsoundSynthesizer> |
Date | 2014-03-28 17:40 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Csound 6 behavior of timeinsts within UDO |
With the current develop code I get (by commenting in the UDO code, and commenting out the instrument code) i1 3.47868 i1 12.49320 i1 13.54875 i1 18.33946 i1 27.35397 i1 28.40952 i1 33.20023 i1 42.21474 i1 43.27029 i1 48.06100 i1 57.07551 i1 58.13107 i1 62.92177 i1 71.93628 i1 72.99184 i1 77.78254 i1 86.79705 i1 87.85261 i1 92.64331 i1 101.65782 i1 102.71338 i1 107.50408 i1 116.51859 i1 117.57415 ======================== Dr Victor Lazzarini Senior Lecturer NUI Maynooth, Ireland victor dot lazzarini at nuim dot ie On 28 Mar 2014, at 16:51, cognition |
Date | 2014-03-29 17:06 |
From | cognition |
Subject | Re: [Csnd] Csound 6 behavior of timeinsts within UDO |
That fixed it - I still had version 6.00. Should have thought of that. :P Thanks! On Fri, Mar 28, 2014 at 10:40 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: With the current develop code I get (by commenting in the UDO code, and commenting out the instrument code) |