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

Cursor active notes #276

Open
rvilarl opened this issue Mar 2, 2025 · 2 comments
Open

Cursor active notes #276

rvilarl opened this issue Mar 2, 2025 · 2 comments

Comments

@rvilarl
Copy link
Collaborator

rvilarl commented Mar 2, 2025

The cursor, on each movement, fires an event including the active notes. At present there is no way to differentiate if:

  • a note activated some steps behind but still active (from a piano perspective keep the associted keys pressed)
  • a note activated some steps but reactivated (from a piano perspective release and press the associated keys again)

Please note that there is a variant of the second sceenario where notes can be tied (from a piano perspective keep the keys pressed) In chords, ties can affect specific pitches meaning that it could be that some keys are to be kept pressed and others are to be re-pressed.

@jaredjj3
Copy link
Collaborator

jaredjj3 commented Mar 3, 2025

@rvilarl, thanks for the issue!

Ultimately, I think the second bullet shows that the current SequenceEntry abstraction is not sufficient for describing all the different changes during playback.

export type SequenceEntry = {
anchorElement: PlaybackElement;
activeElements: PlaybackElement[];
durationRange: DurationRange;
xRange: NumberRange;
};

Every score element actually has a lifecycle, and that's not communicated well here. I'll prototype some ideas for the next iteration of SequenceEntry when I can. Feel free to interject, list more requirements, or provide some ideas.

@rvilarl
Copy link
Collaborator Author

rvilarl commented Mar 3, 2025

An idea could be: for the active elements, keep the ms when it was activated.

Another challenging topic for the cursors are the grace notes, they are played either before or after the associated note is hit.

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

2 participants