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

Ghost note feature request #129

Open
WindowsNT opened this issue Jul 10, 2021 · 8 comments
Open

Ghost note feature request #129

WindowsNT opened this issue Jul 10, 2021 · 8 comments

Comments

@WindowsNT
Copy link

The idea is to display a ghost note on mouse over so when the user clicks, I create a note at that position.

The problem that is when I actually draw a grey note is that the layout sometimes changes. This creates flashing when the mouse moves.

An easy solution to this is to provide hit testing for the staff (notes) so I draw a circle manually.

A more complex solution which is generally advisable is to lock the measures in place no matter how many notes they contain.

@dfober
Copy link
Member

dfober commented Jul 10, 2021

I guess the main problem is when a new note creates a new line (which may change the layout significantly). One solution is to use a page format with an infinite (very long) width. But it supposes to edit the score in 'line mode'

A more complex solution which is generally advisable is to lock the measures in place no matter how many notes they contain.

That's not really possible. It's quite difficult to interfer with the layout algorithm.

@arshiacont
Copy link

@WindowsNT To my knowledge GuidoLib is not designed for that but depending on the kind of application, you can achieve this using Guido Mappings: If the inserted "ghost note" is not supposed to change the entire rhythmic structure of the measure (let's say it's just some annotation), what I would do is to simply draw it on a transparent Layer on top of the rendered Guido Layer. The different internal maps available are there to help!
On OSX/iOS operating systems this can easily be achieved by the CoreAnimation or CoreGraphics frameworks.

@WindowsNT
Copy link
Author

WindowsNT commented Jul 10, 2021

How do I enter 'line' mode?
Specifying a big enough width OK but how big the height should be ?
image

This is with height 500. How do I know how much height I need to display a whole system?

@dfober
Copy link
Member

dfober commented Jul 10, 2021

You can set the height so that to get a single line (e.g. h=5cm). You can also extend the width to a larger value (e.g. w=1000cm or more)

@dfober
Copy link
Member

dfober commented Jul 10, 2021

another idea comes to mind:
you can also create a score with 'empty' elements for the parts that are not filled, and replace these 'empty' elements with notes as you edit.

@WindowsNT
Copy link
Author

That I 've done, but it still changes the layout ocassionally when I add a note. Basically I 'd like a line edit mode without the need of setting height... can this be done? I can't seem to make it working.

@WindowsNT
Copy link
Author

I made it working (single line), testing if ghost note works well.

@WindowsNT
Copy link
Author

I still have issues. In order to draw manually I must first erase the rest and this will also change the layout perhaps.

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

3 participants