New Tool (3.4): Grid Pie

Grid Pie
Renoise cut and pastry.

Conceived, developed and launched at Music Hackday Montreal 2011.

About the hack:
Renoise is a sophisticated music sequencer and audio processing application with a mod tracker interface. One of the new trends in our community is the concept of a meta-interface. In essence, users use the Lua API to transform Renoise into something else, hide the Renoise window, and work with hardware interfaces connected to their own scripts.

Three current examples:

Grid Pie is “yet another meta interface”. It turns Renoise into a live performance audio recombination machine.

Download it here: Grid Pie | Renoise

Nice one.

I’ve been working with a similar concept for basic clip-like functionality. Could probably even be combined with this approach!
So, do you imagine that the Grid is organized into 4 vertical columns, with each column representing a choice among 4 options?

Very similar to the idea I proposed when the possibility of scripting was first announced. Anything that makes live more fun, easy or interesting is worth exploring in my book :)

I was thinking this could be an option.

What I envision is having up to 16 tracks playing at once (4 x 4).

The copy/delete mechanism would use FIFO; move the track in the first available slot.

What remains nebulous is if I should copy the DSP chains too, dunno if this would work, this is where your quoted idea makes more sense.

Hence the tard, as this could simply be done using the scopes…

this is a nice idea

It turns out I don’t have time to work on this, after all.

On the TODO list.

First, a PSA:

[video]http://www.youtube.com/watch?v=T549VoLca_Q[/video]

I’m convinced, so the project is renamed: Grid Pie.

Translated to french: Grid Tarte, twice removed.

I will be working on this idea during Music Hackday Montreal. I will spend 24 hours on it.

To be inspired by:

[video]http://www.youtube.com/watch?v=lpgpwyNytbw[/video]

Here is some code to figure out the resulting pattern length (lowest common multiplier)
Hint: those tracks above would result in a pattern with 1040 lines…IOW, not an optimal fit.

  
  
-- greatest common divisor  
function gcd(m,n)  
 while n ~= 0 do  
 local q = m  
 m = n  
 n = q % n  
 end  
 return m  
end  
  
-- least common multiplier (2 args)  
function lcm(m,n)  
 return ( m ~= 0 and n ~= 0 ) and m * n / gcd( m, n ) or 0  
end  
  
-- find least common multiplier with N args  
function least_common(...)  
 local cm = arg[1]  
 for i=1,#arg-1,1 do  
 cm = lcm(cm,arg[i+1])  
 end  
 return cm  
end   
  
-- the following will output "1040"  
print(least_common(80,40,13))  
  

Grid pie has arrived, Check the first post.

I loaded the beat slicing tutorial to test Grid Pie but it crashes with that song.
maybe because there are to few tracks?

Can you send me the steps to reproduce, or some log?

Cheers.

I can’t reproduce it anymore so it seems fine.
It was as simple as: open renoise>drag grid pie onto it>load beat slice tutorial song>execute grid pie.
great tool btw, lot’s of potential.

anyway here is what my log said about the incident:

  
Error Message: 'C:\Users\Paul\AppData\Roaming\Renoise\V2.7.2\Scripts\Tools\com.renoise.GridPie.xrnx\' failed to execute in one of its menu entry functions.  
Error Message: Please contact the author (Dac Chartrand [dac@renoise.com]) for assistance...  
Error Message: std::logic_error: 'ViewBuilder: invalid value for valuebox: '2'. value must be [1 - 1].'  
Error Message: stack traceback:  
Error Message: [C]: in function 'valuebox'  
Error Message: main.lua:237: in function 'build_interface'  
Error Message: main.lua:326: in function <321><br>```

</321>

OK, I figured out the bug. File in first post (v0.2).

Thanks!

thanks for this one its great idea! just the 4x4 is very small 8x8 and playable with launchpad would be great i think it would be also helpful to jump 4 positions (or 8 in an 8x8 matrix)on the x and y axis - this really have potential!!

this is a good idea!

Luckily the programmer did a very intelligent job here:

Just look at the source code in the main.lua script part (and change the marked lines to your need),
then restart renoise:

require “toolbox”

–[[Globals]]–

local my_interface = nil
local vb = nil
local gridpie_idx = nil
local x_pos = 1
local y_pos = 1

–[[Future]]–

local matrix_width = 8
local matrix_height = 8
local matrix_cells = table.create{}

local matrix_view = nil

Well, I guess this part of the code could become

local matrix_width = table.count(renoise().song.tracks) – add an observable event on track addition
local matrix_height = anyNumberThatCouldBeComingFromAValueBox

But that’s just my 2 noob cents.

I’ve had problems making dynamic grids in the past. Too many Lua errors last time I tried. I’m sure it’s possible, somehow, but I won’t be the one to do it. Patches welcome. :)

Hey, thanks. :)

What I will do for the next version is a menu. Something like

  
* Tools -> Grid Pie -> 4 x 4...  
* Tools -> Grid Pie -> 8 x 8...  
* Tools -> Grid Pie -> Custom...  
  

But like you said, it’s possible now by looking at the Lua.

The most important hurdle to tackle is the MIDI mapping stuff. It’s pretty straightforward. I just didn’t have time (or a controller to test with) during the Music Hack Day. The stubs are already in place. It’s just a matter of finding more free time. Patchers look near line ~435 for:

  
--------------------------------------------------------------------------------  
-- MIDI Mappings  
--------------------------------------------------------------------------------  
  
renoise.tool():add_midi_mapping{  
 name = "Grid Pie:X Axis",  
 invoke = function(message)  
 -- TODO  
 -- vb.views.gp_x.value = FOO  
 end  
}  
  
renoise.tool():add_midi_mapping{  
 name = "Grid Pie:Y Axis",  
 invoke = function(message)  
 -- TODO  
 -- vb.views.gp_x.value = BAR  
 end  
}  
  
for x = 1, matrix_width do  
 for y = 1, matrix_height do  
 renoise.tool():add_midi_mapping{  
 name = "Grid Pie:Slice " .. x .. "," .. y,  
 invoke = function(message)  
 -- TODO  
 -- toggler(x, y)  
 end  
 }  
 end  
end  
  

(PS: I added the functions/procedures that will need to be called, not in code as I type this)

Inspire yourself with the code snippet from: this example.

I won’t have time to mess around with this script for a couple of weeks. But that doesn’t mean you guys/girls can’t have a go at it. Post your hacks?

gonna check this out,does it work with the launchpad?that would be super sweet,great job conner

Grid Pie 0.3 available as attachement in first post.

Here’s a video where I test/demo it with an AKAI LPD8

Cheers.