pyampact.symbolic._parts
- pyampact.symbolic._parts(piece, multi_index=False, kernStrands=False, compact=False, number=False)[source]
Return a DataFrame of the note, rest, and chord objects in the score.
The difference between parts and kernStrands is that parts can have voices whereas kernStrands cannot. If there are voices in the _parts DataFrame, the kernStrands DataFrame will include all these notes by adding additional columns.
- Parameters:
multi_index – Boolean, default False. If True, the returned DataFrame will have a MultiIndex.
kernStrands – Boolean, default False. If True, the method will use the ‘_kernStrands’ analysis.
compact – Boolean, default False. If True, the method will keep chords unified rather then expanding them into separate columns.
number – Boolean, default False. If True, the method will 1-index the part names and the voice names making the columns a MultiIndex. Only applies if compact is also True.
- Returns:
A DataFrame of the note, rest, and chord objects in the score.