liveBook · Manning

Note-on/note-off event

As explained in Learn Generative AI with PyTorch

A musical event indicating that a note begins sounding in the performance encoding.

A note-on event marks the start of a note in a performance-based MIDI representation. Its value identifies pitch from 0 to 127, and its associated velocity records playing intensity from 0 to 127. section 14.1.1

A note-on starts a pitched sound; a note-off releases a note. Together with time-shift and velocity events, these messages turn performance data into tokens for a music Transformer. section 14.1.1 section 14.5

Reading a performance event

A note-on event with value 74 starts D5, while an associated velocity of 86 represents a forceful performance. A later note-off with value 74 stops that note.

How Learn Generative AI with PyTorch covers it

How deep it goes
Defines pitch and velocity values, demonstrates event ordering, and defers detailed MIDI-to-event conversion mechanics.
Examples
Uses D5 at pitch 74, C4 at pitch 60, and a five-event MIDI excerpt containing note-on and note-off messages.
What it assumes
Assumes basic musical pitch awareness while defining MIDI pitch, velocity, note release, and tokenization directly.
What you can do after
Apply it via MIDI tokenization to identify note starts, associate pitches and velocities, and prepare event sequences for model training.
How it connects
Connects note-on events with note-off events, time-shift events, velocity events, MIDI, tokenization, and music Transformers.

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.