Csound Csound-dev Csound-tekno Search About

Maximum running time of Csound

Date2016-03-02 11:34
FromOeyvind Brandtsegg
SubjectMaximum running time of Csound
I seem to recall we touched on this earlier, but do not remember any
definitive conclusion.
I wonder how long I can run Csound?
If I understand it correctly, there is an internal time counter that
increments +1 for each k-rate pass, and the max reliable duration of a
performance would then possibly be limited by the size of this number?
I did a simple test by
        kcount  init 0
        kcount  += 1
and it seems a k-variable is a signed 64 bit value (?) It goes to
2147483647 before flipping over to -2147483648, then it won't
increment any longer.
Does this mean that the maximum running time of Csound can be calculated as:
kcount*ksmps/sr
?
So, for a sr of 44100 and a ksmps of 128, I can run Csound for
approximately 72 days before something unexpected happens?

I have an installation that I would prefer *not* to reboot
periodically, which is why I wonder how long I can reliably run.

best
Oeyvind


Date2016-03-02 11:47
FromWolf Peuker
SubjectRe: Maximum running time of Csound
Hi Oeyvind,

Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
> and it seems a k-variable is a signed 64 bit value (?) It goes to
> 2147483647 before flipping over to -2147483648, then it won't
> increment any longer.
just to be precise, the above looks like a 32-bit integer :)

Best,
Wolf

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

Date2016-03-02 11:53
FromOeyvind Brandtsegg
SubjectRe: Maximum running time of Csound

Sorry, my bad, you're right.  But the question is still if I understand correctly how the time counter works.

2. mar. 2016 12.48 skrev "Wolf Peuker" <wolfpeuker@posteo.de>:
Hi Oeyvind,

Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
> and it seems a k-variable is a signed 64 bit value (?) It goes to
> 2147483647 before flipping over to -2147483648, then it won't
> increment any longer.
just to be precise, the above looks like a 32-bit integer :)

Best,
Wolf

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
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

Date2016-03-02 11:56
FromRory Walsh
SubjectRe: Maximum running time of Csound
f0 -z should keep her running for 7 years or so? Why 7, I'm not sure, but I recall John saying so at some point! 

On 2 March 2016 at 11:47, Wolf Peuker <wolfpeuker@posteo.de> wrote:
Hi Oeyvind,

Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
> and it seems a k-variable is a signed 64 bit value (?) It goes to
> 2147483647 before flipping over to -2147483648, then it won't
> increment any longer.
just to be precise, the above looks like a 32-bit integer :)

Best,
Wolf

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

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

Date2016-03-02 22:22
FromOeyvind Brandtsegg
SubjectRe: Maximum running time of Csound
Thanks,
I found the old email (when I asked the last time, sorry....),
Victor quoting John:
"f 0 z
creates table 0 (actually does not ...) in 25k years time if your
computer is still running, there is still electricity and humans have
failed to destroy themselves in some other way.”

I guess the information failed to stick to my brain as the prospect of
running for 25k years was just too much for me to handle.

But it is somewhat confusing when I re-read the manual (the page for
The Standard Numeric Score):

"Currently, the maximum length of the score is 231-1 control periods.
For example, with kr=1500, you can run a score for a maximum of about
16.5 days before problems occur due to overflowing signed 32-bit
integer variables. The input token 'z' is read as a number with the
value of approximately 25367 years."

I see the 25 k years running time is stated, but it also states that
problems will occur when the 32-bit signed int overflows.
... so what is correct? Will it run without problems even after 2^31
control periods?



2016-03-02 12:56 GMT+01:00 Rory Walsh :
> f0 -z should keep her running for 7 years or so? Why 7, I'm not sure, but I
> recall John saying so at some point!
>
> On 2 March 2016 at 11:47, Wolf Peuker  wrote:
>>
>> Hi Oeyvind,
>>
>> Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
>> > and it seems a k-variable is a signed 64 bit value (?) It goes to
>> > 2147483647 before flipping over to -2147483648, then it won't
>> > increment any longer.
>> just to be precise, the above looks like a 32-bit integer :)
>>
>> Best,
>> Wolf
>>
>> 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
>
>
> 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



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

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

