Csound Csound-dev Csound-tekno Search About

[Csnd-dev] UDO problem in latest develop

Date2025-11-10 16:38
FromDave Seidel
Subject[Csnd-dev] UDO problem in latest develop
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:41
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] UDO problem in latest develop
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:45
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] UDO problem in latest develop
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:48
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:50
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:52
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] UDO problem in latest develop
I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix

<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 4096, 10, 1

opcode TestXout, aa, ikai
  ifreq, koff, aamp, itbl xin
  koff1 = koff
  koff2 = 2 * koff
 
  a1 poscil aamp, ifreq+koff1, itbl
  a2 poscil aamp, ifreq+koff2, itbl
  a3 poscil aamp, ifreq-koff1, itbl
  a4 poscil aamp, ifreq-koff2, itbl
 
  aL = a1 + a3
  aR = a2 + a4
 
  xout aL, aR
endop

instr 1
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This should work - unpacking the outputs
  aL, aR TestXout ifreq, koff, aenv, giSine
  out aL, aR
endin

instr 2
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This tests the regression - calling UDO with multiple outputs directly in out statement
  out TestXout(ifreq, koff, aenv, giSine)
endin

</CsInstruments>
<CsScore>
i 1 0 0.1
i 2 0 0.1
</CsScore>
</CsoundSynthesizer>

On Mon, 10 Nov 2025 at 18:51, Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:52
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
And this is what I get in the console:

>> RissetHarmOsc ->0.000000 0.000000 0.000000 0.000000

On Mon, Nov 10, 2025 at 11:50 AM Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:55
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
Thanks, Hlöðver.

On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix

<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 4096, 10, 1

opcode TestXout, aa, ikai
  ifreq, koff, aamp, itbl xin
  koff1 = koff
  koff2 = 2 * koff
 
  a1 poscil aamp, ifreq+koff1, itbl
  a2 poscil aamp, ifreq+koff2, itbl
  a3 poscil aamp, ifreq-koff1, itbl
  a4 poscil aamp, ifreq-koff2, itbl
 
  aL = a1 + a3
  aR = a2 + a4
 
  xout aL, aR
endop

instr 1
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This should work - unpacking the outputs
  aL, aR TestXout ifreq, koff, aenv, giSine
  out aL, aR
endin

instr 2
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This tests the regression - calling UDO with multiple outputs directly in out statement
  out TestXout(ifreq, koff, aenv, giSine)
endin

</CsInstruments>
<CsScore>
i 1 0 0.1
i 2 0 0.1
</CsScore>
</CsoundSynthesizer>

On Mon, 10 Nov 2025 at 18:51, Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 16:59
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
To confirm, the UDO works if defined and invoked using the old syntax.

On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, Hlöðver.

On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix

<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 4096, 10, 1

opcode TestXout, aa, ikai
  ifreq, koff, aamp, itbl xin
  koff1 = koff
  koff2 = 2 * koff
 
  a1 poscil aamp, ifreq+koff1, itbl
  a2 poscil aamp, ifreq+koff2, itbl
  a3 poscil aamp, ifreq-koff1, itbl
  a4 poscil aamp, ifreq-koff2, itbl
 
  aL = a1 + a3
  aR = a2 + a4
 
  xout aL, aR
endop

instr 1
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This should work - unpacking the outputs
  aL, aR TestXout ifreq, koff, aenv, giSine
  out aL, aR
endin

instr 2
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This tests the regression - calling UDO with multiple outputs directly in out statement
  out TestXout(ifreq, koff, aenv, giSine)
endin

</CsInstruments>
<CsScore>
i 1 0 0.1
i 2 0 0.1
</CsScore>
</CsoundSynthesizer>

On Mon, 10 Nov 2025 at 18:51, Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 17:06
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
My piece actually contains 5 UDOs, all of which were written using the new style, and none of them work. Hopefully there will be a testable fix soon so I don't have to rewrite a substantial part of the code. :-)

On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel <dave.seidel@gmail.com> wrote:
To confirm, the UDO works if defined and invoked using the old syntax.

On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, Hlöðver.

On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix

<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 4096, 10, 1

opcode TestXout, aa, ikai
  ifreq, koff, aamp, itbl xin
  koff1 = koff
  koff2 = 2 * koff
 
  a1 poscil aamp, ifreq+koff1, itbl
  a2 poscil aamp, ifreq+koff2, itbl
  a3 poscil aamp, ifreq-koff1, itbl
  a4 poscil aamp, ifreq-koff2, itbl
 
  aL = a1 + a3
  aR = a2 + a4
 
  xout aL, aR
