A Down and Up Bow Tracker

• May 15, 2024 - 05:30

I write for strings a lot, but one thing I dread about it is having to add the articulation for it. Many a time I would lose my mental note one whether the note was an up or down bow, so adding a tracker on the screen would immensely help my brain! And if this is already in Musescore, tell me please!

I think the best way for it to work would be to show you the symbol at the top of the screen whenever you click on a note.


Comments

In reply to by Jojo-Schmitz

I believe (OP: please correct me if I'm wrong) that OP wants something to automate entering them. Normally bowings are entered only once or twice a measure (at most). They are saying that they lose track of which way the bow is going between the entered articulation marks.

Certainly one way to do this would be to mark all of them and then remove some/most. That's the way I have to do mine. Because I've got to actually decide how I'll bow most measures. They're rarely straightforward.

In reply to by TheHutch

I wasn’t necessarily thinking about automating the articulation, I just want to know whether the note is an up or down bow. For instance, I like to have most/all of my measures starting on a down bow, so if I have this tracker, I’ll be able to click on the note and for it to tell me if it’s down. If it was an up bow, then I’ll be able to go back to where I messed up and fix it quickly without starting at the beginning of the phrase.

In reply to by Heterogina

I must ask, how would MuseScore know if any particular note would be an up or down bow? It can't really be based on which beat the note is on. Slurs, phrasing, accents, and much more, help decide. You might want two up bows in a row. Which you would mark as such. I once worked in a violin repair shop. Another person who worked there was a professional viola player. She played in a local orchestra. One of the things she did for the orchestra was to go through all the string parts and mark bowing so that all player's bows moved the same. So as usual, just another example of we being able to mark a score how we want. But in the end it's up to the player.
Of course we need to mark scores. But still...

In reply to by bobjp

I honestly couldn’t tell you how Musescore could detect whether a note is up or down. Like you said, ties, accents, legato, spiccato, etc. all account to where the bow’s going. That’s the reason I made my post. While adding articulation it can be hard to tell whether it’s comfortable for the player to play.

In reply to by Heterogina

Which brings us to the job of the composer. If he is writing for strings, what he is writing needs to idiomatic. He wouldn't write for strings, the same way he would write for brass. I feel most of the time bow marks might not be needed. But that's just me. You need to do what you must. I just thought I'd throw some thoughts into the mix.

In reply to by bobjp

I disagree that bow marks aren’t important most of the time. If the orchestra’s bows are going in different directions, it looks bad in my opinion. Not to mention that it could be hazardous, I know that that is a stretch, but there’s a lot of movement when playing a string instrument and you don’t want to poke somebody next to you, especially if you’re like me, a cellist who accidentally pokes people’s thighs all the time. 😂

In reply to by Heterogina

You might recall I told a story about a person that goes through scores to be played by an orchestra, to make sure all players are bowing the same way. I never meant that it wasn't important.

I tend to undermark things. But then no one will ever play what I write.

In reply to by Heterogina

That doesn't happen though - the concertmaster (along with the principal for each section) is responsible for ensuring all players use consistent bowing.
I would suggest composers should probably avoid putting bowings in their scores unless they're string players themselves or have consulted at length with players - and even if you're a violinist, you won't necessarily always have a good feel for what bowings work best for contrabasses etc.

All that said, what you've initially asked for is essentially possible with a plug-in (with a fair number of assumptions built in). I don't really think it makes sense to be a core feature of the product.

In reply to by Heterogina

The concept

It sounds like you want a "tracker" that calculates and displays the Bow Direction of the Selected Note. If I've understood correctly then I see considerable value in your idea.

The basic use case

If at any point in a score you're unsure of the player's bow direction (down bow vs. up bow) you'd like to sidestep the tedium of:

a) finding a point in the score where the bow direction is clear (or where the stroke direction is explicitly annotated)

b) then from that point be relieved of manually following a potentially long succession of separate and/or slurred strokes just to determine the direction of the note in question.

I think do this is likely a good candidate for a plugin.

How the bow tracker would work

In this example score—if a "bow tracker were enabled"—clicking on the first note of any measure would cause the tracker to display the bow direction, as exemplified in the lyric line. But rather than showing it in a lyric line, it would display the bow direction in a "bow tracker" area... i.e. in some portion of the screen, perhaps in a plugin window.

https://musescore.com/user/35880724/scores/16848268

NOTE

I foresee a problem whenever there's an odd number of strokes between repeats. In such a case the bow strokes on the second time through would be the opposite of the stroked on the first time, as shown in line two of the score.

In reply to by Heterogina

Who are you writing for - is this for children and/or learners? If not I believe you are overthinking things. There is no need to add a bow lift at the end of the phrase - we string players know to do that already! And depending on the musical line and context and phrasing we may bow “upside-down” to avoid things becoming too choppy - competent players can compensate so that it still sounds right. Our orchestral parts often have some printed bowing marked, but we may change them, and our hired parts may arrive with pencilled bowings which we don’t like and so change to suit us. Printed slurs may indicate phrasing but they may be too long to sustain in one bow, in which case we’ll add a change or too, maybe staggered. And so on….

A few years ago we worked with a young composer who had put in some crazy bowings - he cheerfully admitted he knew nothing about it and together we worked out a scheme which satisfied us both.

In reply to by Brer Fox

Elaine Gould's advice in "Behind Bars":

"Bow direction choices should be left to the player, since either direction can very often achieve the required effect (especially as regards accentation). Indicate the relevant articulation, and leave the player to find the best bowing to achieve this. Bowing may be prescribed for educational music but should otherwise be reserved for very special techniques, e.g. where the bowing contradicts what would normally be used ...".

Very sensible advice as usual.

In reply to by SteveBlower

SteveBlower: In a larger ensemble (basically anything larger than a quartet or sextet), you want everyone to bow in the same direction on all notes. If each player decides their own bow direction, then you get some players going in and out of synch with the rest of the section, which is distracting to the audience.

In reply to by SteveBlower

Gould’s advice can apply to solo music but shouldn’t be taken to mean free bowing in an orchestra. There the section leaders (and occasionally the conductor) will decide on the bowing, which will then be copied into all the parts. You definitely don’t want any “knitting”, as one conductor I had used to call it.

TheHutch is quite right - it is distracting to the audience, not to mention the players.

In reply to by Brer Fox

Yes "the section leaders (and occasionally the conductor) will decide on the bowing, which will then be copied into all the parts". As I understand Gould she is not saying the bowing should not be determined. She is saying it doesn't need to be (shouldn't) be determined by the compose/arranger/engraver, but should be determined by the player(s).

As a wind player, I am somewhat bemused by the interminable discussions in the string section about whether this is an up or a down bow. I generally know when to suck and when to blow by instinct.

In reply to by bobjp

I’m not directing, I’m in high school as well, I play the cello in my orchestra. I get what you’re saying about working with the player(s) to figure out the best bowing, but I feel like we’re getting off topic of what I originally wanted: to let me click on a note and for it to tell me if it’s an up or down bow.

In reply to by Heterogina

Heterogina wrote > "I feel like we’re getting off topic of what I originally wanted: to let me click on a note and for [MuseScore or a plugin] to tell me if it’s an up or down bow."

I was just about to say the same!

People can argue all day about what bowing would be best, who should have the final say, by ink, pencil or eraser. But actually you've never asked for MuseScore, or for anyone, to advise you on the choice of bow direction or slurs, or to advance a general approach or philosophy.

