Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Another question re: score loop

Date2022-08-22 21:14
FromAmy Universe
SubjectRe: [Csnd] Another question re: score loop
oh this one can be tricky at first, but you'll get used to it.
you're reassigning the global audio variable in instr 1. this clears it and adds the new signal as soon as the new note begins, which stops the old instance from outputting that tail.
what you wanna do is mix your signal to that variable (+=) but be very careful, you'll still need to clear it (otherwise it's gonna get very loud very quickly because you're adding to it) usually you wanna `clear` it after you're done with it, so after the `outs` call.
this way as long as the instrument is running it adds to that output, allowing different instances to overlap.

there's a good piece about this in the floss manual:
https://flossmanual.csound.com/csound-language/local-and-global-variables

side note, i find it useful to pass all my audio like this to an output instrument and to clip the outputs, you'll save yourself from a lot of really loud noises when you're experimenting with this stuff ;)

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

Date2022-08-22 21:39
FromPete Goodeve
SubjectRe: [Csnd] Another question re: score loop
AttachmentsNone