-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ticks of noteplotter
#3
Comments
This comment has been minimized.
This comment has been minimized.
The (default) ticks at the moment use this heuristic function to attempt to only show 7 major ticks: https://github.com/JuliaMusic/MusicVisualizations.jl/blob/master/src/noteplotter.jl#L99-L105 . This could be modified to make the experience better, or it could be made customizable via kwarg propagation. |
Hey @Datseris ,I want to work on it,I have been contributing to python Bokeh's documentation tasks,jupyter tutorial improvements and themes inclusion for past 3 months...I understand little of julia (i took coursera coursera on julia scientific computingthough)but I am improving but I am still new to OSS contributions ...been using magenta,librosa,sms-toolsetc for sometime now..I want to contribute to JuliaMusic in general and this place seems a good place to start as I am little used to graphs after using bokeh and librosa...pls guide.. |
Hi, welcome, sure please feel free to contribute. Once you have a topic to work on I can help. It is typically simplest for you to familiarize yourself with making Pull Request to Julia projects (there are YouTube tutorials for that). Regarding the current issue, what I was describing was simply improving the tick layout of the plotting. At the moment this is what happens # limits and labels
if names == nothing
yticks, ylabels = heuristic_note_names(plottedpitches)
else
yticks = plottedpitches
ylabels = [names[p] for p in plottedpitches]
end
ax.set_xlim(st, fi)
ax.set_yticks(yticks)
ax.set_ylim(minimum(plottedpitches)-1, maximum(plottedpitches)+1)
ax.set_yticklabels(ylabels)
ax.set_xlabel("time (ticks)")
return plottedpitches
end
function heuristic_note_names(plottedpitches)
mi, ma = extrema(plottedpitches)
notestep = max((ma-mi)÷7, 1)
pitches = mi:notestep:ma
ylabels = [pitch_to_name(p) for p in pitches]
return pitches, ylabels
end So either the user provides some exact names, (and we do nothing), or we try to have around 7 major ticks irrespectively of how many pitches are plotted. A (very) simple imporivement is to add minor ticks appropriately in between that fill all missing notes. But, I think plotting is probably not the best place to start, as it assumes knowledge of the basics as well. You are probably in a more comfortable situation by starting a contribution to MIDI.jl or MusicManipulations.jl, which both have some open issues that are very simple to tackle. For example: JuliaMusic/MIDI.jl#119 and you could of course open new Feature Request issues for stuff that are missing. |
@ashwani-rathee , since you have been using Librosa, for years now I wanted to bring its features to Julia. We have this fork: https://github.com/JuliaMusic/MusicProcessing.jl which has some librosa functionality but hasn't been updated in 4 years. Perhaps you are interested in taking over and maintaining this? I could as the author to transfer the repo to us if you are interested. |
@Datseris I'll familiarize with the package and look to solve the issues you mentioned first..It will be great if I can get to work on bringing the functionalities from librosa.... |
Add tick lines in between the heuristic notes, but add no labels to these ticks.
The text was updated successfully, but these errors were encountered: