… 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).

UPDATE 2021-10-23: I’m working on some of the above variants and the results are promising. This is a piece where the two voices have been generated using the MusiFrog algorithm; the time/dynamics are played (improvised) live and only very few adjustments were made to the tracks (mainly to underline/adjust some “pseudo-cadences”):

2 thoughts on “MusiFrog

  1. 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 !!!

Leave a Reply

Your email address will not be published. Required fields are marked *