Opensheetmusicdisplay: Question: Accessing Cursor Note / Notes

Created on 28 Aug 2018  路  8Comments  路  Source: opensheetmusicdisplay/opensheetmusicdisplay

Is there currently a way to access what note is being highlighted by the cursor or a way to get retrieve an array of notes being converted by MusicXML?

question

All 8 comments

You can get that info via the iterator in the cursor (is currently a private member):
e.g. with this code:

this.iterator.CurrentVoiceEntries[0].Notes[0].halfTone

to get midi semitone of the first note at the current cursor position.

That answered the question! Thank you again Matt.

Let's leave your issue open for now, as it might be of interest to others - ok? (we had already a simmilar question in a closed issue before).

though if people are not looking for already asked questions in closed issues, they are probably also not looking for it in open issues. I prefer having issues open only if they are unsolved and relevant, so in my opinion this should be closed.
If the same question comes up again, one can just reference the solved issue, and close the new one.

yes right in principle, but it seems that Github shows only open issues by default and people seem to look only into these... @clintmasden, i guess it was like this for you, right?
Maybe we should move answered questions to the wiki and add some kind of Q&A - i think this would make most sense.

@matt-uib I was going to suggest adding a WIKI / FAQ section. I did look through the closed issues to find this answer and couldn't find anything related. BTW I'm surprised how fast you responded which is awesome.

@clintmadsen yeah we really should do that. But then again accessing stuff in opensheetmusicdisplay will be done with proper access in the future. For now the method @matt-uib suggests works quite okay.
We could also implement callbacks whenever the cursor moves

@bneumann, yup his method works perfectly, which is why i closed the issue/question at the beginning =)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cymhellfire picture cymhellfire  路  4Comments

conde2 picture conde2  路  4Comments

sschmidTU picture sschmidTU  路  3Comments

conde2 picture conde2  路  4Comments

vadymVolkov picture vadymVolkov  路  7Comments