pyampact.symbolic.durations

pyampact.symbolic.durations(piece, multi_index=False, df=None)[source]

Return a DataFrame of durations of note and rest objects in the piece.

If a DataFrame is provided as df, the method calculates the difference between cell offsets per column in the passed DataFrame, skipping memoization.

Parameters:
  • multi_index – Boolean, default False. If True, the returned DataFrame will have a MultiIndex.

  • df – Optional DataFrame. If provided, the method calculates the difference between cell offsets per column in this DataFrame.

Returns:

A DataFrame of durations of note and rest objects in the piece.

See also

notes()

Return a DataFrame of the notes and rests given in American Standard Pitch Notation