Skip to content
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

Timeline grid widget #18

Closed
BillyDM opened this issue Oct 8, 2021 · 0 comments
Closed

Timeline grid widget #18

BillyDM opened this issue Oct 8, 2021 · 0 comments

Comments

@BillyDM
Copy link

BillyDM commented Oct 8, 2021

Build the timeline grid as a widget.

Note that this widget will not actually scroll within a tuix scroll container. Instead, this will just draw the various grid lines as a function of the input data.

When zoomed in far enough, this should show additional detail like beats and beat divisions.

Every beat division is marked with a thin vertical line, every beat is marked with a slightly thicker vertical line, and every 4 beats (1 measure) is marked with an event thicker vertical line.

Every 4 measures (16 beats), the background color of the grid should alternative between two different values of gray.

This widget will take these data points as inputs:

  • width and height of the timeline area (in pixels)
  • horizontal zoom level (1.0 is default zoom level, < 1.0 is zoomed out, and > 1.0 is zoomed in). Just pick something that feels reasonable for a scale of 1.0 (like around 100 pixels).
  • horizontal scroll position (represented in units of beats)
  • vertical scroll position (represented in units of pixels)
  • list vertical heights of each track/division (in pixels). This is where the horizontal grid lines should be drawn.
@BillyDM BillyDM closed this as completed Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant