[Csnd] k-while-loops

Hello Everybody!

I use the while-loop extensively. But only at i-time.
I wonder how the k-variant is working.

So, when the program is at k-time in a while loop, is the whole while loop, with all iterations, executed in one k-cycle?
Or is every iteration one k-cycle?

All the Best,

Philipp von Neumann (He/Him)
Composition | Computer Music | Programming

:e-mail: philipp@von-neumann.com
:telephone_receiver: +49 159 01 20 71 03
:globe_with_meridians: von-neumann.com
:loud_sound: SoundCloud: Stream Philipp von Neumann music | Listen to songs, albums, playlists for free on SoundCloud
:herb: Bluesky: @von-neumann.com on Bluesky
:mammoth: Mastodon: Philipp von Neumann (@PvN@sonomu.club) - SoNoMu

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
ย ย ย ย ย ย ย ย GitHub ยท Where software is built
Discussions of bugs and features can be posted here

Hey hey Philipp,
a complete while-loop is executed in one k-cycle. There are a few opcodes which work well with that. Some were specifically ddesigned for it. I think the phasorbank was designed with changes in while-loops in mind. Table reading and writing works. -- Just for your own peace of mind, in case you don't know about that already: DON'T try to use a while loop to stack multiple oscillators or pass a signal repeatedly through some opcode. If you need repeated processing, use a recursive UDO. If you knew that already: just don't mind me. :slight_smile:

Best wishes,

Jeanette