Csound Csound-dev Csound-tekno Search About

Re: [Csnd] [EXTERNAL] [Csnd] Question re: while loop not working

Date2023-02-16 09:39
FromScott Daughtrey
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Question re: while loop not working
Thanks for the reply Victor. 

Ok, that makes sense, however placing the variable inside the loop: 
kTime   init 0
    while kTime<10 do
      kTime timeinsts
      printk 1, kTime
    od

still freezes Csound the moment Run is initialized. I'll not sure of the solution.

Regards,
Scott

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

Date2023-02-16 10:21
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Question re: while loop not working
The instrument time is not incrementing as you have not moved from that kcycle. 
The loop is inside the k-cycle and timeinsts returns the curent k-cycle time. 
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 16 Feb 2023, at 09:39, Scott Daughtrey  wrote:
> 
> Thanks for the reply Victor. 
> 
> Ok, that makes sense, however placing the variable inside the loop: 
> kTime   init 0
>    while kTime<10 do
>      kTime timeinsts
>      printk 1, kTime
>    od
> 
> still freezes Csound the moment Run is initialized. I'll not sure of the solution.
> 
> Regards,
> Scott
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C9556157834ed4afa308308db10011799%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638121369462477486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=H9djJ4qFQHq37Dc6mvyCA64BQ20akNwKYxqMKA%2FnJcI%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C9556157834ed4afa308308db10011799%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C638121369462477486%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sFclXxOcXwPDcMgXxERR5eavZMrXIJlQYFbRZ3R0apg%3D&reserved=0
> 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