Clock divider mode for grids


I was in need of a clock divider when I realised that my grids has everything that’s needed for a nice voltage controlled clock divider module. So I quickly added a new output mode to the firmware.

You can enter the mode by long-pressing the tap button to enter settings mode. Then turn the “map x” knob to adjust the output mode. All leds off is euclidean drum mode, all leds on is grids default mode. I added the clock divider as a third mode (BD and HH leds on).

There are three independent clock division channels that are derived from the master clock.
The density knobs control the clock division from 1 to 32, giving you everything from 1clock/bar to a 32th note clock.
The other three knobs (mapX, mapY and chaos) control each channels offset from the pattern start. Example: Clock devision set to 16. Full CCW means: No offset. Full CW means: Trigger is send delayed by 15 pulses of the main clock. Center means: Trigger is delayed by 8 pulses.

Right now, I don’t really know what to do with the accent outputs. I have my grids set to relay the clock and reset signals (there’s a setting in the factory firmware to enable this).

Here is a fork of the source code on github. You can find attached the *.wav file. Power the module on with the tap button depressed and play the file to the clock input. Try it at your own risk.
Any feedback is highly appreciated! (12.5 KB) (24.5 KB)

I don’t have a Grids but that’s really cool !

haven’t installed it, just two thoughts:

clock dividers sure are useful, but so are clock multipliers.
would it be possible to add clock multiplication - i.e. make the ‘fill’ knobs (and cv) go from 16/1 through 1/16 (with 1/1 at the 12 o’ clock knob setting)?

the offset feature sounds interesting - and makes one use for the accent outs seem obvious to me:
if the trigger outputs are divider outputs with an offset, why not make the accent outputs divider outputs without the offset?

Nice. Maybe make the extra channels some boolean combinations of the main outputs? Or (without thinking to hard about usefulness) as a kind of “inverted” outputs at (division - offset).

good idea about the boolean acc outputs!
so which ones would make most sense? AND, OR and XOR?

+1 for multiplication, too :slight_smile:


Hey y’all!

Thanks for the suggestions. Boolean outputs sounds good indeed.

I’d say AND’ing the three channels together doesn’t make much sense - with divisors of e.g. 4, 9 and 23, chances are really low that all three channels are “on” at the same time - which means that the output would be 0 practically all the time. For more “even” divisors like 2, 4 and 8, it doesn’t make much sense as well, because it would simply mimic the slowest channel (in this example: 8).

However, XOR and OR sounds like a fun way to combine the three channels. So that would be 2/3 outputs. What could we do with the third?

Re clock multiplication: IMO it doesn’t make much sense to multiply the clock in this case. Grids internal clock is running at 32th notes and frankly, a 32th note clock x16 yields 512th notes, that’s 256 triggers per second for 120bpm. I don’t think that’s very usefull. Right now, the output can be 1 trigger per bar (on the /32 position) up to 32th notes (on the /1 position). That’s a very usable range, I think.

@TheSlowGrowth ah, true if you’re using the internal clock. Multiplication is handy if you’re using an external clock though.

Perhaps the 3rd Accent output could simply output the undivided clock.


You can overwrite two of the accent outputs with the internal undevided clock and the reset trigger by enabling one of the settings. That’s already there in the factory firmware.

ah ok, i wasn’t aware that this uses an internal clock - when i read ‘clock divider’, i thought it was about processing an external clock signal.

but then, how does that internal clock relate to the external clock signal? i must confess i’m not really that familiar with grids…

Yeah, AND seems kind of rare. Other candidates are the complementary NOR or XNOR for something that’s on more often that not?

> but then, how does that internal clock relate to the external clock signal?

The clock speed knob adjusts the speed of the internal clock. When you turn it all the way CCW, it runs off an external clock patched to its clock input.

So, yea, my modification is technically a clock divider, but because grids uses an internal clock that can be slaved to an external clock, it’s a little bit different from your average clock divider. One of the differences is that the clock input of grids can be switched between different clock speeds (namely 4, 8 and 24ppqn). So only when it’s set to 8ppqn you will get a true 1:1 ratio between incoming clocks and outgoing clocks when you select the /1 division ratio.

