Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Csound 7 errors

Date2024-09-08 18:44
FromDave Seidel
Subject[Csnd-dev] Csound 7 errors
Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:

error:  Unable to find opcode entry for 'ftgen' with matching argument types:

Found:
  k ftgen ccccciiiiiiiiiiic

Candidates:
  i ftgen iiiiim
  i ftgen.S iiiSim
  i ftgen.iS iiiiSm
  i ftgen.SS iiiSSm
  i ftgen iiiii[]
  i ftgen iiiSi[]

Line: 24
 from file symmetry.csd (1)
Parsing failed due to syntax errors

The ftgen code is:

; sine table
gi_sin = ftgen(0, 0, 2^18, 10, 1)

; tanh function
gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)

gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 18:52
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.

On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:

error:  Unable to find opcode entry for 'ftgen' with matching argument types:

Found:
  k ftgen ccccciiiiiiiiiiic

Candidates:
  i ftgen iiiiim
  i ftgen.S iiiSim
  i ftgen.iS iiiiSm
  i ftgen.SS iiiSSm
  i ftgen iiiii[]
  i ftgen iiiSi[]

Line: 24
 from file symmetry.csd (1)
Parsing failed due to syntax errors

The ftgen code is:

; sine table
gi_sin = ftgen(0, 0, 2^18, 10, 1)

; tanh function
gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)

gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 20:03
Fromvlz
SubjectRe: [Csnd-dev] Csound 7 errors
It looks like the old parser let this expression compile when it should not have.
The ftgen does not have a k-rate output,  see

https://csound.com/manual/ftgen.html

and this is what the error message is saying. If you change to gi_xxxx, it will work.

The new parser is more strict, I guess. Steven can say more.


> On 8 Sep 2024, at 18:52, Dave Seidel  wrote:
> 
> Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
> 
> On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel  wrote:
> Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
> 
> error:  Unable to find opcode entry for 'ftgen' with matching argument types:
> 
> Found:
>   k ftgen ccccciiiiiiiiiiic
> 
> Candidates:
>   i ftgen iiiiim
>   i ftgen.S iiiSim
>   i ftgen.iS iiiiSm
>   i ftgen.SS iiiSSm
>   i ftgen iiiii[]
>   i ftgen iiiSi[]
> 
> Line: 24
>  from file symmetry.csd (1)
> Parsing failed due to syntax errors
> 
> The ftgen code is:
> 
> ; sine table
> gi_sin = ftgen(0, 0, 2^18, 10, 1)
> 
> ; tanh function
> gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
> 
> gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
> gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
> gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
> gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 20:31
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.

Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).

Now, the problem is

error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)

I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.

So I am still unable to proceed.

On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
It looks like the old parser let this expression compile when it should not have.
The ftgen does not have a k-rate output,  see

https://csound.com/manual/ftgen.html

and this is what the error message is saying. If you change to gi_xxxx, it will work.

The new parser is more strict, I guess. Steven can say more.


> On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>
> Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>
> On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
> Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>
> error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>
> Found:
>   k ftgen ccccciiiiiiiiiiic
>
> Candidates:
>   i ftgen iiiiim
>   i ftgen.S iiiSim
>   i ftgen.iS iiiiSm
>   i ftgen.SS iiiSSm
>   i ftgen iiiii[]
>   i ftgen iiiSi[]
>
> Line: 24
>  from file symmetry.csd (1)
> Parsing failed due to syntax errors
>
> The ftgen code is:
>
> ; sine table
> gi_sin = ftgen(0, 0, 2^18, 10, 1)
>
> ; tanh function
> gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>
> gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
> gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
> gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
> gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 20:35
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
Ok, that one was on me, I screwed up the OPCODE7DIR64 setting.

And now I get "csound command: Segmentation violation" and nothing else. Sigh.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.

Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).

Now, the problem is

error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)

I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.

So I am still unable to proceed.

On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
It looks like the old parser let this expression compile when it should not have.
The ftgen does not have a k-rate output,  see

https://csound.com/manual/ftgen.html

and this is what the error message is saying. If you change to gi_xxxx, it will work.

The new parser is more strict, I guess. Steven can say more.


