async function load()

in src/components/MagentaVisualizer.tsx [47:60]


    async function load() {
      if (!container || !notes) return;
      const mmv = await import("@magenta/music/esm/core/visualizer");

      const noteRGB = noteColor ? colorToRgb(noteColor) : undefined;
      const activeNoteRGB = activeNoteColor ? colorToRgb(activeNoteColor) : undefined;

      setVisualizer(
        new mmv.PianoRollSVGVisualizer(notes, container, {
          noteRGB,
          activeNoteRGB,
        })
      );
    }