I don’t know if Csound can do this, but I would like to make an audio effect that slices/chops/retriggers audio coming in and replays back it in a loop at a defined rate. As in, if I play 4 even notes in one measure, the enabled effect would replay the first note, and could replay that same note twice or four times as fast until the next measure.
I imagine I would need to tell Csound to sample the audio input into an a-rate buffer variable or something and have it loop that recorded sample into the output until the defined rate makes it go back to the audio input and resample the next incoming values.
How could I accomplish this?