> On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>
> Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>
> On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
> Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>
> error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>
> Found:
>   k ftgen ccccciiiiiiiiiiic
>
> Candidates:
>   i ftgen iiiiim
>   i ftgen.S iiiSim
>   i ftgen.iS iiiiSm
>   i ftgen.SS iiiSSm
>   i ftgen iiiii[]
>   i ftgen iiiSi[]
>
> Line: 24
>  from file symmetry.csd (1)
> Parsing failed due to syntax errors
>
> The ftgen code is:
>
> ; sine table
> gi_sin = ftgen(0, 0, 2^18, 10, 1)
>
> ; tanh function
> gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>
> gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
> gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
> gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
> gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 20:38
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
...and that was due to their being older DLLs in plugins64. Which is apparently what happens when Csound 7 is installed over Csound 6.

On Sun, Sep 8, 2024 at 3:35 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Ok, that one was on me, I screwed up the OPCODE7DIR64 setting.

And now I get "csound command: Segmentation violation" and nothing else. Sigh.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.

Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).

Now, the problem is

error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)

I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.

So I am still unable to proceed.

On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
It looks like the old parser let this expression compile when it should not have.
The ftgen does not have a k-rate output,  see

https://csound.com/manual/ftgen.html

and this is what the error message is saying. If you change to gi_xxxx, it will work.

The new parser is more strict, I guess. Steven can say more.


> On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>
> Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>
> On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
> Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>
> error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>
> Found:
>   k ftgen ccccciiiiiiiiiiic
>
> Candidates:
>   i ftgen iiiiim
>   i ftgen.S iiiSim
>   i ftgen.iS iiiiSm
>   i ftgen.SS iiiSSm
>   i ftgen iiiii[]
>   i ftgen iiiSi[]
>
> Line: 24
>  from file symmetry.csd (1)
> Parsing failed due to syntax errors
>
> The ftgen code is:
>
> ; sine table
> gi_sin = ftgen(0, 0, 2^18, 10, 1)
>
> ; tanh function
> gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>
> gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
> gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
> gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
> gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 21:06
Fromvlz
SubjectRe: [Csnd-dev] Csound 7 errors
That may be a windows thing. It won’t happen on Mac or Linux. Csound 6 libs do not load on Csound 7 because of version checking.
On the Mac, they are kept in a different place as well.

> On 8 Sep 2024, at 20:38, Dave Seidel  wrote:
> 
> ...and that was due to their being older DLLs in plugins64. Which is apparently what happens when Csound 7 is installed over Csound 6.
> 
> On Sun, Sep 8, 2024 at 3:35 PM Dave Seidel  wrote:
> Ok, that one was on me, I screwed up the OPCODE7DIR64 setting.
> 
> And now I get "csound command: Segmentation violation" and nothing else. Sigh.
> 
> On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel  wrote:
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
> 
> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
> 
> Now, the problem is
> 
> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
> 
> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
> 
> So I am still unable to proceed.
> 
> On Sun, Sep 8, 2024 at 3:03 PM vlz  wrote:
> It looks like the old parser let this expression compile when it should not have.
> The ftgen does not have a k-rate output,  see
> 
> https://csound.com/manual/ftgen.html
> 
> and this is what the error message is saying. If you change to gi_xxxx, it will work.
> 
> The new parser is more strict, I guess. Steven can say more.
> 
> 
> > On 8 Sep 2024, at 18:52, Dave Seidel  wrote:
> > 
> > Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
> > 
> > On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel  wrote:
> > Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
> > 
> > error:  Unable to find opcode entry for 'ftgen' with matching argument types:
> > 
> > Found:
> >   k ftgen ccccciiiiiiiiiiic
> > 
> > Candidates:
> >   i ftgen iiiiim
> >   i ftgen.S iiiSim
> >   i ftgen.iS iiiiSm
> >   i ftgen.SS iiiSSm
> >   i ftgen iiiii[]
> >   i ftgen iiiSi[]
> > 
> > Line: 24
> >  from file symmetry.csd (1)
> > Parsing failed due to syntax errors
> > 
> > The ftgen code is:
> > 
> > ; sine table
> > gi_sin = ftgen(0, 0, 2^18, 10, 1)
> > 
> > ; tanh function
> > gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
> > 
> > gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
> > gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
> > gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
> > gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 21:16
FromSteven Yi
SubjectRe: [Csnd-dev] Csound 7 errors
Definitely looks like a bug to me. I suspect an issue with how = is
optimized out. If you would file a bug in the issue tracker with this,
we can be sure to get to this before release.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel  wrote:
>
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
>
> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
>
> Now, the problem is
>
> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
>
> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
>
> So I am still unable to proceed.
>
> On Sun, Sep 8, 2024 at 3:03 PM vlz  wrote:
>>
>> It looks like the old parser let this expression compile when it should not have.
>> The ftgen does not have a k-rate output,  see
>>
>> https://csound.com/manual/ftgen.html
>>
>> and this is what the error message is saying. If you change to gi_xxxx, it will work.
>>
>> The new parser is more strict, I guess. Steven can say more.
>>
>>
>> > On 8 Sep 2024, at 18:52, Dave Seidel  wrote:
>> >
>> > Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>> >
>> > On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel  wrote:
>> > Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>> >
>> > error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>> >
>> > Found:
>> >   k ftgen ccccciiiiiiiiiiic
>> >
>> > Candidates:
>> >   i ftgen iiiiim
>> >   i ftgen.S iiiSim
>> >   i ftgen.iS iiiiSm
>> >   i ftgen.SS iiiSSm
>> >   i ftgen iiiii[]
>> >   i ftgen iiiSi[]
>> >
>> > Line: 24
>> >  from file symmetry.csd (1)
>> > Parsing failed due to syntax errors
>> >
>> > The ftgen code is:
>> >
>> > ; sine table
>> > gi_sin = ftgen(0, 0, 2^18, 10, 1)
>> >
>> > ; tanh function
>> > gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>> >
>> > gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
>> > gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
>> > gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
>> > gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 21:19
Fromvlz
SubjectRe: [Csnd-dev] Csound 7 errors
> On 8 Sep 2024, at 20:31, Dave Seidel  wrote:
> 
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.

