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

Add support for BPM in the project file and UI #83

Open
jbilcke-hf opened this issue Aug 30, 2024 · 1 comment
Open

Add support for BPM in the project file and UI #83

jbilcke-hf opened this issue Aug 30, 2024 · 1 comment
Assignees
Labels
new feature timeline Issues related to the WebGL timeline (@aitube/timeline)
Milestone

Comments

@jbilcke-hf
Copy link
Owner

jbilcke-hf commented Aug 30, 2024

Context

If we want to support music videos, we need at least a basic support of BPM (beats per minute)

this will help us product a nice grid alignment

Solution

  • Add support for BPM in the project file (meta..)
  • UI (counter, detector, form to edit)
  • timeline (duration to each cell amount)

Notes

If you search for BPM in the code base, you will see there are already function to detect that.

Note that to work as expected, we will need to make the duration per step variable.

Initially we were using this:

import { DEFAULT_DURATION_IN_MS_PER_STEP } from "@/constants"

But I've just pushed a PR to move this to durationInMsPerStep inside the useTimeline

this is still static, but at least now we have a way to mutate the value of durationInMsPerStep based on the detected BPM

@jbilcke-hf jbilcke-hf added new feature timeline Issues related to the WebGL timeline (@aitube/timeline) labels Aug 30, 2024
@jbilcke-hf jbilcke-hf self-assigned this Aug 30, 2024
@jbilcke-hf jbilcke-hf added this to the 1.0.0 (MVP) milestone Aug 30, 2024
@jbilcke-hf
Copy link
Owner Author

jbilcke-hf commented Sep 2, 2024

partially done, I've added:

  • display a global BPM
  • can edit the global BPM
  • save the BPM to the .clap

However, the BPM isn't fully connected to the timeline grid yet (changing it won't change the alignment of segments yet)

and yes, later we can have BPM per-segment (with segments acting as groups)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature timeline Issues related to the WebGL timeline (@aitube/timeline)
Projects
Status: No status
Development

No branches or pull requests

1 participant