Calculating Euclidean Rhythmns using the Bresenham Algorithm

Nikolaus Gradwohl2017-11-24T06:43:52+01:00

Recently I started playing with euclidean rhythms and implemented the bjorklund algorithm shown in the paper by Godfired Toussaint in ruby. The implementation isn't really rocket science (actually it's ring accelerator science :-)) but it uses recursive function calls, two arrays, multiple stages, ... and I had the feeling that this is far more complicated than it needs to be. After reading several posts, blogs and papers about the implementations of the algorithm I read somewhere that the algorithm produces the same result as the bresenham algorithm - at first I ignored the sentence and unfortunately I have no idea anymore where I read it but today I implemented a simple version of it an the results I get are the same as my recursive version - or rotations, which is fine because you usually loop over the sequences and are free to choose a starting point - so in case anyone is interested here is my bresenhamish method for calculating euclidean rhythms in ruby - shouldn't be too complicated to port it to different languages

def eucledean(k,n)
    f = 1.0*n/k
    res =,0);
    a = 0
    k.times do |i|
        res[a.to_i] = 1
        a += f
    return res

(1..8).each do |i|
print eucledian(i,8)
print "\n"

and this are the results I get for the 8 possible rhythms with 8 steps

[1, 0, 0, 0, 0, 0, 0, 0]
[1, 0, 0, 0, 1, 0, 0, 0]
[1, 0, 1, 0, 0, 1, 0, 0]
[1, 0, 1, 0, 1, 0, 1, 0]
[1, 1, 0, 1, 1, 0, 1, 0]
[1, 1, 1, 0, 1, 1, 1, 0]
[1, 1, 1, 1, 1, 1, 1, 0]
[1, 1, 1, 1, 1, 1, 1, 1]
read more ...

AnimationNodes2 Experiment - balls and sticks

Nikolaus Gradwohl2017-11-23T08:35:19+01:00

I finally managed to solve all the cython issues and install version 2 of the animation nodes addon on my linux machine, and rendered a first experiment with the new vectorized nodes - the nodes setup is much simpler than the loop version of 1.6 and i really like the new syntax.

you can download the blend file here

sticks and balls

hint: if you get a "cannot import name X" errors - try to delete the _pycache_ folder in ~/.config/blender/2.79/scripts/addon - this solved the problem for me

read more ...

Layered Boxes

Nikolaus Gradwohl2017-11-22T07:27:03+01:00

I created a small processing sketch this morning. I started by drawing slowly rotating boxes and then added a little transparency to the fill color to create a pseudo 3D layering effect. To spice things up a little bit I added a random function that replaces a box with a new one at a chance of 1/2000 after it gets drawn.

click here to start the sketch or download the sourcecode.


I tried different render modes in Processing and was pretty surprised how different transparency is handled in different render modes - in P3D for example the outlines of the boxes aren't affected by the transparent fill at all - so I switched back to P2D - transparency works the way I expected it but the transparency values differ from the default render. I will read the doku this weekend and see what other unexpected behaviors I can uncover :-)

read more ...

new Song: Walk in the Rain

Nikolaus Gradwohl2017-11-21T09:23:38+01:00

A first electronic, ambient track recorded with my new Waldorf Blofeld with a little help from the Moog Mother32 and the Novation MiniNova.

Oh! And did I mention? I got a new Synthesizer... :-)

walk in the rain

read more ...

guess who got some new macro-lenses

Nikolaus Gradwohl2017-11-14T05:43:23+01:00

hmmmm - I think ... - Oh! Yes! Thats meeeee :-) expect some macro photos

Macro Lens

read more ...

Processing and Blender Sound Visualizer for Magical Dreams

Nikolaus Gradwohl2017-09-29T07:51:40+02:00

I finally managed to finish a project where I could combine most of the tools I love and use. I created a processing sketch to visualize the stereo correlation of my song "Magical Dreams", exported the frames and used blender to create an animated highfield based on the brightness of the images. Then I rendered these frames and combined them to a video with the original track exported from bitwig.

Hmmm ... maybe a bit more complicated than needed, but that's one of advantage of a hobby project - you don't have to justify yourself for inefficient processes and toy around as long as you want to :-)

Magic Dreams

read more ...

new Song: Still Awake

Nikolaus Gradwohl2017-09-27T07:14:31+02:00

I finally found the time to sit down and arrange and mix one of the song fragments that are waiting on my harddisk. I'm currenly very tired after a week full of nightshifts, overtime and bughunting but I'm still awake ... (ok not the best song title ever, but my thoughts are still a bit fuzzy - did I mention sleep deprivation?)

Still awake

read more ...

How to modulate Midi-CC values in Bitwig Studio

Nikolaus Gradwohl2017-09-15T06:26:53+02:00

to make a synth line played on a hardware synth more interesting you can modulate some parameters like filter cutoff, decay time, etc using a midi cc value. This can be done using bitwig studio by either using a automation lane sending the cc value or by using the cc device.

To use an automation lane simply click on the "Show automation lane" icon and select the controller value you want to send in the "midi" section

bitwig cc lfo modulation

then draw the cc values in the lane you just created. I used this technique in my latest song to create the filter cutoff of the highpass filter on my moog mother32 for example

bitwig cc lfo modulation

The second version uses the "Midi CC" device. With this device you can use bitwig's brilliant modulation sources to create the cc you want do send. You could combine several modulation sources like lfos step sequencers etc to influence your sounds.

read more ...

blender denoiser experiment: subsurface shader

Nikolaus Gradwohl2017-09-11T06:05:41+02:00

I made a new Blender Experiment to explore the possibilities and limits of the new blender denoise function. This time I tested the denoiser on a material using a subsurface shader node in combination with a pretty low sample number, because the subsurface node in a material creates very noisy images and increases render time a lot


you can download the blend file here

blender denoise experiment


For this experiment I creatd a simple is-sphere and added a voronoi texture as the displacement texture to make the object a bit more interesting. The material was created using the new cycles Principled BSDF node.

read more ...

microdisplacement denoise test

Nikolaus Gradwohl2017-09-05T05:54:43+02:00

I wanted to test the limits of the new blender denoise function so I used a very detailed texture with lots of sharp edges for microdisplacement.

you can download the blend file here

displacement denoise test

read more ...