[Csnd] error: perf-pass statements illegal in header blk (cngoto)

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

[Csnd] error: perf-pass statements illegal in header blk (cngoto)

Dominik K
Hi,
still cannot understand why the code snippet shown below causes an error.
Many thanks,
Dominik

<CsOptions>
</CsOptions>
<CsInstruments>
  sr = 44100
  ksmps = 64
  nchnls = 2
  0dbfs = 1
 
  iCount = 0
  loop:
    printf_i "iCount = %d\n", 1, iCount
    if (iCount == 1) then
      prints "iCount = 1!!!\n"
    endif
  loop_lt iCount, 1, 16, loop
</CsInstruments>
<CsScore>
i0 0 3600
</CsScore>
</CsoundSynthesizer>

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] error: perf-pass statements illegal in header blk (cngoto)

Steven Yi

if-then runs at k-rate, while if-ithen only runs at init time. Try changing the then to ithen.


On Wed, Sep 27, 2017, 05:10 Dominik K <[hidden email]> wrote:
Hi,
still cannot understand why the code snippet shown below causes an error.
Many thanks,
Dominik

<CsOptions>
</CsOptions>
<CsInstruments>
  sr = 44100
  ksmps = 64
  nchnls = 2
  0dbfs = 1

  iCount = 0
  loop:
    printf_i "iCount = %d\n", 1, iCount
    if (iCount == 1) then
      prints "iCount = 1!!!\n"
    endif
  loop_lt iCount, 1, 16, loop
</CsInstruments>
<CsScore>
i0 0 3600
</CsScore>
</CsoundSynthesizer>

Csound mailing list
[hidden email]
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 [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] error: perf-pass statements illegal in header blk (cngoto)

Victor Lazzarini-2
and there is no perf-time outside instruments and UDOs.
========================
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 Sep 2017, at 09:29, Steven Yi <[hidden email]> wrote:
>
> if-then runs at k-rate, while if-ithen only runs at init time. Try changing the then to ithen.
>
>
> On Wed, Sep 27, 2017, 05:10 Dominik K <[hidden email]> wrote:
> Hi,
> still cannot understand why the code snippet shown below causes an error.
> Many thanks,
> Dominik
>
> <CsOptions>
> </CsOptions>
> <CsInstruments>
>   sr = 44100
>   ksmps = 64
>   nchnls = 2
>   0dbfs = 1
>
>   iCount = 0
>   loop:
>     printf_i "iCount = %d\n", 1, iCount
>     if (iCount == 1) then
>       prints "iCount = 1!!!\n"
>     endif
>   loop_lt iCount, 1, 16, loop
> </CsInstruments>
> <CsScore>
> i0 0 3600
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list
> [hidden email]
> 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 [hidden email] 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] error: perf-pass statements illegal in header blk (cngoto)

Dominik K
In reply to this post by Steven Yi

Many thanks Steven !!!

I think it might be a good idea to add this to the if opcode description.

Cheers

Dominik


On 27/09/2017 10:29, Steven Yi wrote:

if-then runs at k-rate, while if-ithen only runs at init time. Try changing the then to ithen.


On Wed, Sep 27, 2017, 05:10 Dominik K <[hidden email]> wrote:
Hi,
still cannot understand why the code snippet shown below causes an error.
Many thanks,
Dominik

<CsOptions>
</CsOptions>
<CsInstruments>
  sr = 44100
  ksmps = 64
  nchnls = 2
  0dbfs = 1

  iCount = 0
  loop:
    printf_i "iCount = %d\n", 1, iCount
    if (iCount == 1) then
      prints "iCount = 1!!!\n"
    endif
  loop_lt iCount, 1, 16, loop
</CsInstruments>
<CsScore>
i0 0 3600
</CsScore>
</CsoundSynthesizer>

Csound mailing list
[hidden email]
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 [hidden email] 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 [hidden email] 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