Audio Query in SuperCollider Demo

Here’s a script that chops up a drum loop (the Nicol drum loop that comes with the FluCoMa package) and replaces all the drums sounds with other sounds from a corpus.

audio_query_with_scaler.scd (11.3 KB)

This came out of one of our workshops last week! Thoughts, questions, additions, suggestions requested!

Video Demo:

6 Likes

I was trying out the code and I wasn’t getting any sound out of the code until I added the neighbour variable (k) or explicitly prompted " action: " while skipping the neighbour variable in step 11.

~kdtree.kNearest(scaled_buf, action: {
arg nearest…

or

~kdtree.kNearest(scaled_buf, k, {
arg nearest…

where k is nunNeighbours.

I don’t know if this is an issue for anyone else but this solution worked for me to get actual sound from the patch in step 11. I wonder if someone else ran into the same issue. Both the scd code of the demo posted and the guide in the Flucoma release omit the numNeighbours variable when instantiating the function.

Thanks for the catch: the signature for kNearest changed, so we should definitely update the code with the release

1 Like