ISO version of diatonicUpDown which understands accidentals

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

ISO version of diatonicUpDown which understands accidentals

Jim Newton
As some of you may know, I'm working on an enhancement to musescore which implements ornament articulations such as trills (and others).  I'm making heavy use of the function diatonicUpDown, which looks at a key and calculates intervals restricted to the key signature.    This works great, but is limited as mentioned in this forum posting.

In particular, I'd like to get a trill such as
this.

Is there a similar function to diatonicUpDown which I can use which not only looks at the key, but also looks to see which notes are most recently sharpened, flattened or natural-ed earlier in the measure?

I notice that the interactive note entry in musescore understands accidentals.  I.e., in the key of G, if I enter an F it is implicitly interpreted as F#, but if is use the down arrow to make it F natural, then enter another F, it is understood to be natural.

Of course I could write code to examine the measure backward from the note searching for such a note.  Making this function property look at all the voices in the measure could be tricky. Maybe there is already such a function, or at least an implementation I can look at and copy.  

I'd appreciate any clue about the correct way to code this.
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

lasconic
Administrator
Off the top of my head, I would check Measure::findAccidental()

lasconic

2015-05-02 10:25 GMT+02:00 Jim Newton <[hidden email]>:
As some of you may know, I'm working on an enhancement to musescore which
implements ornament articulations such as trills (and others).  I'm making
heavy use of the function diatonicUpDown, which looks at a key and
calculates intervals restricted to the key signature.    This works great,
but is limited as mentioned in  this forum posting
<https://musescore.org/en/node/56281#comment-269526>  .

In particular, I'd like to get a trill such as
<https://musescore.org/sites/musescore.org/files/Screen%20Shot%202015-04-30%20at%2012.14.50.png>
.

Is there a similar function to diatonicUpDown which I can use which not only
looks at the key, but also looks to see which notes are most recently
sharpened, flattened or natural-ed earlier in the measure?

I notice that the interactive note entry in musescore understands
accidentals.  I.e., in the key of G, if I enter an F it is implicitly
interpreted as F#, but if is use the down arrow to make it F natural, then
enter another F, it is understood to be natural.

Of course I could write code to examine the measure backward from the note
searching for such a note.  Making this function property look at all the
voices in the measure could be tricky. Maybe there is already such a
function, or at least an implementation I can look at and copy.

I'd appreciate any clue about the correct way to code this.




--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Marc Sabatella
FWIW, there is an open issue that I think also relates to this in some way: https://musescore.org/en/node/54691.  Maybe it's only related in my head :-).  But I think they perhaps both have to do with not having enough context at the point where it is needed.

On Sat, May 2, 2015 at 4:34 AM, Lasconic <[hidden email]> wrote:
Off the top of my head, I would check Measure::findAccidental()

lasconic

2015-05-02 10:25 GMT+02:00 Jim Newton <[hidden email]>:
As some of you may know, I'm working on an enhancement to musescore which
implements ornament articulations such as trills (and others).  I'm making
heavy use of the function diatonicUpDown, which looks at a key and
calculates intervals restricted to the key signature.    This works great,
but is limited as mentioned in  this forum posting
<https://musescore.org/en/node/56281#comment-269526>  .

In particular, I'd like to get a trill such as
<https://musescore.org/sites/musescore.org/files/Screen%20Shot%202015-04-30%20at%2012.14.50.png>
.

Is there a similar function to diatonicUpDown which I can use which not only
looks at the key, but also looks to see which notes are most recently
sharpened, flattened or natural-ed earlier in the measure?

I notice that the interactive note entry in musescore understands
accidentals.  I.e., in the key of G, if I enter an F it is implicitly
interpreted as F#, but if is use the down arrow to make it F natural, then
enter another F, it is understood to be natural.

Of course I could write code to examine the measure backward from the note
searching for such a note.  Making this function property look at all the
voices in the measure could be tricky. Maybe there is already such a
function, or at least an implementation I can look at and copy.

I'd appreciate any clue about the correct way to code this.




--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer




