liveBook · Manning

Step

As explained in Learn Generative AI with PyTorch

A subdivision of a musical bar used for sequencing rhythms, melodies, or notes.

A step is a subdivision of a musical bar used to sequence rhythms, melodies, or notes. In 4/4 time with four subdivisions per beat, one bar contains 16 steps. section 13.1.2

Keep the sequencing hierarchy clear:

  • A track is a musical layer, such as drums, bass, melody, or a vocal part. section 13.1.2
  • A bar, or measure, spans a specified number of beats; a step divides that bar into smaller time positions. section 13.1.2
  • Each step stores one musical note, encoded in the dataset as a one-hot vector with 84 possible pitches. section 13.1.2

Representing steps in a music tensor

The JSB Chorales representation has shape (4, 2, 16, 84): four tracks, two bars per track, 16 steps per bar, and 84 possible notes per step. A step is therefore one position along the third dimension, containing one 84-value note vector. section 13.6 section 13.1.2

Figure 13.2 Staff notation for a piece of music in JSB Chorales dataset. The music has four tracks, representing the four voices in a chorale: soprano, alto, tenor, and bass. The notation is structured into two bars for each track, with the left and right halves representing the first and second bars, respectively. Each bar consists of 16 steps, aligning with the 4/4 time signature where a bar contains four beats, each subdivided into four sixteenth notes. A total of 84 different pitches are possible, and each note is represented as a one-hot vector with 84 values.

Use the staff-notation figure to inspect how two bars, 16 steps per bar, four tracks, and 84 possible pitches form one symbolic music representation. section 13.1.2

How Learn Generative AI with PyTorch covers it

How deep it goes
Explains steps through bar subdivisions, 4/4 timing, tensor dimensions, and one-hot note encoding.
Examples
Uses JSB Chorales with four tracks, two bars, 16 steps per bar, and 84 possible notes.
What it assumes
Assumes basic musical timing, while defining tracks, bars, steps, pitches, and note encoding.
What you can do after
Evaluate/understand symbolic music tensors by locating each step and interpreting its encoded note.
How it connects
Connects steps to bars, tracks, notes, pitches, one-hot vectors, MIDI, and multitrack music representation.

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.