Date2016-03-02 22:35
FromVictor Lazzarini
SubjectRe: Maximum running time of Csound
I have to check the code again, but I suspect counting uses 64bit variables now.

John might be quicker to provide details.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 2 Mar 2016, at 22:22, Oeyvind Brandtsegg  wrote:
> 
> Thanks,
> I found the old email (when I asked the last time, sorry....),
> Victor quoting John:
> "f 0 z
> creates table 0 (actually does not ...) in 25k years time if your
> computer is still running, there is still electricity and humans have
> failed to destroy themselves in some other way.”
> 
> I guess the information failed to stick to my brain as the prospect of
> running for 25k years was just too much for me to handle.
> 
> But it is somewhat confusing when I re-read the manual (the page for
> The Standard Numeric Score):
> 
> "Currently, the maximum length of the score is 231-1 control periods.
> For example, with kr=1500, you can run a score for a maximum of about
> 16.5 days before problems occur due to overflowing signed 32-bit
> integer variables. The input token 'z' is read as a number with the
> value of approximately 25367 years."
> 
> I see the 25 k years running time is stated, but it also states that
> problems will occur when the 32-bit signed int overflows.
> ... so what is correct? Will it run without problems even after 2^31
> control periods?
> 
> 
> 
> 2016-03-02 12:56 GMT+01:00 Rory Walsh :
>> f0 -z should keep her running for 7 years or so? Why 7, I'm not sure, but I
>> recall John saying so at some point!
>> 
>>> On 2 March 2016 at 11:47, Wolf Peuker  wrote:
>>> 
>>> Hi Oeyvind,
>>> 
>>>> Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
>>>> and it seems a k-variable is a signed 64 bit value (?) It goes to
>>>> 2147483647 before flipping over to -2147483648, then it won't
>>>> increment any longer.
>>> just to be precise, the above looks like a 32-bit integer :)
>>> 
>>> Best,
>>> Wolf
>>> 
>>> 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
>> 
>> 
>> 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
> 
> 
> 
> -- 
> 
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
> 
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp
> 
> 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

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

Date2016-03-03 12:13
Fromjpff
SubjectRe: Maximum running time of Csound
Lookig at threr code quickly it is inconsistent.  kcounter is sometimes 
int and sometimes long.  I think it should be int64 evertwhere, but not 
sure of the implications.  I suspect this is all rather a mess.....

On Wed, 2 Mar 2016, Victor Lazzarini wrote:

> I have to check the code again, but I suspect counting uses 64bit variables now.
>
> John might be quicker to provide details.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 2 Mar 2016, at 22:22, Oeyvind Brandtsegg  wrote:
>>
>> Thanks,
>> I found the old email (when I asked the last time, sorry....),
>> Victor quoting John:
>> "f 0 z
>> creates table 0 (actually does not ...) in 25k years time if your
>> computer is still running, there is still electricity and humans have
>> failed to destroy themselves in some other way.”
>>
>> I guess the information failed to stick to my brain as the prospect of
>> running for 25k years was just too much for me to handle.
>>
>> But it is somewhat confusing when I re-read the manual (the page for
>> The Standard Numeric Score):
>>
>> "Currently, the maximum length of the score is 231-1 control periods.
>> For example, with kr=1500, you can run a score for a maximum of about
>> 16.5 days before problems occur due to overflowing signed 32-bit
>> integer variables. The input token 'z' is read as a number with the
>> value of approximately 25367 years."
>>
>> I see the 25 k years running time is stated, but it also states that
>> problems will occur when the 32-bit signed int overflows.
>> ... so what is correct? Will it run without problems even after 2^31
>> control periods?
>>
>>
>>
>> 2016-03-02 12:56 GMT+01:00 Rory Walsh :
>>> f0 -z should keep her running for 7 years or so? Why 7, I'm not sure, but I
>>> recall John saying so at some point!
>>>
>>>> On 2 March 2016 at 11:47, Wolf Peuker  wrote:
>>>>
>>>> Hi Oeyvind,
>>>>
>>>>> Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
>>>>> and it seems a k-variable is a signed 64 bit value (?) It goes to
>>>>> 2147483647 before flipping over to -2147483648, then it won't
>>>>> increment any longer.
>>>> just to be precise, the above looks like a 32-bit integer :)
>>>>
>>>> Best,
>>>> Wolf
>>>>
>>>> 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
>>>
>>>
>>> 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
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp
>>
>> 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
>
> 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
>

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

