pyampact.symbolicUtils.removeTied

pyampact.symbolicUtils.removeTied(noteOrRest)[source]

Helper function for the _m21ObjectsNoTies method.

Remove tied notes in a given note or rest. Only the first note in a tied group will be kept.

Parameters:

noteOrRest – A music21 note or rest object.

Returns:

np.nan if the note is tied and not the first in the group, otherwise the original note or rest.