This article approaches the subject of musical form from the standpoint of an algorithmic composition practice. It introduces the problem of ergodicity in music, a formal situation at which music development is perceived as static. The concepts of General Periodicity by Henri Pousseur and Temporal Gestalt by James Tenney gave support to a reflection on the nature of the problem, as well as to formulate a twofold structuring procedure based on ideas of continuity and segmentation of the musical course. The devised method was implemented as a computer program to produce entire pieces of music.