Note onset time

18 views
Skip to first unread message

Andrew Luther

unread,
Jun 12, 2024, 12:41:14 PMJun 12
to music21
I am trying to calculate the onset time in seconds for any given note in Music21. So for example, if a note is in measure 3, beat 1 and in 4/4 time at 60bpm, I would need the value  8 to be returned (since the note starts 8 seconds into the piece). This is a simple calculation if the time signature and tempo are consistent throughout the piece, however the calculation becomes difficult for the general case. Is there a way to do this without iterating over all measures?

Thanks in advance for any advice!
Reply all
Reply to author
Forward
0 new messages