| I have written some long loops - actually loops that stepped through
large tables searching for a value. Based on the sound I was getting,
I concluded that the time to execute the loop was longer than a k-
cycle and the loop was allowed to complete before the instrument
released its ownership of the k-cycle.
So I think your guess is correct, Andres, that time is not increasing.
-Lou
On Aug 14, 2011, at 7:00 AM, Andres Cabrera wrote:
> Hi,
>
> I'm trying to understand what happens internally from the opcode's
> point of view... Does the opcode know it is inside a loop, and
> therefore time is not increasing? Would time counting opcodes give
> wrong values when they are placed inside a loop?
>
> Cheers,
> Andres
>
> On Sun, Aug 14, 2011 at 10:42 AM, Victor Lazzarini
> wrote:
>> Not when they are counting time, I suppose, because otherwise
>> they'd be out
>> of sync, would they not?
>> The ones that always print when a variable changes seem to print OK.
>>
>> Victor
>> On 14 Aug 2011, at 10:39, Andres Cabrera wrote:
>>
>>> Hi,
>>>
>>> But wouldn't looping be equivalent to a new k-pass as far as the
>>> opcode is concerned?
>>>
>>> Cheers,
>>> Andres
>>>
>>> On Sun, Aug 14, 2011 at 10:00 AM, Victor Lazzarini
>>> wrote:
>>>>
>>>> Probably right. My impression, without looking at the code, is
>>>> that all
>>>> opcodes that depend on a
>>>> time counter (printk, printks) only work once per k-cycle.
>>>>
>>>> Victor
>>>>
>>>> On 14 Aug 2011, at 09:43, joachim heintz wrote:
>>>>>
>>>>> i think printf works more than once in a k-cycle, if the trigger
>>>>> input
>>>>> changes, for instance:
>>>>>
>>>>>
>>>>>
>>>>> -n -m0
>>>>>
>>>>>
>>>>> gitab ftgen 0, 0, -7, -2, 1, 2, 3, 4, 5, 6, 7
>>>>> instr 1
>>>>> kndx = 0
>>>>> loop:
>>>>> kval tab kndx, gitab
>>>>> printf "%f\n", kndx+1, kval
>>>>> loop_lt kndx, 1, 7, loop
>>>>> turnoff
>>>>> endin
>>>>>
>>>>>
>>>>> i 1 0 .1
>>>>>
>>>>>
>>>>>
>>>>> joachim
>>>>>
>>>>>
>>>>> Am 14.08.2011 02:24, schrieb Jim Aikin:
>>>>>>
>>>>>> Thanks, Victor. I eventually figured that out. The business
>>>>>> about some
>>>>>> of
>>>>>> the
>>>>>> k-rate printing opcodes only running once per k-cycle is a
>>>>>> subtle but
>>>>>> important point. Since I'm also writing up some information
>>>>>> about the
>>>>>> print
>>>>>> opcodes, I'm glad you pointed that out.
>>>>>>
>>>>>> --JA
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>>>>>> http://csound.1045644.n5.nabble.com/Looping-Opcodes-at-k-rate-tp4697195p4697266.html
>>>>>> Sent from the Csound - General mailing list archive at
>>>>>> Nabble.com.
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> Dept. of Music
>>>> NUI Maynooth Ireland
>>>> tel.: +353 1 708 3545
>>>> Victor dot Lazzarini AT nuim dot ie
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>> https://sourceforge.net/tracker/?
>>>> group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?
>>> group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe
>>> csound"
>>>
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|