Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Change in "if"

Date2018-10-26 14:37
FromMichael Gogins
Subject[Csnd-dev] Change in "if"
The behavior of the "if" statement, or of comparisons between pfields
and other variables, appears to have changed recently.

The following CSD file demonstrates the change in behavior.



instr 1
prints "Replace p3 with a positive long value for indefinite notes."
; This block does not work. It did used to work and is used in much of my code.
;if p3 == -1 then
;    p3 = 10000000
;endif
; This block does work.
if p3 != -1 goto non_indefinite
    p3 = 10000000
non_indefinite:

print p3
endin


i 1 1 1



-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com

Date2018-10-26 20:00
FromOscar Pablo Di Liscia
SubjectRe: [Csnd-dev] Change in "if"
How recent is this change? 
I'll be away of a computer for some days, and I can't check, but i remember 
I  may had the same issue a month ago, and could not figure out a solution, thanks.


El viernes, 26 de octubre de 2018, Michael Gogins <michael.gogins@gmail.com> escribió:
The behavior of the "if" statement, or of comparisons between pfields
and other variables, appears to have changed recently.

The following CSD file demonstrates the change in behavior.

<CsoundSynthesizer>
<CsInstruments>
instr 1
prints "Replace p3 with a positive long value for indefinite notes."
; This block does not work. It did used to work and is used in much of my code.
;if p3 == -1 then
;    p3 = 10000000
;endif
; This block does work.
if p3 != -1 goto non_indefinite
    p3 = 10000000
non_indefinite:

print p3
endin
</CsInstruments>
<CsScore>
i 1 1 1
</CsScore>
</CsoundSynthesizer>

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


--
Dr. Oscar Pablo Di Liscia
Profesor Titular
Director Programa de Investigación "Sistemas Temporales y Síntesis Espacial de Sonido en el Arte Sonoro"
Escuela Universitaria de Artes
Universidad Nacional de Quilmes
Argentina


Date2018-10-26 20:25
Fromjpff
SubjectRe: [Csnd-dev] Change in "if"
I see nohing wrong here.  Or did you mean p3 to be -1 in the score? 
Actually it works in that case as well.



On Fri, 26 Oct 2018, Michael Gogins wrote:

> The behavior of the "if" statement, or of comparisons between pfields
> and other variables, appears to have changed recently.
>
> The following CSD file demonstrates the change in behavior.
>
> 
> 
> instr 1
> prints "Replace p3 with a positive long value for indefinite notes."
> ; This block does not work. It did used to work and is used in much of my code.
> ;if p3 == -1 then
> ;    p3 = 10000000
> ;endif
> ; This block does work.
> if p3 != -1 goto non_indefinite
>    p3 = 10000000
> non_indefinite:
>
> print p3
> endin
> 
> 
> i 1 1 1
> 
> 
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com

Date2018-10-26 21:42
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
It works here as well. 

 new alloc for instr 1:
Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 1.000
B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0

If I use i1 1 -1 I get

new alloc for instr 1:
Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 10000000.000

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 26 Oct 2018, at 20:25, jpff  wrote:
> 
> I see nohing wrong here.  Or did you mean p3 to be -1 in the score? Actually it works in that case as well.
> 
> 
> 
> On Fri, 26 Oct 2018, Michael Gogins wrote:
> 
>> The behavior of the "if" statement, or of comparisons between pfields
>> and other variables, appears to have changed recently.
>> 
>> The following CSD file demonstrates the change in behavior.
>> 
>> 
>> 
>> instr 1
>> prints "Replace p3 with a positive long value for indefinite notes."
>> ; This block does not work. It did used to work and is used in much of my code.
>> ;if p3 == -1 then
>> ;    p3 = 10000000
>> ;endif
>> ; This block does work.
>> if p3 != -1 goto non_indefinite
>>   p3 = 10000000
>> non_indefinite:
>> 
>> print p3
>> endin
>> 
>> 
>> i 1 1 1
>> 
>> 
>> 
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com

Date2018-10-27 08:56
Fromjoachim heintz
SubjectRe: [Csnd-dev] Change in "if"
for me, for any -1 as p3 csound exits immediately with the message:
Score finished in csoundPerformKsmps() with 2.

