Csound Csound-dev Csound-tekno Search About

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

Date2017-09-27 09:10
FromDominik K <00000289a377b150-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] error: perf-pass statements illegal in header blk (cngoto)
Hi,
still cannot understand why the code snippet shown below causes an error.
Many thanks,
Dominik




  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


i0 0 3600



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

Date2017-09-27 09:29
FromSteven Yi
SubjectRe: [Csnd] error: perf-pass statements illegal in header blk (cngoto)

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 <00000289a377b150-dmarc-request@listserv.heanet.ie> 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
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

Date2017-09-27 09:38
FromVictor Lazzarini
SubjectRe: [Csnd] error: perf-pass statements illegal in header blk (cngoto)
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  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 <00000289a377b150-dmarc-request@listserv.heanet.ie> wrote:
> Hi,
> still cannot understand why the code snippet shown below causes an error.
> Many thanks,
> Dominik
> 
> 
> 
> 
>   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
> 
> 
> i0 0 3600
> 
> 
> 
> 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

Date2017-09-27 09:38
From"V. Dominik Kunz" <00000289a377b150-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] error: perf-pass statements illegal in header blk (cngoto)

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 <00000289a377b150-dmarc-request@listserv.heanet.ie> 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
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