*… a Musical Frog jumping around a harmonic lake!*

The **MusiFrog** is a simple deterministic algorithm that can be used to produce nice pseudo-random melodies that I discovered while experimenting with generative-music (but perhaps someone else has already found it).

It is based on a frog that jumps over a sequence of stones. Each stone has a *jump value* and is associated with a *musical note*. Initially the frog is on stone 1 and suppose it has jump value X. The note associated with stone 1 is played, and the frog jumps forward X steps on stone N=1+X; the jump value of stone 1 is increased by 1. Then the note associated with stone N is played, the frog jump forward according to the jump value of the stone which is then incremented by one. The process is repeated and when the frog jumps off the last stone it “wraps-up” and return to the beginning of the sequence.

The following table represents an example of a MusiFrog sequence:

There are many possibilities for experimentation:

- the underlying scale can be different, and can also contains “pauses/silences”, or span multiple octaves, or represent a melodic line;
- the initial jump values of the stones can be set all equals to 1, but can also be different; for example:
- 1,2,3,4,…. ;
- 1,2,4,8,16,… (powers of 2)
- 2,3,5,7,… (primes)

- the number of stones can be be varied;
- the jump value increment can be different (though the value of 1 guarantees that all stones are visited).

I implemented the algorithm in a VCV Rack module ; you can download it and subscribe to the AlgoritmArte modules to experiment with it.

This is a short demonstration video (music is generated with this example VCV patch).

Nice and simple! Naivily I’d lie the frog also to jump back for more likelihood of melody-like generation. Maybe you could add real randomness and let the frog have a certain likelihood of switching direction? Kind of like a ping-pong sequencer. Maybe the direction change would only happen every 8th jump, to keep it somehow in a pattern?

Yes, I’m experimenting with other variations:

– change direction at the end of the sequence

– limit the max length of each jump and then restart with 0, or start decrementing the jump value;

– use “negative” steps;

– combine two frogs

– …

I’ll post updates when I have some new material !!!