drumscript.notation_generator.score_builder.build_score

build_score(detected_events: list[dict[str, Any]], tempo: float, output_path: str = 'outputs/score.pdf', quantization_subdivision: int = 16, time_signature: str = '4/4')[source]

Builds a drum score by saving event data to JSON and rendering to PDF. # Builds a drum score by saving the event data to JSON and then # rendering it directly to PDF using the custom engine. # This bypasses MusicXML entirely to ensure WYSIWYG (What You See Is What You Get) results. # Builds a drum score PDF, respecting the provided Time Signature, or assuming default 4/4 if not provided

Parameters:
  • detected_events (List[Dict[str, Any]]) – List of classified drum events.

  • tempo (int) – Tempo in BPM.

  • output_path (str, optional) – Path to save the PDF.

  • quantization_subdivision (int, optional) – Grid for quantization (e.g., 16 for 16th notes).

  • time_signature (str, optional) – Time signature string (e.g., “4/4”).