get_notes
Extract all notes from an MEI file with pitch and octave information.
Overview
The get_notes tool extracts every note from an MEI file, displaying pitch names and octave numbers organized by measure, beat, and voice part.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
str |
Yes | Name of the MEI file (e.g., "Bach_BWV_0772.mei") |
Returns
| Key | Type | Description |
|---|---|---|
filename |
str |
The input filename |
notes |
str |
CSV representation of notes dataframe |
Example Output
Measure,Beat,1,2
1.0,1.0,Rest,Rest
1.0,1.25,C4,
1.0,1.5,D4,
1.0,1.75,E4,
1.0,2.0,F4,
1.0,2.25,D4,
1.0,2.5,E4,
1.0,2.75,C4,
1.0,3.0,G4,
1.0,3.25,,C3
1.0,3.5,C5,D3
Note Representation
- Pitch + Octave:
C4,D5,B♭3 - Rest:
Rest - No note:
NaN(voice is silent at this moment)
Octave Numbers
Following scientific pitch notation:
C4= Middle CC3= One octave below middle CC5= One octave above middle C
Use Cases
Basic Note Inventory
See what notes appear in a piece:
Voice Part Analysis
Identify when each voice enters and rests:
- Look for
Restto find rests - Look for
NaNto find where voices are silent
Preparation for Interval Analysis
Notes extraction is typically the first step before melodic or harmonic interval analysis.
Related Tools
- get_melodic_intervals - Calculate intervals from these notes
- get_harmonic_intervals - Compare notes between voices
- Intervals Overview - Learn about interval analysis