It’s a Csound 6 parser bug in the function syntax. If you replace it with the op syntax,

gk_centaur         ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)

you get an error in Csound 6
error: syntax error, unexpected ')', expecting NEWLINE or ','  (token ")")
 from file test.csd (1), line 15:
 >>> gk_centaur         ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2) <<<

Now, here’s what’s happening with your code. The function code gets translated to

#i2  ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
gk_centaur =  #i2

and here is where the bug raises its head

instr 1
printk2 gk_centaur
endin

gives

new alloc for instr 1:
 i1     0.00000

> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).

I am not sure about the state of any installer outside Mac which I maintain. I would say it’s not ready for production, since it will need some adaptation for Csound 7.
You are welcome to put a PR through with a robust Windows installer.

Date2024-09-08 21:20
Fromvlz
SubjectRe: [Csnd-dev] Csound 7 errors
That’s a bug in Csound 6 not in 7. See my earlier email.

> On 8 Sep 2024, at 21:16, Steven Yi  wrote:
> 
> Definitely looks like a bug to me. I suspect an issue with how = is
> optimized out. If you would file a bug in the issue tracker with this,
> we can be sure to get to this before release.
> 
> On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel  wrote:
>> 
>> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
>> 
>> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
>> 
>> Now, the problem is
>> 
>> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
>> 
>> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
>> 
>> So I am still unable to proceed.
>> 
>> On Sun, Sep 8, 2024 at 3:03 PM vlz  wrote:
>>> 
>>> It looks like the old parser let this expression compile when it should not have.
>>> The ftgen does not have a k-rate output,  see
>>> 
>>> https://csound.com/manual/ftgen.html
>>> 
>>> and this is what the error message is saying. If you change to gi_xxxx, it will work.
>>> 
>>> The new parser is more strict, I guess. Steven can say more.
>>> 
>>> 
>>>> On 8 Sep 2024, at 18:52, Dave Seidel  wrote:
>>>> 
>>>> Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>>>> 
>>>> On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel  wrote:
>>>> Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>>>> 
>>>> error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>>>> 
>>>> Found:
>>>>  k ftgen ccccciiiiiiiiiiic
>>>> 
>>>> Candidates:
>>>>  i ftgen iiiiim
>>>>  i ftgen.S iiiSim
>>>>  i ftgen.iS iiiiSm
>>>>  i ftgen.SS iiiSSm
>>>>  i ftgen iiiii[]
>>>>  i ftgen iiiSi[]
>>>> 
>>>> Line: 24
>>>> from file symmetry.csd (1)
>>>> Parsing failed due to syntax errors
>>>> 
>>>> The ftgen code is:
>>>> 
>>>> ; sine table
>>>> gi_sin = ftgen(0, 0, 2^18, 10, 1)
>>>> 
>>>> ; tanh function
>>>> gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>>>> 
>>>> gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
>>>> gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
>>>> gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
>>>> gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-08 21:23
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
Makes sense, thanks.

