liveBook · Manning

Chord

As explained in Learn Generative AI with PyTorch

A combination of musical notes sounded together, here treated as one of the musical factors to control in generation.

A chord is a combination of two or more notes played simultaneously. It provides music’s harmonic foundation, while melody supplies the recognizable sequence of notes and groove supplies rhythmic motion. Chords are built from scales and arranged into progressions that give music structure and emotional depth. section 13.2.1

In MuseGAN, chords are one of four controls for generated music, alongside style, melody, and groove. They provide shared harmonic information rather than specifying each track’s individual melodic content. section 13.2.1 section 13.2

The chord control follows a compact temporal pattern:

  • A chord noise vector starts with shape (1, 32). section 13.2.1
  • A temporal network expands it into two (1, 32) vectors, one for each bar. section 13.2.1
  • The resulting bar-level chord information has identical values across all four tracks, providing shared harmonic context. 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 the chord vector expands across two bars and combines with style, melody, and groove in the four-track generator. section 13.2.1

How Learn Generative AI with PyTorch covers it

How deep it goes
Explains chord function and latent-vector expansion, but stops short of detailing chord encoding or generator implementation.
Examples
Uses a (1, 32) chord vector expanded into two bar-level vectors shared across four tracks.
What it assumes
Assumes basic musical vocabulary and introduces chords alongside the other controls needed for structured music generation.
What you can do after
Understand how chord information conditions bars and tracks within a MuseGAN music-generation design.
How it connects
Connects chords with scales, chord progressions, harmony, melody, groove, style, and generative music.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Generative AI with PyTorch. The section links point to the parts of the book it draws on.