Think of the possibilities! And it could be as simple as adding the following function:
freq frequency [channel]
sets channel's frequency to frequency hz. If no channel is provided, 0 is assumed. 0 or negative frequencies mutes it (no sound). Frequency is also reset when sound or music plays on a given channel.
Note that Pico itself calls _update at 30fps. Nothing forbids you from making custom update loop that works waay faster (been there, done that), though you'd need to take care about flipping the buffer and whatnot.
//edit: Also apparently flip() is kinda expensive - dunno if intended or not.
[Please log in to post a comment]