endop

instr 1
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This should work - unpacking the outputs
  aL, aR TestXout ifreq, koff, aenv, giSine
  out aL, aR
endin

instr 2
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This tests the regression - calling UDO with multiple outputs directly in out statement
  out TestXout(ifreq, koff, aenv, giSine)
endin

</CsInstruments>
<CsScore>
i 1 0 0.1
i 2 0 0.1
</CsScore>
</CsoundSynthesizer>

On Mon, 10 Nov 2025 at 18:51, Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 17:08
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
But I am grateful to have a workaround!

On Mon, Nov 10, 2025 at 12:06 PM Dave Seidel <dave.seidel@gmail.com> wrote:
My piece actually contains 5 UDOs, all of which were written using the new style, and none of them work. Hopefully there will be a testable fix soon so I don't have to rewrite a substantial part of the code. :-)

On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel <dave.seidel@gmail.com> wrote:
To confirm, the UDO works if defined and invoked using the old syntax.

On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, Hlöðver.

On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix

<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 64
nchnls = 2
0dbfs = 1

giSine ftgen 0, 0, 4096, 10, 1

opcode TestXout, aa, ikai
  ifreq, koff, aamp, itbl xin
  koff1 = koff
  koff2 = 2 * koff
 
  a1 poscil aamp, ifreq+koff1, itbl
  a2 poscil aamp, ifreq+koff2, itbl
  a3 poscil aamp, ifreq-koff1, itbl
  a4 poscil aamp, ifreq-koff2, itbl
 
  aL = a1 + a3
  aR = a2 + a4
 
  xout aL, aR
endop

instr 1
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This should work - unpacking the outputs
  aL, aR TestXout ifreq, koff, aenv, giSine
  out aL, aR
endin

instr 2
  ifreq = 440
  koff = 0.004
  aenv linen 0.5, 0.01, p3, 0.01
 
  ; This tests the regression - calling UDO with multiple outputs directly in out statement
  out TestXout(ifreq, koff, aenv, giSine)
endin

</CsInstruments>
<CsScore>
i 1 0 0.1
i 2 0 0.1
</CsScore>
</CsoundSynthesizer>

On Mon, 10 Nov 2025 at 18:51, Dave Seidel <dave.seidel@gmail.com> wrote:
This is how it's being used in context:

instr Drone
    idur = p3
    iamp = ampdb(p4) / 7
    ifreq = p5

    icps = ifreq / 4
    icps2 = icps * 1.5
    icps3 = icps * 2
    prints("drones: %f, %f, %f\n", icps, icps2, icps3)

    aenv = linen(iamp, 3, idur, 3)

    a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
    a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
    a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
    ga_drone_L +=  a1L+a2L+a3L
    ga_drone_R +=  a1R+a2R+a3R
   
    printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
endin


On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel <dave.seidel@gmail.com> wrote:
I'm not getting any error message at all.

On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
this is the error you are seeing?

> error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43

On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely

On Mon, 10 Nov 2025 at 18:39, Dave Seidel <dave.seidel@gmail.com> wrote:
The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.

opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
    koff1 = ofs
    koff2 = 2 * ofs
    koff3 = 3 * ofs
    koff4 = 4 * ofs

    printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)

    ; a1 = poscil3(kamp, freq, tbl
    a2 = poscil3(amp, freq+koff1, tbl)
    a3 = poscil3(amp, freq+koff2, tbl)
    a4 = poscil3(amp, freq+koff3, tbl)
    a5 = poscil3(amp, freq+koff4, tbl)
    a6 = poscil3(amp, freq-koff1, tbl)
    a7 = poscil3(amp, freq-koff2, tbl)
    a8 = poscil3(amp, freq-koff3, tbl)
    a9 = poscil3(amp, freq-koff4, tbl)
    aL = a2+a4+a6+a8
    aR = a3+a5+a7+a9

    aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
    xout(aoutL+aL, aoutR+aR)
    ; xout(aL, aR)
  endop

example calling statement:

a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)

Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.




Date2025-11-10 17:14
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] UDO problem in latest develop
There is an open issue on this. It seems UDOs are broken at the moment.
Let’s move the discussion there.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland






