Open Cheezer1656 opened 7 months ago
Looks like a cool contribution. Do you have a demo I could look at?
Also, please don't update yarn.lock
/package-lock.json
in the same PR. These are long diffs and it's hard to see what's going on there. I would prefer if you could make an issue listing what needs to be updated and why, and I can take care of it.
Sure! I removed the yarn.lock
and package.lock
changes and added an example of the multi-lined visualizer to the demo (index.html
). Is this ok?
Sorry, it took me a while to get around to this! Thanks for the demo, I now see better what this is doing.
I agree it would be useful to have the staff visualizer split into multiple lines. However, I see a couple of issues with the approach:
In sheet music, breaks should always occur at downbeats.
In short, it seems intricate to do this right and it would require some interaction with the actual score rendering logic, which is not accessible from here. Therefore I think it would be preferable to add this feature directly to staffrender
, which is what is used to render the scores. I think it's better to keep the visualizers here as thin wrappers around the ones defined in @magenta/music
(unless we fully implement a new visualizer type here, which would also be fine).
Added a
line
parameter to the midi-visualizer element that determines how many lines the notes are split into.Also updated some packages to fix some vulnerabilities.