I’m still a neophyte on the programming side of things, so it’s taken me some time to get
with_fx :record working. I’ll post this example for my past self and anyone new looking for a quick start. It seemed like such a useful and simple tool, and maybe those fluent in SP don’t need such a simplistic example to play with. But I find these little blocks more instructive, so here’s as whittled down as I could get it. (Thanks to @robin.newman and @Martin for examples to learn from). Also some questions below the fold…
bname=("moe") with_fx :record,buffer: buffer(bname,8) do live_audio :foo end
Then at some later point in performance-time call up the .wav and live_loop it:
live_loop :foo do sample "C:/Users/12082/.sonic-pi/store/default/cached_samples/moe.wav" sleep 8 end
So I have a bunch of questions that might have been answered in the tutorials but I can’t find anywhere. I’d note that I’m hoping to incorporate SP into my teaching next year at the middle school level so am trying to get to get a handle on both the coding itself and the ability to explain certain aspects of it, at least to 13 year-olds:
-Is the above code the most optimized syntax for recording snippets for a loop in a live coding performance? (setting aside sampling precision, syncing, multiple sample workflow, etc. for the moment)
-What is the functional/conceptual relationship between these little b buffers (as they spit out the .wav files) and the eight Big B Buffers under the code editor window?
-What is the logical/language reason for the second ‘buffer’ in the line? Are there non-buffer buffers?
-What was the rationale for treating recording as an ‘effect’?
-Is it possible to change the default folder for saved .wav files to something else?
I recognize some answers to these questions might be somewhat technical, but would be interested all the same.
Thanks for any thoughts!