As I understand it, you simple requested a tracker as an automated way for MuseScore—or a plugin—to answer the following question:

If a string player were to correctly play through a particular score to note x, what is the direction of the string player's bow stoke at note x?

This has nothing to do with artistry, pedagogy, tradition, style, or creating the perfect sounding performance or recording. It's just a way for the scorist to find they're "bow stroke bearing" in the score.

Essentially the requested "tracker" is for a scorist who wants to ask, "Based on the bowing I've chosen (regardless if anyone agrees with them or not) what direction is the bow stroke at the selected note? Up or down?"

The requested tracker would provide a function I'd use many times a day, because it would save me time and energy. I don't need anyone advising me on bowing or slurs. And I'm perfectly happy with musicians penciling alternate slurs on my scores. In fact, to make it easy for players/condutors to choose, sometimes I provide scores fully annotated with slurs (so my ideas are understood) and an additional score score with no slurs ... so there's nothing to cross out or erase.

scorster

In reply to by scorster

If you can codify the rules for calculating the bow direction from a known point in the score then this should be quite a simple plugin.

You could also get the plugin to add bow symbols to the score at specified intervals, although I only play guitar so this may not make any sense.

Does bow direction change with each note? Does bow direction sometimes change even if the note doesn't? e.g. to sustain a note?

In reply to by yonah_ag

Off the top of my head:

a) The bow direction is set anytime there's an up bow or down bow mark. NOTE:
   • It may be assumed that the initial stroke is down, particularly if it's on a 4/4 beat.
   • It may be assumed that the initial stroke is up if it's offbeat (i.e. on an "and")

b) subsequent strokes simply alternating (down or up) unless there's a slur. Said differently, bow direction changes with each individual unslurred note.

c) a slur continues the bow direction over the notes "within" the slur, such that all notes are played the direction of the first stroke of the slur. Bow direction changes after exiting the slur.

d) ties have the same effect slurs with respect to bow direction. Notes within the tie continue in the direction that the tie began with.

I think that's about it.

scorster

In reply to by scorster

Ties also act as slurs but they cross the measure and it’s one sustained note in a bow stroke rather than multiple notes.

There’s also a technique called “stagger bow,” which means to change your bow direction at a random beat when sustaining a note. This technique is usually used when holding a note for a long period of time, without the sound of the orchestra changing bow direction and or having the note fade in and out when reaching the tip or frog of the bow. This breaks the “rule” of every section of the orchestra having to be in sync with bow movement/direction; but every player will resolve, likely to a down bow, when the sustained note is over. Stagger bow is marked as a down or up bow symbol with parenthesis around it.

In reply to by Heterogina

Thanks! I updated my post to add Ties to my list of elements that affect bow direction.

"Stagger bow" is interpreted by the player, as you say, but the plugin could have a switch to indicate if the final stroke is to be up or down.

Do you know if there's a stagger bow marking that explicitly indicates the final strokes direction? If so, and ifmuseScore supports it, then the plugin could know.

scorster

In reply to by scorster

I never knew there was a symbol for it.

Nonetheless, staggering is definitely NOT interpreted by the player. It must be arranged among the entire section so that only one player changes direction at a time.

I would say that the stagger mark would simply indicate 'the other direction than the note started on'.

In reply to by scorster

Scorster: Here's a beginning of some pseudo-code. Square brackets with italics are comments.

[Bow_Direction property is like a boolean: -Bow_Direction or Not(Bow_Direction) reverses it.]

From Selected_Note, step backward through notes to previous Bow Direction marking or to Section.Note(1).
Set this to be First_Note.
Current_Note = First_Note
If First_Note = Section.Note(1)
. . . .Current_Note.Direction = Down
. . . .[Forgot to include the possibility of the first note being other than the first note of a measure]
Else
. . . .Current_Note.Direction = First_Note.Direction
End If

Loop
. . . .Previous_Note = Current_Note
. . . .Previous_Direction = Current_Note.Direction
. . . .Current_Note = Current_Note+1

. . . .If (Current_Note is tied to Previous_Note) or (Current_Note is slurred to Previous_Note)
. . . . . . . .Current_Note.Direction = Previous_Direction
. . . .Else
. . . . . . . .Current_Note.Direction = Not(Previous_Direction)
. . . .Endif

. . . .[Need to handle staggers here as well. Not sure just how that would work?]

Until Current_Note = Note_Selected

Indicate Current_Note.Direction [Add marking or show message box?]

[Say, how do you space text with tabs here in the forum???]

In reply to by TheHutch

What is a Section?

• MS scores can be processed segment-by-segment.
• 1 segment is 1/480 th of a second.
• Only segments with information exist, (so there are not blank segments for each 1/480 position where nothing happens!)

• There are plugin functions for goto next or previous segment.
• Check segment type is ChordRest (otherwise it's not a note segment)
• Then process list of segment annotations to look for bowing.

See the Properties section of plugin documentation on Segment:
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…

and see SegmentType:
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/names…

(Incidentally, since cellos/violins appear to be bowed horizontally, how is the bowing direction up/down rather than left/right?)

Has anyone checked to see whether such a plugin already exists? We don't want to re-invent the wheel.

In reply to by scorster

Maybe to start with it would be enough to get this working for the currently selected stave rather than dealing with multiple different sections of an orchestra spread across multiple staves. Othereise you would need to query each stave to see if it had a bowed instrument.

If you can post a single instrument, single measure, MS3 score showing all the possible bowing symbols then I can at least do a plugin feasibility check and then make a basic framework for development.

In reply to by yonah_ag

yonah_ag wrote > Maybe ... it would be enough to get this working for the currently selected stave

I think it's entirely reasonable to expect the plugin to work only on the track with a single selected note.

yonah_ag wrote > If you can post a single instrument, single measure, MS3 score showing all the possible bowing symbols.

Here's a test score, but it has eight bars. In making it I realized pizz (pizzicato) notes would not be counted as strokes. Arco means to begin bowing again. I filled the lyric line with indications of the current bow direction.

https://musescore.com/user/35880724/scores/16920982

In reply to by scorster

Thanks. To confirm: the arrows below the score are the bow direction symbols but normally these would only be shown in atypical situations. The OP wants such symbols to be displayed on demand via a plugin. Are pizz notes normal notes in Musescore? If not then there needs to be a different way to identifying them for counting purposes.

In reply to by yonah_ag

@yonah_ag > ...the arrows below the score are the bow direction symbols? but normally these would only be shown in atypical situations.

The bow direction symbols used in standard scores are:

    Down bow and Up bow symbols.png

... and these symbols are in MuseScore 3's Articulation panel, as shown at the left side of its bottom line in the following image:

MuseScore 3 Articulation Panel Down bow Up bow.png

@Heterogina requested a display—in a plugin window or some other good spot—that indicates the bow direction of the currently selected note. To be clear Heterogina made no request to algorithmically add down bow or up bow markings (or arrows) to the score.

NOTE: I manually added regular down/up arrows to the lyric line to merely indicate in "lay terms" the bow direction at each note. Those arrows are not part of standard string notation, and there was no request to have them added or visible in the score.

However as an avid educator, I've envisioned an option to add Down bow and Up bow symbols throughout scores constructed for educational purposes, and the result would likely prove useful in troubleshooting and debugging. Additionally the option of adding arrows might be a nice ancillary feature the plugin could automate—I've used arrows when making easy scores for very young kids and that approach has proven useful for them.

scorster

In reply to by scorster

Here's an example of a Tracker window showing the direction of the E note in Measure 3

Bow Tracker plugin with notation example.png

In the Leland font the Unicode font encoding slots for Down/Up stroke symbols are:

    Down bow:  U+E610
    Up bow:       U+E612

I think those would be the same regardless of what SMuFL font the user has chosen.

scorster

In reply to by yonah_ag

pizz is done with a finger pluck, so I'd ignore those notes in the bow stroke calculation.

Then when bowing resumes with arco there's the question of the bow direction if not indicated. I can make a description of the default concept for that. But from the plugin's perspective it might want/need the scorist to indicate, even if the mark is set to invisible.

YES. It's terrifically odd that the standard up bow symbol points downward. I'd have fired the monks who leveraged that to become the accepted the norm hundreds of years ago. There is a marcato symbol that points upward, but it only means heavily accented and distinctly articulated—it is not a bow direction symbol.

scorster

In reply to by scorster

“ It's terrifically odd that the standard up bow symbol points downward. I'd have fired the monks who leveraged that to become the accepted the norm hundreds of years ago.”

It’s much more practical for the player the way it is. Remember that a lot of bowings are marked by hand by the player, often at speed and sometimes with the part upright on a music stand rather than on a table. The result is that in practice the marks frequently lose their sharp corners so that down-bows look like upside-down up-bows.

I was taught that the up-bow symbol related to the sharp tip of the bow, and the down-bow to the square frog - easy for learners to grasp.

In reply to by yonah_ag

yonah_ag:

The direction to move the bow is the "open" end of the symbol. (Took me more than a year to get that into my head when I started playing violin at age 55. We get stupid when we get old. At least, I do :-) I have always supposed that they are differently shaped because that makes it easier to identify them quickly; if they were simply the same shape inverted, you would have to take more time to actually identify which way the open end goes, rather than just see "square" versus "triangle". (Just a guess, as I said.)

In reply to by scorster

Re: scorster • May 17, 2024 - 22:16
In the Leland font the Unicode font encoding slots for Down/Up stroke symbols are:

    Down bow:  U+E610
    Up bow:       U+E612_

What's the syntax for using these Unicode characters in a Qt text string?

In reply to by scorster

yonah_ap:

1) Once the direction is known for a given note, it should be trivial to add the appropriate symbol to that note. Something along the lines of a checkbox in the plug-in to say "mark it" versus "don't mark it".

