drumscript.notation_generator.helpers.get_note_duration_name

get_note_duration_name(duration_beats: float, tempo_bpm: int) str[source]

Converts a duration in beats to a standard musical note name (e.g., ‘quarter’, ‘eighth’). This function can be further refined for more complex duration mappings (e.g., dotted notes).

Parameters:
  • duration_beats (float) – Duration in beats.

  • tempo_bpm (int) – Tempo in BPM.

Returns:

Name of the note duration (e.g., ‘quarter’).

Return type:

str