Tool idea: Rotate sample selection

sketch:

anyone?

They say that a picture is worth a thousand words, but in this case I think it would be helpful if you actually explained what this thing is/does. What exactly does “rotate” mean here in the context of a sample selection?

initial state

chunk of audio was selected

some rotation was performed

result

and by words:
this tool should perform rotation of audio data within the selection with selectable step units (Beats / Samples / Minutes)

edit: or milliseconds instead of minutes

Seems like an interesting tool indeed. The main logic itself is also a piece of cake and should not take long to code.

The main problem here (if you even care about this) will be ensuring that the rotations are performed “cleanly”, ie. no pops or clicks occurring at the edges.

Let’s say I have the following selection, for example:
4213 renoise-rotate-before.png

And I rotate that selection by some non-ideal amount:
4214 renoise-rotate-after.png

Obviously this result will sound like crap. This is perhaps an extreme example because it’s just a simple waveform with the worst possible outcome, but these type of artifacts will still occur on other material. Just something to consider anyway. Some form of clever cross-fading at the selection edges could probably take care of it quite effectively enough.

I would include parts of the selection length itself (like 1/4th, 1/3rd etc) too. Maybe just have that represented by ‘degrees’.
This could be coded as a tool btw…
And stronger yet, in the case of dblues example, any rotation other than 360 deg creates those hiccups. But of course, 1. you don’t really want this to disturb sinewaves and 2. sync option on some synths have that same effect sometimes, saw and square waves too btw. Any way to remedy, a function much like the “Smooth” function in sample editor might be implemented to kind of LPF the edges of the selection with a margin of say 20 samples left and right.

edit: with point #1 I meant: you don’t want this tool to go and mess about with sinewaves, because with ‘real world’ samples the destruction is much less noticeable. It’s good to warn for these clicks, but don’t let that stop you.

I would very much like this feature in a flavor where the data was padded with silence instead of rotating. Maybe an option? This would be very helpful when aligning stuff (vocal phrases) in a sample.

The way I do this today is horrible. Cutting and pasting silence on a gut feeling, or reverting to struggling with slices.

This shouldn’t bee that hard to script, but I’m not sure how fast it would be trying to paste new sample data in realtime. Having two sliders would be nice, one above with degrees 0-360 and one slider below for finetuning.

That’s indeed the reason, why the tool should assist as much as possible in getting it right the first time.