[Csnd] "sum" -opcode works differently compared to a simple "+" sign?

Dear list,

could it be that the "sum" -opcode works differently compared to a simple "+" sign?

For me it looks a lot like the first item (a1 in my example below) is summed twice in sum.

You can see it if you compare the output of the amplitude.

I have Csound 6.17 running on Linux ubuntu 20.04.

Best,

Jan Jacob

sound | movement | object | space
sonic architecture | site: http://www.sonicarchitecture.de
spatial electronic composition | higher order ambisonic music

<CsoundSynthesizer>

<CsOptions>

- odac

</CsOptions>

<CsInstruments>

sr = 48000

ksmps = 128

nchnls = 2

0dbfs = 1.0

instr 1

iamp = p4

a1 oscil iamp, 440

a2 oscil iamp, 440

a3 oscil iamp, 440

a4 oscil iamp, 440

aout sum a1, a2, a3, a4

;aout = a1 + a2 + a3 + a4 ; uncomment this for comparison

outs aout, aout

endin

</CsInstruments>

<CsScore>

i1 0 1 .5

</CsScore>

</CsoundSynthesizer>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

There's a bug in it. It was introduced I think in 6.16 and it has been fixed after 6.17 was released.

Prof. Victor Lazzarini
Maynooth University
Ireland

Very useful. I have some very long string of sums sometimes (no pun intended).
This would be very useful and helpful if all the bugs have been dealt with.
Got to try that one. Very cool.

-Partev

That is a cool substitute for a long strings of sums using ‘+’ signs.
Works pretty good. I like it. That’s a keeper. Thank you.

-Partev