Melody is the recognizable sequence of pitched notes that forms a tune. Its pitch, rhythm, and contour shape a piece’s main musical and emotional themes. section 13.2.1
In controlled music generation, melody is one of four latent inputs alongside chords, style, and groove. These factors provide more detailed control than a single noise vector. section 13.2 section 13.2.1
The melody input has a specific role in the four-track, two-bar arrangement:
- Begins as a (4, 32) noise vector, giving melody information across four tracks. section 13.2.1
- Passes through a temporal network that stretches it into two (4, 32) vectors. section 13.2.1
- Produces eight (1, 32) vectors, one for each track-and-bar combination. section 13.2.1
Melody in a generated composition
For a composition with four tracks and two bars, the melody vector is expanded so every track-bar pair receives its own melody representation, while chords govern bars collectively and groove applies across tracks. section 13.2.1
Figure 13.5 Music generation using chords, style, melody, and groove. Each music composition consists of four tracks and spans two bars. We will extract four noise vectors from the latent space for this purpose. The first vector, representing chords, has a dimension of (1, 32). This vector will be processed through a temporal network to expand the chords into two (1, 32) vectors, corresponding to the two bars, with identical values across all tracks. The second vector, denoting style, also has a dimension of (1, 32) and remains constant across all tracks and bars. The third vector, melody, is shaped as (4, 32). It will be stretched through a temporal network into two (4, 32) vectors, resulting in eight (1, 32) vectors, each representing a unique track and bar combination. Lastly, the fourth vector, groove, with a dimension of (4, 32), will be applied to the four tracks, maintaining the same values for both bars.
Trace how melody moves from a (4, 32) latent vector through temporal expansion into eight track-and-bar representations. section 13.2.1
