Skip to content

About

Clock multiplier / divider / beatshifter

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

102 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Polyrhythm Clock Generator

Clock Dividers have always been a staple of modular synthesis. They have added complexity and nuance to many of the patches I have built, allowing for long delayed triggers to keep new things happening. These Clock Dividers are great, but the approach has always seemed to me to be mathematical rather than musical. This is my attempt to make a clock divider that is based more on musical principles than mathematical ones (and thereby entailing even more math :). The principle is based on Polyrhythms such as 3:4 or 5:3. This is achieved by taking an input clock, setting what time signature that input clock is in, so that we can find the downbeat, and then subdividing that downbeat to match our new desired time signature.

I was in the process of building and coding, and having latency issues, when Look Mum No Computer published his video about his pendulum clock. I had already been looking at ginky syntese grain's code. The patch that RohanM. did for LMNC solved a number of the problems that I was having. 90% of this code is based on their work and I simply added a few switches and changed the math to accomplish what I was trying to do. All of the class building and interrupts are entirely their work and I am highly appreciative of them sharing their work:

Clock multiplier / divider / beatshift

The original code by a773 (atte.dk) (released under the GPL licence) provided alternate firmware for the ginky synthese grains eurorack module.

Extended by RohanM. to provide a general purpose clock multipler / divider / beatshift code for use as a synthesiser module.

Hardware

This module runs on an Arduino (tested on an Arduino Nano). It expects four potentiometers as controls (pins defined by MULT_POT, DIV_POT, MODE_POT and BEATSHIFT_POT). It takes a clock as input on the CLOCK_IN pin and has two trigger outputs - SHIFTED_OUT and UNSHIFTED_OUT (the latter identical but without the beatshift applied).

I have added to this two on/off/on switches (pins MULT_SWITCH and DIV_SWITCH) that add modifiers to the get_mult and get_div functions. There are also an input clock throughput jack and a combined output jack that are completely electrically wired and not coded in the module.

Operation

The module can operate currently in two modes:

  • MULT_DIV mode: Modifies the original SIMPLE mode and multiplies or divides by factors of two or more (1, 2, 4, 8, 16, ...)
  • POLY mode: Calculates the downbeat of the input clock based on the input time signature and subdivides(multiplies the downbeat by the output time signature
  • (I have two more in mind, but haven't fully realised them: TUPLET and EUCLIDEAN. There are some place holders in the code for these)

The mode can be selected by moving the mode knob to the left or right side. A range of output tempos can be produced by combining multiplication and division, especially by using complex factors. The beatshift knob can be used to delay the trigger from the beatshifted output by up to one beat.

Changelog

  • 15-08-2022 Adapted by ApocPro for the addition of the Polyclock functionality
  • 24-10-2021 Reworked by Rohan Mitchell for easier multi/div changes between beats
  • 16-10-2021 Further changes to allow for longer gaps between incoming beats and logic to handle multi/div changes between beats for Look Mum No Computer
  • 11-9-2021 Adapted by Jesse Stevens of artist duo Cake Industries for Look Mum No Computer offbeat shift needs

About

Clock multiplier / divider / beatshifter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages