[tool idea] Smarter Interpolation

Right now if you want to interpolate pattern editor data (volume, panning, delay & patterncommand values) using the advanced editor interpolation options, you have to make an exact range selection starting from the first value, ending exactly at the last value.

If you mouse range select over the values, they fall within the selection but the range is bigger, pressing Lin, Log or Exp wont do anything. This irritates me frequently :D , clicking can be fiddly and I rather have Renoise not be so strict in this regard. Imo it would be better & faster if interpolation would just work within a range without the necessity for value-borders.

Could a tool be made that interpolates within a pattern editor selection like I propose?

Also, if you currently make a value range like this:




And press Lin, you’ll get:



Instead of what I want to be:


Could this be implemented in an interpolation tool? Have the interpolation work between multiple values selected in the range?


I just wanted to mention an alternative to consider, which imo should be faster workflow-wise and more intuitive.


  1. Line 1 and 16 has volume values on them.
  2. The cursor is positioned anywhere in between.
  3. A shortcut will interpolate from the closest value above (line 1) to the closest value below (line 16).

“Interpolate gap”. This is also better in the sense that it could wrap across patterns.

Sounds smart!

It doesn’t work for when you want to do stuff like in my example with multiple values at once, though would already be a lot faster.

Conner once made a script for me that takes the space between 2 note events in the pattern editor and use it to set the edit-step amount after pressing the tools keyboard shortcut.

Maybe his code can be easily altered for the interpolation purpose:

 local rns = renoise.song()  
 local my_pattern = rns.selected_pattern_index  
 local my_track = rns.selected_track_index  
 local my_col = rns.selected_note_column_index  
 local my_line = rns.selected_line_index  
 local my_inst = rns.selected_instrument_index  
 local my_iter = rns.pattern_iterator:lines_in_pattern_track(my_pattern, my_track)  
 for pos,line in my_iter do  
 local col = line.note_columns[my_col]  
 if col and not col.is_empty then  
 if pos.line < my_line then  
 my_inst = col.instrument_value + 1  
 local start = -1  
 local finish = -1  
 my_iter = rns.pattern_iterator:lines_in_pattern_track(my_pattern, my_track)  
 for pos,line in my_iter do  
 local col = line.note_columns[my_col]  
 if col and not col.is_empty then  
 if pos.line < my_line and col.instrument_value + 1 == my_inst then  
 start = pos.line  
 elseif col.instrument_value + 1 == my_inst then  
 finish = pos.line  
 my_inst = string.upper(string.format("%02x", my_inst - 1))  
 if start ~= -1 and finish ~= -1 then  
 rns.transport.edit_step = finish - start  
 "Selected Instrument " .. my_inst .. ", Edit Step changed to " .. (finish - start) .. "."  
 "Selected Instrument " .. my_inst ..", unable to calculate Edit Step!"  
renoise.tool():add_keybinding {  
 name = "Pattern Editor:Edit Step:For Jonas",  
 invoke = main  
renoise.tool():add_menu_entry {  
 name = "Main Menu:Tools:For Jonas",  
 invoke = main  

From that you then want to make it so it produces a curve where the cursor position in the mid-value, breaking away from the fixed Lin and Log modes…

Or probably not ;)

Ah. “Skew” the interpolation according to cursor position. Interesting idea, but a bit difficult to communicate.

Anyway I will start coding the “interpolate gap” tool this evening.

I think these are really cool ideas! (both Djeroek and joule)
I hardly ever used interpolate in the PE though… are the functions useful for anything other than volume column?

yes, for example pitch pattern commands DXX & UXX. Basically any pattern comment where you want to have change over time.


I am an ignorant when it comes to math. Can you help me when it comes to the log and exp functions? You seem to be the one to ask.

When trying a tool which did some work on with entering Automation curves I tried to see if I could match that given by the Generate Exponential Curve (or whatever it is phrased at) that you can find in the context menu. Never got exactly there but I did get somewhere close…

Ideas to try to maybe get you on the right course.
To get an exponential curve the way I have used it to resize the range to be 0-1 and then use an exponent (raise to a power of) some value. Two (squared) and three (cubed) or somewhere around there I think I remember being fairly similar to Renoise’s Exp function…

Not tested and there may well be syntax errors too but something along these lines maybe.

I will try and come up with some dummy code or a better, more full description later…

I had a go at this over the week. This uses Conner_BW’s code to get values and then interpolate between them. It’s found in the Pattern Editor context menu. It’s quite self-explanatory once you try it. One note is that it doesn’t read fx values very well. Enjoy and let me know what you think, bugs, features etc.

Very Cool JupiterXLI! Thanks :drummer:/>


while useful as it auto inserts missing pattern command values when interpolating effects, it doesn’t seem to interpolate different multiple values within a selection like I propose in the first post. It is basically a detached advanced edit interpolate section right now?

feature request:

have a keyboard shortcut that automatically executes the last used setting in the tool gui.

You’re right it doesn’t interpolate between multiple values. However, it does do what joule suggested in that you can place the cursor anywhere between two values and it will interpolate. So for multiple values you only need to move the cursor. Remembering the last setting would definitely be useful and I totally forgot about keybindings.

ah you’re right, the between values interpolating is an added value for sure!

For a lot of different values in a selection this can be quite tedious, but doable with a kb-shortcut for exec.

The tool remembers the last setting and has a nice keyboard shortcut which will execute the previous chosen settings.

Maybe someone can help with that, unfortunately I just don’t have any need for that function.

I think it should:

  1. Just have shortcuts for interpolate gap linear, exp and log for the currently active column.
  2. Respect edit mode.

If you don´t want to, do you mind if I alter it?

Just wanna say, I’m not using this, but hardly any keyboard shortcuts respect edit mode?

I’ll change the tool to respect edit mode but I’m not sure what the bold part means. I don’t think there is a way to determine if you are in the volume or pan column.

No, but if you peak into the advance edit, you see that the masking selection at the top of the area allows one to set the area of influence.
You can’t read out the state of the masking selection in the advanced edit section unfortunately, but i did created a widget that can be used for it.

Somehow forgot to post this. The tool now obeys edit mode. Also added two new shortcuts as a workaround, for vol and pan. The tool will only remember settings as selected in the gui. So by selecting fx in the gui you can use the shortcuts to interpolate fx, vol and pan using keybindings. I think this is a good compromise between speed of use and not needing a shortcut for every parameter. Also it looks like I messed up the spelling so I fixed what I could, the ID will stay the same though.
3857 com.JupiterXLI.SmartInterpolator.xrnx