> On 10 Nov 2025, at 17:08, Dave Seidel  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.
> But I am grateful to have a workaround!
> 
> On Mon, Nov 10, 2025 at 12:06 PM Dave Seidel  wrote:
> My piece actually contains 5 UDOs, all of which were written using the new style, and none of them work. Hopefully there will be a testable fix soon so I don't have to rewrite a substantial part of the code. :-)
> 
> On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel  wrote:
> To confirm, the UDO works if defined and invoked using the old syntax.
> 
> On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel  wrote:
> Thanks, Hlöðver.
> 
> On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson  wrote:
> I made a reproducible test here, it fails in instr 2, instr 1 works, so you have a workaround for now, by placing the arguments positionally "old-style" while I make a fix
> 
> 
> 
> -n -d
> 
> 
> sr = 44100
> ksmps = 64
> nchnls = 2
> 0dbfs = 1
> 
> giSine ftgen 0, 0, 4096, 10, 1
> 
> opcode TestXout, aa, ikai
>   ifreq, koff, aamp, itbl xin
>   koff1 = koff
>   koff2 = 2 * koff
>   
>   a1 poscil aamp, ifreq+koff1, itbl
>   a2 poscil aamp, ifreq+koff2, itbl
>   a3 poscil aamp, ifreq-koff1, itbl
>   a4 poscil aamp, ifreq-koff2, itbl
>   
>   aL = a1 + a3
>   aR = a2 + a4
>   
>   xout aL, aR
> endop
> 
> instr 1
>   ifreq = 440
>   koff = 0.004
>   aenv linen 0.5, 0.01, p3, 0.01
>   
>   ; This should work - unpacking the outputs
>   aL, aR TestXout ifreq, koff, aenv, giSine
>   out aL, aR
> endin
> 
> instr 2
>   ifreq = 440
>   koff = 0.004
>   aenv linen 0.5, 0.01, p3, 0.01
>   
>   ; This tests the regression - calling UDO with multiple outputs directly in out statement
>   out TestXout(ifreq, koff, aenv, giSine)
> endin
> 
> 
> 
> i 1 0 0.1
> i 2 0 0.1
> 
> 
> 
> On Mon, 10 Nov 2025 at 18:51, Dave Seidel  wrote:
> This is how it's being used in context:
> 
> instr Drone
>     idur = p3
>     iamp = ampdb(p4) / 7
>     ifreq = p5
> 
>     icps = ifreq / 4
>     icps2 = icps * 1.5
>     icps3 = icps * 2
>     prints("drones: %f, %f, %f\n", icps, icps2, icps3)
> 
>     aenv = linen(iamp, 3, idur, 3)
> 
>     a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
>     a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv, giPrime)
>     a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv, giPrime)
>     ga_drone_L +=  a1L+a2L+a3L
>     ga_drone_R +=  a1R+a2R+a3R
>     
>     printks("drone %f, %f\n", 2, ga_drone_L, ga_drone_R)
> endin
> 
> 
> On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel  wrote:
> I'm not getting any error message at all.
> 
> On Mon, Nov 10, 2025 at 11:45 AM Hlöðver Sigurðsson  wrote:
> this is the error you are seeing?
> 
> > error: opcode 'RissetHarmOsc' for expression with arg types icai returns out-args != 1, line 43
> 
> On Mon, 10 Nov 2025 at 18:41, Hlöðver Sigurðsson  wrote:
> I'm taking a look at this now, I don't know if my changes had anything to do with it, not unlikely
> 
> On Mon, 10 Nov 2025 at 18:39, Dave Seidel  wrote:
> The following UDO does not work with the latest develop sources. The print statement shows that all four inputs argos are coming in at 0; If I revert to the 7.0.0-beta.9 tag, it works fine.
> 
> opcode RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
>     koff1 = ofs
>     koff2 = 2 * ofs
>     koff3 = 3 * ofs
>     koff4 = 4 * ofs
> 
>     printks(">> RissetHarmOsc ->%f %f %f %f\n", 5, freq, ofs, amp, tbl)
> 
>     ; a1 = poscil3(kamp, freq, tbl
>     a2 = poscil3(amp, freq+koff1, tbl)
>     a3 = poscil3(amp, freq+koff2, tbl)
>     a4 = poscil3(amp, freq+koff3, tbl)
>     a5 = poscil3(amp, freq+koff4, tbl)
>     a6 = poscil3(amp, freq-koff1, tbl)
>     a7 = poscil3(amp, freq-koff2, tbl)
>     a8 = poscil3(amp, freq-koff3, tbl)
>     a9 = poscil3(amp, freq-koff4, tbl)
>     aL = a2+a4+a6+a8
>     aR = a3+a5+a7+a9
> 
>     aoutL, aoutR = reverbsc(aL, aR, 0.4, 4000)
>     xout(aoutL+aL, aoutR+aR)
>     ; xout(aL, aR)
>   endop
> 
> example calling statement:
> 
> a1L, a1R = RissetHarmOsc(icps,  0.004, aenv, giPrime)
> 
> Has something changed to make my UDO invalid in some way? I'm using this code in as performance on Saturday and I'm focused on preparing, but I can follow up with a minimal example.
> 
> 
> 


Date2025-11-10 17:18
Fromjoachim heintz
SubjectRe: [Csnd-dev] UDO problem in latest develop
hi dave -
i have opened a ticket for a related issue.
i have no problems when i checkout commit 
728c8e4fdc6f1ca30da9577bed651ec79af59057.
perhaps this is an option for you, too.
best -
	joachim

On 10/11/2025 18:08, Dave Seidel wrote:
> But I am grateful to have a workaround!
> 
> On Mon, Nov 10, 2025 at 12:06 PM Dave Seidel  > wrote:
> 
>     My piece actually contains 5 UDOs, all of which were written using
>     the new style, and none of them work. Hopefully there will be a
>     testable fix soon so I don't have to rewrite a substantial part of
>     the code. :-)
> 
>     On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel      > wrote:
> 
>         To confirm, the UDO works if defined and invoked using the old
>         syntax.
> 
>         On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel
>         > wrote:
> 
>             Thanks, Hlöðver.
> 
>             On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson
>             > wrote:
> 
>                 I made a reproducible test here, it fails in instr 2,
>                 instr 1 works, so you have a workaround for now, by
>                 placing the arguments positionally "old-style" while I
>                 make a fix
> 
>                 
>                 
>                 -n -d
>                 
>                 
>                 sr = 44100
>                 ksmps = 64
>                 nchnls = 2
>                 0dbfs = 1
> 
>                 giSine ftgen 0, 0, 4096, 10, 1
> 
>                 opcode TestXout, aa, ikai
>                    ifreq, koff, aamp, itbl xin
>                    koff1 = koff
>                    koff2 = 2 * koff
> 
>                    a1 poscil aamp, ifreq+koff1, itbl
>                    a2 poscil aamp, ifreq+koff2, itbl
>                    a3 poscil aamp, ifreq-koff1, itbl
>                    a4 poscil aamp, ifreq-koff2, itbl
> 
>                    aL = a1 + a3
>                    aR = a2 + a4
> 
>                    xout aL, aR
>                 endop
> 
>                 instr 1
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
> 
>                    ; This should work - unpacking the outputs
>                    aL, aR TestXout ifreq, koff, aenv, giSine
>                    out aL, aR
>                 endin
> 
>                 instr 2
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
> 
>                    ; This tests the regression - calling UDO with
>                 multiple outputs directly in out statement
>                    out TestXout(ifreq, koff, aenv, giSine)
>                 endin
> 
>                 
>                 
>                 i 1 0 0.1
>                 i 2 0 0.1
>                 
>                 
> 
>                 On Mon, 10 Nov 2025 at 18:51, Dave Seidel
>                 >
>                 wrote:
> 
>                     This is how it's being used in context:
> 
>                     instr Drone
>                          idur = p3
>                          iamp = ampdb(p4) / 7
>                          ifreq = p5
> 
>                          icps = ifreq / 4
>                          icps2 = icps * 1.5
>                          icps3 = icps * 2
>                          prints("drones: %f, %f, %f\n", icps, icps2, icps3)
> 
>                          aenv = linen(iamp, 3, idur, 3)
> 
>                          a1L, a1R = RissetHarmOsc(icps,  0.004, aenv,
>                     giPrime)
>                          a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv,
>                     giPrime)
>                          a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv,
>                     giPrime)
>                          ga_drone_L +=  a1L+a2L+a3L
>                          ga_drone_R +=  a1R+a2R+a3R
> 
>                          printks("drone %f, %f\n", 2, ga_drone_L,
>                     ga_drone_R)
>                     endin
> 
> 
>                     On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel
>                                          > wrote:
> 
>                         I'm not getting any error message at all.
> 
>                         On Mon, Nov 10, 2025 at 11:45 AM Hlöðver
>                         Sigurðsson                          > wrote:
> 
>                             this is the error you are seeing?
> 
>                              > error: opcode 'RissetHarmOsc' for
>                             expression with arg types icai returns out-
>                             args != 1, line 43
> 
>                             On Mon, 10 Nov 2025 at 18:41, Hlöðver
>                             Sigurðsson                              > wrote:
> 
>                                 I'm taking a look at this now, I don't
>                                 know if my changes had anything to do
>                                 with it, not unlikely
> 
>                                 On Mon, 10 Nov 2025 at 18:39, Dave
>                                 Seidel                                  > wrote:
> 
>                                     The following UDO does not work with
>                                     the latest develop sources. The
>                                     print statement shows that all four
>                                     inputs argos are coming in at 0; If
>                                     I revert to the 7.0.0-beta.9 tag, it
>                                     works fine.
> 
>                                     opcode
>                                     RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
>                                          koff1 = ofs
>                                          koff2 = 2 * ofs
>                                          koff3 = 3 * ofs
>                                          koff4 = 4 * ofs
> 
>                                          printks(">> RissetHarmOsc ->%f
>                                     %f %f %f\n", 5, freq, ofs, amp, tbl)
> 
>                                          ; a1 = poscil3(kamp, freq, tbl
>                                          a2 = poscil3(amp, freq+koff1, tbl)
>                                          a3 = poscil3(amp, freq+koff2, tbl)
>                                          a4 = poscil3(amp, freq+koff3, tbl)
>                                          a5 = poscil3(amp, freq+koff4, tbl)
>                                          a6 = poscil3(amp, freq-koff1, tbl)
>                                          a7 = poscil3(amp, freq-koff2, tbl)
>                                          a8 = poscil3(amp, freq-koff3, tbl)
>                                          a9 = poscil3(amp, freq-koff4, tbl)
>                                          aL = a2+a4+a6+a8
>                                          aR = a3+a5+a7+a9
> 
>                                          aoutL, aoutR = reverbsc(aL, aR,
>                                     0.4, 4000)
>                                          xout(aoutL+aL, aoutR+aR)
>                                          ; xout(aL, aR)
>                                        endop
> 
>                                     example calling statement:
> 
>                                     a1L, a1R = RissetHarmOsc(icps,
>                                       0.004, aenv, giPrime)
> 
>                                     Has something changed to make my UDO
>                                     invalid in some way? I'm using this
>                                     code in as performance on Saturday
>                                     and I'm focused on preparing, but I
>                                     can follow up with a minimal example.
> 
> 
> 

Date2025-11-10 17:21
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
Thanks, Joachim, I will try that. And thanks Victor, I missed Joachims's original report.

On Mon, Nov 10, 2025 at 12:19 PM joachim heintz <jh@joachimheintz.de> wrote:
hi dave -
i have opened a ticket for a related issue.
i have no problems when i checkout commit
728c8e4fdc6f1ca30da9577bed651ec79af59057.
perhaps this is an option for you, too.
best -
        joachim

On 10/11/2025 18:08, Dave Seidel wrote:
> But I am grateful to have a workaround!
>
> On Mon, Nov 10, 2025 at 12:06 PM Dave Seidel <dave.seidel@gmail.com
> <mailto:dave.seidel@gmail.com>> wrote:
>
>     My piece actually contains 5 UDOs, all of which were written using
>     the new style, and none of them work. Hopefully there will be a
>     testable fix soon so I don't have to rewrite a substantial part of
>     the code. :-)
>
>     On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel <dave.seidel@gmail.com
>     <mailto:dave.seidel@gmail.com>> wrote:
>
>         To confirm, the UDO works if defined and invoked using the old
>         syntax.
>
>         On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel
>         <dave.seidel@gmail.com <mailto:dave.seidel@gmail.com>> wrote:
>
>             Thanks, Hlöðver.
>
>             On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson
>             <hlolli@gmail.com <mailto:hlolli@gmail.com>> wrote:
>
>                 I made a reproducible test here, it fails in instr 2,
>                 instr 1 works, so you have a workaround for now, by
>                 placing the arguments positionally "old-style" while I
>                 make a fix
>
>                 <CsoundSynthesizer>
>                 <CsOptions>
>                 -n -d
>                 </CsOptions>
>                 <CsInstruments>
>                 sr = 44100
>                 ksmps = 64
>                 nchnls = 2
>                 0dbfs = 1
>
>                 giSine ftgen 0, 0, 4096, 10, 1
>
>                 opcode TestXout, aa, ikai
>                    ifreq, koff, aamp, itbl xin
>                    koff1 = koff
>                    koff2 = 2 * koff
>
>                    a1 poscil aamp, ifreq+koff1, itbl
>                    a2 poscil aamp, ifreq+koff2, itbl
>                    a3 poscil aamp, ifreq-koff1, itbl
>                    a4 poscil aamp, ifreq-koff2, itbl
>
>                    aL = a1 + a3
>                    aR = a2 + a4
>
>                    xout aL, aR
>                 endop
>
>                 instr 1
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
>
>                    ; This should work - unpacking the outputs
>                    aL, aR TestXout ifreq, koff, aenv, giSine
>                    out aL, aR
>                 endin
>
>                 instr 2
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
>
>                    ; This tests the regression - calling UDO with
>                 multiple outputs directly in out statement
>                    out TestXout(ifreq, koff, aenv, giSine)
>                 endin
>
>                 </CsInstruments>
>                 <CsScore>
>                 i 1 0 0.1
>                 i 2 0 0.1
>                 </CsScore>
>                 </CsoundSynthesizer>
>
>                 On Mon, 10 Nov 2025 at 18:51, Dave Seidel
>                 <dave.seidel@gmail.com <mailto:dave.seidel@gmail.com>>
>                 wrote:
>
>                     This is how it's being used in context:
>
>                     instr Drone
>                          idur = p3
>                          iamp = ampdb(p4) / 7
>                          ifreq = p5
>
>                          icps = ifreq / 4
>                          icps2 = icps * 1.5
>                          icps3 = icps * 2
>                          prints("drones: %f, %f, %f\n", icps, icps2, icps3)
>
>                          aenv = linen(iamp, 3, idur, 3)
>
>                          a1L, a1R = RissetHarmOsc(icps,  0.004, aenv,
>                     giPrime)
>                          a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv,
>                     giPrime)
>                          a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv,
>                     giPrime)
>                          ga_drone_L +=  a1L+a2L+a3L
>                          ga_drone_R +=  a1R+a2R+a3R
>
>                          printks("drone %f, %f\n", 2, ga_drone_L,
>                     ga_drone_R)
>                     endin
>
>
>                     On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel
>                     <dave.seidel@gmail.com
>                     <mailto:dave.seidel@gmail.com>> wrote:
>
>                         I'm not getting any error message at all.
>
>                         On Mon, Nov 10, 2025 at 11:45 AM Hlöðver
>                         Sigurðsson <hlolli@gmail.com
>                         <mailto:hlolli@gmail.com>> wrote:
>
>                             this is the error you are seeing?
>
>                              > error: opcode 'RissetHarmOsc' for
>                             expression with arg types icai returns out-
>                             args != 1, line 43
>
>                             On Mon, 10 Nov 2025 at 18:41, Hlöðver
>                             Sigurðsson <hlolli@gmail.com
>                             <mailto:hlolli@gmail.com>> wrote:
>
>                                 I'm taking a look at this now, I don't
>                                 know if my changes had anything to do
>                                 with it, not unlikely
>
>                                 On Mon, 10 Nov 2025 at 18:39, Dave
>                                 Seidel <dave.seidel@gmail.com
>                                 <mailto:dave.seidel@gmail.com>> wrote:
>
>                                     The following UDO does not work with
>                                     the latest develop sources. The
>                                     print statement shows that all four
>                                     inputs argos are coming in at 0; If
>                                     I revert to the 7.0.0-beta.9 tag, it
>                                     works fine.
>
>                                     opcode
>                                     RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
>                                          koff1 = ofs
>                                          koff2 = 2 * ofs
>                                          koff3 = 3 * ofs
>                                          koff4 = 4 * ofs
>
>                                          printks(">> RissetHarmOsc ->%f
>                                     %f %f %f\n", 5, freq, ofs, amp, tbl)
>
>                                          ; a1 = poscil3(kamp, freq, tbl
>                                          a2 = poscil3(amp, freq+koff1, tbl)
>                                          a3 = poscil3(amp, freq+koff2, tbl)
>                                          a4 = poscil3(amp, freq+koff3, tbl)
>                                          a5 = poscil3(amp, freq+koff4, tbl)
>                                          a6 = poscil3(amp, freq-koff1, tbl)
>                                          a7 = poscil3(amp, freq-koff2, tbl)
>                                          a8 = poscil3(amp, freq-koff3, tbl)
>                                          a9 = poscil3(amp, freq-koff4, tbl)
>                                          aL = a2+a4+a6+a8
>                                          aR = a3+a5+a7+a9
>
>                                          aoutL, aoutR = reverbsc(aL, aR,
>                                     0.4, 4000)
>                                          xout(aoutL+aL, aoutR+aR)
>                                          ; xout(aL, aR)
>                                        endop
>
>                                     example calling statement:
>
>                                     a1L, a1R = RissetHarmOsc(icps,
>                                       0.004, aenv, giPrime)
>
>                                     Has something changed to make my UDO
>                                     invalid in some way? I'm using this
>                                     code in as performance on Saturday
>                                     and I'm focused on preparing, but I
>                                     can follow up with a minimal example.
>
>
>

Date2025-11-10 17:25
FromDave Seidel
SubjectRe: [Csnd-dev] UDO problem in latest develop
I can confirm that the problem is not present if I use the SHA Joachim pointed at.

On Mon, Nov 10, 2025 at 12:21 PM Dave Seidel <dave.seidel@gmail.com> wrote:
Thanks, Joachim, I will try that. And thanks Victor, I missed Joachims's original report.

On Mon, Nov 10, 2025 at 12:19 PM joachim heintz <jh@joachimheintz.de> wrote:
hi dave -
i have opened a ticket for a related issue.
i have no problems when i checkout commit
728c8e4fdc6f1ca30da9577bed651ec79af59057.
perhaps this is an option for you, too.
best -
        joachim

On 10/11/2025 18:08, Dave Seidel wrote:
> But I am grateful to have a workaround!
>
> On Mon, Nov 10, 2025 at 12:06 PM Dave Seidel <dave.seidel@gmail.com
> <mailto:dave.seidel@gmail.com>> wrote:
>
>     My piece actually contains 5 UDOs, all of which were written using
>     the new style, and none of them work. Hopefully there will be a
>     testable fix soon so I don't have to rewrite a substantial part of
>     the code. :-)
>
>     On Mon, Nov 10, 2025 at 11:59 AM Dave Seidel <dave.seidel@gmail.com
>     <mailto:dave.seidel@gmail.com>> wrote:
>
>         To confirm, the UDO works if defined and invoked using the old
>         syntax.
>
>         On Mon, Nov 10, 2025 at 11:55 AM Dave Seidel
>         <dave.seidel@gmail.com <mailto:dave.seidel@gmail.com>> wrote:
>
>             Thanks, Hlöðver.
>
>             On Mon, Nov 10, 2025 at 11:52 AM Hlöðver Sigurðsson
>             <hlolli@gmail.com <mailto:hlolli@gmail.com>> wrote:
>
>                 I made a reproducible test here, it fails in instr 2,
>                 instr 1 works, so you have a workaround for now, by
>                 placing the arguments positionally "old-style" while I
>                 make a fix
>
>                 <CsoundSynthesizer>
>                 <CsOptions>
>                 -n -d
>                 </CsOptions>
>                 <CsInstruments>
>                 sr = 44100
>                 ksmps = 64
>                 nchnls = 2
>                 0dbfs = 1
>
>                 giSine ftgen 0, 0, 4096, 10, 1
>
>                 opcode TestXout, aa, ikai
>                    ifreq, koff, aamp, itbl xin
>                    koff1 = koff
>                    koff2 = 2 * koff
>
>                    a1 poscil aamp, ifreq+koff1, itbl
>                    a2 poscil aamp, ifreq+koff2, itbl
>                    a3 poscil aamp, ifreq-koff1, itbl
>                    a4 poscil aamp, ifreq-koff2, itbl
>
>                    aL = a1 + a3
>                    aR = a2 + a4
>
>                    xout aL, aR
>                 endop
>
>                 instr 1
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
>
>                    ; This should work - unpacking the outputs
>                    aL, aR TestXout ifreq, koff, aenv, giSine
>                    out aL, aR
>                 endin
>
>                 instr 2
>                    ifreq = 440
>                    koff = 0.004
>                    aenv linen 0.5, 0.01, p3, 0.01
>
>                    ; This tests the regression - calling UDO with
>                 multiple outputs directly in out statement
>                    out TestXout(ifreq, koff, aenv, giSine)
>                 endin
>
>                 </CsInstruments>
>                 <CsScore>
>                 i 1 0 0.1
>                 i 2 0 0.1
>                 </CsScore>
>                 </CsoundSynthesizer>
>
>                 On Mon, 10 Nov 2025 at 18:51, Dave Seidel
>                 <dave.seidel@gmail.com <mailto:dave.seidel@gmail.com>>
>                 wrote:
>
>                     This is how it's being used in context:
>
>                     instr Drone
>                          idur = p3
>                          iamp = ampdb(p4) / 7
>                          ifreq = p5
>
>                          icps = ifreq / 4
>                          icps2 = icps * 1.5
>                          icps3 = icps * 2
>                          prints("drones: %f, %f, %f\n", icps, icps2, icps3)
>
>                          aenv = linen(iamp, 3, idur, 3)
>
>                          a1L, a1R = RissetHarmOsc(icps,  0.004, aenv,
>                     giPrime)
>                          a2L, a2R = RissetHarmOsc(icps2, 0.005, aenv,
>                     giPrime)
>                          a3L, a3R = RissetHarmOsc(icps3, 0.006, aenv,
>                     giPrime)
>                          ga_drone_L +=  a1L+a2L+a3L
>                          ga_drone_R +=  a1R+a2R+a3R
>
>                          printks("drone %f, %f\n", 2, ga_drone_L,
>                     ga_drone_R)
>                     endin
>
>
>                     On Mon, Nov 10, 2025 at 11:48 AM Dave Seidel
>                     <dave.seidel@gmail.com
>                     <mailto:dave.seidel@gmail.com>> wrote:
>
>                         I'm not getting any error message at all.
>
>                         On Mon, Nov 10, 2025 at 11:45 AM Hlöðver
>                         Sigurðsson <hlolli@gmail.com
>                         <mailto:hlolli@gmail.com>> wrote:
>
>                             this is the error you are seeing?
>
>                              > error: opcode 'RissetHarmOsc' for
>                             expression with arg types icai returns out-
>                             args != 1, line 43
>
>                             On Mon, 10 Nov 2025 at 18:41, Hlöðver
>                             Sigurðsson <hlolli@gmail.com
>                             <mailto:hlolli@gmail.com>> wrote:
>
>                                 I'm taking a look at this now, I don't
>                                 know if my changes had anything to do
>                                 with it, not unlikely
>
>                                 On Mon, 10 Nov 2025 at 18:39, Dave
>                                 Seidel <dave.seidel@gmail.com
>                                 <mailto:dave.seidel@gmail.com>> wrote:
>
>                                     The following UDO does not work with
>                                     the latest develop sources. The
>                                     print statement shows that all four
>                                     inputs argos are coming in at 0; If
>                                     I revert to the 7.0.0-beta.9 tag, it
>                                     works fine.
>
>                                     opcode
>                                     RissetHarmOsc(freq:i,ofs:k,amp:a,tbl:i):(a,a)
>                                          koff1 = ofs
>                                          koff2 = 2 * ofs
>                                          koff3 = 3 * ofs
>                                          koff4 = 4 * ofs
>
>                                          printks(">> RissetHarmOsc ->%f
>                                     %f %f %f\n", 5, freq, ofs, amp, tbl)
>
>                                          ; a1 = poscil3(kamp, freq, tbl
>                                          a2 = poscil3(amp, freq+koff1, tbl)
>                                          a3 = poscil3(amp, freq+koff2, tbl)
>                                          a4 = poscil3(amp, freq+koff3, tbl)
>                                          a5 = poscil3(amp, freq+koff4, tbl)
>                                          a6 = poscil3(amp, freq-koff1, tbl)
>                                          a7 = poscil3(amp, freq-koff2, tbl)
>                                          a8 = poscil3(amp, freq-koff3, tbl)
>                                          a9 = poscil3(amp, freq-koff4, tbl)
>                                          aL = a2+a4+a6+a8
>                                          aR = a3+a5+a7+a9
>
>                                          aoutL, aoutR = reverbsc(aL, aR,
>                                     0.4, 4000)
>                                          xout(aoutL+aL, aoutR+aR)
>                                          ; xout(aL, aR)
>                                        endop
>
>                                     example calling statement:
>
>                                     a1L, a1R = RissetHarmOsc(icps,
>                                       0.004, aenv, giPrime)
>
>                                     Has something changed to make my UDO
>                                     invalid in some way? I'm using this
>                                     code in as performance on Saturday
>                                     and I'm focused on preparing, but I
>                                     can follow up with a minimal example.
>
>
>