2) i would say that, especially for educational purposes, using the standard markings would be better than a non-standard mark (your up/down arrows). Learning the "right" symbols is definitely the best way to go.

In reply to by scorster

scorster:

Negative. In my pseudo-code, I was using the term "section" to refer to either a) the beginning of the score, or b) the first note after a Layout / Section Break. You would not consider the notes from before a Section Break, but you must go back in the music to a point where bow direction is known. That will be either a previous bow direction mark, or the beginning of the section (a Section Break). As Heterogina and yonah_ag pointed out, another "beginning point"--a point at which bow direction is known by definition, would be an acro after a pizz. This note will normally be a down bow and, for the purposes of this plug-in can certainly be assumed to be so, unless it is otherwise marked, of course.

Yes, it could have to go through Repeats/Jumps. If I was doing it, I would simply have the plug-in say, "I can't do this because of repeats" if it runs into a Jump/Repeat ... at least as a first iteration. Perhaps the plug-in could instruct the user to run it on notes shortly before the Jump/Repeat, then identify a note shortly after the Jump/Repeat to add a bow direction.

I don't play cello or bass, so I didn't think of that. The equivalent phrasing would be away from the body (left) = up. Toward the body (right) = down. However, the articulations are labeled "Bow Up" and "Bow Down". Thus, I would guess (on no actual knowledge!!!) that the horizontal instruments refer to the same "Up" and "Down".

In reply to by TheHutch

Another thought: an explicit bow-lift will also give a new beginning point. (And a rest can be assumed to be an implicit bow-lift.) The note after a bow-lift will be bowed in the direction to make the down-beat of the following measure be a down bow.

This will also apply to a pickup measure at the beginning of a section. The direction of the first note will be selected to make beat one of the following measure be a down bow.

In reply to by TheHutch

@TheHutch wrote> scorster: Negative. In my pseudo-code, I was using the term "section" to refer to either a) the beginning of the score, or b) the first note after a Layout / Section Break.

Ah, understood. I didn't realize that yonah_ag was asking about your use of the word "section" in your pseudo code.

I was mistakenly referring to posts prior in the thread where "section" referred to a group of players:

https://musescore.org/en/node/364096#comment-1242256
https://musescore.org/en/node/364096#comment-1242266
https://musescore.org/en/node/364096#comment-1242267
https://musescore.org/en/node/364096#comment-1242309
https://musescore.org/en/node/364096#comment-1242319

scorster

In reply to by yonah_ag

It's possible to conceptualize the violin down bow and the cello down bow in the same manner:

•  A down bow stroke moves your bowing hand (and the frog—i.e. the bow's "handle") away from the strings.

• An up bow stroke moves your bow hand comes closer to the strings.

In reply to by scorster

Yes, scorster. That's a better way to phrase it than what I said.

And, from that point of view, it's obvious that the same markings will be used for the same motion on all four standard bowed instruments: violin, viola, violoncello, and contrabass. I suppose there might be an unusual instrument that does it differently, but none I've ever heard of.

In reply to by TheHutch

OK. I think that there is enough detail to develop a first version but there are a couple of technical issues that I need to verify:

1) Can bow markings be shown in a plugin's dialogue? (and optionally added to the score).

2) Can "pizz." and "arco" be detected? It is not sufficient to find these literal texts since the actual control is a separate property of the text, NOT the text itself.

https://musescore.org/en/node/50196

However, at least for prototyping, the face value texts could be used. (It would be somewhat perverse if a scorer selected a "pizz." text and applied the normal channel control). Would the text "pizz." always be used or could "pizz", (no abbreviation dot), also be valid?

In reply to by yonah_ag

Because pizz. and arco. are among those "special" staff text items that affect playback, I would definitely assume that they can be detected by a plug-in. However, while I know my way around programming a little bit, I know NOTHING about QT nor about MuS's data structure. So that assumption is purest of WAG :-D

In case you don't know: "Wild @$$ Guess" :-D

In reply to by yonah_ag

yonah_ag:

Re: 'The actual staff text is irrelevant: it is the associated channel change which triggers pizzicato, tremolo or arco, so it is this channel setting that the plugin will need to read. There is nothing special about the texts "pizz." or "arco".'

I misspoke. I meant that they were "special" because the channel change is added upon using the pizz. or arco. buttons from the palette. I realize that the actual text value is immaterial. I would assume that the channel change could be read from the plug-in. (Again, just WAG)

In reply to by TheHutch

I have been investigating the object model / plugin documentation and I am only making slow progress using plugin code to find:

(1) The articulation symbol

The ObjectExplorer plugin shows that articulations are element.type=29 with parent.type=93 (which is a chord). However, the plugin documentation does not list articulations as properties of chords, so I need to do a bit more digging.

object.png

Chord Properties

chord.png

(2) The channel change property within the staff text element

pizz.png

In reply to by yonah_ag

I'm confused, yonah_ag. Where in "the channel change property within the staff text element" does it actually change the channel? Perhaps the channel change is not associated with the staff text, but is simply performed as a separate action. That is, perhaps the previous or next item in the score is the channel change. (Or did I miss something obvious?)