On Sun, Sep 8, 2024 at 4:19 PM vlz <viclazzarini@gmail.com> wrote:
> On 8 Sep 2024, at 20:31, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.

It’s a Csound 6 parser bug in the function syntax. If you replace it with the op syntax,

gk_centaur         ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)

you get an error in Csound 6
error: syntax error, unexpected ')', expecting NEWLINE or ','  (token ")")
 from file test.csd (1), line 15:
 >>> gk_centaur         ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2) <<<

Now, here’s what’s happening with your code. The function code gets translated to

#i2  ftgen 80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
gk_centaur =  #i2

and here is where the bug raises its head

instr 1
printk2 gk_centaur
endin

gives

new alloc for instr 1:
 i1     0.00000

> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).

I am not sure about the state of any installer outside Mac which I maintain. I would say it’s not ready for production, since it will need some adaptation for Csound 7.
You are welcome to put a PR through with a robust Windows installer.

Date2024-09-08 21:24
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors
Sorry, Steven, I've lost track of which issue you would like me to create a bug for.

On Sun, Sep 8, 2024 at 4:16 PM Steven Yi <stevenyi@gmail.com> wrote:
Definitely looks like a bug to me. I suspect an issue with how = is
optimized out. If you would file a bug in the issue tracker with this,
we can be sure to get to this before release.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
>
> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
>
> Now, the problem is
>
> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
>
> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
>
> So I am still unable to proceed.
>
> On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
>>
>> It looks like the old parser let this expression compile when it should not have.
>> The ftgen does not have a k-rate output,  see
>>
>> https://csound.com/manual/ftgen.html
>>
>> and this is what the error message is saying. If you change to gi_xxxx, it will work.
>>
>> The new parser is more strict, I guess. Steven can say more.
>>
>>
>> > On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>> >
>> > Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>> >
>> > On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>> > Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>> >
>> > error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>> >
>> > Found:
>> >   k ftgen ccccciiiiiiiiiiic
>> >
>> > Candidates:
>> >   i ftgen iiiiim
>> >   i ftgen.S iiiSim
>> >   i ftgen.iS iiiiSm
>> >   i ftgen.SS iiiSSm
>> >   i ftgen iiiii[]
>> >   i ftgen iiiSi[]
>> >
>> > Line: 24
>> >  from file symmetry.csd (1)
>> > Parsing failed due to syntax errors
>> >
>> > The ftgen code is:
>> >
>> > ; sine table
>> > gi_sin = ftgen(0, 0, 2^18, 10, 1)
>> >
>> > ; tanh function
>> > gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>> >
>> > gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
>> > gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
>> > gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
>> > gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-09 13:45
FromDave Seidel
SubjectRe: [Csnd-dev] Csound 7 errors

On Sun, Sep 8, 2024 at 4:24 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Sorry, Steven, I've lost track of which issue you would like me to create a bug for.

On Sun, Sep 8, 2024 at 4:16 PM Steven Yi <stevenyi@gmail.com> wrote:
Definitely looks like a bug to me. I suspect an issue with how = is
optimized out. If you would file a bug in the issue tracker with this,
we can be sure to get to this before release.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
>
> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
>
> Now, the problem is
>
> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
>
> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
>
> So I am still unable to proceed.
>
> On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
>>
>> It looks like the old parser let this expression compile when it should not have.
>> The ftgen does not have a k-rate output,  see
>>
>> https://csound.com/manual/ftgen.html
>>
>> and this is what the error message is saying. If you change to gi_xxxx, it will work.
>>
>> The new parser is more strict, I guess. Steven can say more.
>>
>>
>> > On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>> >
>> > Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>> >
>> > On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>> > Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>> >
>> > error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>> >
>> > Found:
>> >   k ftgen ccccciiiiiiiiiiic
>> >
>> > Candidates:
>> >   i ftgen iiiiim
>> >   i ftgen.S iiiSim
>> >   i ftgen.iS iiiiSm
>> >   i ftgen.SS iiiSSm
>> >   i ftgen iiiii[]
>> >   i ftgen iiiSi[]
>> >
>> > Line: 24
>> >  from file symmetry.csd (1)
>> > Parsing failed due to syntax errors
>> >
>> > The ftgen code is:
>> >
>> > ; sine table
>> > gi_sin = ftgen(0, 0, 2^18, 10, 1)
>> >
>> > ; tanh function
>> > gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>> >
>> > gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
>> > gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
>> > gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
>> > gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)

