Tool idea, need help with design: Quantise to selected pattern_track

I wish to make a tool that will quantise the pattern to the data of a selected pattern_track, instead of the current quantisation method.

For things on the same line it’s of course simple, but what to do with the values in between?

I don’t have any really good ideas of how to make it work. Does anyone have any suggestions?

Reminds me of the structure imposer tool;

https://forum.renoise.com/t/done-structure-imposer/37059

…but what to do with the values in between?

scale them with delay column values according to a set percentage in a tool gui?

I’ld try to abstract over lpb. Personally i have lpb set to 8 or more, quantize will probaly not work too well on a lines basis, if you work with settings like that.

Sth. like:

-- lines to beat
local beat = (line_index - 1) / lpb
if note_column.delay_value > 0 then
   local beat_delay = 
       (note_column.delay_value / 255) * (1 / lpb)
    beat = beat + beat_delay
end

-- beat to lines
local new_line = math.floor(new_beat * lpb) + 1
local new_delay = (new_beat - ((new_line - 1) / lpb)) * lpb * 255

… or sth.

That doesn’t answer the question about what to do with note data that “doesn’t match” the pattern ofc (:

Don’t think there some general solution to that, you could simply leave it alone (with a threshold value, if the distance to a matching note in the quantize pattern is too big), or quantize it to some (fine resolution) groove grid instead. Or get crazy trying to recognize rhytmic patterns (triplets, flams, whatever) and make up interpolation functions according to the quantize pattern :slight_smile:

addendum;

maybe also look at the time sig bender tools code, a tool which can divide a pattern up in chunks and tries to fit the content in whatever set pattern length;

https://forum.renoise.com/t/script-idea-done-pattern-divider-juxtaposer/26080

Iguess I should have been much more specific.

But the current new and improved plan is:

Take a pattern track with all delays, quantise it with renoise tools to a perfect grid, then using BPM automation recreate the delays.

Fully BPM dependant stuff will go crazy, but if the changes are small the general stuff won’t, and we get all the benefits of usinga perfect grid and a tracker in general.

I will combine it with a fancier automation curve drawing tool as well. BPM changes by 0.1-3 are quite nasty in the current system. (any other bpm/tpl automation will cause rendering issues)