I don't know how to see the info you are displaying or I would look myself :-)

[A few moments later] I would guess that the channel change would be a part of the Ms:PlayEventType property of the chord. Is that what the second bit is showing? If so, the question remains: what part of that actually tells something to change the channel?

In reply to by yonah_ag

re 1):

Can a plugin access the Leland music font? If so, you may be able to display the down bow and up bow symbols via Leland.otf ... or the object model's internal reference to it.

The Unicode font encoding slots are:

    Down bow:  U+E610 
    Up bow:       U+E612 

Note: The Leland music symbol font won't be a system resource unless you locate it in MuseScore>Resources>Fonts and install the .otf file. Worth mentioning: I see Leland.otf in the MS4 Resources>Fonts folder but not in MS3's Resources>Fonts folder, so it seems Leland is compiled into the MS3 app.

Alternatives:

• You may be able to display SVG objects in the plugin. If so, try the ones I've attached.

• MS3 and MS4 contain LelandText.otf in their Resoures>Fonts folder. I checked but don't see Down / Up symbols in LelandText.otf. THAT would be handy for anyone who needs those symbols in MuseScore text objects! AND potentially a way to display the Down/Up Symbols in the plugin window.

Good luck with all this!

scorster

Attachment Size
Down Bow.svg 801 bytes
Up bow.svg 980 bytes

In reply to by yonah_ag

It occurs to me that we are basically talking about markings, not about playback. If our starting point is an arco mark, it doesn't matter whether that mark affects playback or not. So, we only need to find the "arco" text, not the channel change.

I discovered the snap pizzicato marking, which will be another point at which we can define a bow direction.

I had believed that there was a specific symbol for an explicit "bow lift", but apparently not??? If I'm mistaken about this, that would need to be included in the logic to find StartChord.

Here's new pseudo-code:

Definitions:
SelectedChord: the chord selected by the user; if a range is selected, the beginning of the selection is set to SelectedChord.
FirstChord: work from SelectedChord backward until we find a known bow direction; that's FirstChord
CurrentChord; the current working point as we go backward then forward between FirstChord and SelectedChord.


SelectedChord = [identify the currently selected chord; if a range is selected, the first chord in the range is set as SelectedChord]
IF SelectedChord is a rest THEN
. . . . . Generate error ["cannot identify bow direction for a rest"]
. . . . . EXIT PlugIn
ENDIF
blnStopLooping = FALSE
CurrentChord = SelectedChord
LOOP
. . . . . CurrentChord = CurrentChord - 1 [Move backwards one chord]
. . . . . IF CurrentChord has "pizz." marking, THEN [if we find a "pizz." marking before we find any of the other markings, then SelectedChord is in the midst of a pizzicato section, which does not have bow direction defined.]
. . . . . . . . . . Generate error ["cannot identify bow direction during pizzicato"]
. . . . . . . . . . EXIT PlugIn
. . . . . ENDIF
. . . . . IF CurrentChord has "upbow" marking OR CurrentChord has "downbow" marking OR CurrentChord is first chord in Score OR CurrentChord is first chord in Section [first chord after a Section Break] THEN
. . . . . . . . . . StartChord = CurrentChord
. . . . . . . . . . blnStopLooping = TRUE
. . . . . ENDIF
. . . . . IF CurrentChord is rest OR CurrentChord has "snap pizzicato" marking THEN
. . . . . . . . . . StartChord = CurrentChord + 1 [the starting point is the chord immediately following a rest or snap pizz.]
. . . . . . . . . . blnStopLooping = TRUE
. . . . . ENDIF
UNTIL blnStopLooping
IF StartChord has "upbow" marking
. . . . . StartBowDir = Up
ELSEIF StartChord has "downbow" marking
. . . . . StartBowDir = Down
ELSEIF StartChord NOT on beat one [If the StartChord is not a bow marking, evaluate whether it is on beat one. If it's not, move to the first beat of the next measure and set that as down; If it is, it's down.]
. . . . . LOOP
. . . . . . . . . . StartChord = StartChord + 1
. . . . . UNTIL StartChord on beat one
. . . . . StartBowDir = Down
ELSE StartBowDir = Down
ENDIF
[Once we reach this point, StartChord is the latest note before SelectedChord that we know (or can define) a bow direction. Everything from StartChord to SelectedChord is chords/notes.]
CurrentChord = StartChord
CurrentBowDir = StartBowDir
LOOP
. . . . . CurrentChord = CurrentChord + 1
. . . . . If CurrentChord NOT in a tie or slur THEN
. . . . . . . . . . CurrentBowDir = NOT(CurrentBowDir)
. . . . . ELSEIF CurrentChord is the first note of the tie or slur
. . . . . . . . . . CurrentBowDir = NOT(CurrentBowDir)
. . . . . ELSE [if it's in the middle of the tie/slur]
. . . . . . . . . . CurrentBowDir = CurrentBowDir [could leave this out but I'm including it to complete the logic]
. . . . . ENDIF
UNTIL CurrentChord = SelectedChord
Report CurrentBowDir


Based on the info at https://violinspiration.com/violin-bowing-techniques-terms-symbols-and-…, this plug-in will not work (may not work?) with several more advanced bowing techniques. "Up bow staccato", "down bow staccato", "flying spiccato", "ricochet bowing", "Sautillé bowing", "Fouette or Whipped bowing", or "Tremolo bowing" all appear to break our (very!) basic rules on bow direction.

In reply to by TheHutch

(1) and (2) were issues to resolve. The text is output from the ObjectExplorer plugin. I made scorster's score into a single measure and selected the whole measure for ObjectExplorer so that I would have complete information.

Channel change does not appear to be in the playEvent or the playEventType.

Anyway, as I said above, the plugin could just look for "pizz." and "arco" texts rather than find the channel changes, so issue 2 has a fix, (which you also identified).

So that leaves (1) to be solved. ObjectExplorer's output shows that the articulation element has chord as its parent but the plugin documentation does not define articulation as a property of chord. So where are articulation elements in the object model.

In reply to by yonah_ag

It’s very slight, when down bowing you’re getting closer to the tip of the bow, which has less weight, so the notes volume gradually decreases. When up bowing you’re getting closer to the frog (base) of the bow, which has more weight, so the notes volume gradually increases. But like I said, it’s very slight and hardly noticeable.

I have found the elements by inspecting the MSCX file, (which is what I should've done to start with!), so I can now try to access them from a plugin.

This simple measure:

bowing.png

Looks like this in the MSCX file and the score object model should match:

mscx.png

The articulation and channel information is clearly visible.

In reply to by scorster

The key thing about bow direction--whether in halves, quarters, eights, sixteenths, triplets, or any other--is that the beginning of a measure should be a down bow. So, when we identify the starting point for calculating the current bow direction, if it's not beat one of a measure, we can simply ignore the rest of the measure to start with a down bow on the first beat of the next measure ... OR we can count backwards from the next measure to the starting point, like this:

20240520 092508-bow dir.png

This, if our SelectedNote is after the quarter note C, we can ignore the previous measure. If our SelectedNote is before the quarter note C, we 'count backwards' to identify its direction.

In reply to by Brer Fox

In your example, the sixteenth note C (first note, first measure) would normally be played with a down bow (reversing the direction in the rest of that measure), so that the eighth note C (first note, second measure) would be a down bow.

But you're right about the subsequent measures.

Creating that example got me thinking: this plug-in is only going to be accurate over fairly short "distances". At most ... maybe 5 measures. Maybe more, but I think more likely, less. Might want to include code that starts at our SelectedNote and goes backward to find a "known direction" to begin with ... and if it doesn't find such a point within some fairly short distance (how long???) says something like , "Too far! Try selecting an earlier note"

In reply to by TheHutch

My intention is to work backward from the current note. This seems most intuitive.

Is it agreed that the first note, (not necessarily beat), of every measure is a down bow unless otherwise indicated?

If so, the plugin will never need to look back beyond the current measure and will therefore be highly accurate, (and very fast, no matter how many measures in the score). It will either find an explicit bow symbol on the first note of the measure or an implied down bow.

In reply to by yonah_ag

yonah_ag asked > Is it agreed that the first note, (not necessarily beat), of every measure is a down bow unless otherwise indicated?

A down bow at the start a measure is inferred when no indication is present:

    a) if the bow has been stopped
    b) if the bow was lifted
    c) if the score starts on a down beat
    d) if the score has a pickup and its inferred direction leads to a down beat

