from __future__ import annotations import streamlit.components.v1 as components from sim.notation_svg import grand_staff_svg def notation_staff(chord_midi, prefer_sharps: bool = True): """ Offline notation renderer (no CDN). Generates an SVG grand staff for the chord and embeds it via components.html. """ svg = grand_staff_svg(list(chord_midi), prefer_sharps=prefer_sharps) nonce = "_".join(str(int(x)) for x in chord_midi) components.html(svg + f"", height=270, scrolling=False)