Gen~ Buffer Playback Speed, no clicks

james d's icon

Hi all,

I wrote a patch that allows me to:
- drop a folder full of audio files into a patch
- load one of those files at random into a buffer
- have gen~ play back a loop from that buffer (with the ability to change start position and length of loop)

Now I want the ability to play back the loop at slower speeds, like 50%, tape style (with the pitch dropping, etc...)

Normally I have done this outside of gen~ using play~ and passing it a message like "start 1000 3000 4000", which works well, except there can be clicks which I am hoping would be easier to fix in gen~?

I am using "counter" and "%" so far in gen~ to make the loop, but I am guessing that is the wrong approach for different playback speeds...

Here is my patch so far, any advice would be appreciated. Thanks!

Max Patch
Copy patch and select New From Clipboard in Max.

nouserid's icon

Max Patch
Copy patch and select New From Clipboard in Max.

james d's icon

Thank you!

james d's icon

Ok, a couple of follow up questions:

1. Connecting the `sig~` to the `counter`object does seem to have the playback behavior I want, however, I hear something like a bit crushing on a slower speeds... Is there a better way to do this?

2. I added some attack/release ramps to the looper to remove clicks. My logic feels kinda silly here because I don't know how to write an "&&" condition in `gen~`. Is this the best strategy for click removal?

Thanks!

Max Patch
Copy patch and select New From Clipboard in Max.

james d's icon

Wow, thanks so much! The "cubic" interpolation sounds much better to my ears. I really appreciate the help, and the extra comments. Learned a lot here! Strange that `%` doesn't work, I'm not sure I would have looked there for a bug.

james d's icon

Now that I have this looper working, I am wondering if there is a way to make the looper restart at 0? Is there a way to set `history` to zero from a message or a button somehow?

Thanks!