Sample Scrubber


#1

I'm curious, has anyone created a sample scrubber patch (or dedicated object) that lets you attach, say a knob, and directly scrub backwards and forwards by twisting it, like the effect you get when scrubbing (scratching) on vinyl?

What I'm after is a very basic sample player, without any of the granular stuff, I just want the knob to directly play the sample as I spin it back and forth, and for the sample to change pitch according to the twisting of the knob speed. And, for the sample to start (and stay) at whatever position the knob last stopped moving.

Basically, a sample version of vinyl being forced backward and forward.

I can't try anything at the moment as I don't have Axoloti installed on this system. But I'm preparing a Linux box especially for Axoloti and other audio stuff, so I'll try anything and everything suggested once I have it up and running.


Sampleplayer questions
#2

The table/play pitch object has inlets for pitch and position, so I guess you could use that one for sample scrubbing.


#3

But how?

There's no reverse on that one so I thought I would start with one of the rbrt modules. Has to have the ability to play in reverse otherwise the scrub would only work one way.

Anyone have any example patches?


#4

reverse would just be turning the pot backwards.


#5

dial/p -> conv/interp -> table/read interp

eventually you could add a math/glide before the conversion from frac to audio in order to simulate acceleration of the vynil. But it's no more than that i think.


#6

yeah that should work. the only problem i see is the limited resolution of midi, if you hook up a pot to the axoloti it should be much better.

it could be very nice to try this with an encoder instead of a pot, you could calculate the speed from the encoder ticks and implement things like acceleration and deceleration like on a record player that you push and then stop...


#7

if you use an encoder you can calculate the speed with filter/delta (well, actually you can do it even with a regular knob)
you could then add some glide to such output and then feed it to filter/integrator


#8

If you have a MIDI controller than supports it, there's a 14-bit MIDI CC object, I think.

That's higher-resolution than the 12-bit DACs you'd be using if you hooked up a pot directly to an Axoloti pin.

a|x


#9

yeah sure that's an option.


#10

if you find a midi controller with endless encoders they will use relative encoding ( I know the ableton push does).
if you don't mind fixed position, then you could play with pitchbend as that's already 14bit, at least would given you an idea if it was likely to work.


#11

Thanks for the responses, but is there any chance I could see a basic setup?

It would save me hours or maybe even days of having to rip my hair out, and just to be clear, although it would be cool to see how it's done, I'm not talking about the inertia or ballistics that are involved then a real vinyl is spinning. I literally just want to map the minimum value of a knob to the start of a sample, and the maximum value to the end so that no matter what length the sample is, I can scrub through it start to end in forward or reverse using a knob.

Encoders are a big no for the sort of thing I mean, but again, even an example of that would be great, anything to put me (and anyone else who's curious) on the right track.

So I'm after a crisp, exact response to turning the knob, it should feel like the sample is directly connected to the knob. The standard resolution of MIDI should be no problem, cause if it works ok, I hope to rig-up a physical analogue pot to it, hopefully an industrial grade one that will take a super-sized knob to make in nice to use.


#12

here you go, i post a patch and a sample to play with.

a couple of observations:

you absolutely need the smooth object, otherwise it sounds like garbage even with interpolated read. adjust the smooth object to get kind of a slurry response (like on a vinyl player that slows down) put it to zero to get immediate response.

table length is an issue. if your raw file is not exactly table length in size the end of your knob will be silent. i added a max position multiplier that can adjust the knob range, as of now that is manually done (listen to it and adjust accordingly)

have fun!

scrub.axp (2.6 KB)

http://s000.tinyupload.com/?file_id=10034142281622528151 (the raw sample file to load)


#13

That sounds fantastic, lokki, thanks and much appreciated!

Will take a look as soon as I get a Linux installation sorted. I'm currently trying various distros, and hope to have it all finalised and permanently installed by end of next week.


#14

here is a better version...(at least for midi)

scrub2.axp (2.6 KB)


#15

Finally!

This is great, cheers Lokki. I feel like a complete tit for not knowing how to do that, but in my defence, the amount of downloads suggest that 19 others must have been just as clueless as me :rofl:

It was the lack of that math object after the scrub dial that had me stumped.
Love the way the smoothing works as well, simple but cool, cheers!


#16

Just thought I'd bump this thread for the attention of @urklang.

Check-out how many downloads were stated in the post above, and then look at the post before that one, which is, at the time of writing this post, now at 41 downloads.

This is a clear example of what I am talking about in your project thread, it shows that the users are starved of this stuff because it's just far too low-level for a heck of a lot of us around here. Now 41 might not sound like a lot of downloads, but I see the number as a popularity percentage indicator, as in, I don't think I've seen any other patch on this forum downloaded as much as that one, not even close.

It's popular because it's a sample-based object for a platform where building sample-based stuff is far too low-level, and too hard for many to comprehend - even a basic sample scrubber!