tim-janik / anklang

MIDI and Audio Synthesizer and Composer
https://anklang.testbit.eu/
Mozilla Public License 2.0
55 stars 4 forks source link

Piano roll grid menu #21

Open swesterfeld opened 1 year ago

swesterfeld commented 1 year ago

This PR adds support for letting the user set the grid size manually. It supports tuplets (we could not do this at all before), so for instance you can uses 1/8 triplet grids. It also supports small grid sizes, while being smart enough to not draw too many grid lines.

I've preserved the code we already have for automatic grid size selection. I believe that this can be nice, because you can zoom in, and as you zoom in the grid adapts to smaller and smaller grids. So with the PR, I added an explicit choice between grid mode "auto" (automatic grid size) and "manual" (user defined grid size).

swesterfeld commented 10 months ago

As far as I know, you already have other code for computing grid lines (for the arranger) and you want my code and the other code be merged and shared between piano roll and arranger; so it would be great if you could provide your code.