Godfried’s Algebraic Clock Generator

One of Godfrieds track types is being a clock generator thus generate periodic trigger pulses somehow dependant to the master clock. You got it, “Clock Divider” or “Clock Multiplier”

The classic Clock Divider divides a master clock by a given number, mostly a perceived musically usefull. So it generates a trigger every 2, 4, 8…etc master clock beats, some do even weired things like uneven numbers. Similar goes for Clock Multipliers that mostly generate 2, 4, 8… etc evenly spaced triggers for one beat of the master clock.

But what about Polyrhythms, which means uneven or even prime fractions off the classic musical timing, thats based on powers of 2 ( if you don’t to evil things like triplets ) ?

So here is what Godfried does, you might want need to remember some basic algebra from way back in school.

Godfried doesn’t differntiate between Divider and Multiplier, it uses an Algebraic Clock Generator, that calculates the tracks clock in respect to the internal master clock (the one that you set by the Tempo parameter in the Clock Menu).

It generates a Trigger pulse every n counts of a fraction of the master clocks beat by using “Counts” and “Fraction” parameters (numerator and denominator mathematically speaking).

Here are some examples:

Counts = 4, Fraction=1 generates a trigger every 4 beats of the master clock – a classic Clock Divider

Counts = 1, Fraction= 4 generates 4 triggers for every single beat of the master clock – a classic Clock Multiplier

Counts=7, Fraction=2 generates a trigger pulse every 3.5 beats of the master clock – not sooo classic anymore….

Counts=13, Fraction=7 generates a trigger pulse every 13/7 beats of the master clock, that is a 0,4642th note given a 4/4 bar on the master clock which means a trigger every 0,9285s with a master tempo of 120.00 bpm. No sign of classicness anymore, huh? Instead severe Polyrhythmitistm.

Please note, that the Fraction parameter goes all the way up to 32, so it divides a beat of the master clock into 32 slices – thats a 128th note if you consider a 4/4 bar. Please further note, that Counts=4 and Fraction=8 is the same as Counts=1 and Fraction=2. And so on, remember?

Since a digital clock is always quantized rounding errors might occur. And since i know you clever modularists will do self playing patches, that last forever and these tiny weeny fractions will add up after some days rendering your art offbeat – whatever offbeat means in polyrhythms – these are as evenly distributed as possible to the single steps (Counts).

Meet Godfried, the PPG

Above the prototype of Godfried, the PPG. PPG means Polyrhythmic Pattern Generator – not what you were thinking.

The story behind goes something like this: i LOVE selfplaying patches. But i was badly lacking an elegant Master Clock Module with nice big start and stop buttons. OK, actually i have one, but its a bit to big to lug around. So i decided to make one myself, that narcistically fits my needs: BIG Buttons for my ever aging Wurstfinger, easy to to set up, best with a nice display, memory for the patches, as small as possible and most important: a precise timing. Did i say i am a timing afficionado? And no way i would want to dispense the Circlon’s phantastic PRH feature.

And after a “bit” playing around it developed into this:

A 30 bpm – 300 bpm Master Clock with +- 0,0001s accuracy, that can be synced externally (as though i would not recommend this. Its meant as Master Clock / StartStop module in the end….)

6 Trigger Channels driven by the Master Clock, that can play either

  • command Signals like Start, Stop, Reset etc….
  • Clock Signals derived from the Master clock
  • XOX style sequencer patterns up to 64 Steps
  • Euclidean sequencer patterns

All of the above (well, except the command Signals….) are real polyrhythmic, so your pattern with x steps will play the same time as y beats from the Master Clock. Trigger Outputs are +8V.

Additionally (as there was an unused but nice D/A in the used Teensy 3.2 board, 2 unused OpAmp cells and some free PCB real estate…) there is a CV track that plays a CV pattern of up to 64 steps, also polyrhythmic and possibly quantizeable (yet to implement). CV ranges from 0-4,85V with 12 Bit resolution.

As soon as i figure out what swing means in a polyrhytmic context i’ll also implement this – if you have any ideas about this i’d be pleased to hear from you!

A crispy 128×64 OLED allows for a nice graphical user interface, that makes editing easy despite the fact there is only a single encoder plus one “Escape” button and a 512k eeprom provides plenty of memory. I managed to squeeze all of this into 6HP.

Currently i built the prototype in the Pic above and are in the stage of completely rewriting the Firmware to accomodate Data Structures to possible future features. Or – seen more realistically – clean up the mess from the brainstorming phase.

A new revision of PCBs is already ordered and as soon as i consider the Firmware as good enough DIY kits for this will be available.