However in a succession of bow strokes, like continuous quarter notes in 3/4, the bow direction naturally alternates at each measure start. No indication is required for a player to accommodate that— the natural interpretation is simple alternating strokes, even across bar lines.

yonah_ag wrote > My intention is to work backward from the current note. This seems most intuitive.

By "current" note you mean selected note?

The plugin was requested to help scorists determine the bow direction of the current note—meaning that the bow direction of the selected note is not always readily known. So the plugin would have to look back (just as a scorist would do) to find the most recent indication, or rely on the most recent inference, and calculate from there. Bow strokes simply alternate at each note ... except in the presence of a slur. Notes "under" a slur are played in a single stroke. Additionally, as exampled above, there are a range of inferred resumption directions after a bow stop or bow lift.

And with regard to inferences, I think the plugin should advertise its inference methodology so the scorist will understand the outcome.

In reply to by scorster

• Yes, current note = selected note.
• Yes, the plugin will look back from this selected note in order to calculate and display its bow direction.
• Yes, it will look for the most recent, earlier bowing indication, whether explicit or implicit.
• Yes, there will be documentation to advertise its methodology.

😀 So far, so good but then ...

TheHutch • May 20, 2024 - 14:28, says:
"The key thing about bow direction--whether in halves, quarters, eights, sixteenths, triplets, or any other--is that the beginning of a measure should be a down bow." 😀

But you disagree. 😮

As a finger-picking guitar player, (pizzicato?), I have no idea who is correct but I need some clarity in order to design the checking algorithm.

In reply to by yonah_ag

A down-bow is naturally stronger than an up-bow because the heel of the bow is heavier than the tip. If the first note of the bar starts at the beginning, on the first beat, then it should normally be a down-bow. But if, as in my and TheHutch’s examples, the first bar starts with a rest so that the first note is off the beat, it is unaccented and so must be an up-bow.

It is not going to be easy to automate it because bowing is more complex than you think….

In reply to by yonah_ag

From yonah_ag

TheHutch • May 20, 2024 - 14:28, says:
"The key thing about bow direction--whether in halves, quarters, eights, sixteenths, triplets, or any other--is that the beginning of a measure should be a down bow." 😀

But you disagree. 😮

I'm glad you're checking the wind before setting sail!

Yes, I disagreed in this thread pertaining to the starting note, exampled not on the downbeat in this post.

Nevertheless, I view the statement "The key thing about bow direction--whether in halves, quarters, eights, sixteenths, triplets, or any other--is that the beginning of a measure should be a down bow" as an oversimplification, as shown in the following score where the lyric "you" starts on an up bow at the start of measure 2:

https://musescore.com/user/35880724/scores/17244394

In reply to by scorster

Sorry, scorster and yonah_ag. I have to disagree with many of your examples.