Date2016-03-03 12:19
FromOeyvind Brandtsegg
SubjectRe: Maximum running time of Csound
Is there a way to read the kcounter directly from a Csound instrument?
That way I can run Csound offline with -n and test the reliable
running time quickly (not having to wait for 25k years).

2016-03-03 13:13 GMT+01:00 jpff :
> Lookig at threr code quickly it is inconsistent.  kcounter is sometimes int
> and sometimes long.  I think it should be int64 evertwhere, but not sure of
> the implications.  I suspect this is all rather a mess.....
>
>
> On Wed, 2 Mar 2016, Victor Lazzarini wrote:
>
>> I have to check the code again, but I suspect counting uses 64bit
>> variables now.
>>
>> John might be quicker to provide details.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 2 Mar 2016, at 22:22, Oeyvind Brandtsegg 
>>> wrote:
>>>
>>> Thanks,
>>> I found the old email (when I asked the last time, sorry....),
>>> Victor quoting John:
>>> "f 0 z
>>> creates table 0 (actually does not ...) in 25k years time if your
>>> computer is still running, there is still electricity and humans have
>>> failed to destroy themselves in some other way.”
>>>
>>> I guess the information failed to stick to my brain as the prospect of
>>> running for 25k years was just too much for me to handle.
>>>
>>> But it is somewhat confusing when I re-read the manual (the page for
>>> The Standard Numeric Score):
>>>
>>> "Currently, the maximum length of the score is 231-1 control periods.
>>> For example, with kr=1500, you can run a score for a maximum of about
>>> 16.5 days before problems occur due to overflowing signed 32-bit
>>> integer variables. The input token 'z' is read as a number with the
>>> value of approximately 25367 years."
>>>
>>> I see the 25 k years running time is stated, but it also states that
>>> problems will occur when the 32-bit signed int overflows.
>>> ... so what is correct? Will it run without problems even after 2^31
>>> control periods?
>>>
>>>
>>>
>>> 2016-03-02 12:56 GMT+01:00 Rory Walsh :
>>>>
>>>> f0 -z should keep her running for 7 years or so? Why 7, I'm not sure,
>>>> but I
>>>> recall John saying so at some point!
>>>>
>>>>> On 2 March 2016 at 11:47, Wolf Peuker  wrote:
>>>>>
>>>>> Hi Oeyvind,
>>>>>
>>>>>> Am 02.03.2016 um 12:34 schrieb Oeyvind Brandtsegg:
>>>>>> and it seems a k-variable is a signed 64 bit value (?) It goes to
>>>>>> 2147483647 before flipping over to -2147483648, then it won't
>>>>>> increment any longer.
>>>>>
>>>>> just to be precise, the above looks like a 32-bit integer :)
>>>>>
>>>>> Best,
>>>>> Wolf
>>>>>
>>>>> 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
>>>>
>>>>
>>>>
>>>> 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
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://www.partikkelaudio.com/
>>> http://soundcloud.com/brandtsegg
>>> http://flyndresang.no/
>>> http://soundcloud.com/t-emp
>>>
>>> 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
>>
>>
>> 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
>>
>
> 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



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

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