read_clip_notes
Inspect MIDI notes in an Ableton Live Session clip: read notes, query a beat window, or count notes without transferring large data.
Instructions
Read MIDI notes of a Session clip, query a specific window, or count notes.
Args:
track: Track index in song.tracks.
slot: Scene/slot index in track.clip_slots.
from_time: Start beat of window to query. Omit to query from beat 0.
time_span: Window length in beats. Omit to query to the end of the clip.
count_only: When True, returns note count without transferring note data.
check: When True, performs validation checks on queried notes.
Returns:
Dictionary containing notes, count, window parameters, and validation report.
Note:
Times and positions are expressed in clip-local beats. Muted notes are included
and carry ``mute: true``. ``time_span`` is a length in beats, not an end beat:
beats 24 to 32 is ``from_time=24, time_span=8``.
Windowing and counting exist because there was otherwise no way to ask a small
question. Measured 2026-08-30: surveying note density across 59 drum clips meant
reading every note of every clip, and one clip alone came back as 384 notes and
57k characters, past the tool-result cap, so it spilled to a file. The LOM has no
``note_count`` on ``Clip`` at all, so counting meant transferring everything in
order to measure it. ``count_only=True`` counts inside Live and carries back one
integer.
With ``count_only`` there is nothing to validate, so ``check`` is ignored. With a
window, ``check`` sees the window and not the clip.
Returned notes are sorted by time, then pitch. Live hands its notes back ordered
by pitch, which is the one order a musical instruction never means: "the third
note", "every other note" and "the last note" are all about when a note sounds.
Measured 2026-08-30 against Live 12.4.5: four notes written at beats 0, 1, 2, 3
with pitches 72, 60, 67, 62 came back 60, 62, 67, 72, so taking every other entry
off the raw list picks alternating pitches rather than alternating beats, silently
and plausibly. For Live's own order call ``get_notes_extended`` through
``lom_call``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | Yes | ||
| check | No | ||
| track | Yes | ||
| from_time | No | ||
| time_span | No | ||
| count_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||