Lute tablature note values incorrectly treated

• Oct 11, 2024 - 11:29

Is there a way to display note values correctly in lute tablature in Musescore 4? Musescore incorrectly shows either the note values of all voices on one stave or the note values of the top voice, not as it should, the shortest note values of all voices (as if written as one voice). See pdf file.


Comments

It's simple: Attempt to show rhythms in all 3 voices (or 4) has never been implemented. For good reason: lute tablatures, as I'm sure you know, display only one rhythm value (with flags, or other figures, according to the Renaissance and Baroque periods), that of the upper part (let's say the melodic part).

Everything else (whether or not to hold certain notes, whether or not a second voice enters at a certain point) is determined by the lutenist himself, by his experience and knowledge of the repertoire and lute playing.

The two-voices display (with the rhythm displayed above and below) has nevertheless been implemented in Musescore 10 years ago. Nothing more.

In short, you have to choose: either transcribe a lute score in standard notation (with the usual 4-voice availability, which is what I personally do quite often), or stick to a 1-voice lute tablature (as Sarge Gerbode does, for example, in French tablature). Or display the two ways is wished on the same score.

In reply to by cadiz1

I'm not sure I understand you. What I was hoping Musescore would do automatically was to convert many voiced staff notation into 1 voiced lute tab notation. I write the staff notation first, then copy it into a lute tab score. I assumed that Musescore would not attempt to show all voices in the tab, but instead would convert them into conventional lute tab practice (ie, effectively one voice with only the shortest note values shown on top of the stave). I can't find a way to convert my many-voiced staff notation into single voiced tab without having to laboriously re-write the staff notation as if it were single voiced, then copying that into the lute tab. I want to avoid that if possible. I also don't want to write into the lute tab stave directly as that is equally time consuming. I want one staff notation version (for eg guitarists, showing correct voice leading) and one lute tab version showing only the fastest note values, for lutenists. Is there a way to do this automatically when copying from staff many voiced to tab one voiced, and if so how, and if not, Musescore writers should implement it.

In reply to by Conall

Thank you for specifying your use case.
"What I was hoping Musescore would do automatically was to convert many voiced staff notation into 1 voiced lute tab notation"[...]
As far as I know, no program is capable of doing this. Just imagine: you have three voices with different note values in the standard staff, and the program would have to destroy the polyphony and rhythm of voices to keep the shortest note values.

What you can do, however, is export your score in MIDI format. In the import panel, you can, among other things, reduce the writing to 1 voice - image below.

import panel.jpg

But there will still be some editing (at best) to do before you change the staff type (back to Tablature). Unfortunately, the MIDI Import panel no longer exists in V4. Removed (for the moment at least), see: https://musescore.org/en/handbook/3/midi-import

In reply to by cadiz1

Hey, thank you Cadiz (muchas gracias!). I downloaded Musescore 3, exported my multivoiced M4 staff notation file as a midi file, opened it in M3, specified only 1 voice in the import panel. This produces a messy one voice file with loads of tied notes (the original voices that had notes longer than the shortest note in a measure / bar are simply changed to many tied short notes). I then exported that as music xml file, opened the original M4 score (that had a part in multiple voices in staff notation), added a lute tab stave, opened the messy 1 voice xml file in M4, copied that into the lute stave of the original M4 score. It works very well. I only had to alter a few bits and do the usual choosing of what fingerboard positions I wanted to have the tab in.
While the above sounds cumbersome and slow, it's a lot faster than having to completely re-write a multiple voiced staff score into a single voiced one. It probably saved me at least 1-2 hours! Thanks again. I may try to write the above process more elegantly/ succinctly with examples and post it on Facebook lute & Musescore groups.
For now it looks like Musescore 3 is better for lute (because of the midi import panel) than M4. I really hope the panel is re-introduced in future M4 updates.
It must also be a fairly simple process for a Musescore coder to implement the above process and add it to M4 as a new plug-in?

In reply to by Conall

"I may try to write the above process more elegantly/ succinctly with examples and post it on Facebook lute & Musescore groups."
Good idea. But post it on this thread first, it might be useful to other members of this MuseScore forum.

"For now it looks like Musescore 3 is better for lute (because of the midi import panel) than M4"
For everything concerning early music and lute tablatures, the code is strictly the same between V3 and V4, and even V2. The main features were implemented in Version 2, 9 years ago... :(
It's true that the absence of the MIDI import panel is extremely detrimental for these use cases. This is one of the reasons why I still use V3.

"It must also be a fairly simple process for a Musescore coder to implement the above process"
It's always what we think, what we say when you're not the one to implement it...:)

In reply to by Conall

If you're going to use MS3 then the conversion of 3 (or 4) voices to a single voice would be possible via a plugin.

Would it be as simple as taking the shortest note duration at any tick and changing every note, (in all voices), at that tick to the same duration and moving to voice 1, or are there other complications?

In reply to by cadiz1

The time position of any note (or rest) in a MuseScore score is expressed in ticks. The score starts at tick=0 and a single tick is 1/480th of a crotchet. So it's a relative time value since the actual duration of a crotchet in seconds depends on the bpm tempo.

Note lengths are also expressed in ticks. A crotchet has a duration of 480 ticks, a quaver 240 ticks, a dotted quaver 360 ticks etc. See https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/tickl… (where division = 480).

From experience with other pluguns I would expect some difficulty with tuplets but I'll start with simpler scores that have no tuplets to see if the idea is worth pursuing. Customised note starts, (bringing a note before or after the beat via piano roll editor), would definitely be problematic.

In reply to by yonah_ag

  1. Don't worry about tuplets/triplets. During the Renaissance and Baroque periods, binary time division was almost exclusive, and ternary division was only a passing exception, indicated only by a 3 (without a bracket) and placed inside and at the beginning of the measures passage concerned. In short, we're 95% in the clear on this front.
  2. I doubt that lute and guitar players use the Piano Roll for early music, so don't worry about that either.

In reply to by cadiz1

That certainly helps a lot.

A quick test, (based on the measures that you showed below), shows that this will be possible but it needs a bit more intelligence than simply selecting the shortest duration at each tick because the following tick can have implications for the previous, as seen in this first test where the red crotchets should be quavers.

VoiceMerge.png

Moving notes out of voices 2, 3, 4 leaves behind rests which I can easily remove on a second pass. So, it looks promising but I just need to work out the logic for rhythmic grouping. Any pointers would be welcome!

In reply to by cadiz1

The rests get left behind by moving notes to voice 1 but I can easily remove these with plugin code. I need to think about all the possible rhythm groups for the time signature and produce an algorithm to deal with them. So there will need to be some 'look ahead' rather than just dealing with every tick ('chord') in isolation.

In reply to by cadiz1

Question: the red notes, did you color them in before posting the image (probably?), or is it the plugin that “admits” and signals its failure by marking them in red? In the latter case, this would allow the user to see right away where there's editing to be done (another time-saver).

In reply to by cadiz1

Not really as I have made a quick and dirty test by shoe horning some code into the TAB Walk plugin so it's not standalone. I'll separate the code and upload something simple before next weekend. (Unfortunately my day job is getting in the way!)

In reply to by cadiz1

I think that I should be able to process by detecting overlap, (which clearly is not allowed in a voice merge), then reducing the duration of the chord at the previous tick accordingly. This detection is easy since I know the start tick of the notes and also their tick duration.

This sounds very promising and would not need a knowledge of the rhythmic patterns.

In reply to by yonah_ag

@yonah_ag

I can't remember ...

Did I PM you my workflow experiments with regard to merging multiple voices into one? I'd have probably sent it a few months ago.

Here's what I recall off the top of my head.

When two notes (in separate voices) coincide temporally:

   • you have to convert the note with the longer face value to the face value of the shorter one
   • then you can successfully move it into the desired voice

This inevitable leaves a trail of rests in one or more voices. As you mentioned it's easy with plugin code to identify rests and delete them, but I stumbled on an interesting discovery. When manually removing rests you can select the last rest in a measure and press Delete (backspace) until they're all gone.

If you're interested in my thoughts and experiments on devoicing scores I'll try to find my notes and example scores.

scorster

In reply to by scorster

The backspace deletion of rests is handy and one that I use as it's often quicker than rightclick-select-samevoice-delete.

As for voice merging notes, it's a little more complex than converting based only on shortest value. As you can see from the example above, (red notes), there can be a need to revise durations according to 'what comes next'.

I think that I have an algorithm that is simple and will work. I have started coding it in TAB Ring as I can make use of the existing mapping features.

In reply to by scorster

Note: TAB Ring has a mode which works with non-tab scores so this voice merger won't be limited to tab.

The obvious process after a voice merge for lute or guitar notation would be to add a tab stave so that string data can be made available, then TAB Ring could restore the sustain lost by merging to a single voice.

In reply to by yonah_ag

Plugin for testing.

This has been made as an extension of the TAB Ring plugin since lute tablature is a good fit but it could be made standalone if that would be beneficial.

The only option needed is Merge Voices, in which mode none of the other options apply, (i.e. there is no TAB Ring applied). The View Process Map option can be used to show the internal tables generated during processing and is for debug purposes. (This option also stops any score changes).

The plugin processes the first stave only and can handle all 4 voices. I use the second stave to hold a copy of the original multi-voice measures so that it's easy to compare with the merged result.

Warning! The merge process is very slow and this seems to be due to the MuseScore pad commands, possibly because of the amount of undo information that is generated. (Try pressing undo repeatedly and you'll see what I mean). The merge can be applied to selected measures or to the whole score.

Full TAB Ring user guide is here: https://sites.google.com/view/tab-ring/
If merge voices becomes released I will update the official plugin and the documentation.

TABRingMergeVoice.png

TabRing 1.4.6.qml

In reply to by yonah_ag

@yonah_ag

When finished TAB Ring's Merge Voices will be a remarkable tool, for:

     • simplifying notation—regardless of the end purpose
     • as a prep for cleanly exporting MIDI to a DAW
     • and for many easily imaged educational purposes

Merge Voices produces perfect results on a number of two-voice guitar pieces. (Yes, it processed somewhat slowly, but consider doing the same task by hand, and the many errors likely manually incurred!)

On others pieces the plugin generate mostly rests. I think those pieces had three or four voices. Will look into this further and post some examples.

Thanks so much for this!

scorster

P.S. Are the other settings inactive during Merge Voices? Since Merge Voices' activation button replaces the Apply Ring and Reset Buttons, I'm assuming not.

In reply to by scorster

The other settings are inactive during a voice merge. (Note: Voice Ring mode will be checked if the the score has no tablature but this option is not related to Voice Merge and, in any case, it will be inactive.)

Getting mainly rests indicates that the merge failed and left behind the rests that MuseScore creates when you shorten any note duration. (Use the undo command repeatedly on a successful merge and you will see all the rests. Maybe this contributes to the slowness since these all go onto the undo stack individually.)

I'll be able to debug when you post some examples. Mscz files would be appreciated as I'm very slow at entering standard notation.

I haven't done any testing with ties, rests or triplets so these are likely to have issues.

When the duration algorithm cannot assign a known duration then it defaults to a 1/64th note.

In reply to by Conall

MIDI import is rarely a very good way to enter music into a notation software, but for the cases where it cannot be avoided, and for whatever reason you cannot quantize or other santize it in a DAW first, you can use the import panel to import the MIDI file, then save the score and load it into MU4 to taker advantage of the major improvements and bug fixes there.

This would be possible via a plugin in MS3 by adding intelligent voice merging to the TAB Ring plugin, (which would preserve your polyphony and rhythm). This would not yet be possible with MS4.

In reply to by yonah_ag

The OP doesn't want to preserve the rhythm of Voices 2 and 3, as here:

poly1.jpg

but to overall this rhythm with the shortest note values, as is the case in the lute repertoire.
Note values are completely erased, and it's up to the player to rebuild it when playing.

poly2.jpg

In reply to by cadiz1

Yes, I appreciate that is the case. This is exactly what a voice merge would do. Presumably the notes are supposed to sustain as per the standard notation. This is what TAB Ring does.

In fact I can't see any rhythm changes in your example, only note duration changes.

Here's a simple example of TAB Ring processing. You can hear the note's in voice 1 sustain properly after TAB Ring has been applied, and way beyond their written duration. This would work equally well if this score was collapsed to a single voice.

https://musescore.com/user/28842914/scores/13203472

This works with any tablature stave.

In reply to by yonah_ag

Hello everyone! My name is John, and I create YouTube videos and music using AI tools. I'm currently working with AudioModify and always on the lookout for new tools to help enhance my work. Has anyone here made music with AI? I'd love to hear your experience, as I'm building a business in this field.

In reply to by yonah_ag

Hey! Thanks everyone for their interesting input (except the off-topic guy...).
A plug in is exactly what's needed. The exporting as midi and importing into Muse3, specifying 1 voice only, does work, or has done so far anyway. Inevitably there's some tweaking involved and it's specifically useful for copying into lute tab staves (or guitar tab I guess).
But a plug in that does the job well, producing a score minus millions of ties might be useful for other applications too.
We still need a midi import panel in M4 though rather than having to rely on M3.

In reply to by Conall

+1
I had time this afternoon to test this plugin further, on 4 scores. Indeed, this plugin does the job! The triplets don't work, but since that's rare, it's not a problem. Ties are sometimes kept, other times not, I haven't yet really found out why. And it's not really a problem too.

But then again, that's nothing compared to the completely messed-up state of MIDI scores when you reduce them to a single voice. I spent a lot of time a few years ago wrestling with these scores to correct (I even set up a personal and efficient process...), but I really wish I'd had this plugin at my disposal at that time. It would have saved me a lot of time and a few headaches!
I need it less now, but thanks again for putting this plugin in place. 👍
NB: for the record, the only thing that surprised me was the reaction time. I even thought the plugin didn't work on 2 scores, but in fact it did! You just have to be patient and wait a few more seconds. 😎

In reply to by cadiz1

I am so used to plugins working in-the-blink-of-an-eye that I was shocked at how slow this one is. If I switch off the pad-note commands then it runs instantaneously so they are definitely the culprit - but they are the heart of what's needed!

Perhaps if I could disable the undo stack it would be quicker. I just don't know and it's quite frustrating. I have looked for other plugins which modify duration some other way but haven't found one.

If you can post an example where ties get messed up then I'll look at fixing it. There is nothing in the code to actively remove ties so it must be an unintended side effect of something else => a bug! It might not be a big deal in practise but I don't like releasing buggy code.

In reply to by yonah_ag

I'd have to look into the matter, as it may be useful to keep them sometimes (sorry, I don't have the time to list everything in detail), but my first idea would be to find a way of removing them all, so as to have a clean rendering.
If it's easier to remove them all, go for it...
But then again, this plugin suits me just as it is.

In reply to by yonah_ag

Ok, lighter plugin, perfect for the use case. Thank you. For some reason, not all voices are merged into a single voice 1. But the most important thing is that their duration corresponds to voice 1.
On the other hand, as I said, you need to “clean up” the ties, which means deleting the tied notes.
I've attached the MIDI file if you'd like to try it out: Fantasia_12_-__Luis_Miln.mid

  • MIDI file
    mess.jpg

  • After applying the plugin
    etape2.jpg

In reply to by wolfgan

Re: wolfgan • Oct 26, 2024 - 17:10
"something like this"
It's a direct consequence of deleting tied-to notes so maybe hiding will work better. I think that in strict notation 2 of my ties were not needed so I was also using unrepresentative notation.

In reply to by yonah_ag

"I'm guessing that that this is not quite correct. What should it look like?"

Indeed, the display of all this rests is not the expected result :(
When you open the previously attached MIDI file, and in the import panel, in the “Max. Voices” tab in the import panel, you set it to a single voice, you get this (standard staff) - image below.
test plugin.jpg

As you can see, it's a mess with all these ties. And yet, by some kind of miracle (!), when you copy the result to a TAB staff, everything lights up and the note values are correct.
In fact, when you compare the two staves, it's as if the ties and tied notes were not deleted (i.e. with the rests that don't fit) but hidden.
In fact, ideally, the plugin should be able to do the same thing: detect ties and tied notes and hide them (not delete them). This would give us the result shown in part B (in standard notation) of the image below.
Let's face it, the result is much more neat!

hiding.jpg

In reply to by Conall

@Conall
If you copy the resulting single voice notation to a tablature stave and fix string/fret numbers where required, you can then use the main purpose of the TAB Ring plugin to restore the playback sustain lost by voice merging. (You need to move the tablature to be the first stave for this process but you can move it back afterwards).

In reply to by yonah_ag

Hi everyone & thanks for your contributions.
I didn't try the plug in, but the midi import method works via Musescore 3 - except for triplets. I'm not concerned with sound as much as the look of the tab score. See the attached file for examples using the process. I did have to change staff clef to treble clef with 8 underneath (sounds an octave below written, as customary in guitar music and lute staff if only one clef is used rather than treble & bass. RE: triplets I changed those by hand. If there are many of these it would probably work better to change time signature to compound.

In reply to by Conall

So the method is pretty easy:
1. Write multiple voiced music in staff notation
2. Export as midi file
3. Open in Musescore 3. In midi import panel specify 1 voice only (under "Max Voices" ) then press apply. This results in a messy looking staff notation file with all voices made into one and including loads of ties. You may have to change to guitar clef (treble clef with 8 underneath).
4. In Muse 3 add lute tab stave, copy messy staff 1 voice version into it.
5. Edit for triplets (if there should have been some) and edit course / string choices as desired. Save it as Musescore file.
6. If you prefer Musescore 4, open the above in M4. But watch you won't be able to open it in M3 again if saved in M4.

In reply to by Conall

The plugin method is:
1. Write multiple voiced music in staff notation
2. Run the plugin, resulting in a clean, single voice notation stave
3. Add a lute tab and copy/paste the notation stave
4. Edit for triplets

So there are now at least 2 options for use with MS3.

It would probably be worth keeping a separate copy of the original multi voice notation for use with other instruments.

In reply to by Conall

As mentioned, and through no fault of its own, the TAB Ring plugin runs only on MS3 thru MS3.7

Install the .qml file to the MS3 plugins folder.

The following instructions appear at the bottom of the TAB Ring documentation page:

Installing TAB Ring

Download TABRing.qml from MuseScore's plugin forum and move it to your MuseScore Plugins folder, as defined in:

      MuseScore > Edit > Preferences > General

For more details see the MuseScore 3 Handbook section on plugins.

In reply to by yonah_ag

@yonah_ag

• The new Merge Voices standalone plugin worked perfectly on an extensive two-voice Fernando Sor piece!

• On the Carcassi (above) the plugin still places unisons in Voice 1.

• I'd recommend constraining the bottom of the Process Map field a fixed distance from the bottom of the window, so the Process Map field resizes when the user changing the height of the plugin window.

Keep up the good work!

This plugin is already quite useful to me.

scorster

In reply to by scorster

• I have an update almost ready which should process tied notes and I have just found a major bug: whilst the plugin does process all 4 voices, it only processes the first note of each chord. Oops! This was not evident from early samples because there were no chords.

• Re Unisons placed in voice 1: surely this is correct since this is one of the plugin's main objectives.

• Do you mean the bottom of: the MuseScore window, the plugin's UI dialogue or the plugin editor window? I don't understand the goal here.

The map window is supposed to be as tall as possible. I could go for 1200px on my monitor but left it at 800px for better compatibility. Maybe I could go for 1080px.

(Note: the map window does need to be wider to stop wrapping of column data when tick numbers reach higher values.)

In reply to by yonah_ag

yonah_ag wrote >

> • Re Unisons placed in voice 1: surely this is correct since this is one of the plugin's main objectives.

Not sure I follow. One of the unison notes came from Voice 1. The other from Voice 2.

When merged I would think Voice 1 should only hold one of those notes, while the other is safely discarded. Right?

> • Do you mean the bottom of: the MuseScore window, the plugin's UI dialogue or the plugin editor window? I don't understand the goal here.

I meant the plugin's UI dialog. Sorry if I was unclear. And I misspoke regarding the Process Map. I meant to refer to the field that shows automatically and display's Voice Merge 1.0 in its first line.

When I increase the height of the plugin's UI window the bottom of that field doesn't automatically shift downward along with the bottom of the plugin's UI window. So I see this:

Progress field with an unconstrained lower edge.png

And I don't see a handle for manually adjusting the field height.

Lastly, what do you can that field?

In reply to by scorster

Unisons: Ah! I see now. Yes, I should discard one of the unisons. Will have to wait for v1.2.

The information field is probably not needed and has its origins in TAB ring. It shows the number of note updates made after processing, (which also show that the process has finished), but it might as well be removed.

Why would you want to increase the height of the UI dialogue? There is nothing else to show.

Strange how different the UI is rendered under MacOs. Here's the Windows version:

MVWin.png

In reply to by yonah_ag

Version 1.1 : Chords and Ties

This version processes chords and handles ties. I tried hiding ties but it was only a partial success because Musescore deletes ties when a note is shortened - which is how the plugin works, i.e. by shortening notes. So the consistent way to handle this is to remove tied-to notes, which obviously don't denote a beat in playback anyway.

This will result in some rests in voice 1 which I can take at look at for v1.2

MergeVoices 1.1.qml

In reply to by cadiz1

All the notes are now in Voice 1, which is really great. There's still a little difficulty with the ties, when they were (and notes) in another voice, Voice 3 (orange color, in MuseScore) and Voice 2 (green). But maybe I'm nitpicking!
orange.jpg
vert.jpg

In reply to by cadiz1

There should be absolutely no ties in the result so this is indeed odd.

If you can upload this as a .mscx file then I'll take a look. My notation entry is so slow, (especially with all those sharp, flat and semi-sharp symbols), that it would take frustratingly long.

It's not nit-picking; it's useful feedback for improving the plugin.

In reply to by yonah_ag

yonah_ag wrote >

> Unisons: Ah! I see now. Yes, I should discard one of the unisons. Will have to wait for v1.2.

Excellent. I'll watch for v1.2

> Why would you want to increase the height of the UI dialogue? There is nothing else to show.

After running the plugin a third line displayed in the field AND a field scroll bar appeared. That's when I resized the plugin height ... because I thought scrolling or resizing might reveal more information..

Regarding your final comment: Initially the dialog (on MacOS) looks the same as the image you posted. The image I sent was after I had resized the plugin UI window.

In reply to by yonah_ag

Here the 3rd line said Updated: x ... so I imagine it's just a count of the changes made.

Would it be better just to dump this info box?

I think you could dump the dialog—though I always like seeing the plugin's version number plainly advertised in its UI. Is it possible to put that in the Title bar?

In reply to by yonah_ag

I tested v1.2 on the following score. The goal was to merge the voices of the piano part's treble staff into an easily readable melodic line.

The steps were:

     • Start with the piano score
     • Add a solo treble staff
     • Position it as the top of the system
     • Copy the piano part's treble staff and paste it into the new staff
     • Run the Merge Voices plugin on the contents of the new staff
     • Optionally, I then created Parts (one for Piano and one for Mandolin)

I'm extremely happy with the result ... and the amount of time it saved me!

At certain points I would impart arranger's decisions, such as eliminating the C# from the opening quarter diad.

scorster

https://musescore.com/user/35880724/scores/21529054/s/FqCsCI

In reply to by scorster

New file test this morning: completely meets my expectations.You just have to wait a little: 40 seconds on a file barely two pages long. But this is purely an insignificant detail when you know. The messy mess of MIDI import is magically cleaned up. And for that alone, our sincere thanks.

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