In 4/4, the note that is automatically assigned a down bow (unless there is strong reason--like the composer's indication--otherwise) is beat one, and to a lesser degree, beat three. In 3/4, it would be beat one only. The accented beats. (and yeah, that means that my previous example was incorrect on beat three *blush*)

For example, the example of "Happy Birthday", should have down bow on "birth" and "you". A slur would be added between two of the notes in the "birth-day to" measure to make it an even number of changes of direction. This slur indicates that the notes are played on a single bow stroke.

20240521 014709-birthday.png

If beat one is a rest, then the first note would be set to make beat one of the next measure (and, if possible, beat three of the current 4/4 measure) be down bow.

I agree with the statement that we should only go back a short way (as I said in my last post). I'm now thinking that it should be only the previous measure.

A rest or an explicit bow lift start everything over. In other words, it would not be incorrect to mark up bow / rest / up bow. Equally, down bow / bow lift / down bow. it's not required to be that way, just that the rest or the bow lift provide a new starting point with no connection to the previous bow direction. When the player lifts the bow (for the rest or the bow lift), they can play the next bow stroke in either direction, regardless of the last stroke.

I agree that we can ignore simile. If it's in the score, it will be implicitly obvious or it will not be considered for bowing.

In reply to by TheHutch

TheHutch wrote > In 4/4, the note that is automatically assigned a down bow (unless there is strong reason--like the composer's indication--otherwise) is beat one, and to a lesser degree, beat three. In 3/4, it would be beat one only.

Still disagree.

In a procession of detaché strokes in 4/4 an up bow may naturally occur on beat 1 ... and no explicit indication is required.

The strokes just alternate.

.

https://musescore.com/user/35880724/scores/17249056

In reply to by scorster

I disagree. There is a technique for playing two detaché notes on the same bow stroke. (I don't remember it's name, and I can't play it well, but I know it exists,) In that first example, I would probably do it on the two eighth notes. So the five notes in that measure would be 1) down, 2) up, 3) down, &) down, 4) up, 1) down.

It's not "wrong" to play the first beat up, but the section tries to do so wherever possible. ... and that should be the default option for this plug-in.

In reply to by TheHutch

@theHutch

At this point I have to wonder if you play violin and have orchestral string experience?

theHutch wrote >
> It's not "wrong" to play the first beat up, but the section -tries- to do so wherever possible
> There is a technique for playing two separate notes on the same bow stroke.

Indeed there are a number techniques such as Martelé, Ricochet, Staccato that allow separate notes in a single stroke ... but that doesn't mean "down bows on beat one" is the rule of the land, or something a string section should strive for "whenever possible." There is nothing ambiguous or flawed with the sample score I submitted. All the string players I know would play it as a succession of separate strokes, without batting an eye or harming an ear.

Any of the bowing techniques I cited (Martelé, Ricochet, Staccato) would be fine for your goal if you want the sound imparted by that particular articulation—which will sound distinctly different from a garden variety Detaché, and often basic Detaché is preciselt what the composer wants.

Your rigid stance here sounds like Music 101 pedantry. An oversimplification, as I said previously, which pointlessly distorts some sort of good guideline into hardened doctrine.

I know you're trying to contribute to the betterment of the proposed plugin ... but let's drop this point of discussion. I won't change my view.

In reply to by scorster

The difficulty is that there can be several valid bowings, which may be subtly different in their effect. E.g. in the “Happy Birthday” example two have been offered, while I would play it a third way: Down-up Down Up Up Down, etc., with the two Ups articulated, to match the way a raucous chorus might sing it!

Recently I took part in a “Side by side” play day with a professional orchestra, where each amateur player sat next to a pro, working on Strauss’s Rosenkavalier Suite. The parts were hired and in several places already had pencilled bowings added to change the printed ones - several times there were discussions with the leader with more changes made.

In reply to by yonah_ag

It may not be practical for you, but it would be for me and many other string composers. As I read through the comments, I feel like we’re going back to over complicating everything. Yes, bowing style is important, but it’s not what I asked for. I, honestly and personally, do not care if the first note of the measure starts up, what I do care about is if everyone in the orchestra is bowing in the same direction.
I can’t stop you from not continuing writing this plugin, but know that all I want is just basic up and down bow identification without backtracking.

In reply to by Heterogina

Since this plugin will be aimed at meeting your requirements then your comments are the most important. (People can always make more complex versions later if required and the extra subtleties can be discussed somewhen else.)

So, for your needs, how should up/down be calculated?
• There has to be a reference point somewhere in the score to calculate from
• Do you want anything to happen after rests? e.g. always down bow
• Do you want anything to happen at the start of each measure?

In reply to by yonah_ag

@yonah_ag wrote > Since this plugin will be aimed at meeting your requirements then your comments are the most important.

Quite a succinct and handsome reply.

Thanks for your continuing interest and clarity on this!

As mentioned, I too will value from the requested bow direction tracker so I will continue to contribute toward its inception and betterment.

scorster

In reply to by yonah_ag

I believe up and down bows should be, in a bar of 4/4, down, up, down, up.

The reference point of where the plug-in would calculate would be the first note to the left of the selected note. Unless stated otherwise (maybe you can pick where you want the reference point to be)

If there’s a rest, then I want the bow to continue normally, ex (as a bar of 4/4): Down, rest, up, down. Unless there’s a long rest, maybe a whole rest or two, then I want the bow to start down on beat one/ three or up on beat two/four. I know things can get a little tricky with odd and compound time signatures, and I honestly don’t have an answer for those.

I’m not sure what you mean by something happening at the start of each measure, are you trying to say that the plug-in will show you the bow direction of the first beat of the measure when played back?

In reply to by Heterogina

Heterogina • May 21, 2024 - 21:11
(1) I believe up and down bows should be, in a bar of 4/4, down, up, down, up.

Consider these 2 measures in 4/4 time:

bowbow.jpg

• Measure 1 is down, up, down, up, down
• Measure 2 is up, down, up, down, up

Neither of these bowing patterns match your asserted pattern so we already have a problem.

(2) The reference point of where the plug-in would calculate would be the first note to the left of the selected note.

What if the note to the left has no bow symbol? Look to the next left? What if that one also has no symbol? Look to the ... ? But this is backtracking and you specifically stated in your previous post that you don't want any backtracking!

"Something happening at the start of each measure" was asking whether there should always be a bow down at the start of a measure, even if the previous measure finished on a bow down.

In reply to by yonah_ag

Ok, I will clarify. What I meant about number one was that I believe that the very first note in any string piece should start on a down bow unless it's a pickup or stated as an up bow.

What I meant for number two was the note before the selected note already has an "invisible" bow direction (symbol) assigned to it. So the plug-in will read the "invisible" bow direction and carry out the note reading process as such. Let's use your example: let's say I want to know what bow direction the B on the third beat of measure two was. Since I believe that every string score will start on a down bow, the plug-in will read the E's "invisible" note direction, which is a down bow, therefore the plug-in will tell me that the B is an up bow.
I know it's easy to tell what bow direction it was, but usually those scenarios are a little more difficult.

And number three, I believe that if you end on a down bow at the end of a phrase, you would bow lift to start the next phrase down, obviously unless stated otherwise. If you're in the middle of the phrase, then I believe you should let the bow go where it wants to.

In reply to by Heterogina

OK from your comments so far we now have these definitions:

1a) We forget about 4/4 measures always being "down, up, down, up" and simpy follow a down/up alternating pattern.

1b) The first actual played note, (so not rests), in the score is assumed to be a down unless there is an explicit up symbol.

1c) An explicit bowing symbol sets the bowing sequence from that point forward.

1e) The plugin will only work with 4/4 scores since other time signatures are not simple.

1e) After a long rest, (exactly how long?), next bow will be down for a note on beats 1&3, up for 2&4. (What happens if the next note is off the beat rather than on?


2) I don't understand. How will the note before already have an "invisible" bow direction? Notes never already have any bow symbol in Musescore, neither visible nor invisible. They have to me added manually by the scorer.


I don't follow (3)

3a) How do I know where a phrase starts or ends?

3b) In the middle of a phrase, how will the bow "go where it wants to". I don't know what that means. The bow is under the control of the player and so the player chooses either an up or down direction. It has nothing to do with what the bow "wants".


New questions:

4) Are there any other places in a score when the down/up alternating pattern would be interrupted, thereby resetting the next bow direction to down?


5) Are there any other rules to consider?


In reply to by yonah_ag

1a, b, c) You're spot on!
1d) I was hoping there would be more time signatures, but like I said, they are more complicated with bowings :(
1e) You "restart" your bow direction if you have to rest for more than one measure. So if you end down on beat 4 and rest a whole measure, the first beat of the next measure you would play would be a down bow as well, unless stated otherwise. If the note is off the beat (I assume you mean if it's on an "&"), then it would be an up bow, unless marked otherwise.
2) Ok, so, this is kind of hard to explain, but I'll try my best lol. When you're playing a string piece, you're subconsciously thinking of where your bow is going. For example, if I just played a down bow, my brain would say that I needed to play an up bow if the score permits it. So the "invisible" bow direction is what your brain says to play. If we look back at your example and we played through it, my brain will tell me that I needed to play a down bow on the E without me "knowing." It's like blinking and breathing, you never think about it unless you concentrate on it.
3a) Phrases normally end on the I chord (If we're in C, we would end on a C Major chord). Phrases also usually end on a down bow as well.
3b) I was being sarcastic, sorry if it confused you lol. The bow "going where it wants to" means that you play it as written.
4) Like I said, the ends of phrases usually end on a down bow but the start of phrases also usually start on a down bow as well, so string players lift their bow to start down again. For the plug-in to read the end of the phrase and the beginning of a new one, I suggest adding a bow lift at the end of the phrase so it doesn't confuse it.
5) Pizz. (Pizzicato) and col legno do not get counted as bow strokes. (Col legno is a technique to where string players use the stick of the bow to produce sound instead of the hair of it. The reason it doesn't get counted as a bow stroke is because you're tapping the stick on the string instead of moving the bow across the string.)

I really tried my best to answer your questions and I hope I made sense to you lol :)

In reply to by Heterogina

We're getting there!

1d) More time signatures are possible if you can define how they work. Let's start with 4/4 and see how it goes.

2) Still problematic. The plugin is required to identify the bowing when you click on any note in the score. Therefore it does not have any context of "if I just played a down bow". If you always knew which direction you had just bowed then you wouldn't be asking for the plugin.

This is where the backtracking comes in, (which you say you don't want). From any arbitrary note in the score the plugin will have to backtrack to find the most recent bowing indicator then apply the agreed rules to calculate the bowing for the selected note. So I guess that you will be ok with this backtracking?

3b) Does "play it as written" mean use any explicit bowing, otherwise calculate by backtracking?

4a) Phrases will have to wait for a later iteration as they are still too vauge. I'm sure that you don't mean that every I chord marks the end of a phrase, so there must be other info for phrase ends. On top of this you would have to define the I chord for the piece and then add chord symbols to every chord in the score for checking against.

4b) Is there a word or symbol that you add to the score to indicate such a bow lift?

