diff --git a/Project.toml b/Project.toml index 30b3831..d2fe291 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MusicVisualizations" uuid = "8e838768-4b4f-4130-9d6d-43f7b35ca0d6" repo = "https://github.com/JuliaMusic/MusicVisualizations.jl.git" -version = "0.2.0" +version = "0.2.1" [deps] DefaultApplication = "3f0dd361-4fe0-5fc6-8523-80b14ec94d85" @@ -14,7 +14,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69" julia = "1.1" MusicManipulations = "1.0" DefaultApplication = "0.1" -PyPlot = "2.8.1" +PyPlot = "2.8.2" Reexport = "0.2, 0.3, 1.0" diff --git a/src/MusicVisualizations.jl b/src/MusicVisualizations.jl index b55e9b9..b12051c 100644 --- a/src/MusicVisualizations.jl +++ b/src/MusicVisualizations.jl @@ -1,10 +1,10 @@ module MusicVisualizations -using PyPlot, DefaultApplication using Reexport @reexport using MusicManipulations +using PyPlot, DefaultApplication -include("musescore.jl") include("noteplotter.jl") +include("musescore.jl") end diff --git a/src/noteplotter.jl b/src/noteplotter.jl index 76b1a46..ed184ee 100644 --- a/src/noteplotter.jl +++ b/src/noteplotter.jl @@ -3,10 +3,11 @@ export noteplotter maxnotevel(::Note) = 127 maxnotevel(::MoreVelNote) = 157 -Rectangle = PyPlot.matplotlib.patches.Rectangle function plotpianonote!(ax, note, cmap) - r = Rectangle((note.position, note.pitch - 0.5), note.duration, 1, - color = cmap(note.velocity/maxnotevel(note))) + r = PyPlot.matplotlib.patches.Rectangle( + (note.position, note.pitch - 0.5), note.duration, 1, + color = cmap(note.velocity/maxnotevel(note)) + ) ax.add_artist(r) return note.pitch end