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

how to change spacing between notes based on timing and duration? #961

Open
mohammadhasanzadeh199 opened this issue Nov 11, 2023 · 4 comments

Comments

@mohammadhasanzadeh199
Copy link

Hi
first of all, thanks for this awesome library.
I am working on a web page to animate the different songs notations.
I used TimingCallbacks and synth and CSS to animate the notations and it's working correctly.
gif
but as you can see in this gif the animation is slowing down at some points.
that's because the spacing between notes and bars is not based on note timing and duration.
I checked the documentation and issues but I can't find any solution.
is it possible to change spaces between notes or render them based on timing and duration?

@paulrosen
Copy link
Owner

Unfortunately not. I have the same effect in my apps, too. The visual spacing is set to mimic the standard spacing that you see in printed music, which is not quite equal spacing. I don't think it is a particular bad effect. We haven't had any complaints from our users.

There are some ABC directives that supply that option. If someone wants to help implement them, let me know and I can give you some pointers about how to do it. I don't have time right now, though.

@crysfel
Copy link

crysfel commented Nov 15, 2023

I'm working in something like this as well, ran into the same issue, specially because I'm rendering the the notes quite large. I'd like to scroll at the same speed at all times and that includes adding extra space for each note.

I want to give this a try, can you point me in the right direction?

Thanks!

@brahma0545
Copy link

Hi first of all, thanks for this awesome library. I am working on a web page to animate the different songs notations. I used TimingCallbacks and synth and CSS to animate the notations and it's working correctly. gif gif but as you can see in this gif the animation is slowing down at some points. that's because the spacing between notes and bars is not based on note timing and duration. I checked the documentation and issues but I can't find any solution. is it possible to change spaces between notes or render them based on timing and duration?

is your repository public? I am working on a similar project, it's fine even if I control the speed or have an equal speed with different spaces between the notes.

@paulrosen
Copy link
Owner

See https://paulrosen.github.io/abcjs/audio/synthesized-sound.html#cursorcontrol-object You can set beatSubdivisions to give you callbacks often enough to have a smooth cursor.

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

4 participants