--
Marc Sabatella
[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Jim Newton
Hi Marc, thanks for pointing out that issue.  I was beginning to wonder something very similar from looking at the code.

The puzzling thing that I've found so far is this.

Given a Note object, I can call findAccidental on it.  However, if the note has not yet been created, it is not clear to me how to investigate its impending accidental-ness.

The function findAccidental can also be called with a segment, staff index (staffIdx) and line.
Do you understand what those concepts are?   Is staffIdx an index to which staff the note is on in a multi-staff system, or is it an index within a staff to which line/space the note is (or will be) sitting on?
In looking at this code there seems to be two things called a position, on of type Position, and one of type QpointF. There is also something called a step (cf function step2pitch).

QUESTION: Is there a place in the code or documentation where these and related concepts are explained?  It would help me to understand them.

What I think I'd like to be able to do (with regard to ornament calculation) is think of musical notes in a staff, and trill to the note above or below in the staff.   Thus I need to ask the question, which line/space is the given note on?  What note would correspond to the line/space above or below (or two above or two below) the given note?  Those questions should take into account already the key signature, and any accidentals which are pending within the measure to the left of the given note.
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Marc Sabatella
I don't know that there is documentation on this, but I can try to answer the specific questions here according to my understanding

- staffIdx is indeed the index into the array of staves

- some note input functions use a concept of position to indicate where the note is to be placed, the details may differ sccording to context

- QPointF is a Qt thing, just an (x,y) point.  For anything starting with Q, you can look that up in the Qt docs.

- step is normally an integer 0 = C, 1 = D, 2 = E, etc - basically, note name, not considering key or accidental

- Note::line() tells you what line is on.  Trying to figure out what note corresponds to which line is exactly what the note input functions already do - so they can determine what note to add if you press "B", or click the middle line of the staaff.  So follow that code and you should get a good idea of what is possible.

On Sun, May 3, 2015 at 6:12 AM, Jim Newton <[hidden email]> wrote:
Hi Marc, thanks for pointing out that issue.  I was beginning to wonder
something very similar from looking at the code.

The puzzling thing that I've found so far is this.

Given a Note object, I can call findAccidental on it.  However, if the note
has not yet been created, it is not clear to me how to investigate its
impending accidental-ness.

The function findAccidental can also be called with a segment, staff index
(staffIdx) and line.
Do you understand what those concepts are?   Is staffIdx an index to which
staff the note is on in a multi-staff system, or is it an index within a
staff to which line/space the note is (or will be) sitting on?
In looking at this code there seems to be two things called a position, on
of type Position, and one of type QpointF. There is also something called a
step (cf function step2pitch).

QUESTION: Is there a place in the code or documentation where these and
related concepts are explained?  It would help me to understand them.

What I think I'd like to be able to do (with regard to ornament calculation)
is think of musical notes in a staff, and trill to the note above or below
in the staff.   Thus I need to ask the question, which line/space is the
given note on?  What note would correspond to the line/space above or below
(or two above or two below) the given note?  Those questions should take
into account already the key signature, and any accidentals which are
pending within the measure to the left of the given note.



--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579275.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



--
Marc Sabatella
[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Jim Newton
Great that is very enlightening. But I think I don’t yet understand “line”.
Is line some sort of iterator or index into the staff or measure when read from left to right?\
Or is line really referring to the 5 lines of a staff and the 4 spaces?
I ask this because  it seems that I can calculate the step given the line and the clef.  (absStep cf 1300 in file edit.cpp)

What about the segment?  To call the findAccidentalFunction, I apparently need the measure, the segment, 
the staffIdx, and the line. (1299 in file edit.cpp).

Jim

On 03 May 2015, at 16:32, Marc Sabatella [via MuseScore Developer] <[hidden email]> wrote:

I don't know that there is documentation on this, but I can try to answer the specific questions here according to my understanding

- staffIdx is indeed the index into the array of staves

- some note input functions use a concept of position to indicate where the note is to be placed, the details may differ sccording to context

- QPointF is a Qt thing, just an (x,y) point.  For anything starting with Q, you can look that up in the Qt docs.

- step is normally an integer 0 = C, 1 = D, 2 = E, etc - basically, note name, not considering key or accidental

- Note::line() tells you what line is on.  Trying to figure out what note corresponds to which line is exactly what the note input functions already do - so they can determine what note to add if you press "B", or click the middle line of the staaff.  So follow that code and you should get a good idea of what is possible.

On Sun, May 3, 2015 at 6:12 AM, Jim Newton <<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=7579277&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
Hi Marc, thanks for pointing out that issue.  I was beginning to wonder
something very similar from looking at the code.

The puzzling thing that I've found so far is this.

Given a Note object, I can call findAccidental on it.  However, if the note
has not yet been created, it is not clear to me how to investigate its
impending accidental-ness.

The function findAccidental can also be called with a segment, staff index
(staffIdx) and line.
Do you understand what those concepts are?   Is staffIdx an index to which
staff the note is on in a multi-staff system, or is it an index within a
staff to which line/space the note is (or will be) sitting on?
In looking at this code there seems to be two things called a position, on
of type Position, and one of type QpointF. There is also something called a
step (cf function step2pitch).

QUESTION: Is there a place in the code or documentation where these and
related concepts are explained?  It would help me to understand them.

What I think I'd like to be able to do (with regard to ornament calculation)
is think of musical notes in a staff, and trill to the note above or below
in the staff.   Thus I need to ask the question, which line/space is the
given note on?  What note would correspond to the line/space above or below
(or two above or two below) the given note?  Those questions should take
into account already the key signature, and any accidentals which are
pending within the measure to the left of the given note.



--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579275.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=7579277&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



--
Marc Sabatella
<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=7579277&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://2/user/SendEmail.jtp?type=node&amp;node=7579277&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



If you reply to this email, your message will be added to the discussion below:
http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579277.html
To unsubscribe from ISO version of diatonicUpDown which understands accidentals, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Marc Sabatella
On Sun, May 3, 2015 at 11:59 AM, Jim Newton <[hidden email]> wrote:
Great that is very enlightening. But I think I don’t yet understand “line”.
Is line some sort of iterator or index into the staff or measure when read from left to right?

Are you looking at the code?  It's a simple integer.  0 for the top line of the staff, then it counts space, line, space, line etc. from there.

What about the segment?  To call the findAccidentalFunction, I apparently need the measure, the segment,
the staffIdx, and the line. (1299 in file edit.cpp).

Right, and this is what I meant about not having enough context.  You can't know the key or accidental  state of a note until you know what segment it belongs to.  I assume everything you are doing is in rendermidi, so that shouldn't be a problem.  The notes are already added to chords, which are already added to segments, which are already added to measures, long before we trying to deal with playback.

Marc

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Jim Newton
Yes thanks, it is making more and more sense.
But I still haven’t understood what a segment is.
I see a way of getting it of this and that object, but I still don’t know what it represents.


On 03 May 2015, at 18:52, Marc Sabatella [via MuseScore Developer] <[hidden email]> wrote:

On Sun, May 3, 2015 at 11:59 AM, Jim Newton <<a href="x-msg://4/user/SendEmail.jtp?type=node&amp;node=7579281&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
Great that is very enlightening. But I think I don’t yet understand “line”.
Is line some sort of iterator or index into the staff or measure when read from left to right?

Are you looking at the code?  It's a simple integer.  0 for the top line of the staff, then it counts space, line, space, line etc. from there.

What about the segment?  To call the findAccidentalFunction, I apparently need the measure, the segment,
the staffIdx, and the line. (1299 in file edit.cpp).

Right, and this is what I meant about not having enough context.  You can't know the key or accidental  state of a note until you know what segment it belongs to.  I assume everything you are doing is in rendermidi, so that shouldn't be a problem.  The notes are already added to chords, which are already added to segments, which are already added to measures, long before we trying to deal with playback.

Marc

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://4/user/SendEmail.jtp?type=node&amp;node=7579281&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



If you reply to this email, your message will be added to the discussion below:
http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579281.html
To unsubscribe from ISO version of diatonicUpDown which understands accidentals, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Marc Sabatella
Oh, sorry, I didn't realize that.  Segment is a very fundamental concept in MuseScore - it refers to a vertical time slice of the score.  See https://docs.google.com/document/d/1BmjPqk9j4-zSFaiFsUjYSURDk98MHSgrHjfhMJ1Q9gg/edit?usp=sharing for information on these sort of basics.

On Sun, May 3, 2015 at 12:55 PM, Jim Newton <[hidden email]> wrote:
Yes thanks, it is making more and more sense.
But I still haven’t understood what a segment is.
I see a way of getting it of this and that object, but I still don’t know what it represents.


> On 03 May 2015, at 18:52, Marc Sabatella [via MuseScore Developer] <[hidden email]> wrote:
>
> On Sun, May 3, 2015 at 11:59 AM, Jim Newton <[hidden email] <x-msg://4/user/SendEmail.jtp?type=node&node=7579281&i=0>> wrote:
> Great that is very enlightening. But I think I don’t yet understand “line”.
> Is line some sort of iterator or index into the staff or measure when read from left to right?
>
> Are you looking at the code?  It's a simple integer.  0 for the top line of the staff, then it counts space, line, space, line etc. from there.
>
> What about the segment?  To call the findAccidentalFunction, I apparently need the measure, the segment,
> the staffIdx, and the line. (1299 in file edit.cpp).
>
> Right, and this is what I meant about not having enough context.  You can't know the key or accidental  state of a note until you know what segment it belongs to.  I assume everything you are doing is in rendermidi, so that shouldn't be a problem.  The notes are already added to chords, which are already added to segments, which are already added to measures, long before we trying to deal with playback.
>
> Marc
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________
> Mscore-developer mailing list
> [hidden email] <x-msg://4/user/SendEmail.jtp?type=node&node=7579281&i=1>
> https://lists.sourceforge.net/lists/listinfo/mscore-developer <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579281.html <http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579281.html>
> To unsubscribe from ISO version of diatonicUpDown which understands accidentals, click here < > NAML <http://dev-list.musescore.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579282.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



--
Marc Sabatella
[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Jim Newton
Thanks. That is a helpful document.
Note the sentence from the document:

The Segment object (segment.h) is perhaps the most important data structure to understand in MuseScore. 


On 03 May 2015, at 19:07, Marc Sabatella [via MuseScore Developer] <[hidden email]> wrote:

Oh, sorry, I didn't realize that.  Segment is a very fundamental concept in MuseScore - it refers to a vertical time slice of the score.  See https://docs.google.com/document/d/1BmjPqk9j4-zSFaiFsUjYSURDk98MHSgrHjfhMJ1Q9gg/edit?usp=sharing for information on these sort of basics.

On Sun, May 3, 2015 at 12:55 PM, Jim Newton <<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=7579284&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
Yes thanks, it is making more and more sense.
But I still haven’t understood what a segment is.
I see a way of getting it of this and that object, but I still don’t know what it represents.


> On 03 May 2015, at 18:52, Marc Sabatella [via MuseScore Developer] <<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=7579284&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> On Sun, May 3, 2015 at 11:59 AM, Jim Newton <[hidden email] <<a href="x-msg://4/user/SendEmail.jtp?type=node&amp;node=7579281&amp;i=0" class="">x-msg://4/user/SendEmail.jtp?type=node&node=7579281&i=0>> wrote:
> Great that is very enlightening. But I think I don’t yet understand “line”.
> Is line some sort of iterator or index into the staff or measure when read from left to right?
>
> Are you looking at the code?  It's a simple integer.  0 for the top line of the staff, then it counts space, line, space, line etc. from there.
>
> What about the segment?  To call the findAccidentalFunction, I apparently need the measure, the segment,
> the staffIdx, and the line. (1299 in file edit.cpp).
>
> Right, and this is what I meant about not having enough context.  You can't know the key or accidental  state of a note until you know what segment it belongs to.  I assume everything you are doing is in rendermidi, so that shouldn't be a problem.  The notes are already added to chords, which are already added to segments, which are already added to measures, long before we trying to deal with playback.
>
> Marc
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
> _______________________________________________
> Mscore-developer mailing list
> [hidden email] <<a href="x-msg://4/user/SendEmail.jtp?type=node&amp;node=7579281&amp;i=1" class="">x-msg://4/user/SendEmail.jtp?type=node&node=7579281&i=1>
> https://lists.sourceforge.net/lists/listinfo/mscore-developer <https://lists.sourceforge.net/lists/listinfo/mscore-developer>
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579281.html <http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579281.html>
> To unsubscribe from ISO version of diatonicUpDown which understands accidentals, click here < > NAML <http://dev-list.musescore.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579282.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=7579284&amp;i=2" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



--
Marc Sabatella
<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=7579284&amp;i=3" target="_top" rel="nofollow" link="external" class="">[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
<a href="x-msg://8/user/SendEmail.jtp?type=node&amp;node=7579284&amp;i=4" target="_top" rel="nofollow" link="external" class="">[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



If you reply to this email, your message will be added to the discussion below:
http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579284.html
To unsubscribe from ISO version of diatonicUpDown which understands accidentals, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Jim Newton
In reply to this post by Marc Sabatella
Is this defined somewhere in the code?
I.e., which step value corresponds to which note, A,B,C etc?
My first investigation shows  0 = A, not 0 = C.

> - step is normally an integer 0 = C, 1 = D, 2 = E, etc - basically, note name, not considering key or accidental

Reply | Threaded
Open this post in threaded view
|

Re: ISO version of diatonicUpDown which understands accidentals

Marc Sabatella
Oh, I forgot, there are different contexts in which the term "step" is used as well.  Sometimes it's step within an octave - in which case it's C = 0 - but there is also an absolute version that incorporates octave as well.

On Mon, May 4, 2015 at 4:35 AM, Jim Newton <[hidden email]> wrote:
Is this defined somewhere in the code?
I.e., which step value corresponds to which note, A,B,C etc?
My first investigation shows  0 = A, not 0 = C.

> - step is normally an integer 0 = C, 1 = D, 2 = E, etc - basically, note
> name, not considering key or accidental





--
View this message in context: http://dev-list.musescore.org/ISO-version-of-diatonicUpDown-which-understands-accidentals-tp7579271p7579290.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer



--
Marc Sabatella
[hidden email]

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Mscore-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mscore-developer