For me, this firmware is mainly usefull to create different slower clocks from a single master clock (which is coming from yarns in my case). The voltage control over that is a nice extra compared to a vanilla clock divider.

If you want a “real” clock divider, you must enable the external clock input by turning the tempo knob all the way CCW and selecting the 8 pulses per quarter note (ppqn) setting for the clock input.

> What could we do with the third?

I think a dedicated 1:1 clock is a decent candidate - it never hurts to have an extra source for the master clock, and it’s especially useful if the internal clock is in control.

I finally found the time to finish the clock divider mode.

  • ACC1 now outputs the result of an OR operation of all the outputs (= it’s 1 if at least one of the regular outputs is 1).

  • ACC2 now outputs the result of an XOR operation of all the outputs (= it’s 1 if an odd number of regular outputs is 1).

  • ACC3 now outputs a randomized version of output 3 (with a 50% chance)

I spent the better part of this afternoon trying to find out why my code changes didn’t work. After 2h of painfully inserting debugging instructions everywhere in the code, I realized that the *.wav upload isn’t working right (I was only using ISP before). Sure enough, once I used my ISP adapter, all was working as expected.
Has anyone actually gotten the .wav bootloader working? I can access it, I can also play the wav-file and the lights make nice shiny flashy patterns - but at the end, nothing has changed. As if all the packets were discarded due to checksum mismatches or something like that.

Here is the wavefile, nonetheless. Would be cool to know if anyone of you can get it to run. Please only do this if you know how to recover your module in case of a problem. (24.6 KB)

1 Like

Nice! I’ll test this out tomorrow.

May I suggest that you name your alt firmware for Grids after one of the games in the Peter Greenaway film “Drowning by Numbers”: The following names are still available:

  • Dawn Card Castles
  • Flights of Fancy (or Reverse Strip Jump)
  • The Great Death Game
  • Hangman’s Cricket
  • The Hare and Hounds
1 Like

^^ Why?
That was funny and made sense with Sheep and Tides. But I don’t get why every alternative firmware name should get a reference to Drowning by Numbers. Also: Sheep was a complete different firmware from Tides. Whereas for example this one and others like Parasites are additions to the original firmware.

My post was not a serious suggestion (although by all means chose one of those names, @TheSlowGrowth), I was just trolling, but not you, @cj55, nor @TheSlowGrowth

Has this firmware been verified since the last post. I’m interested in using grids to clock a muxlicer sequential switch so as to get variable step length. I’m hoping this will allow me to do so.

1 Like

Hi. I tried your alt. firmware. I thought I’d try the update you did with ACCENT outs, which is not available on the hex file from original post (hex file which works fine. Clock division is a cool add by the way).
So instead of checking the (24.6 KB) - because I’d like to learn and modify myself - I thought I’d compile an hex from your last github revision. But then the modules bricks if I flash Grids with it. If I compile the original MI firmware and flash (to unbrick the module so to say), then Grids works again. If I flash with the hex from your first post, it works too.
My question is:
1- Does the last revision on Github include the ACCENT out mod too? I’m compiling this, but I’m not even sure the ACCENT mod is included (I can’t find it in the code). <<< EDIT: okay. It is included. I found it in around line 189)

2- If yes, you compiled an hex file from this last revision, flashed Grids and it worked?
Thanks a lot in advance for your help.

Hi y’all,

I remember I had weird issues: After I included the accent outputs the module would not work after flashing. Apparently going to the settings and resetting all settings to something meaningful (then saving the settings) would make the module work again, so I thought it was simply a question of re-adjusting the settings after flashing. Later I found that the module sometimes it would do weird things. I wanted to fix this but then forgot about it - thanks for reminding me. I’ll try to take a look at it later, but time is scarse right now, so I can’t make promises as to when I’ll be able to provide a fix.