JuliaMusic / MusicVisualizations.jl

Providing music-related visualization built on top of the packages of JuliaMusic
MIT License
17 stars 4 forks source link

Move plotting to Makie #13

Open Datseris opened 3 years ago

Datseris commented 3 years ago

With the new progress in AbstractPlotting, now in version 0.17, Makie is the premier stellar plotting library for Julia. We should port all plotting code there, which will make it 1000s of times faster as well.

Very easy to do.

NeroBlackstone commented 1 year ago

I read the original MusicVisualizations implementation and Makie documentation. I think it's hard to implement plotpianonote! function using Makie, since there is no PyPlot "patches" counterpart in Makie. A possible Makie implementation is Ledgend. But it's a little low-level and lacks documentation.

So, maybe we should change "Piano Roll" and "Drum Map" implementation in Makie.

For the piano roll, a good solution is barplot.

For the drum map, we can use MarkerElement in Ledgend. And add an argument to indicate how to plotting drum, like Dict(1=>("kick",MarkerElement))

Datseris commented 1 year ago

Hm, isn't the simplest that for PyPlot patches you use the rectangles and mesh scatter: https://docs.makie.org/stable/examples/plotting_functions/meshscatter/ ?

Datseris commented 1 year ago

For drum map a simple scatter! is all we need, as in Makie scatter allows to have different marker and color per scattered data point.