pyampact.symbolic.midi_ticks_durations

pyampact.symbolic.midi_ticks_durations(piece, i=1, df=None)[source]

Replaces the placeholder ONSET_SEC and OFFSET_SEC columns with timing information directly extracted from the music21 stream.

Parameters:
  • i (int) – Part index (1-based)

  • df (pd.DataFrame or None) – Optional DataFrame with rows matching notes in the selected part.

Returns:

Updated DataFrame with ONSET_SEC, OFFSET_SEC, DURATION, and TEMPO columns.

Return type:

pd.DataFrame