Csound Csound-dev Csound-tekno Search About

Re: [Csnd] [EXTERNAL] Re: [Csnd] Question about accumulation of audio variables

Date2023-04-04 19:07
FromMassimiliano Tonelli
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Question about accumulation of audio variables
Thank you! Yes. This is the problem. I just wished they were functions :).

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

Date2023-04-05 02:00
FromEduardo Moguillansky
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Question about accumulation of audio variables

If you have the poly external you can do

instr 1

icount = 15

kfreq = line:k(100, p3, 200)

kharm = line:k(1.68, p3, 1)

kbw = line:k( 0.1, p3, 0.01)

kindexes[] genarray_i 1, icount

kpans[] genarray_i 0, 1, 1/icount

kfreqs[] = kindexes ^ kharm * kfreq

kbws[] = kfreqs * kbw

asig pinker

abands[] poly icount, "resonz", asig, kfreqs, kbws

aL[], aR[] poly icount, "pan2", abands, kpans

aleft = sumarray(aL)

aright = sumarray(aR)

aenv = linenr:a(0.001, 0.5, 0.5, 0.01)

outch 1, aleft * aenv, 2, aright * aenv

endin

https://csound-plugins.github.io/csound-plugins/opcodes/poly.html

On 04.04.23 20:07, Massimiliano Tonelli wrote:
Thank you! Yes. This is the problem. I just wished they were functions :).

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