this does happen in all cases:
- nothing in the instrument at all except print
- any if-condition which changes -1 to any positive number. (both if 
condition work for me but don't have any effect because of the exit.)

this is with linux and csound develop from today.

	joachim


On 26/10/18 22:42, Victor Lazzarini wrote:
> It works here as well.
>
>  new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 1.000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> If I use i1 1 -1 I get
>
> new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 10000000.000
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 26 Oct 2018, at 20:25, jpff  wrote:
>>
>> I see nohing wrong here.  Or did you mean p3 to be -1 in the score? Actually it works in that case as well.
>>
>>
>>
>> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>
>>> The behavior of the "if" statement, or of comparisons between pfields
>>> and other variables, appears to have changed recently.
>>>
>>> The following CSD file demonstrates the change in behavior.
>>>
>>> 
>>> 
>>> instr 1
>>> prints "Replace p3 with a positive long value for indefinite notes."
>>> ; This block does not work. It did used to work and is used in much of my code.
>>> ;if p3 == -1 then
>>> ;    p3 = 10000000
>>> ;endif
>>> ; This block does work.
>>> if p3 != -1 goto non_indefinite
>>>   p3 = 10000000
>>> non_indefinite:
>>>
>>> print p3
>>> endin
>>> 
>>> 
>>> i 1 1 1
>>> 
>>> 
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>

Date2018-10-27 12:21
FromMichael Gogins
SubjectRe: [Csnd-dev] Change in "if"
I forgot to mention my issue is for Csound 6.11 in the latest Debian package. 

On Sat, Oct 27, 2018, 03:56 joachim heintz <jh@joachimheintz.de wrote:
for me, for any -1 as p3 csound exits immediately with the message:
Score finished in csoundPerformKsmps() with 2.

this does happen in all cases:
- nothing in the instrument at all except print
- any if-condition which changes -1 to any positive number. (both if
condition work for me but don't have any effect because of the exit.)

this is with linux and csound develop from today.

        joachim


On 26/10/18 22:42, Victor Lazzarini wrote:
> It works here as well.
>
>  new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 1.000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> If I use i1 1 -1 I get
>
> new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 10000000.000
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 26 Oct 2018, at 20:25, jpff <jpff@codemist.co.uk> wrote:
>>
>> I see nohing wrong here.  Or did you mean p3 to be -1 in the score? Actually it works in that case as well.
>>
>>
>>
>> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>
>>> The behavior of the "if" statement, or of comparisons between pfields
>>> and other variables, appears to have changed recently.
>>>
>>> The following CSD file demonstrates the change in behavior.
>>>
>>> <CsoundSynthesizer>
>>> <CsInstruments>
>>> instr 1
>>> prints "Replace p3 with a positive long value for indefinite notes."
>>> ; This block does not work. It did used to work and is used in much of my code.
>>> ;if p3 == -1 then
>>> ;    p3 = 10000000
>>> ;endif
>>> ; This block does work.
>>> if p3 != -1 goto non_indefinite
>>>   p3 = 10000000
>>> non_indefinite:
>>>
>>> print p3
>>> endin
>>> </CsInstruments>
>>> <CsScore>
>>> i 1 1 1
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>

Date2018-10-27 12:35
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
Maybe this has been addressed in 6.12? Can't recall anything though. 


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

On 27 Oct 2018, at 12:22, Michael Gogins <michael.gogins@GMAIL.COM> wrote:

I forgot to mention my issue is for Csound 6.11 in the latest Debian package. 

On Sat, Oct 27, 2018, 03:56 joachim heintz <jh@joachimheintz.de wrote:
for me, for any -1 as p3 csound exits immediately with the message:
Score finished in csoundPerformKsmps() with 2.

this does happen in all cases:
- nothing in the instrument at all except print
- any if-condition which changes -1 to any positive number. (both if
condition work for me but don't have any effect because of the exit.)

this is with linux and csound develop from today.

        joachim


On 26/10/18 22:42, Victor Lazzarini wrote:
> It works here as well.
>
>  new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 1.000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> If I use i1 1 -1 I get
>
> new alloc for instr 1:
> Replace p3 with a positive long value for indefinite notes.instr 1:  p3 = 10000000.000
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 26 Oct 2018, at 20:25, jpff <jpff@codemist.co.uk> wrote:
>>
>> I see nohing wrong here.  Or did you mean p3 to be -1 in the score? Actually it works in that case as well.
>>
>>
>>
>> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>
>>> The behavior of the "if" statement, or of comparisons between pfields
>>> and other variables, appears to have changed recently.
>>>
>>> The following CSD file demonstrates the change in behavior.
>>>
>>> <CsoundSynthesizer>
>>> <CsInstruments>
>>> instr 1
>>> prints "Replace p3 with a positive long value for indefinite notes."
>>> ; This block does not work. It did used to work and is used in much of my code.
>>> ;if p3 == -1 then
>>> ;    p3 = 10000000
>>> ;endif
>>> ; This block does work.
>>> if p3 != -1 goto non_indefinite
>>>   p3 = 10000000
>>> non_indefinite:
>>>
>>> print p3
>>> endin
>>> </CsInstruments>
>>> <CsScore>
>>> i 1 1 1
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>> -----------------------------------------------------
>>> Michael Gogins
>>> Irreducible Productions
>>> http://michaelgogins.tumblr.com
>>> Michael dot Gogins at gmail dot com
>>>
>

Date2018-10-27 14:50
Fromjoachim heintz
SubjectRe: [Csnd-dev] Change in "if"
just to note that it works when i replace the score line by
	schedule 1, 1, -1

so it seems to be a score issue.



On 27/10/18 13:35, Victor Lazzarini wrote:
> Maybe this has been addressed in 6.12? Can't recall anything though.
>
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 27 Oct 2018, at 12:22, Michael Gogins  > wrote:
>
>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>> package.
>>
>> On Sat, Oct 27, 2018, 03:56 joachim heintz >  wrote:
>>
>>     for me, for any -1 as p3 csound exits immediately with the message:
>>     Score finished in csoundPerformKsmps() with 2.
>>
>>     this does happen in all cases:
>>     - nothing in the instrument at all except print
>>     - any if-condition which changes -1 to any positive number. (both if
>>     condition work for me but don't have any effect because of the exit.)
>>
>>     this is with linux and csound develop from today.
>>
>>             joachim
>>
>>
>>     On 26/10/18 22:42, Victor Lazzarini wrote:
>>     > It works here as well.
>>     >
>>     >  new alloc for instr 1:
>>     > Replace p3 with a positive long value for indefinite notes.instr
>>     1:  p3 = 1.000
>>     > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>     >
>>     > If I use i1 1 -1 I get
>>     >
>>     > new alloc for instr 1:
>>     > Replace p3 with a positive long value for indefinite notes.instr
>>     1:  p3 = 10000000.000
>>     >
>>     > ========================
>>     > Prof. Victor Lazzarini
>>     > Dean of Arts, Celtic Studies, and Philosophy,
>>     > Maynooth University,
>>     > Maynooth, Co Kildare, Ireland
>>     > Tel: 00 353 7086936
>>     > Fax: 00 353 1 7086952
>>     >
>>     >> On 26 Oct 2018, at 20:25, jpff >     > wrote:
>>     >>
>>     >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>     score? Actually it works in that case as well.
>>     >>
>>     >>
>>     >>
>>     >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>     >>
>>     >>> The behavior of the "if" statement, or of comparisons between
>>     pfields
>>     >>> and other variables, appears to have changed recently.
>>     >>>
>>     >>> The following CSD file demonstrates the change in behavior.
>>     >>>
>>     >>> 
>>     >>> 
>>     >>> instr 1
>>     >>> prints "Replace p3 with a positive long value for indefinite
>>     notes."
>>     >>> ; This block does not work. It did used to work and is used in
>>     much of my code.
>>     >>> ;if p3 == -1 then
>>     >>> ;    p3 = 10000000
>>     >>> ;endif
>>     >>> ; This block does work.
>>     >>> if p3 != -1 goto non_indefinite
>>     >>>   p3 = 10000000
>>     >>> non_indefinite:
>>     >>>
>>     >>> print p3
>>     >>> endin
>>     >>> 
>>     >>> 
>>     >>> i 1 1 1
>>     >>> 
>>     >>> 
>>     >>>
>>     >>> -----------------------------------------------------
>>     >>> Michael Gogins
>>     >>> Irreducible Productions
>>     >>> http://michaelgogins.tumblr.com
>>     >>> Michael dot Gogins at gmail dot com
>>     >>>
>>     >

Date2018-10-27 15:16
FromMauro Giubileo
SubjectRe: [Csnd-dev] Change in "if"

To me it works as expected, with both 1 and -1.

I'm on Windows. "Csound version 6.12 beta (double samples) Oct 24 2018", downloaded from the main site: https://csound.com/download.html

P.S.: why the 'beta' in the info line when run csound from the command line?

Regards,
Mauro


Il 2018-10-27 15:50 joachim heintz ha scritto:

just to note that it works when i replace the score line by
    schedule 1, 1, -1

so it seems to be a score issue.



On 27/10/18 13:35, Victor Lazzarini wrote:
Maybe this has been addressed in 6.12? Can't recall anything though.


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

On 27 Oct 2018, at 12:22, Michael Gogins <michael.gogins@GMAIL.COM
<mailto:michael.gogins@GMAIL.COM>> wrote:

I forgot to mention my issue is for Csound 6.11 in the latest Debian
package.

On Sat, Oct 27, 2018, 03:56 joachim heintz <jh@joachimheintz.de
<mailto:jh@joachimheintz.de> wrote:

    for me, for any -1 as p3 csound exits immediately with the message:
    Score finished in csoundPerformKsmps() with 2.

    this does happen in all cases:
    - nothing in the instrument at all except print
    - any if-condition which changes -1 to any positive number. (both if
    condition work for me but don't have any effect because of the exit.)

    this is with linux and csound develop from today.

            joachim


    On 26/10/18 22:42, Victor Lazzarini wrote:
    > It works here as well.
    >
    >  new alloc for instr 1:
    > Replace p3 with a positive long value for indefinite notes.instr
    1:  p3 = 1.000
    > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
    >
    > If I use i1 1 -1 I get
    >
    > new alloc for instr 1:
    > Replace p3 with a positive long value for indefinite notes.instr
    1:  p3 = 10000000.000
    >
    > ========================
    > Prof. Victor Lazzarini
    > Dean of Arts, Celtic Studies, and Philosophy,
    > Maynooth University,
    > Maynooth, Co Kildare, Ireland
    > Tel: 00 353 7086936
    > Fax: 00 353 1 7086952
    >
    >> On 26 Oct 2018, at 20:25, jpff <jpff@codemist.co.uk
    <mailto:jpff@codemist.co.uk>> wrote:
    >>
    >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
    score? Actually it works in that case as well.
    >>
    >>
    >>
    >> On Fri, 26 Oct 2018, Michael Gogins wrote:
    >>
    >>> The behavior of the "if" statement, or of comparisons between
    pfields
    >>> and other variables, appears to have changed recently.
    >>>
    >>> The following CSD file demonstrates the change in behavior.
    >>>
    >>> <CsoundSynthesizer>
    >>> <CsInstruments>
    >>> instr 1
    >>> prints "Replace p3 with a positive long value for indefinite
    notes."
    >>> ; This block does not work. It did used to work and is used in
    much of my code.
    >>> ;if p3 == -1 then
    >>> ;    p3 = 10000000
    >>> ;endif
    >>> ; This block does work.
    >>> if p3 != -1 goto non_indefinite
    >>>   p3 = 10000000
    >>> non_indefinite:
    >>>
    >>> print p3
    >>> endin
    >>> </CsInstruments>
    >>> <CsScore>
    >>> i 1 1 1
    >>> </CsScore>
    >>> </CsoundSynthesizer>
    >>>
    >>> -----------------------------------------------------
    >>> Michael Gogins
    >>> Irreducible Productions
    >>> http://michaelgogins.tumblr.com
    >>> Michael dot Gogins at gmail dot com
    >>>
    >

Date2018-10-27 15:32
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
The thing is, the report was saying that if — then was behaving differently
to if — goto and there was nothing there about Csound having
to carry on for longer.  The if - then is behaving as expected.

The score behaves as I would expect. It issues 1 event for 1 sec and
then closes csound. If there is no score, Csound continues on forever,
or if there is an f z statement, or an e 10000 etc
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 27 Oct 2018, at 14:50, joachim heintz  wrote:
> 
> just to note that it works when i replace the score line by
> 	schedule 1, 1, -1
> 
> so it seems to be a score issue.
> 
> 
> 
> On 27/10/18 13:35, Victor Lazzarini wrote:
>> Maybe this has been addressed in 6.12? Can't recall anything though.
>> 
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>> On 27 Oct 2018, at 12:22, Michael Gogins > > wrote:
>> 
>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>>> package.
>>> 
>>> On Sat, Oct 27, 2018, 03:56 joachim heintz >>  wrote:
>>> 
>>>    for me, for any -1 as p3 csound exits immediately with the message:
>>>    Score finished in csoundPerformKsmps() with 2.
>>> 
>>>    this does happen in all cases:
>>>    - nothing in the instrument at all except print
>>>    - any if-condition which changes -1 to any positive number. (both if
>>>    condition work for me but don't have any effect because of the exit.)
>>> 
>>>    this is with linux and csound develop from today.
>>> 
>>>            joachim
>>> 
>>> 
>>>    On 26/10/18 22:42, Victor Lazzarini wrote:
>>>    > It works here as well.
>>>    >
>>>    >  new alloc for instr 1:
>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>    1:  p3 = 1.000
>>>    > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>>    >
>>>    > If I use i1 1 -1 I get
>>>    >
>>>    > new alloc for instr 1:
>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>    1:  p3 = 10000000.000
>>>    >
>>>    > ========================
>>>    > Prof. Victor Lazzarini
>>>    > Dean of Arts, Celtic Studies, and Philosophy,
>>>    > Maynooth University,
>>>    > Maynooth, Co Kildare, Ireland
>>>    > Tel: 00 353 7086936
>>>    > Fax: 00 353 1 7086952
>>>    >
>>>    >> On 26 Oct 2018, at 20:25, jpff >>    > wrote:
>>>    >>
>>>    >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>>    score? Actually it works in that case as well.
>>>    >>
>>>    >>
>>>    >>
>>>    >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>>    >>
>>>    >>> The behavior of the "if" statement, or of comparisons between
>>>    pfields
>>>    >>> and other variables, appears to have changed recently.
>>>    >>>
>>>    >>> The following CSD file demonstrates the change in behavior.
>>>    >>>
>>>    >>> 
>>>    >>> 
>>>    >>> instr 1
>>>    >>> prints "Replace p3 with a positive long value for indefinite
>>>    notes."
>>>    >>> ; This block does not work. It did used to work and is used in
>>>    much of my code.
>>>    >>> ;if p3 == -1 then
>>>    >>> ;    p3 = 10000000
>>>    >>> ;endif
>>>    >>> ; This block does work.
>>>    >>> if p3 != -1 goto non_indefinite
>>>    >>>   p3 = 10000000
>>>    >>> non_indefinite:
>>>    >>>
>>>    >>> print p3
>>>    >>> endin
>>>    >>> 
>>>    >>> 
>>>    >>> i 1 1 1
>>>    >>> 
>>>    >>> 
>>>    >>>
>>>    >>> -----------------------------------------------------
>>>    >>> Michael Gogins
>>>    >>> Irreducible Productions
>>>    >>> http://michaelgogins.tumblr.com
>>>    >>> Michael dot Go

Date2018-10-27 15:34
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
That must be because of the windows CMake build settings. Someone who knows more about the Windows build must look at it,
as it looks like a debug version is being built.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 27 Oct 2018, at 15:16, Mauro Giubileo  wrote:
> 
> To me it works as expected, with both 1 and -1.
> 
> I'm on Windows. "Csound version 6.12 beta (double samples) Oct 24 2018", downloaded from the main site: https://csound.com/download.html
> 
> P.S.: why the 'beta' in the info line when run csound from the command line?
> 
> Regards,
> Mauro
> 
> 
> 
> Il 2018-10-27 15:50 joachim heintz ha scritto:
> 
>> just to note that it works when i replace the score line by
>>     schedule 1, 1, -1
>> 
>> so it seems to be a score issue.
>> 
>> 
>> 
>> On 27/10/18 13:35, Victor Lazzarini wrote:
>>> Maybe this has been addressed in 6.12? Can't recall anything though.
>>> 
>>> 
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>> 
>>> On 27 Oct 2018, at 12:22, Michael Gogins >> > wrote:
>>> 
>>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>>>> package.
>>>> 
>>>> On Sat, Oct 27, 2018, 03:56 joachim heintz >>>  wrote:
>>>> 
>>>>     for me, for any -1 as p3 csound exits immediately with the message:
>>>>     Score finished in csoundPerformKsmps() with 2.
>>>> 
>>>>     this does happen in all cases:
>>>>     - nothing in the instrument at all except print
>>>>     - any if-condition which changes -1 to any positive number. (both if
>>>>     condition work for me but don't have any effect because of the exit.)
>>>> 
>>>>     this is with linux and csound develop from today.
>>>> 
>>>>             joachim
>>>> 
>>>> 
>>>>     On 26/10/18 22:42, Victor Lazzarini wrote:
>>>>     > It works here as well.
>>>>     >
>>>>     >  new alloc for instr 1:
>>>>     > Replace p3 with a positive long value for indefinite notes.instr
>>>>     1:  p3 = 1.000
>>>>     > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>>>     >
>>>>     > If I use i1 1 -1 I get
>>>>     >
>>>>     > new alloc for instr 1:
>>>>     > Replace p3 with a positive long value for indefinite notes.instr
>>>>     1:  p3 = 10000000.000
>>>>     >
>>>>     > ========================
>>>>     > Prof. Victor Lazzarini
>>>>     > Dean of Arts, Celtic Studies, and Philosophy,
>>>>     > Maynooth University,
>>>>     > Maynooth, Co Kildare, Ireland
>>>>     > Tel: 00 353 7086936
>>>>     > Fax: 00 353 1 7086952
>>>>     >
>>>>     >> On 26 Oct 2018, at 20:25, jpff >>>     > wrote:
>>>>     >>
>>>>     >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>>>     score? Actually it works in that case as well.
>>>>     >>
>>>>     >>
>>>>     >>
>>>>     >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>>>     >>
>>>>     >>> The behavior of the "if" statement, or of comparisons between
>>>>     pfields
>>>>     >>> and other variables, appears to have changed recently.
>>>>     >>>
>>>>     >>> The following CSD file demonstrates the change in behavior.
>>>>     >>>
>>>>     >>> 
>>>>     >>> 
>>>>     >>> instr 1
>>>>     >>> prints "Replace p3 with a positive long value for indefinite
>>>>     notes."
>>>>     >>> ; This block does not work. It did used to work and is used in
>>>>     much of my code.
>>>>     >>> ;if p3 == -1 then
>>>>     >>> ;    p3 = 10000000
>>>>     >>> ;endif
>>>>     >>> ; This block does work.
>>>>     >>> if p3 != -1 goto non_indefinite
>>>>     >>>   p3 = 10000000
>>>>     >>> non_indefinite:
>>>>     >>>
>>>>     >>> print p3
>>>>     >>> endin
>>>>     >>> 
>>>>     >>> 
>>>>     >>> i 1 1 1
>>>>     >>> 
>>>>     >>> 
>>>>     >>>
>>>>     >>> -----------------------------------------------------
>>>>     >>> Michael Gogins
>>>>     >>> Irreducible Productions
>>>>     >>> http://michaelgogins.tumblr.com
>>>>     >>> Michael dot Gogins at gmail dot com
>>>>     >>>

Date2018-10-28 10:15
Fromjoachim heintz
SubjectRe: [Csnd-dev] Change in "if"
i expected -1 as p3 to create an 'infinite' long note.  in 
https://csound.com/docs/manual/i.html:

A negative value will initiate a held note (see also ihold). A negative 
value can also be used for 'always on' instruments like reverberation.

but obviously i was wrong, and the score line
	i 1 1 -1
terminates csound immediately after calling instrument 1, if nothing 
keeps csound running, like e 3600 or similar.

	joachim



On 27/10/18 16:32, Victor Lazzarini wrote:
> The thing is, the report was saying that if — then was behaving differently
> to if — goto and there was nothing there about Csound having
> to carry on for longer.  The if - then is behaving as expected.
>
> The score behaves as I would expect. It issues 1 event for 1 sec and
> then closes csound. If there is no score, Csound continues on forever,
> or if there is an f z statement, or an e 10000 etc
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 27 Oct 2018, at 14:50, joachim heintz  wrote:
>>
>> just to note that it works when i replace the score line by
>> 	schedule 1, 1, -1
>>
>> so it seems to be a score issue.
>>
>>
>>
>> On 27/10/18 13:35, Victor Lazzarini wrote:
>>> Maybe this has been addressed in 6.12? Can't recall anything though.
>>>
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>> On 27 Oct 2018, at 12:22, Michael Gogins >> > wrote:
>>>
>>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>>>> package.
>>>>
>>>> On Sat, Oct 27, 2018, 03:56 joachim heintz >>>  wrote:
>>>>
>>>>    for me, for any -1 as p3 csound exits immediately with the message:
>>>>    Score finished in csoundPerformKsmps() with 2.
>>>>
>>>>    this does happen in all cases:
>>>>    - nothing in the instrument at all except print
>>>>    - any if-condition which changes -1 to any positive number. (both if
>>>>    condition work for me but don't have any effect because of the exit.)
>>>>
>>>>    this is with linux and csound develop from today.
>>>>
>>>>            joachim
>>>>
>>>>
>>>>    On 26/10/18 22:42, Victor Lazzarini wrote:
>>>>    > It works here as well.
>>>>    >
>>>>    >  new alloc for instr 1:
>>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>>    1:  p3 = 1.000
>>>>    > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>>>    >
>>>>    > If I use i1 1 -1 I get
>>>>    >
>>>>    > new alloc for instr 1:
>>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>>    1:  p3 = 10000000.000
>>>>    >
>>>>    > ========================
>>>>    > Prof. Victor Lazzarini
>>>>    > Dean of Arts, Celtic Studies, and Philosophy,
>>>>    > Maynooth University,
>>>>    > Maynooth, Co Kildare, Ireland
>>>>    > Tel: 00 353 7086936
>>>>    > Fax: 00 353 1 7086952
>>>>    >
>>>>    >> On 26 Oct 2018, at 20:25, jpff >>>    > wrote:
>>>>    >>
>>>>    >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>>>    score? Actually it works in that case as well.
>>>>    >>
>>>>    >>
>>>>    >>
>>>>    >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>>>    >>
>>>>    >>> The behavior of the "if" statement, or of comparisons between
>>>>    pfields
>>>>    >>> and other variables, appears to have changed recently.
>>>>    >>>
>>>>    >>> The following CSD file demonstrates the change in behavior.
>>>>    >>>
>>>>    >>> 
>>>>    >>> 
>>>>    >>> instr 1
>>>>    >>> prints "Replace p3 with a positive long value for indefinite
>>>>    notes."
>>>>    >>> ; This block does not work. It did used to work and is used in
>>>>    much of my code.
>>>>    >>> ;if p3 == -1 then
>>>>    >>> ;    p3 = 10000000
>>>>    >>> ;endif
>>>>    >>> ; This block does work.
>>>>    >>> if p3 != -1 goto non_indefinite
>>>>    >>>   p3 = 10000000
>>>>    >>> non_indefinite:
>>>>    >>>
>>>>    >>> print p3
>>>>    >>> endin
>>>>    >>> 
>>>>    >>> 
>>>>    >>> i 1 1 1
>>>>    >>> 
>>>>    >>> 
>>>>    >>>
>>>>    >>> -----------------------------------------------------
>>>>    >>> Michael Gogins
>>>>    >>> Irreducible Productions
>>>>    >>> http://michaelgogins.tumblr.com
>>>>    >>> Michael dot Gogins at gmail dot com
>>>>    >>>
>>>>    >
>>>>

Date2018-10-28 12:38
FromMauro Giubileo
SubjectRe: [Csnd-dev] Change in "if"

That's could be a bug... I tried this too and doesn't work:

<CsoundSynthesizer>

<CsOptions>

-odac -d

</CsOptions>

<CsInstruments>

 

sr = 44100

ksmps = 32

nchnls = 2

0dbfs  = 1

instr 1

 aout oscili 0.5, 440
      ihold

      outs   aout, aout

endin

 

</CsInstruments>

<CsScore>

i1 1 1

</CsScore>

"ihold" should make the note become "held", but instead the performance stops immediately after the instrument start. The same thing happens if you use "-1" for the P3 param in the score.

Regards,
Mauro

Il 2018-10-28 11:15 joachim heintz ha scritto:

i expected -1 as p3 to create an 'infinite' long note.  in https://csound.com/docs/manual/i.html:

A negative value will initiate a held note (see also ihold). A negative value can also be used for 'always on' instruments like reverberation.

but obviously i was wrong, and the score line
    i 1 1 -1
terminates csound immediately after calling instrument 1, if nothing keeps csound running, like e 3600 or similar.

    joachim



On 27/10/18 16:32, Victor Lazzarini wrote:
The thing is, the report was saying that if — then was behaving differently
to if — goto and there was nothing there about Csound having
to carry on for longer.  The if - then is behaving as expected.

The score behaves as I would expect. It issues 1 event for 1 sec and
then closes csound. If there is no score, Csound continues on forever,
or if there is an f z statement, or an e 10000 etc
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 27 Oct 2018, at 14:50, joachim heintz <jh@joachimheintz.de> wrote:

just to note that it works when i replace the score line by
    schedule 1, 1, -1

so it seems to be a score issue.



On 27/10/18 13:35, Victor Lazzarini wrote:
Maybe this has been addressed in 6.12? Can't recall anything though.


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

On 27 Oct 2018, at 12:22, Michael Gogins <michael.gogins@GMAIL.COM
<mailto:michael.gogins@GMAIL.COM>> wrote:

I forgot to mention my issue is for Csound 6.11 in the latest Debian
package.

On Sat, Oct 27, 2018, 03:56 joachim heintz <jh@joachimheintz.de
<mailto:jh@joachimheintz.de> wrote:

   for me, for any -1 as p3 csound exits immediately with the message:
   Score finished in csoundPerformKsmps() with 2.

   this does happen in all cases:
   - nothing in the instrument at all except print
   - any if-condition which changes -1 to any positive number. (both if
   condition work for me but don't have any effect because of the exit.)

   this is with linux and csound develop from today.

           joachim


   On 26/10/18 22:42, Victor Lazzarini wrote:
   > It works here as well.
   >
   >  new alloc for instr 1:
   > Replace p3 with a positive long value for indefinite notes.instr
   1:  p3 = 1.000
   > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
   >
   > If I use i1 1 -1 I get
   >
   > new alloc for instr 1:
   > Replace p3 with a positive long value for indefinite notes.instr
   1:  p3 = 10000000.000
   >
   > ========================
   > Prof. Victor Lazzarini
   > Dean of Arts, Celtic Studies, and Philosophy,
   > Maynooth University,
   > Maynooth, Co Kildare, Ireland
   > Tel: 00 353 7086936
   > Fax: 00 353 1 7086952
   >
   >> On 26 Oct 2018, at 20:25, jpff <jpff@codemist.co.uk
   <mailto:jpff@codemist.co.uk>> wrote:
   >>
   >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
   score? Actually it works in that case as well.
   >>
   >>
   >>
   >> On Fri, 26 Oct 2018, Michael Gogins wrote:
   >>
   >>> The behavior of the "if" statement, or of comparisons between
   pfields
   >>> and other variables, appears to have changed recently.
   >>>
   >>> The following CSD file demonstrates the change in behavior.
   >>>
   >>> <CsoundSynthesizer>
   >>> <CsInstruments>
   >>> instr 1
   >>> prints "Replace p3 with a positive long value for indefinite
   notes."
   >>> ; This block does not work. It did used to work and is used in
   much of my code.
   >>> ;if p3 == -1 then
   >>> ;    p3 = 10000000
   >>> ;endif
   >>> ; This block does work.
   >>> if p3 != -1 goto non_indefinite
   >>>   p3 = 10000000
   >>> non_indefinite:
   >>>
   >>> print p3
   >>> endin
   >>> </CsInstruments>
   >>> <CsScore>
   >>> i 1 1 1
   >>> </CsScore>
   >>> </CsoundSynthesizer>
   >>>
   >>> -----------------------------------------------------
   >>> Michael Gogins
   >>> Irreducible Productions
   >>> http://michaelgogins.tumblr.com
   >>> Michael dot Gogins at gmail dot com
   >>>
   >

Date2018-10-28 20:51
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
if you add this to score

f 0 z

it does.

There is no bug, you are asking the instrument to hold, but Csound will stop playing after the
score elapses (i1 1 1). 

If you set p3 to -1, it will hold, as long as Csound is open.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 28 Oct 2018, at 12:38, Mauro Giubileo  wrote:
> 
> That's could be a bug... I tried this too and doesn't work:
> 
> 
> 
> 
> -odac -d
> 
> 
>  
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs  = 1
> instr 1
> 
>  aout oscili 0.5, 440
>       ihold
>       outs   aout, aout
> 
> endin
>  
> 
> 
> i1 1 1
> 
> "ihold" should make the note become "held", but instead the performance stops immediately after the instrument start. The same thing happens if you use "-1" for the P3 param in the score.
> 
> Regards,
> Mauro
> 
> Il 2018-10-28 11:15 joachim heintz ha scritto:
> 
>> i expected -1 as p3 to create an 'infinite' long note.  in https://csound.com/docs/manual/i.html:
>> 
>> A negative value will initiate a held note (see also ihold). A negative value can also be used for 'always on' instruments like reverberation.
>> 
>> but obviously i was wrong, and the score line
>>     i 1 1 -1
>> terminates csound immediately after calling instrument 1, if nothing keeps csound running, like e 3600 or similar.
>> 
>>     joachim
>> 
>> 
>> 
>> On 27/10/18 16:32, Victor Lazzarini wrote:
>>> The thing is, the report was saying that if — then was behaving differently
>>> to if — goto and there was nothing there about Csound having
>>> to carry on for longer.  The if - then is behaving as expected.
>>> 
>>> The score behaves as I would expect. It issues 1 event for 1 sec and
>>> then closes csound. If there is no score, Csound continues on forever,
>>> or if there is an f z statement, or an e 10000 etc
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 27 Oct 2018, at 14:50, joachim heintz  wrote:
>>>> 
>>>> just to note that it works when i replace the score line by
>>>>     schedule 1, 1, -1
>>>> 
>>>> so it seems to be a score issue.
>>>> 
>>>> 
>>>> 
>>>> On 27/10/18 13:35, Victor Lazzarini wrote:
>>>>> Maybe this has been addressed in 6.12? Can't recall anything though.
>>>>> 
>>>>> 
>>>>> Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>> Maynooth University
>>>>> Ireland
>>>>> 
>>>>> On 27 Oct 2018, at 12:22, Michael Gogins >>>> > wrote:
>>>>> 
>>>>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>>>>>> package.
>>>>>> 
>>>>>> On Sat, Oct 27, 2018, 03:56 joachim heintz >>>>>  wrote:
>>>>>> 
>>>>>>    for me, for any -1 as p3 csound exits immediately with the message:
>>>>>>    Score finished in csoundPerformKsmps() with 2.
>>>>>> 
>>>>>>    this does happen in all cases:
>>>>>>    - nothing in the instrument at all except print
>>>>>>    - any if-condition which changes -1 to any positive number. (both if
>>>>>>    condition work for me but don't have any effect because of the exit.)
>>>>>> 
>>>>>>    this is with linux and csound develop from today.
>>>>>> 
>>>>>>            joachim
>>>>>> 
>>>>>> 
>>>>>>    On 26/10/18 22:42, Victor Lazzarini wrote:
>>>>>>    > It works here as well.
>>>>>>    >
>>>>>>    >  new alloc for instr 1:
>>>>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>>>>    1:  p3 = 1.000
>>>>>>    > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>>>>>    >
>>>>>>    > If I use i1 1 -1 I get
>>>>>>    >
>>>>>>    > new alloc for instr 1:
>>>>>>    > Replace p3 with a positive long value for indefinite notes.instr
>>>>>>    1:  p3 = 10000000.000
>>>>>>    >
>>>>>>    > ========================
>>>>>>    > Prof. Victor Lazzarini
>>>>>>    > Dean of Arts, Celtic Studies, and Philosophy,
>>>>>>    > Maynooth University,
>>>>>>    > Maynooth, Co Kildare, Ireland
>>>>>>    > Tel: 00 353 7086936
>>>>>>    > Fax: 00 353 1 7086952
>>>>>>    >
>>>>>>    >> On 26 Oct 2018, at 20:25, jpff >>>>>    > wrote:
>>>>>>    >>
>>>>>>    >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>>>>>    score? Actually it works in that case as well.
>>>>>>    >>
>>>>>>    >>
>>>>>>    >>
>>>>>>    >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>>>>>    >>
>>>>>>    >>> The behavior of the "if" statement, or of comparisons between
>>>>>>    pfields
>>>>>>    >>> and other variables, appears to have changed recently.
>>>>>>    >>>
>>>>>>    >>> The following CSD file demonstrates the change in behavior.
>>>>>>    >>>
>>>>>>    >>> 
>>>>>>    >>> 
>>>>>>    >>> instr 1
>>>>>>    >>> prints "Replace p3 with a positive long value for indefinite
>>>>>>    notes."
>>>>>>    >>> ; This block does not work. It did used to work and is used in
>>>>>>    much of my code.
>>>>>>    >>> ;if p3 == -1 then
>>>>>>    >>> ;    p3 = 10000000
>>>>>>    >>> ;endif
>>>>>>    >>> ; This block does work.
>>>>>>    >>> if p3 != -1 goto non_indefinite
>>>>>>    >>>   p3 = 10000000
>>>>>>    >>> non_indefinite:
>>>>>>    >>>
>>>>>>    >>> print p3
>>>>>>    >>> endin
>>>>>>    >>> 
>>>>>>    >>> 
>>>>>>    >>> i 1 1 1
>>>>>>    >>> 
>>>>>>    >>> 
>>>>>>    >>>
>>>>>>    >>> -----------------------------------------------------
>>>>>>    >>> Michael Gogins
>>>>>>    >>> Irreducible Productions
>>>>>>    >>> http://michaelgogins.tumblr.com
>>>>>>    >>> Michael dot Gogins at gmail dot com
>>>>>>   

Date2018-10-28 20:52
FromVictor Lazzarini
SubjectRe: [Csnd-dev] Change in "if"
This is nothing to do with setting p3 to -1, but with Csound closing. Just add a f 0 z and you
will see the infinite long note.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 28 Oct 2018, at 10:15, joachim heintz  wrote:
> 
> i expected -1 as p3 to create an 'infinite' long note.  in https://csound.com/docs/manual/i.html:
> 
> A negative value will initiate a held note (see also ihold). A negative value can also be used for 'always on' instruments like reverberation.
> 
> but obviously i was wrong, and the score line
> 	i 1 1 -1
> terminates csound immediately after calling instrument 1, if nothing keeps csound running, like e 3600 or similar.
> 
> 	joachim
> 
> 
> 
> On 27/10/18 16:32, Victor Lazzarini wrote:
>> The thing is, the report was saying that if — then was behaving differently
>> to if — goto and there was nothing there about Csound having
>> to carry on for longer.  The if - then is behaving as expected.
>> 
>> The score behaves as I would expect. It issues 1 event for 1 sec and
>> then closes csound. If there is no score, Csound continues on forever,
>> or if there is an f z statement, or an e 10000 etc
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 27 Oct 2018, at 14:50, joachim heintz  wrote:
>>> 
>>> just to note that it works when i replace the score line by
>>> 	schedule 1, 1, -1
>>> 
>>> so it seems to be a score issue.
>>> 
>>> 
>>> 
>>> On 27/10/18 13:35, Victor Lazzarini wrote:
>>>> Maybe this has been addressed in 6.12? Can't recall anything though.
>>>> 
>>>> 
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>> 
>>>> On 27 Oct 2018, at 12:22, Michael Gogins >>> > wrote:
>>>> 
>>>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
>>>>> package.
>>>>> 
>>>>> On Sat, Oct 27, 2018, 03:56 joachim heintz >>>>  wrote:
>>>>> 
>>>>>   for me, for any -1 as p3 csound exits immediately with the message:
>>>>>   Score finished in csoundPerformKsmps() with 2.
>>>>> 
>>>>>   this does happen in all cases:
>>>>>   - nothing in the instrument at all except print
>>>>>   - any if-condition which changes -1 to any positive number. (both if
>>>>>   condition work for me but don't have any effect because of the exit.)
>>>>> 
>>>>>   this is with linux and csound develop from today.
>>>>> 
>>>>>           joachim
>>>>> 
>>>>> 
>>>>>   On 26/10/18 22:42, Victor Lazzarini wrote:
>>>>>   > It works here as well.
>>>>>   >
>>>>>   >  new alloc for instr 1:
>>>>>   > Replace p3 with a positive long value for indefinite notes.instr
>>>>>   1:  p3 = 1.000
>>>>>   > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>>>>>   >
>>>>>   > If I use i1 1 -1 I get
>>>>>   >
>>>>>   > new alloc for instr 1:
>>>>>   > Replace p3 with a positive long value for indefinite notes.instr
>>>>>   1:  p3 = 10000000.000
>>>>>   >
>>>>>   > ========================
>>>>>   > Prof. Victor Lazzarini
>>>>>   > Dean of Arts, Celtic Studies, and Philosophy,
>>>>>   > Maynooth University,
>>>>>   > Maynooth, Co Kildare, Ireland
>>>>>   > Tel: 00 353 7086936
>>>>>   > Fax: 00 353 1 7086952
>>>>>   >
>>>>>   >> On 26 Oct 2018, at 20:25, jpff >>>>   > wrote:
>>>>>   >>
>>>>>   >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
>>>>>   score? Actually it works in that case as well.
>>>>>   >>
>>>>>   >>
>>>>>   >>
>>>>>   >> On Fri, 26 Oct 2018, Michael Gogins wrote:
>>>>>   >>
>>>>>   >>> The behavior of the "if" statement, or of comparisons between
>>>>>   pfields
>>>>>   >>> and other variables, appears to have changed recently.
>>>>>   >>>
>>>>>   >>> The following CSD file demonstrates the change in behavior.
>>>>>   >>>
>>>>>   >>> 
>>>>>   >>> 
>>>>>   >>> instr 1
>>>>>   >>> prints "Replace p3 with a positive long value for indefinite
>>>>>   notes."
>>>>>   >>> ; This block does not work. It did used to work and is used in
>>>>>   much of my code.
>>>>>   >>> ;if p3 == -1 then
>>>>>   >>> ;    p3 = 10000000
>>>>>   >>> ;endif
>>>>>   >>> ; This block does work.
>>>>>   >>> if p3 != -1 goto non_indefinite
>>>>>   >>>   p3 = 10000000
>>>>>   >>> non_indefinite:
>>>>>   >>>
>>>>>   >>> print p3
>>>>>   >>> endin
>>>>>   >>> 
>>>>>   >>> 
>>>>>   >>> i 1 1 1
>>>>>   >>> 
>>>>>   >>> 
>>>>>   >>>
>>>>>   >>> -----------------------------------------------------
>>>>>   >>> Michael Gogins
>>>>>   >>> Irreducible Productions
>>>>>   >>> http://michaelgogins.tumblr.com
>>>>>   >>> Michael dot Gogins at gmail dot com
>>>>>   >>>
>>>>>   >

Date2018-10-28 20:53
FromSteven Yi
SubjectRe: [Csnd-dev] Change in "if"
Another option is to use --daemon which will leave Csound running as a
server and continue to render until explicitly exited.
On Sun, Oct 28, 2018 at 4:51 PM Victor Lazzarini  wrote:
>
> if you add this to score
>
> f 0 z
>
> it does.
>
> There is no bug, you are asking the instrument to hold, but Csound will stop playing after the
> score elapses (i1 1 1).
>
> If you set p3 to -1, it will hold, as long as Csound is open.
>
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
> > On 28 Oct 2018, at 12:38, Mauro Giubileo  wrote:
> >
> > That's could be a bug... I tried this too and doesn't work:
> >
> > 
> >
> > 
> > -odac -d
> > 
> > 
> >
> > sr = 44100
> > ksmps = 32
> > nchnls = 2
> > 0dbfs  = 1
> > instr 1
> >
> >  aout oscili 0.5, 440
> >       ihold
> >       outs   aout, aout
> >
> > endin
> >
> > 
> > 
> > i1 1 1
> > 
> > "ihold" should make the note become "held", but instead the performance stops immediately after the instrument start. The same thing happens if you use "-1" for the P3 param in the score.
> >
> > Regards,
> > Mauro
> >
> > Il 2018-10-28 11:15 joachim heintz ha scritto:
> >
> >> i expected -1 as p3 to create an 'infinite' long note.  in https://csound.com/docs/manual/i.html:
> >>
> >> A negative value will initiate a held note (see also ihold). A negative value can also be used for 'always on' instruments like reverberation.
> >>
> >> but obviously i was wrong, and the score line
> >>     i 1 1 -1
> >> terminates csound immediately after calling instrument 1, if nothing keeps csound running, like e 3600 or similar.
> >>
> >>     joachim
> >>
> >>
> >>
> >> On 27/10/18 16:32, Victor Lazzarini wrote:
> >>> The thing is, the report was saying that if — then was behaving differently
> >>> to if — goto and there was nothing there about Csound having
> >>> to carry on for longer.  The if - then is behaving as expected.
> >>>
> >>> The score behaves as I would expect. It issues 1 event for 1 sec and
> >>> then closes csound. If there is no score, Csound continues on forever,
> >>> or if there is an f z statement, or an e 10000 etc
> >>> ========================
> >>> Prof. Victor Lazzarini
> >>> Dean of Arts, Celtic Studies, and Philosophy,
> >>> Maynooth University,
> >>> Maynooth, Co Kildare, Ireland
> >>> Tel: 00 353 7086936
> >>> Fax: 00 353 1 7086952
> >>>
> >>>> On 27 Oct 2018, at 14:50, joachim heintz  wrote:
> >>>>
> >>>> just to note that it works when i replace the score line by
> >>>>     schedule 1, 1, -1
> >>>>
> >>>> so it seems to be a score issue.
> >>>>
> >>>>
> >>>>
> >>>> On 27/10/18 13:35, Victor Lazzarini wrote:
> >>>>> Maybe this has been addressed in 6.12? Can't recall anything though.
> >>>>>
> >>>>>
> >>>>> Victor Lazzarini
> >>>>> Dean of Arts, Celtic Studies, and Philosophy
> >>>>> Maynooth University
> >>>>> Ireland
> >>>>>
> >>>>> On 27 Oct 2018, at 12:22, Michael Gogins  >>>>> > wrote:
> >>>>>
> >>>>>> I forgot to mention my issue is for Csound 6.11 in the latest Debian
> >>>>>> package.
> >>>>>>
> >>>>>> On Sat, Oct 27, 2018, 03:56 joachim heintz  >>>>>>  wrote:
> >>>>>>
> >>>>>>    for me, for any -1 as p3 csound exits immediately with the message:
> >>>>>>    Score finished in csoundPerformKsmps() with 2.
> >>>>>>
> >>>>>>    this does happen in all cases:
> >>>>>>    - nothing in the instrument at all except print
> >>>>>>    - any if-condition which changes -1 to any positive number. (both if
> >>>>>>    condition work for me but don't have any effect because of the exit.)
> >>>>>>
> >>>>>>    this is with linux and csound develop from today.
> >>>>>>
> >>>>>>            joachim
> >>>>>>
> >>>>>>
> >>>>>>    On 26/10/18 22:42, Victor Lazzarini wrote:
> >>>>>>    > It works here as well.
> >>>>>>    >
> >>>>>>    >  new alloc for instr 1:
> >>>>>>    > Replace p3 with a positive long value for indefinite notes.instr
> >>>>>>    1:  p3 = 1.000
> >>>>>>    > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
> >>>>>>    >
> >>>>>>    > If I use i1 1 -1 I get
> >>>>>>    >
> >>>>>>    > new alloc for instr 1:
> >>>>>>    > Replace p3 with a positive long value for indefinite notes.instr
> >>>>>>    1:  p3 = 10000000.000
> >>>>>>    >
> >>>>>>    > ========================
> >>>>>>    > Prof. Victor Lazzarini
> >>>>>>    > Dean of Arts, Celtic Studies, and Philosophy,
> >>>>>>    > Maynooth University,
> >>>>>>    > Maynooth, Co Kildare, Ireland
> >>>>>>    > Tel: 00 353 7086936
> >>>>>>    > Fax: 00 353 1 7086952
> >>>>>>    >
> >>>>>>    >> On 26 Oct 2018, at 20:25, jpff  >>>>>>    > wrote:
> >>>>>>    >>
> >>>>>>    >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
> >>>>>>    score? Actually it works in that case as well.
> >>>>>>    >>
> >>>>>>    >>
> >>>>>>    >>
> >>>>>>    >> On Fri, 26 Oct 2018, Michael Gogins wrote:
> >>>>>>    >>
> >>>>>>    >>> The behavior of the "if" statement, or of comparisons between
> >>>>>>    pfields
> >>>>>>    >>> and other variables, appears to have changed recently.
> >>>>>>    >>>
> >>>>>>    >>> The following CSD file demonstrates the change in behavior.
> >>>>>>    >>>
> >>>>>>    >>> 
> >>>>>>    >>> 
> >>>>>>    >>> instr 1
> >>>>>>    >>> prints "Replace p3 with a positive long value for indefinite
> >>>>>>    notes."
> >>>>>>    >>> ; This block does not work. It did used to work and is used in
> >>>>>>    much of my code.
> >>>>>>    >>> ;if p3 == -1 then
> >>>>>>    >>> ;    p3 = 10000000
> >>>>>>    >>> ;endif
> >>>>>>    >>> ; This block does work.
> >>>>>>    >>> if p3 != -1 goto non_indefinite
> >>>>>>    >>>   p3 = 10000000
> >>>>>>    >>> non_indefinite:
> >>>>>>    >>>
> >>>>>>    >>> print p3
> >>>>>>    >>> endin
> >>>>>>    >>> 
> >>>>>>    >>> 
> >>>>>>    >>> i 1 1 1
> >>>>>>    >>> 
> >>>>>>    >>> 
> >>>>>>    >>>
> >>>>>>    >>> -----------------------------------------------------
> >>>>>>    >>> Michael Gogins
> >>>>>>    >>> Irreducible Productions
> >>>>>>    >>> http://michaelgogins.tumblr.com
> >>>>>>    >>> Michael dot Gogins at gmail dot com
> >>>>>>    >>>
> >>>>>>    >

Date2018-10-28 21:05
FromMauro Giubileo
SubjectRe: [Csnd-dev] Change in "if"

That's good to know. Thanks for the explanation!

Regards,
Mauro


Il 2018-10-28 21:51 Victor Lazzarini ha scritto:

if you add this to score

f 0 z

it does.

There is no bug, you are asking the instrument to hold, but Csound will stop playing after the
score elapses (i1 1 1).

If you set p3 to -1, it will hold, as long as Csound is open.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 28 Oct 2018, at 12:38, Mauro Giubileo <mgiubileo@COMPUTERALTAFED.IT> wrote:

That's could be a bug... I tried this too and doesn't work:

<CsoundSynthesizer>

<CsOptions>
-odac -d
</CsOptions>
<CsInstruments>
 
sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1
instr 1

 aout oscili 0.5, 440
      ihold
      outs   aout, aout

endin
 
</CsInstruments>
<CsScore>
i1 1 1
</CsScore>
"ihold" should make the note become "held", but instead the performance stops immediately after the instrument start. The same thing happens if you use "-1" for the P3 param in the score.

Regards,
Mauro

Il 2018-10-28 11:15 joachim heintz ha scritto:

i expected -1 as p3 to create an 'infinite' long note.  in https://csound.com/docs/manual/i.html:

A negative value will initiate a held note (see also ihold). A negative value can also be used for 'always on' instruments like reverberation.

but obviously i was wrong, and the score line
    i 1 1 -1
terminates csound immediately after calling instrument 1, if nothing keeps csound running, like e 3600 or similar.

    joachim



On 27/10/18 16:32, Victor Lazzarini wrote:
The thing is, the report was saying that if — then was behaving differently
to if — goto and there was nothing there about Csound having
to carry on for longer.  The if - then is behaving as expected.

The score behaves as I would expect. It issues 1 event for 1 sec and
then closes csound. If there is no score, Csound continues on forever,
or if there is an f z statement, or an e 10000 etc
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

On 27 Oct 2018, at 14:50, joachim heintz <jh@joachimheintz.de> wrote:

just to note that it works when i replace the score line by
    schedule 1, 1, -1

so it seems to be a score issue.



On 27/10/18 13:35, Victor Lazzarini wrote:
Maybe this has been addressed in 6.12? Can't recall anything though.


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

On 27 Oct 2018, at 12:22, Michael Gogins <michael.gogins@GMAIL.COM
<mailto:michael.gogins@GMAIL.COM>> wrote:

I forgot to mention my issue is for Csound 6.11 in the latest Debian
package.

On Sat, Oct 27, 2018, 03:56 joachim heintz <jh@joachimheintz.de
<mailto:jh@joachimheintz.de> wrote:

   for me, for any -1 as p3 csound exits immediately with the message:
   Score finished in csoundPerformKsmps() with 2.

   this does happen in all cases:
   - nothing in the instrument at all except print
   - any if-condition which changes -1 to any positive number. (both if
   condition work for me but don't have any effect because of the exit.)

   this is with linux and csound develop from today.

           joachim


   On 26/10/18 22:42, Victor Lazzarini wrote:
   > It works here as well.
   >
   >  new alloc for instr 1:
   > Replace p3 with a positive long value for indefinite notes.instr
   1:  p3 = 1.000
   > B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
   >
   > If I use i1 1 -1 I get
   >
   > new alloc for instr 1:
   > Replace p3 with a positive long value for indefinite notes.instr
   1:  p3 = 10000000.000
   >
   > ========================
   > Prof. Victor Lazzarini
   > Dean of Arts, Celtic Studies, and Philosophy,
   > Maynooth University,
   > Maynooth, Co Kildare, Ireland
   > Tel: 00 353 7086936
   > Fax: 00 353 1 7086952
   >
   >> On 26 Oct 2018, at 20:25, jpff <jpff@codemist.co.uk
   <mailto:jpff@codemist.co.uk>> wrote:
   >>
   >> I see nohing wrong here.  Or did you mean p3 to be -1 in the
   score? Actually it works in that case as well.
   >>
   >>
   >>
   >> On Fri, 26 Oct 2018, Michael Gogins wrote:
   >>
   >>> The behavior of the "if" statement, or of comparisons between
   pfields
   >>> and other variables, appears to have changed recently.
   >>>
   >>> The following CSD file demonstrates the change in behavior.
   >>>
   >>> <CsoundSynthesizer>
   >>> <CsInstruments>
   >>> instr 1
   >>> prints "Replace p3 with a positive long value for indefinite
   notes."
   >>> ; This block does not work. It did used to work and is used in
   much of my code.
   >>> ;if p3 == -1 then
   >>> ;    p3 = 10000000
   >>> ;endif
   >>> ; This block does work.
   >>> if p3 != -1 goto non_indefinite
   >>>   p3 = 10000000
   >>> non_indefinite:
   >>>
   >>> print p3
   >>> endin
   >>> </CsInstruments>
   >>> <CsScore>
   >>> i 1 1 1
   >>> </CsScore>
   >>> </CsoundSynthesizer>
   >>>
   >>> -----------------------------------------------------
   >>> Michael Gogins
   >>> Irreducible Productions
   >>> http://michaelgogins.tumblr.com
   >>> Michael dot Gogins at gmail dot com
   >>>
   >