Mutable Instruments Grids Drum Fill visualisation

Introduction

While researching the modules I have on order for my first Eurorack system I was looking for examples of people who had played with the Grids firmware, specifically I was looking for anyone who'd changed the drum loop tables. There were a few people asking about it on the muffwiggler forums but no examples of people having done it. The other thing that popped up a few times were people asking about some way of visualising the stock firmware from pichenettes and again, no examples of people having done it. Since, at the time of writing this, I don't have my rails or powersupply (or even my Grids), and I have some experience reading microcontroller firmware (though any C is likely to be enough for this project) and some experience writing visualisations in Javascript - I figured I'd give writing a visualisation a try.

This tool aims to be a true representation of how the X/Y and 3 Fill CV on a Muteable Instruments Grids effect the Trig and Acc outputs over the 32 steps. It uses D3js, HTML5's range input control and is derived from the Grids firmware source code. I believe it to be a true translation of everything except the chaos control and euclidean mode, but I don't yet have my Grids to actually test it against. Feel free to point out bugs. :)

The X and Y controls interpolate the threshold levels between the 5x5 matrix of 32 by 3 track drum loops using the same 4 way mixing and look up tables from the original firmware. pichenettes explains the theory of how this works in the thread Understanding code Grids: U8Mix and bitshift in pattern_generator.cc over on the MI forums. The interpolated thresholds are displayed as coloured squares for each step & track; the higher the threshold the more blue the square is. Higher valued steps get introduced first as you raise the fill control for that track. If the threshold is high enough (the cutoff is a value of 192), any time it fires on the trigger output it will also fire on the accent output. Watch the borders of the squares as you raise the fill controls for the different tracks, when a trig would be generated on that step and track the stroke turns black and when an acc would be generated that step and track's stroke is 2px thicker than a non acc generating step.

Update!

It took less than a day for someone (drinkcorpsevomit) on the forum to request I add sound and I'll be honest, it had definitely crossed my mind. Props to them for the prompt and for pointing me to howler.js which made it super easy. The interface is a bit rough and I'm not sure I have the BPM to timeout duration right(this version taps out correctly now), but it definitely plays very 808 drums when you press the [run?] button.

On with the show

Coordinates: (0:0,0:0)
0
0
0
0
0
120

Cheers, @devdsp.