Csound Csound-dev Csound-tekno Search About

[Csnd] k-while-loops

Date2025-05-08 07:29
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
Subject[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

📧 philipp@von-neumann.com
📞 +49 159 01 20 71 03
🌐 von-neumann.com
🔊 SoundCloud: https://soundcloud.com/phvon
🌿 Bluesky: https://bsky.app/profile/von-neumann.com
🦣 Mastodon: https://sonomu.club/@PvN

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

Date2025-05-08 08:14
From"Jeanette C."
SubjectRe: [Csnd] k-while-loops
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. :)

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I love the things you say
And I love the love your touch conveys <3
(Britney Spears)

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

Date2025-05-08 15:18
FromSteven Yi
SubjectRe: [Csnd] k-while-loops
The whole while-loop is performed per k-cycle. You can see an example of using a k-rate while loop to generate an audio-rate signal here:

https://github.com/kunstmusik/libsyi/blob/master/gatesig.udo

(There's some other examples in that repository too.)

On Thu, May 8, 2025 at 2:30 AM Philipp Neumann <0000119f78f3a4f9-dmarc-request@listserv.heanet.ie> wrote:
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

📧 philipp@von-neumann.com
📞 +49 159 01 20 71 03
🌐 von-neumann.com
🔊 SoundCloud: https://soundcloud.com/phvon
🌿 Bluesky: https://bsky.app/profile/von-neumann.com
🦣 Mastodon: https://sonomu.club/@PvN

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
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