[Csnd-dev] first timeinstk cycle in UDOs is 0 not 1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd-dev] first timeinstk cycle in UDOs is 0 not 1

joachim-3
this prints 1 as expected and written in the manual page for timeinstk:

instr 1
  kFirstCycle timeinstk
  printk 0, kFirstCycle
  turnoff
endin
schedule(1,0,1)

but in a UDO 0 is reported as first cycle number:

opcode Report,0,0
  kFirstCycle timeinstk
  printk 0, kFirstCycle
endop
instr 2
  Report()
  turnoff
endin
schedule(2,0,1)

is this a bug?  or is it expected and i missed something on the
timeinstk manual page?

        joachim
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] first timeinstk cycle in UDOs is 0 not 1

Pete G.
Looks like a slight bug to me...
Note that -- unless I'm being stupid -- it doesn't seem to work at all
if the instrument isn't scheduled at time 0!  Try changing 'schedule(2, 0, 1)
to schedule(2,1,1)... Works again if you remove the turnoff, but then the
non-zero times start at 1.  All a bit strange.

        -- Pete --

On Wed, Nov 25, 2020 at 06:48:36PM +0100, joachim heintz wrote:

> this prints 1 as expected and written in the manual page for timeinstk:
>
> instr 1
>  kFirstCycle timeinstk
>  printk 0, kFirstCycle
>  turnoff
> endin
> schedule(1,0,1)
>
> but in a UDO 0 is reported as first cycle number:
>
> opcode Report,0,0
>  kFirstCycle timeinstk
>  printk 0, kFirstCycle
> endop
> instr 2
>  Report()
>  turnoff
> endin
> schedule(2,0,1)
>
> is this a bug?  or is it expected and i missed something on the
> timeinstk manual page?
>
> joachim
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] first timeinstk cycle in UDOs is 0 not 1

joachim-3
thanks -- i opened a ticket now in github.
best -
        joachim


On 25/11/2020 23:48, Pete Goodeve wrote:

> Looks like a slight bug to me...
> Note that -- unless I'm being stupid -- it doesn't seem to work at all
> if the instrument isn't scheduled at time 0!  Try changing 'schedule(2, 0, 1)
> to schedule(2,1,1)... Works again if you remove the turnoff, but then the
> non-zero times start at 1.  All a bit strange.
>
> -- Pete --
>
> On Wed, Nov 25, 2020 at 06:48:36PM +0100, joachim heintz wrote:
>> this prints 1 as expected and written in the manual page for timeinstk:
>>
>> instr 1
>>   kFirstCycle timeinstk
>>   printk 0, kFirstCycle
>>   turnoff
>> endin
>> schedule(1,0,1)
>>
>> but in a UDO 0 is reported as first cycle number:
>>
>> opcode Report,0,0
>>   kFirstCycle timeinstk
>>   printk 0, kFirstCycle
>> endop
>> instr 2
>>   Report()
>>   turnoff
>> endin
>> schedule(2,0,1)
>>
>> is this a bug?  or is it expected and i missed something on the
>> timeinstk manual page?
>>
>> joachim