New Tool (3.0): Grid Pie

(Conner_Bw) #1

[size=“3”]Grid Pie
Renoise cut and pastry. [/size]

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:

(danoise) #2

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?

(kazakore) #3

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 :)

(Conner_Bw) #4

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…

(s-n-s) #5

this is a nice idea

(Conner_Bw) #6

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

On the TODO list.

(Conner_Bw) #7

First, a PSA:


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:


(danoise) #8

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  
 return m  
-- least common multiplier (2 args)  
function lcm(m,n)  
 return ( m ~= 0 and n ~= 0 ) and m \* n / gcd( m, n ) or 0  
-- 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])  
 return cm  
-- the following will output "1040"  

(Conner_Bw) #9

Grid pie has arrived, Check the [first post]( view findpost p 216655).

(Dr. Drips) #10

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

(Conner_Bw) #11

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


(Dr. Drips) #12

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 []) 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>```


(Conner_Bw) #13

OK, I figured out the bug. File in [first post]( view findpost p 216655) (v0.2).


(D.A.T.) #14

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!!

(kaneel) #15

this is a good idea!

(dr4g0n76) #16

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”


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


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

local matrix_view = nil

(kaneel) #17

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.

(Conner_Bw) #18

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  
 name = "Grid Pie:X Axis",  
 invoke = function(message)  
 -- TODO  
 --\_x.value = FOO  
 name = "Grid Pie:Y Axis",  
 invoke = function(message)  
 -- TODO  
 --\_x.value = BAR  
for x = 1, matrix\_width do  
 for y = 1, matrix\_height do  
 name = "Grid Pie:Slice " .. x .. "," .. y,  
 invoke = function(message)  
 -- TODO  
 -- toggler(x, y)  

(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?

(s-n-s) #19

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

(Conner_Bw) #20

Grid Pie 0.3 available as attachement in [first post]( view findpost p 216655).

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