Date2024-09-09 13:47
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] Csound 7 errors
Thanks.
Prof. Victor Lazzarini
Maynooth University
Ireland

On 9 Sep 2024, at 13:46, Dave Seidel <dave.seidel@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.


On Sun, Sep 8, 2024 at 4:24 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Sorry, Steven, I've lost track of which issue you would like me to create a bug for.

On Sun, Sep 8, 2024 at 4:16 PM Steven Yi <stevenyi@gmail.com> wrote:
Definitely looks like a bug to me. I suspect an issue with how = is
optimized out. If you would file a bug in the issue tracker with this,
we can be sure to get to this before release.

On Sun, Sep 8, 2024 at 3:31 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>
> Thanks, but wouldn't that be considered an incompatibility with existing code? I 've been using this for years, incorrect or not.
>
> Anyway, I fixed it, but was then warned that OPCODE7DIR64 was not set. Shouldn't this be set by the installer. Anyway, I fixed that (but I saw that Csound 7 is installed to C:\Program Files\Csound6_x64\ -- hopefully this will also be fixed in the installer).
>
> Now, the problem is
>
> error: -+rtmidi='portmidi': unknown module *** error opening MIDI in device: -1 (Unknown MIDI error)
>
> I'm using -+rtmidi=portmidi. There is no portmidi.dll in the plugins64 directory.
>
> So I am still unable to proceed.
>
> On Sun, Sep 8, 2024 at 3:03 PM vlz <viclazzarini@gmail.com> wrote:
>>
>> It looks like the old parser let this expression compile when it should not have.
>> The ftgen does not have a k-rate output,  see
>>
>> https://csound.com/manual/ftgen.html
>>
>> and this is what the error message is saying. If you change to gi_xxxx, it will work.
>>
>> The new parser is more strict, I guess. Steven can say more.
>>
>>
>> > On 8 Sep 2024, at 18:52, Dave Seidel <dave.seidel@GMAIL.COM> wrote:
>> >
>> > Obviously the line number is unhelpful (just like in 6), but these are the only ftgen statements in the code.
>> >
>> > On Sun, Sep 8, 2024 at 1:44 PM Dave Seidel <dave.seidel@gmail.com> wrote:
>> > Now that I \have csound 7, I just tries running the code that works in csound 6, and got the error message:
>> >
>> > error:  Unable to find opcode entry for 'ftgen' with matching argument types:
>> >
>> > Found:
>> >   k ftgen ccccciiiiiiiiiiic
>> >
>> > Candidates:
>> >   i ftgen iiiiim
>> >   i ftgen.S iiiSim
>> >   i ftgen.iS iiiiSm
>> >   i ftgen.SS iiiSSm
>> >   i ftgen iiiii[]
>> >   i ftgen iiiSi[]
>> >
>> > Line: 24
>> >  from file symmetry.csd (1)
>> > Parsing failed due to syntax errors
>> >
>> > The ftgen code is:
>> >
>> > ; sine table
>> > gi_sin = ftgen(0, 0, 2^18, 10, 1)
>> >
>> > ; tanh function
>> > gi_tanh = ftgen(0, 0, 16385, "tanh", -157, 157, 0)
>> >
>> > gk_centaur          = ftgen(80, 0, 13, -2, 1, 21/20, 9/8, 7/6, 5/4, 4/3, 7/5, 3/2, 14/9, 5/3, 7/4, 15/8, 2)
>> > gk_meta_slendro     = ftgen(81, 0, 13, -2, 1, 65/64, 9/8, 37/32, 151/128, 5/4, 21/16, 43/32, 3/2, 49/32, 7/4, 57/32, 2)
>> > gk_pyth             = ftgen(82, 0, 13, -2, 1, 2187/2048, 9/8, 32/27, 81/64, 4/3, 729/512, 3/2, 6561/4096, 27/16, 16/9, 243/128, 2)
>> > gk_bihexany         = ftgen(83, 0, 13, -2, 1, 35/33, 7/6, 5/4, 14/11, 15/11, 3/2, 35/22, 5/3, 7/4, 20/11, 21/11, 2)