Feel free to share your thoughts here, or – if you are brave – apply as a BetaTester. But only if you are *really* brave.

2021 will be better….

OK, its been a bit since i last posted here. For the last 7 years i was kinda distracted from this little project by life, the universe and everything else.

The good about 2020 was i sorted out some things, learned a tad about this and that and finally had some time to go back to the drawing board, finish a thing or two where i left them and start some new projects.

Coming up in January are these two here:

Stay tuned for more information coming up soon.

Oh, and all the best for 2021 for you!

The Vector Sequencer

Some thoughts about sequencing;

Classical Step sequencing is one dimensional, a row of steps (this single line makes for 1 dimension) on which you can move forward, backward, some Sequencers allow repititions, skips, jumps etc… but its always back and forth mostly on a multiple of 8 Steps.

Now free your Mind and take a breath, we are breaking with habits.

What if you had another dimension to it, not only one single row, instead a Grid of Cells. Each Cell could hold various musical interesting Data such as CV or MIDI Data.

Then how big should this Grid be and how can you navigate thru it.

For the Size of the grid the answer is simple: infinite. This is achieved by allowing to cycle thru the rows (x-direction) and lines (y-direction), when you leave the grid to the right you come in on the opposite side at the same line. Thus you have an finite number of Cells but you can move in any direction infinite as far as you want.

Now comes the tricky part, the amount if Cells. We chose a 5×5 Grid for several reasons:

  • 5 is a Prime, so every row and every line is an algebraic ring (more on the implications in a later posting), one of the advantages is that you touch every element in a ring with any constant number of steps you move, so you hit every cell sometime. This is only achieved when the number of cells in a row/line and the step size have no common dividers, therefore you will have to choose a prime number for the lines size.
  • 5×5 is physical feasible, 7×7 makes up to 49 cells so you would have to tune 49 values before you can start making music
  • 5 is quite nice to split any chord into or for small fractions of a melody
  • 5 is my sons favorite number

Now that we have justified the size of the Grid how to navigate? Assuming that the grid is overflowing on each side every cell is like the other, any determination on starting point is only convention. We chose (x,y) = (1,1) as the upper left corner only counting positive, so the lower right corner is (5,5). Oh, this looks like something familiar from school some time ago? Yes, indeed, its called a Vector! Now we can point to the start of our sequence with this Vector, its called the Reset Vector (Xr,Xy), every time a Reset Event is triggered the Sequencer will move to this Cell on the next Clock Tick (or instantly when stopped).

So where to move on the next Clock Tick? Follow the Move Vectors! Lets define a set of 4 Values (Xt, X, Yt, Y) Xt, and Yt define the clock tick on which the Sequencer moves X or Y Steps in Positive (to the right/down) direction. Thats about (nearly) all. With these 4 Values you determine how the Sequencer crawls over the Gris, lets look at an Example:

Set Xt=1 X=1 Yt=1 and Y=0, this means move every clock tick (Xt=1) one step to the right (X=1) and every clock tick (Yt=1) do nothing (Y=0) on the y-Axis.

If you hit start the Sequencer will jump to the Reset Position (1,1) and on the next clock tick it will move one step to the right, overflowing at (5,1) to (1,1) just like an old school Sequencer would do.

Now set Yt=5 and Y=1. Hit Start. The Sequencer now will move one step to the right and after the rightmost Cell on the first line (5,1) it will jump to the first cell in the 2nd line (1,2) determined by the Yt=5 (do every 5 Ticks) Y=1 (one move downwards). See this Video.

Just with these 4 Values you can do a myriad of possible movements across the grid. BTW, there is no reverse movement or negative steps as moving one step to the left means exactly the same as moving 4 steps to the right…

To complicate things a bit – or make more interesting sequences – the Sequencer has for both Axis Events, defined by (Xet, Xev) and (Yet, Yev), with Xet, Yet the number of clock tick when the Event occurs and Xev and Yev defining the event type.

These Events can be anything from this collection

  • Reset to a certain position on the Axis
  • Reset to Reset Position
  • Reset to a Jump Position
  • Jump additional n Steps
  • Repeat N Times the Actual Step
  • Change the Step Width
  • Reverse (only if StepWidth= 1 or 4) for KnightRider Blinkenlight Effects
  • Swap X and Y Rules
  • Stop Sequencer

So the complete behavior of the Sequencer can be tweaked by 4 Parameters for the Vector, 4 Parameters for the Events and 4 Parameters for 2 Jump Positions making up for Patterns you never could achieve with classical Step Sequencers and are – albeit iterative – strictly deterministic (if you don’t use random events).

We call this principle of sequencing  Vector Sequencer and its name is

The Exfilinator