5) I'll process "pizz." and "arco" to start with and we can progress from there.

In reply to by yonah_ag

1d) Since we're ignoring style, all time signatures will work the same: alternate from one note to the next, except for ties and slurs.

2) Another possibility is to have the plug-in say something like "I can't identify the bow direction on this note because there's no bow direction indicated back to THAT note." and indicate the point it looked to: explicit bow up, explicit bow down, explicit bow lift, arco/pizz. col legno, rest, snap pizzicato, section break, beginning of score. (I think that's all the symbols we've identified?)

Backtracking is absolutely required. There's no other way to even begin but to work backward until the plug-in can find a place where it can identify a bow direction ... or reach a point where it determines that it cannot identify a bow direction.

4b) I believe that OP said that the bow lift is indicated by the "Breath mark (comma)" symbol highlighted below. Is that correct, Heterogina?

20240523 114850-bow lift.png

4a) Phrases would qualify as "style". If we're ignoring that, we can just skip that step. (At least for now!)

In reply to by TheHutch

Re: TheHutch • May 23, 2024 - 16:51 new
1d) Since we're ignoring style, all time signatures will work the same: alternate from one note to the next, except for ties and slurs.

Heterogina also mentioned that bow direction after a long rest is determined by the 4/4 beat number. How would this work with 3/4, 6/8, 12/8, 2/4 etc. where there are not four beats to work with?

2) Yes, if a result cannot be deduced I will indicate where the plugin got to. Backtracking is definitely needed. In fact this must be a common method for a person to deduce the correct result.

4b) Thanks. I'll add one to a score to find out its details.

In reply to by yonah_ag

1d) If I were marking a score and a rest ended anywhere in the middle of a measure, I would make the beginning of the following measure a down bow. No matter the time signature. From there, work backward to the first note following the rest, alternating except for ties/slurs.

In reply to by yonah_ag

yonah_ag, I think your questions (and more) are vital. Heterogina just wants to be able to click in a note to see if it is a down or up bow. Piece of cake, right. Except nothing in programing is simple. If the plug-in is to guess what bow direction is, there needs to be criteria for it to do so. Seems to me that maybe going back to the beginning of the previous measure might be enough. Even so articulations and style matter. The composer needs to be keeping track and add bowings as needed. Unless the plug-in is very, very accurate, incorrect markings will result.

In reply to by bobjp

bobjp > Seems to me that maybe going back to the beginning of the previous measure might be enough.

Looking to the start of the previous measure would likely be insufficient.

The start of the previous may not have a clearly inferred nor explicitly expressed bow direction. So the plugin would have to look back until it finds such a definitive point ... and calculate from there.

In reply to by Heterogina

Heterogina wrote > Yes, bowing style is important, but it’s not what I asked for. I, honestly and personally, do not care if the first note of the measure starts up, what I do care about is if everyone in the orchestra is bowing in the same direction.

> ...all I want is just basic up and down bow identification without backtracking.

Thanks for restating your goal Heterogina.

For some reason the discussion keeps diverting to matters of style. And we hear repeated opinions that support a particular stylistic outcome that requires the addition of slurs.

In my understanding: You've never asked for a tool that offers stylistic bowing advice. Rather you've requested a "tracker" that can identifiy/confirm the bow direction any selected note.

Ideally then, as a community, we'd attempt clarify what constitutes or nullifies a change of bow direction so the plugin can calculate accordingly.

I encourage anyone wanting to discuss bowing style to start a separate thread.

scorster

In reply to by TheHutch

@TheHutch
Re: Sorry, scorster and yonah_ag. I have to disagree with many of your examples.

Que? I have not submitted any examples for you to disagree with. In fact I am not in a position to make any informed examples because all I know about bowing is from info in this thread. I have never played a bowed instrument.

My comments are all geared to getting a clear spec. for writing a plugin.

In reply to by yonah_ag

Re: 'Re: "A rest or an explicit bow lift start everything over"
Does this mean that the next bowing would be down unless there is an up override?'

No, it means that the next bowing will be whichever direction would make the subsequent downbeat be down, unless there is an override before that downbeat.

Let's say that an eighth rest occurs on beat three, followed by three eighth notes: 3) rest, &) up, 4) down, &) up. 1) down.

If the eighth rest occurs on beat three followed by quarter note, eighth note: 3) rest, &) down, 4&) up. 1) down.

Or, if a sixteenth rest occurs on beat three followed by three sixteenths, eighth, two sixteenths: 3) rest e) down, &) up, a) down, 4) up, &) down, a) up. 1) down.

Each time, the bow direction is chosen after the rest so that the direction of the subsequent downbeat will be down.

In code terms, this means that if SelectedNote falls after that subsequent downbeat, you can just ignore the partial measure and start counting from that downbeat. If SelectedNote falls before that subsequent downbeat, but after the rest, you must count backwards from the downbeat. (I hope I'm making this clear.)

There's enough info to start on a plugin but there is a shortcoming in the plugin API which adds a complication: on selecting a note in a score the plugin API does not expose the articulation/s for that note. There is a workaround to find articulations but not directly in the context of a note.
See https://musescore.org/en/node/350125

In reply to by TheHutch

I did.

That confirmed that it's a child of chord elements but access to it from the chord is not exposed in the plugin API. Chord elements contain note elements, (available in plugin API), so you can't directly access articulation for a note. 😞

You can't access the xml from a plugin. It gets loaded into the object model which is what you access with the plugin API.

The workaround is the best approach.

(You can process the xml by other means but it then becomes a plugout. I have an Excel plugout for exploring mscx files, which is where those screenshots came from.)

In reply to by yonah_ag

A plugin can read the mscx file and construct a map of the piece by looking for durationType (to be coverted to ticks), pitch, ties, and stringsUp/DownBow + whatever else is needed. Would this not be a sufficient preamble to the Down and Up Bow tracker? What am I missing?

In reply to by TheHutch

Indeed, this is the same link that I shared above.

It describes a workaround, (indirect method), of accessing articulations since there is no direct method in the context of a note or chord. So you have to select every element in the score, (notes, beams, stems, flags, texts, symbols, clefs, chords, time sigs, articulations, ...), then step through this list 1 element at a time to find those elements which are actually articulations, storing their segment tick time in a list so that the list can be referenced when a user clicks a note for bow direction.

Whilst I'm stepping thru all the elements I might as well map the pizz./arco texts at the same time.

Plugin Progress Update (v0.0.5)

• Basic score mapper with all elements or only bowing related elements.
bowing2.png
The output is a table of score elements displayed in a popup window.

• Test Score:
bowing1.png

MapScore.qml
Bowing.mscz

Slow progress but I only have so much spare time. Feel free to test the mapper with other test scores and feed back with any issues.

In reply to by yonah_ag

@yonah_ag Great to see your progress!

I got the following output table results when running the plugin on my attached test score.

• Didn't matter if I had no selection or the full score selected.
• And the same results appeared regardless of Map Type = Full Map or Map Type = Bow Map.''

Bow Direction plugin - Output table 2024-05-28.png

And sometimes the plugin produces no report, and no report popup window.

scorster

In reply to by yonah_ag

Plugin Update v0.0.6
Fix to both of the above issues: MapScore.qml

Note: Current plugin processes the whole score even when a selection has been made. This is by design. Update also includes wider output window because Qt renders differently on macOS vs. Windows. This should stop the column header wrap but I have no mac to verify this.

In reply to by yonah_ag

Weird. I tried again running from the Plugin Creator window and via the Plugin Manager and get the same result as before. Could you make a 'debug' version with output to console.log? I followed the 3.7 story but have no idea what could cause this. Or any suggestions?

In reply to by yonah_ag

Confirmed!
EDIT: Some more testing fun: I put 9 up/down articulations in the attached. It's about 750 measures and it takes about 160 seconds to run (for me). Am I right that "Bowing Map" is not yet functional?
La_Valse.mscz
EDIT2: A more realistic test file would be a string quartet (attached without adding bow up/down marks). The original file was .mid and presumably did not carry along articulations. Another excellent testfile would be Bach Violin Sonatas & Partitas, but they are behind a paywall at Musescore.com
Quartet_Opus_59No3_2.mscz

In reply to by elsewhere

This is one consequence of the workaround, i.e. that all elements have to be processed to find articulations. I can optimize the mapping code for bowing maps and I'll add a map test where the results are not concatenated to a variable for html display output. Hopefully it will be quicker.

If it's still too slow then the user would have to add bowing as texts rather than articulations. However, 750 measures sounds like a pretty big score to me.

In reply to by elsewhere

It detects notes and rests; "pizz." and "arco" texts; up/down articulation symbols; breaths. I think that this is all the situations that have been defined for the first version. Now I need to turn these detected elements into bowing directions. I should find time over the weekend.

Your image shows that I have left a debug in, (oops), and also that I haven't considered multiple staves yet. I'm not sure how these are organised for plugin access as I only score for guitar, (single stave).

In reply to by yonah_ag

According to Newretrograde.qml selection elements know which track they are on:
// return active tracks
function activeTracks() {
var tracks = [];
for (var i = 0; i < curScore.selection.elements.length; i++) {
var e = curScore.selection.elements[i];
if (i == 0) {
tracks.push(e.track);
var previousTrack = e.track;
}
if (i > 0) {
if (e.track != previousTrack) {
tracks.push(e.track);
previousTrack = e.track;
}
}
}
return tracks;
}

In reply to by yonah_ag

Here's a new updated version of my test score. I added a two-line variation (i.e. lines 3 and 4) where I simply placed notes in a second voice beneath an existing slur in voice 1. That doesn't affect slurs or bow direction.

... but there is the last measure, where the slur is in voice 2. This is not an issue for bow direction, but the tracker would have to look to both voices to account for the total number of slurs.

One potential rub would be if a scorist puts conflicting slurs in the two voices. But that would be good information for the tracker to reveal to the scorist!

scorster

https://musescore.com/user/35880724/scores/16920982

In reply to by scorster

The small note with a crossed out stem in bar 7 has no segment tick. It shows as "undefined" in the output and appears to be have parent and grandparent both as "chord". What does this type of note mean? (I use small numbers in TAB but only to indicate lower velocity).

In reply to by yonah_ag

That's an "acciaccatura". It's the first button (unless you have rearranged them) on the Grace Notes palette. A grace note would most commonly (but not always!) be played on the same bow stroke that its "parent" note is played, the note it is "gracing" :-)

In reply to by yonah_ag

v0.3.0's Bowing at Tick looks good!

The file name changed to Bowing_0.qml so it was a little confusing that the Plugin Manager name is still Map Score. The dialog is also still named Map Score, which may be appropriate at least for now.

scorster

In reply to by yonah_ag

Nice!
I’ve noticed a few things though.
In measure 1, it would be natural (at least to me) to start the last two notes on an up bow, then the first note of two on an upbow. Idk what’s going on with 3, tbh. But a slur would be one bow—one bow till the last note of the measure, and a single slur would usually cover all four notes. The final note also would be up bow.

Great work on this!

In reply to by Asher S.

It's a computer program so it's dumb but fast. Any appearance of intelligence has to come from the people that specify how the program should work. The program itself has no concept of what is natural so if the programmer is to imbue the program with any such notion then a precise specification of why these should be up bows needs to be made available and hold true without exception, (unless such exceptions can themselves be clearly specified).

Slurs are a total nightmare in MS3 as they are not attached to notes. Run the full score mapping and you'll see that all slurs are defined at the end of the score. They have a track number but no obvious tick number to relate them to any particular notes. They actually seem to be curved lines drawn at (x,y) co-ordinates on the page. Suggestions on how to process them are welcome.

In reply to by yonah_ag

BTW it's not true that slurs aren't logically attached to notes, even if it might not be a direct relationship. The behaviour when moving notes around and even during playback demonstrates it's definitely possible to determine which slurs are associated with which notes. However I don't know whether the plug-in interface is able to access the required info - if not, I'd agree that's a serious shortcoming.

In reply to by yonah_ag

There does not appear to be plugin access to be able to link a slur to a note. So, effectively, the slurs are invisible to the plugin code and the programmer cannot usefully process them. One possible workaround would be to add (manually) a bowing symbol to the last note of a slur set of notes:

bowing5.png
Is it worth continuing with the plugin or is the slur situation a deal breaker? The final step of the plugin is to add code to show the bowing of the selected note in the plugin UI. (The maps and the blue text options are just for my development purposes.)

Bowing.qml

In reply to by yonah_ag

I had thought you were having to parse through all the subitems in each chord to find ... what? articulations? It looks like while you're doing that you could find the <Spanner type = "Slur"> with a <prev> value or a negative <fractions> value to find the end of a slur. (Or did I misunderstand what you were doing?)

In reply to by TheHutch

Run the map of all elements and you'll see what I mean. The Spanner codes are seen in the mscx file and I was using this as a guide to the internal object model. I am not parsing the mscx file but processing the object model. There does not seem to be a start tick and end tick for the slur but I'll keep looking.

The plugin documentation is almost silent regarding slurs.

In reply to by elsewhere

Thanks for sharing.

This is similar to a technique that I use with the another plugin. The plugin saves a copy of the score as an mscx file, reads this whole file into a variable, applies some regex then rewrites the file before loading it back into MS.

I'll see whether musicxml is more suitable/easier than mscx but it will definitely slow down the mapping process. I could check for slurs during the simple mapping and only resort to this external file processing when simple mapping detects slurs.

Sometimes even simple plugins run into unforseen complications. 😬

In reply to by elsewhere

On the other hand it looks like I can take the musicxml and then
(1) Find the divisions value
(2) Regex out everything not inside note elements
(3) Regex out chord and grace notes
(4) Regex out everything except durations and slurs

This will leave the minimum set of elements to be parsed, adding slurs to the map built by processing the object model. Does this seem reasonable or have I missed something?

In reply to by yonah_ag

Sounds reasonable. I'm not a regex expert and have not used it since my "Brief" (text editor) days...
EDIT: But will you still find the correct tick that way?
EDIT2: To be clear: I did everything by trial(s) and error(s). More or less arbitrarily I decided to use tick += duration at a “voice” line. To what element a duration in the musicxml file applies is not clear at first sight. It turned out that for certain elements (like slur) the tick was correct, but for others it was a duration too far. Needed corrections were applied in the check function.

In reply to by elsewhere

I only need the tick for slurs.

Regex is typically faster than loop processing in javascript so I will use it to cut down the xml to the tags of interest, i.e. durations (not in chords) and slurs, and then loop through these elements to find slur stop/start whilst calculating ticks, with the results being added to the map.

Initially I'll use a single track score, (1 stave, 1 voice), to reduce complications.

Do you still have an unanswered question? Please log in first to post your question.