A Down and Up Bow Tracker
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
Sounds like this would be a good idea for a plug-in.
I'll definitely use it after you write it. :-)
There are articulations you could add
In reply to There are articulations you… 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 I believe (OP: please… 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 I wasn’t necessarily… by Heterogina
That would require automation. :-)
In reply to That would require… by TheHutch
Oh, lol 😂. I know nothing about writing a plug-in, I’m just hoping that my idea could come to fruition.
In reply to Oh, lol 😂. I know nothing… 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 I must ask, how would… 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 I honestly couldn’t tell you… 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 Which brings us to the job… 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 I disagree that bow marks… 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 You might recall I told a… by bobjp
Sorry if I misinterpreted what you were saying. I'm not sure what you mean about no one ever playing your pieces though.
In reply to I disagree that bow marks… 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 That doesn't happen though -… by Dylan Nicholson1
The plugin development is in progress - with a fair number of assumptions being made! Updates are being posted at the end of this thread.
In reply to I wasn’t necessarily… 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 If I understand, you want a… by scorster
You're a genius! This is exactly what I wanted. And I think a way to get past the problem of different bow strokes in repeats would to add a bow lift at the end of the phrase.
In reply to You're a genius! This is… 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 Who are you writing for - is… 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 Elaine Gould's advice in … by SteveBlower
Indeed - spot on.
In reply to Elaine Gould's advice in … 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 In a larger ensemble, you… by TheHutch
That doesn't happen though...it's always worked out beforehand by the concert master/section principals.
In reply to Elaine Gould's advice in … 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 That can apply to solo music… 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 Who are you writing for - is… by Brer Fox
Yes, I actually am writing for a high school orchestra.
In reply to Yes, I actually am writing… by Heterogina
Interesting. Here a simple plugin is considered. On the forum of a another notation software, they speak about Artificial Intelligence to achieve this.
In reply to Yes, I actually am writing… by Heterogina
Heterogina; I assume you are directing this, also. Then just like any director anywhere, you get to work with the group and decide what is the best bowing for everyone.
As usual, Elaine is only partially correct.
In reply to Heterogina; I assume you are… 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 I’m not directing, I’m in… 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 Heterogina wrote > "I feel… by scorster
Thank you so much for clarifying what I wanted! It’s like you’re reading my mind. All I wanted was to see what note has what bow stroke without going back to the beginning of the phrase to figure it out.
In reply to Thank you so much for… by Heterogina
Glad I was able to clarify.
I think it's great that you came up with such a simple yet innovative idea! I hope to see it in action someday. Time permitting, I may be able to help facilitate.
scorster
In reply to Glad I could clarify. I… by scorster
Definitely looks pluginable but I'm not quite sure if plugins can see note on-click events so it may need a little more.
Edit: I think I already have a plugin which detects on-click so it must be possible.
In reply to Definitely looks pluginable. by yonah_ag
Example code: onScoreStateChanged: { viewNote(); }
So write a showBow() function instead of this examples viewNote().
In reply to Example code:… by yonah_ag
@yonah_ag
If you can get a foothold I'd be glad to assist!
scorster
In reply to @yonah_ag If you can get a… 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 If you can codify the rules… 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 Off the top of my head: a)… 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 Ties also act as slurs but… 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 Thanks! I updated my post… by scorster
There’s not a stagger bow marking. I tried putting an up bow with parenthesis around it, but Musescore doesn’t have a parenthesis option for bow markings :(
In reply to Thanks! I updated my post… 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 I never knew there was a… by TheHutch
Yes, most of stagger bowing is implied, but every time I see it marked it’s with a bow symbol with parentheses around it.
In reply to Yes, most of stagger bowing… by Heterogina
This is in the Master Palette.
In reply to This is in the Master… by bobjp
You may be thinking of this.
In reply to This is in the Master… by bobjp
Oh, I didn’t know that.
In reply to Off the top of my head: a)… 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 Scorster: Here's a beginning… 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 What is a Section? MS scores… by yonah_ag
It would be very helpful to have a bow direction on the first note after any jump, otherwise the score would have to be processed for 'jump structure', (repeats and voltas), and the segment processing would have to follow this jump structure.
In reply to What is a Section? MS scores… by yonah_ag
It's late here ... so I'll reply to the one question: What is a Section?
In the context of this discussion—and with regard to orchestration in general—a "section" refers to a group of like instruments, such as the First violin and Second violin sections.
In reply to It's late here ... so I'll … 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 Maybe to start with it would… 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 yonah_ag wrote > Maybe … 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 Thanks. To confirm: the… 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:
... and these symbols are in MuseScore 3's Articulation panel, as shown at the left side of its bottom line in the following image:
@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 @yonah_ag > ...the arrows… by scorster
Here's an example of a Tracker window showing the direction of the E note in Measure 3
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 Here's an example with the… by scorster
Thanks for clarifying. How do pizz notes affect bowing?
(It seems a bit odd that a down arrowhead is the bow up symbol and that the bow down symbol is not an inverted bow up symbol.)
In reply to Thanks for clarifying. How… by yonah_ag
Pizz. notes do not affect bowing since you’re using your finger to produce the sound instead of the bow. It is assumed to play a down bow when exiting pizz. unless stated otherwise.
In reply to Thanks for clarifying. How… 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 pizz is down with a finger… 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 “ It's terrifically odd that… by Brer Fox
@Brer Fox
Re "It’s much more practical for the player the way it is."
A reprise for the monks then. There's always some wisdom behind these choices. Thanks for sharing.
In reply to Thanks for clarifying. How… 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 Here's an example with the… 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 @yonah_ag > ...the arrows… 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 It's late here ... so I'll … 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 Negative. In my pseudo-code,… 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 Negative. In my pseudo-code,… 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 What is a Section? MS scores… 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 Down bow on violin, and on… 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 Yes, scorster. That's a… 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 OK. I think that there is… 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 Because pizz. and arco. are… by TheHutch
@TheHutch
Please re-read this page from the handbook: https://musescore.org/en/node/50196
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".
In this example I have attached pizzicato to the stave text "banana":
In reply to @TheHutch Please re-read… 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 yonah_ag: Re: 'The actual… 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.
Chord Properties
(2) The channel change property within the staff text element
In reply to I have been investigating… 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 I'm confused, yonah_ag… by TheHutch
[.]
In reply to OK. I think that there is… 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
In reply to re 1): Can you access the… by scorster
Leland is compiled into Mu3 too, as or 3.6.0
In reply to re 1): Can you access the… by scorster
@scorster:
Thanks for these codes. My Tab Bold plugin offers Leland in its font list so this will be good to use. Failing that I can use your SVGs from QT, (I can load them both and just show/hide as required).
In reply to Thanks for these codes. My … 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 It occurs to me that we are… 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 It occurs to me that we are… by TheHutch
There is a bow lift symbol. In the breaths and pauses tab, it looks like an apostrophe. I don’t know if other versions of Musescore has it but Musescore 4 does!
In reply to There is a bow lift symbol… by Heterogina
Does a bow lift symbol have any effect on the next bowing direction?
In reply to Does a bow lift symbol have… by yonah_ag
It is assumed that when you lift your bow to go to a down bow unless marked otherwise. Usually when you lift your bow it’s because your bow is ending on a down bow and the composer wants the next phrase to start down as well.
In reply to It is assumed that when you… by Heterogina
Just out of interest: does a note sound different between up and down bowing?
In reply to Just out of interest: does a… 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.
In reply to Just out of interest: does a… by yonah_ag
Yes they sound different.
But if you ask Hilary Hahn she can perfectly make her down sounds like up and vice versa...
In reply to Yes they sound different… by frfancha
And sometimes you want to exploit the natural balance of the bow which is light at the tip and heavier at the heel - it’s easier (more natural) to do a long diminuendo on a down-bow, or a long crescendo on an up-bow.
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:
Looks like this in the MSCX file and the score object model should match:
The articulation and channel information is clearly visible.
In reply to I have found the elements by… by yonah_ag
Musescore allows multiple articulations on a chord so I propose to check only the first one. In this example I have stacked a bow up and a bow down:
In reply to Musescore allows multiple… by yonah_ag
@yonah_ag,
Sounds like you're making good progress!
Here's my take on inferred bow direction—i.e., after a string player stops or lifts the bow and the scorist has made no explicit instruction on arco resuming bow direction.
https://musescore.com/user/35880724/scores/17048449
In reply to @yonah_ag, Sounds like you… 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:
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 The key thing about bow… by TheHutch
I hesitate to join in, but maybe you should allow an override or something to the above. What about a passage like this - beat one of a bar is not necessarily always a down bow.
In reply to I hesitate to join in, but… 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 In your example, the… by TheHutch
In reply to I hesitate to join in, but… by Brer Fox
TheHutch wrote > In your example, the sixteenth note C (first note, first measure) would normally be played with a down bow
I disagree. On reading the passage Brer Fox posted I'd assume an up bow direction inferred on the very first note (the middle C note in question). As shown in the last measure of the score at this link.
In reply to In your example, the… 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 My intention is to work back… 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 yonah_ag asked > Is it… 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 Yes, current note = selected… 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 Yes, current note = selected… 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 Musescore allows multiple… by yonah_ag
I don't think we need to concern ourselves with the impact of "simile," as it appears to be unsupported in MuseScore
https://musescore.com/user/35880724/scores/17245588
In reply to I don't think we need 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.
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 Sorry, scorster and yonah_ag… 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 TehHutch wrote > In 4/4, the… 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 I disagree. There is a… 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 @theHutch At this point I… 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 The difficulty is that there… by Brer Fox
Indeed, see https://musescore.org/en/node/364096#comment-1242217 and https://musescore.org/en/node/364096#comment-1242267 much earlier in this thread.
In reply to Indeed, see https:/… by SteveBlower
Maybe a plugin is not practical after all.
In reply to Maybe a plugin is not… 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 It may not be practical for… 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 Since this plugin will be… 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 Since this plugin will be… 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 I believe up and down bows… 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:
• 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 Heterogina • May 21, 2024 -… 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 Ok, I will clarify. What I… 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 OK so for (1) we now have… 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 1a, b, c) You're spot on! 1d… 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 1d) More time signatures are… 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?
4a) Phrases would qualify as "style". If we're ignoring that, we can just skip that step. (At least for now!)
In reply to 1d) Since we're ignoring… 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 Re: TheHutch • May 23, 2024 … 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 1d) Since we're ignoring… by TheHutch
4b) Yep!
In reply to Since this plugin will be… 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 yonah_ag, I think your… by bobjp
@bobjp, You are spot on. I think that part of the problem is that I don't know about bowing and that Heterogina does not know about programming so we are having trouble communicating in a common language.
In reply to yonah_ag, I think your… 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 bobjp > Seems to me that… by scorster
scorster "Looking to the start of the previous measure would likely be insufficient."
Maybe, maybe not.
In reply to scorster "Looking to the… by bobjp
bobjp wrote > Maybe, maybe not.
Exactly. That's my point.
In reply to bobjp wrote > Maybe, maybe… by scorster
All I said was that it might be enough. Might. It depends on many things.
In reply to It may not be practical for… 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 Sorry, scorster and yonah_ag… 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 Sorry, scorster and yonah_ag… by TheHutch
@TheHutch:
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?
In reply to @TheHutch: Re: "A rest or an… 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 There's enough info to start… by yonah_ag
Didn't you find the articulation in the xml? Can you not look at the xml text from the plug-in?
In reply to Didn't you find the… 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 I did. That confirmed that… 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 A plugin can read the mscx… by elsewhere
I know it can. I have used this technique when there was no other option but in this case, since there is a workaround, it would be a sledgehammer to crack a nutshell. Parsing an xml file takes quite a bit of coding.
In reply to I did. That confirmed that… by yonah_ag
yonah_ag:
I stumbled onto this thread topic that seems to be about accessing the articulations through the API:
How do I get staffIdx and tick information for Articulation, Arpeggio, Dynamics, etc?
https://musescore.org/en/node/350125#new
However, I saw you posted in it quite a few times, so presumably you already know about it. Just wanted to point it out, in case it's helpful.
In reply to yonah_ag: I stumbled onto… 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.
The output is a table of score elements displayed in a popup window.
• Test Score:
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 Plugin Progress Update •… by yonah_ag
Got 112:-1: TypeError: Cannot read property 'type' of null
with (pretty wild) attached (a 2 stave score) Running MU3.6
In reply to Plugin Progress Update •… 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.''
And sometimes the plugin produces no report, and no report popup window.
scorster
In reply to Plugin Progress Update •… 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 Fix to both of the above in… by yonah_ag
Does this only work with MU3?
In reply to Does this only work with MU3? by Asher S.
I only use MS3 so I don't know whether it works with MS4's plugin API.
In reply to I only use MS3 so I don't… by yonah_ag
Even if it did, I wouldn’t know how to install it.
Tbh, I’d probably be smarter than it anyway :P
In reply to Even if it did, I wouldn’t… by Asher S.
Plugins are not smart: they rely totally on human intelligence but they do tend to be faster than humans.
In reply to Plugins are not smart: they… by yonah_ag
I mean, I’m a cellist, I wouldn’t really have much purpose for it.
In reply to I mean, I’m a cellist, I… by Asher S.
Don't cellists have up and down bowing? Is this just for violinists?
In reply to Don't cellists have up and… by yonah_ag
Yes, they do. But I wouldn't need the tracker--I don't need any help to figure out the bowings.
In reply to Fix to both of the above in… by yonah_ag
I confirm no more bomb. Output now looks like this (as you probably know):
In reply to I confirm no more bomb… by elsewhere
All those "undefined" values are not right. Notes should have a tick value and a note name.
Next iteration soon...
In reply to I confirm no more bomb… by elsewhere
When I run your RavelSample with 0.0.6 I get this output:
I am running MS3.7.
[Edit] Note type shows as 20 in your score but 21 in mine. Very odd. 😳
In reply to When I run your RavelSample… 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 Weird. I tried again running… by elsewhere
What version of MS are you running?
The table is essentially a console log but written as html.
In reply to What version of MS are you… by yonah_ag
version 3.6.2.548021803
revision: 3224f34
How can I 'read' the table?
In reply to version 3.6.2.548021803… by elsewhere
The table is as shown in the popup window. It's simply the output that we've both posted pics of. I'll try with 3.6.2 as I still have it installed.
In reply to version 3.6.2.548021803… by elsewhere
Well that explains it. In 3.6.2 notes are type 20. 😲
I need to dig deeper into this.
In reply to Well that explains it. In 3… by yonah_ag
Looks like using an enum rather than a literal number will solve this.
See https://musescore.org/en/node/364675
Plugin Update 0.0.7
Use enumeration for element types.
Works with MS3.6.2 and MS3.7.
MapScore.qml
In reply to Plugin Update 0.0.7 Use… 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 Confirmed! 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.
Plugin Update 0.1.0 - Bowing Map is now functional
In reply to Update 0.1.0 - Bowing Map is… by yonah_ag
Good news: bowing map runs in 6 sec!
Debug: run: 6076ms
In reply to Good news: bowing map runs… by elsewhere
On the 750 measure score?
In reply to On the 750 measure score? by yonah_ag
Yes! But does it detect the bowings?
EDIT
To be clear I timed the function mapScore
with console.time("run") at the beginning & console.timeEnd("run") at the end
In reply to Yes! [inline:mapscore.png] 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 It detects notes and rests; … by yonah_ag
Great. The plugin goes sequentially: voice after voice, staff after staff
In reply to Great. The plugin goes… by elsewhere
I will have to identify the correct stave so that there is no crosstalk. I'll get it working on single voice, single stave score first as it's simpler. Is multi-voice normal for bowed instruments?
In reply to I will have to identify the… by yonah_ag
Good plan. Multi-voice is certainly unusual but look at the attached, and think string quartets. I'm a pianist and no bowing expert. That you switched voices you can deduce from the fact that the tick is back to 0.
6-violin-sonatas-partitas_Part10.pdf
EDIT I take that back. You can't bow up and down at the same time, and looking at voice 1 should be sufficient.
In reply to I will have to identify the… 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 According to Newretrograde… by elsewhere
Track, StaffID and voice are all basic score handling properties for plugins.
Not sure if you are a plugin writer but if not (yet) then there is good documentation for the plugin API here: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
In reply to I will have to identify the… 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 I've updated my test score… by scorster
See 0.1.1 below. It only processes track 0, which is voice 1 of the first stave, so the second voice will be completely ignored.
[Edit] See also 0.1.2
In reply to I've updated my test score… 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 The small note with a… 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 That's an "acciaccatura". It… by TheHutch
I don't have a grace notes palette. If it does not affect bowing direction then I need to detect that it's not a 'real' note otherwise it will cause a change in bowing direction. It's a pity that its element type is the same as a normal note.
Plugin Update 0.1.1
• Separate function for optimised bowing mapping.
• Only processes first track.
• Added console.log timing.
MapScore.qml
In reply to Plugin Update 0.1.1 Separate… by yonah_ag
Update 0.1.2
• Process first track when Bowing Elements is selected.
• Process all tracks when All Elements is selected.
MapScore.qml
Plugin Update 0.2.3 - Algorithm 1
Use option Bowing At Tick
Legend: up, down, pizzicato, rest, x unknown
Bowing.qml
Plugin Update 0.3.0 - Algorithm 2
Option to add bowing debug texts to score.
Use undo to remove them.
Bowing.qml
In reply to Plugin Update 0.3.0 -… 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
Plugin Update 0.4.0 - Ties & Breaths
• Added code for ties & breaths
Bowing.qml
In reply to Plugin Update 0.4.0 - Ties &… 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 Nice! I’ve noticed a few… 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 It's a computer program so… by yonah_ag
Oof, hopefully the plugin interface gets re-added in MS4 soon.
In reply to Oof, hopefully the plugin… by Asher S.
It won't help with any 'intelligence' and if slurs are still defined the same way in MS4 then they will still be a nightmare.
Have you formulated a definition to code more 'naturalness' into the bowing plugin?
In reply to Oof, hopefully the plugin… by Asher S.
You can still write and run plugins that work with MS4 but it's very limited.
In reply to It's a computer program so… 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 BTW it's not true that slurs… by Dylan Nicholson1
I am only talking about access to slurs via the plugin interface. I am not working on any core development. If you have a method for detecting a slur at a note tick in the plugin interface then I would be most grateful if you could share it.
In reply to Plugin Update 0.4.0 - Ties &… 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:
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 There does not appear to be… 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 I had thought you were… 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 There does not appear to be… by yonah_ag
Try my plugin https://musescore.org/en/project/musicxml-parser
It finds slurs & more. Feel free to adapt the code to your needs. I make no claims of 'ownership'.
In reply to Try my plugin https:/… 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 Try my plugin https:/… by elsewhere
Can you add tick to the output?
In reply to Can you add tick to the… by yonah_ag
Change
output += s + " found at measure " + result.toFixed(2) + " in voice " + voice + "\n"
to
output += s + " found at tick" + tick + " in voice " + voice + "\n"
In reply to Change output += s + " found… by elsewhere
Is the tick value calculated correctly when there are multiple notes (chords) at the same time point in the score?
In reply to Is the tick value calculated… by yonah_ag
Yes. In musicxml < chord /> signals chord notes and I ignore their duration (and also duration of grace notes).
< /note > signals the end of this note and chord is set to false (as documented in the code)
In reply to Yes. In musicxml signals… by elsewhere
I think that I might as well abandon my object model processing and parse xml instead, especially as I need it for slurs. I have found this very useful document: https://www.w3.org/2021/06/musicxml40/tutorial/
In reply to Yes. In musicxml signals… 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 Looks like I can take the… 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 Sounds reasonable. I'm not a… 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.
In reply to There does not appear to be… by yonah_ag
[redacted]
Waiting for feedback from OP (Heterogina) before investing any more time in development.