Clock divider mode for grids
  • Hello,

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


  • 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.
  • 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
  • ^^ 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.

  • Well, sometimes naming traditions develop. In the old days, every unix server anywhere was named after a character from Lord of the Rings. Canonical name each release of their Ubuntu linux distro after an animal with an alliterative adjectival qualifier. Intel name their CPUs after geographical features near their fab plants. However, 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…

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion