Skip to main content


This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Opagust

General Discussion / Re: Question for musicxml experts: representation of flow directions
Well, it seems I did kwew it back in 2021 :o .
Here's what I found in the coding I wrote for the musicxml to Noteworthy  convertor:

Code: [Select · Download]
def convert_tag_direction_end(element):
    object_line = {
        'dynamic': '|Dynamic|Style:mp|Pos:7',
        'dynamic_variance-sfz': '|DynamicVariance|Style:Sforzando|Pos:7',
        'dynamic_variance-rfz': '|DynamicVariance|Style:Rinforzando|Pos:7',
        'dynamic_variance_text': '|Text|Text:sfp|Pos:7',
        'segno': '|Flow|Style:Segno|Pos:8',
        'coda': '|Flow|Style:Coda|Pos:8',
        'D.C. al Fine': '|Flow|Style:DCalFine|Pos:8|Justify:Right',
        'D.S. al Fine': '|Flow|Style:DSalFine|Pos:8|Justify:Right',
        'D.C. al Coda': '|Flow|Style:DCalCoda|Pos:8|Justify:Right',
        'D.S. al Coda': '|Flow|Style:DSalCoda|Pos:8|Justify:Right',
        'To Coda': '|Flow|Style:ToCoda|Pos:8|Justify:Right',
        'D.C.': '|Flow|Style:DaCapo|Pos:8|Justify:Right',
        'fine': '|Flow|Style:Fine|Pos:8',
        'pedal': '|SustainPedal|Pos:-11|Wide:Y'

Object Plugins / Re: PrintConfiguration (0.1)
Thanks! (maybe I use local staffName = staff.AddStaff.Opts.Name.Text or staff.AddStaff.Opts.Name ...).This nested Text objects baffled me anyway, but it is there in my 2.75a.2


That seems a bit neater. It's been a while since I last programmed in lua, I'm in love with Python now, but that's the way I would write in Python too.
Object Plugins / Re: PrintConfiguration (0.1)
Hi Heinrich,

I got this error when I ran the user tool:
C:\ProgramData\Noteworthy Software\nwc2\UserPlugins\PrintConfiguration.hmm.nwcuser.lua:145: attempt to concatenate local 'staffName' (a nil value)

When I removed the '.Text' at the end of line 142, the error didn't occur any more.
But I think it has to do with the version of nwc (mine is 2.8 beta 1).
So maybe this is the best solution:
Code: [Select · Download]
    local staffName = staff.AddStaff.Opts.Name.Text
    if staffname == nil then staffname = staff.AddStaff.Opts.Name
That works for me.
Are you certain you uploaded the new file to your website? I downloaded and reinstalled the program, and I'm getting the same behavior as before.
Shame on me :-[ !
I downloaded and reinstalled it myself and you're absolutely right.
I suppose I forgot to push te save button after uploading the new version.

I now have changed the version number to, uploaded this version to my website, pushed the save button, then downloaded and reinstalled it on my computer and tested it on your file and it seems now to be OK.
I sincerely hope you agree with me.
I'm seeing the correct slur handling for the sample file I sent you, but I'm getting the same mangled |Text and |Tempo objects as before (line break inserted before |Pos)
Edit: My bad, I just realized that the sample file I sent you already had the line breaks stripped out  :-[  Let me forward a copy of the original XML that hasn't been fixed.
Hi Mike,
Let this be a comfort for you: I also made a mistake. I tested on '/n' instead of '\n'.

Version 1.1.1 is now updated.
A great tool - very helpful right now for getting (parts of) PDFs via Audiveris to NWC, for my crank organ arrangements.

I have another problematic MXL file; Audiveris already stumbles on many things in the score, creates a "corrupted" MXL, which I could load into MuseScore and then "beautify" a little. However MXML2NWC then exits with an exception ... I have attached the error message and the MXL file - hopefully you can see what the problem is!


The error is caused by these elements in part 'P1':
Code: [Select · Download]
    <measure number="36" width="187.79">

The 'sign' and 'line' elements are used to determine a key for this dictionary in my program :
Code: [Select · Download]
    'G,2': 'Treble',
    'F,4': 'Bass',
    'C,3': 'Alto',
    'C,4': 'Tenor',
    'percussion,None': 'Percussion'

So 'F,5' is an invalid key.
IMHO this can be caused by:
  • The score has a bass clef positioned one line above the 'normal' bass clef. NWC does not support it, neither does my program.
  • Or: Audiveris incorrectly read the position. (In part 'P2', measure number "0", I found  a normal 'F,4' clef)

So maybe I could change my program to ignore the line number (except for the 'C' clefs) and print a warning if the line number differs from the 'normal' one? 

And here is the Help text :

- The input file must be a score-partwise musicxml file; extensions: .musicxml, .xml or .mxl. Files with
    extension *mxl are compressed but will automatically unpacked in a .xml file.
- The output file is a nwctxt file.
- Different voices are placed on different (layered) staves.
- For some features that aren't supported in NWC itself, a 'user object' is used. You may see a popup that alerts you
  to download a missing plugin.

Upon installation a shortcut icon was created on your desktop. You can drag and drop a musicxml file upon that icon,
or double click it and manually select the file to be converted via the button 'Select a musicxml file'.

The processing consists of a few consecutive stages, which are logged in the 'Loggings' frame.
There's also a 'Warnings' frame to draw your attention on possibly incorrect input or processing. Each warning always
includes the staff name and measure number.

The input file is read and analysed, after which a 'Setup' window appears.
This will give you the opportunity to:
 - Check or uncheck some processing options via the 'Options' tab.
 - Tune the title page, via the 'Title Page' tab.
 - Deselect parts, change staff properties and/or deselect lyric lines, via the 'Staves' tab.
More detailed help info is available via the help buttons on these tabs.

After pressing 'CONVERT' on the setup window, the conversion process is started.
When the conversion is completed, you can save or 'save as...' the output file.
Next you can directly open that file in NWC (without leaving the program), via the appropriate button (on condition
that NWC is installed in 'C:/Program Files (x86)/Noteworthy Software/NoteWorthy Composer 2/NWC2.exe').
If you had warnings in the warning frame, you can easily switch between MXML2NWC and NWC to check these measures.

And the help windows for the setup tabs in attachments:
Version 1.1 is now available on

Changes are:
    - Some bug fixes.
    - Revised lyrics treatment.
    - The input file name can be passed as command line argument.
    - Major changes:
        * After the input file is selected, it will be analysed and a setup window is presented.
        * Via this setup window, one can set options, configure the title page and deselect/select parts, change
            the staff properties and start or cancel the conversion process.
        * Two frames for loggings and warnings are added.
        * A new button to directly open the saved file in NWC.
        * Help buttons on main window and on each tab of the etup window.
Hi Rich,

As I said, I'm working on the next version.

I think it's not too difficult to include a 'look ahead' and search for a divisions element further in a staff, before starting to  process the first measure.
That should solve the problem.

I hope to publish the next version soon.

In the meanwhile, if you have the same problem in another xml file:
- Open the file in a text editor and look for the first occurence of  '<attributes>
- Before that you'll find a preceding line with '<measure number =...'
- If it's the same error situation, that measure number will be > 1.
- Then copy all the lines from '<attributes>' to '</attributes>', as in your file:
Code: [Select · Download]
- Now look higher in the file for a line with '<measure number="1">'
- Paste the copied lines after that line
- Save the file with another name.
Hi Richard,

The error occurs in the first measure, when trying to determine the length of the first element. This is done  by means of the <duration> element.

Excerpts from the musicmxl reference:
"Duration is a positive number specified in division units."

"Parent element: <attributes>
Musical notation duration is commonly represented as fractions. The <divisions> element indicates how many divisions per quarter note are used to indicate a note's duration. "

"The <attributes> element contains musical information that typically changes on measure boundaries. This includes key and time signatures, clefs, transpositions, and staving."

So, in order to determine the length of a note or rest, the division unit must be known, which is part of a <attributes> element.
In your file, the first <attributes> element occurs for the first time in measure 6, so the division unit is not known before that.

When I moved the <attributes> element to the start of measure 1 in your xml file, the error didn't occur anymore.
I'll send you a personal mail with the corrected xml file and the resulting nwctxt file (happy tune, by the way).
Hi, Heinrich.
Just a short "still working on it" message on my behalf:
I'm working on version 1.1 of MWML2NWC, in which the conversion is done in 3 phases: analyse, setup and convert.
In the setup phase a window with 2 tabs is shown, that enables the user to setup the Title Page layout and the staff properties, see attachments.
I will add a checkbox for system and page breaks.
Any further suggestions from your side are very welcome.

I also added a 'Loggings' and 'Warnings' frame that are filled during the conversion, see third attachment.

It might be that a more useful process is actually: Remove everything except notes and rests (probably with a user tool), create a correct "naked score" from these; and finally add all the "small things" (and not so small ones) - either manually or, at a few places, by copying something over from the "ORM-ed" score.

The whole enterprise is certainly not for the faint-hearted, at least with this Audiveris+Converter pipeline; where the main "problem", but also "heavy-weight-lifter" is Audiveris: What it can and cannot do essentially defines the result. So be it. I'll see what I learn ...

Indeed, I agree that the output of Audiveris is the main problem here.
Maybe I can add a window to MXML2NWC where you can select/deselect the item types to convert ?

As for the sometimes missed notes or dots: In audiveris the measures that are too short after the transcription are colored pink, so that should be a help to locate them quickly in the nwctxt file.
Kospoth's symphony worked nicely* for the 1st, 2nd and 3rd movement. The mxls produced by Audiveris already have a fair share of problems (however, some are from untypical notations in the score), but the result is quite usable. However, the 4th movement stumps MXML2NWC 1.0.2 (I hope - I just installed it over the previous one; does the installer replace it? ... it would be nice if there were a version info somewhere), with another Python error. The zipped .mxls are in the attachment (however, due to renaming, the XMLs stored inside the mxls do have strange names from my scanning operation - I hope this is fine).

* However, there are a few things where I stumble
a) The first staff of each NWCTXT contains "a million" PgTxts at  the start (see NWCTXT result of second movement in the attachment).
b) When opening, the files require a font "Default" which I apparently don't have.
c) Opening another .mxl file often (always?) crashes MXML2NWC later. You can try it with the symphony: First, convert and save movement 1; then, press "SELECT ..." again and open movement 3. "CONVERT" will result in an error - see attachment.


The new version (1.0.3) is available on

  • Yes, the installer replaces the previous one.
    The window title bar now shows the version number.
  • I fixed the errors. The first one (list index out of scope) was a real bug. The second one was a beam property 'backward hook' that NWC can't digest. Unknown beam properties will now be ignored.
  • The "million" PgTxts are derived from the <credit-words> tags in the xml file. Audiveris seems to create these tags for everything that it can't recognize as musical symbol? Example:
     "<credit-words default-x="1686" default-y="11" font-family="sans-serif" font-size="198" font-weight="bold">—-—wv—~'—-</credit-words>"
  • The font 'Default' is derived from the tag "<lyric-font font-family="Default" font-size="10"></lyric-font>". I now replace it with 'Times New Roman'.
  • Opening an converting more than one file in the same run can cause some problems. Probable cause is that some variables are not properly restored. I found it to much effort to spit this out, so now I keep the select button disabled after opening a file. So you'll have to exit and restart the program, which seems to me not a big effort to ask for.
  • Your fourth movement prodced a lot of popups for invalid chords (caused by identical chord members in one chord object). So I replaced the multiple popups by showing these warnings in one extra window, tat doesn't halt the execution.
b) In the attachment are (in a single .zip) two more .mxl files produced by Audiveris. The input for this was a scan of Ruth Elaine Schram's arrangement of "Go, Tell It On The Mountain" (see - "permanently out of print", according to the publisher). I'd like to create a rehearsal voice/mp3 for a soloist singer from this via NWC. Audiveris produces two "movements", where the latter is the separate coda starting on the last page but one. Giving the first file to MXML2NWC 1.0.2 unfortunately creates another Python stacktrace ... Maybe you could look into this.


The Python stacktrace was due to the fact that Audiveris interpreted a chord symbol as a lyric syllable in lyric line 3 on a staff without  lyric lines 1 nor 2.
So in the next version of MXML2NWC  (coming soon, I hope), I will ignore lyrics assigned to lyric lines that  are 'out of order'.

P.S. I managed to download and install Audiveris. I used your pdf as input and I saw a lot of pink areas after transcription. I think these are the places where Audiveris had some difficulties to correctly 'read' the score and as a consequence may lead to incorrect areas  in the resulting NWCTXT file after running MXML2NWC.
The new version (1.0.2) is available on

I zipped the MXL, because the forum does not accept .mxl files. Opening the .mxl with MXML2NWC does not work - it seems that it does not see that this is a zipped file which needs unzipping (and yes, MXML2NWC does not accept .mxl as a standard extension for files it wants to open, so this is an "advertised feature"). Still, I have the (small) feature request that .mxl files are accepted, i.e. unzipped and then worked on the XML.
A zipped *.mxl file is now accepted as input. An unzipped *.xml file will be generated and processed. The *.xml file will be saved  in the same directory as the input file.

Manual unzipping of the .mxl yielded an XML file, which MXML2NWC actually digested, with a host of messages which I ignored (and did not read; and maybe would not have understood).
When I unzipped your first file and used it as input for MXML2NWC, I had 2 popups with an error message 'Invalid Chord Error' with techincal information, that I happened to understand. Twice it concerned a generated nwctxt line that was not a legal NWCTXT object.
With the information in the popups I could find the cause in the input file: in 2 places a chord with two identical chord elements.
In this new version I replaced the error popups with information (see attachment) wich is hopefully more readable. It contains the staff name and measure number, the erroneous nwctxt line and the one that was generated instead.

I also opened the .mxl file coming out of Audiveris in Musescore. Musescore complained that this was not a valid MusicXML file, but after pressing "Ignore" it also gobbled it up and created a score, which I again exported as MusicXML ---> see " Once more, I had to manually unpack the .mxl. Now, when I gave this to MXML2NWC, it ran into some Pythonian error.
The Pythonian error when using your second, Musescore, file,- was again due to the presence of a decimal number where my program expected an integer. I fixed that and also a few other places where I thought a decimal number could be admitted. After running this new MXML2NWC version on your 2nd file, I got the same 2 popups as for your 1st file, so my conclusion is that the reason is due to the output of Audiveris.
Accepting (unzipped) .mxl files will be a piece of (apple) cake.

I will soon download, unzip and run your files to see what messages and error they will generate.
And hopefully I will be able to explain the messages and correct the error.
  • Thanks for your positive respons.
    Because I never found a unambiguous syntax description for MXML files, I had to develop this tool with trial and error, testing with files from different sources.
    I did not know about XML files generated by Capella before, so I'm glad it worked out so well.
  • As to the 'unknown publisher' fact: My website has no commercial intention. The majority of the downloads are NWC related, and I suppose the NWC users 'know' me enough from the forum. The other downloads are intented for my personal friends and family (but  not exclusively of course).  So if someone cancels the install process because I'm unkwown, so be it.
  • Removing the 1.0 version before I got a positive respons seemed a little premature.
Tips & Tricks / Re: Entering lyrics efficiently
Apart from H.M. approach,  I'm used to enter the lyrics first, before notating the staff.
The syllables then show themselves one after another with ev'ry note you enter and you can quickly check their correctness..
General Discussion / Re: Percussion Staff Bar Lines
Special endings are by default only printed on the top staff. So their position in the top staff declares what is printed.
Try this: On your first staff, set 'Show on printed' in the Visibility tab to 'Never', in Percussion Staff to 'Always'.
I'm getting this error when I try to run it.

(It took me a while to find the program. It would be nice if it gave the option of creating a shortcut on my desktop :) )

Hi Mike,

1) About the error:

One of the first things the tool does is looking into the Windows registry to find the folder for the object plugins (wich you can see in NWC via 'Tools/Options', tab 'Folders').
I'm searching with register key ' \HKEY_CURRENT_USER\SOFTWARE\NoteWorthy Software\NoteWorthy Composer 2\Folders' for an entry 'UserPlugins'. That always worked on my (Windows 10) computer. I don't know why it doesn't work on yours, but the error can easily be intercepted.

When the tool inserts an user object and the corresponding plugin is not found in the plugin folder, a popup is shown, saying "You need to download following object plugin: ...".
But the purpose is only to inform the user of a missing plugin, the user object itself will be present in the output file anyway.
So now I've changed the program to intercept that error and go on.
In that case you can get popups 'You need to download...' for one or more user objects, even if you already downloaded it.

2)About  finding the program:
During installation the target folder is shown and can be modified as well. But it can be easily overlooked, so I will explicitly state that.

3) About a desktop shortcut:
I've changed the installation procedure: a desktop shortcut 'MXMX2NWC' will be created. Unfortunately I couldn't find out how to include it as an option,so it will always be created.

Go to to download a new Windows installer for the new version of the program.

I'm looking forward for your feedback.

This tool convert musicxml files to nwctxt files

- The input file must be a score-partwise musicxml file.
- The output file is a nwctxt file.
- Different voices are placed on different (layered) staves.
- For some features that aren't supported in NWC itself, a 'user object' is used. You may see a popup that alerts you to download
a missing plugin.

- Known issues:
  - Features that aren't supported in NWC and for which no user object exists or for which I can't determine the correct parameters,
  will give erroneous results, e.g. tuples other than triples, cross-staff beams and slurs.
  - Because of the layering, some notes, their accidentals or dots may overlap with each other. This can be fixed by setting
  the properties 'Extra Accidental Spacing', 'Extra Note Spacing' and/or 'Extra Dot Spacing'.
  - If you encounter other issues, please let me know.

This is a stand alone Windows program, not a classic nwc user tool, so you can't invoke it from within NWC.
You can download a Windows installer program in

- 15/09/2021: 1.0: Original version
- 02/11/2021: 1.0.1: bug fixes

    Download and run the installation file.
    During installation, the target folder is shown and can be modified.
    After installation, a shortcut 'MXML2NWC' will be created on your desktop.
Object Plugins / Re: Markup.rg
Hey Opagust...  Umm, what's it supposed to do?  If it's put the numbers 1 and 2 to the left of the staff then it didn't work for me...

I did some more experiments.
It seems that, when the staff has no bracket nor brace, the 1 and 2 ar not visible in edit mode, nor in viewer mode.
However, they do appear in print preview.

But this has of course nothing to do with the markup object itself, but rather with the way the editor sets its margins.
Object Plugins / Re: Markup.rg
Very useful, H.M.

My first attempt, after some tuning:

Code: [Select · Download]
|User|Markup.rg|Pos:2|Class:StaffSig|Markup:"/m0.7/x-2 1/y-7/x-1.5 2"
|Clef|Type:Treble|OctaveShift:Octave Down|Visibility:Always
Object Plugins / Re: (2.1)
OK, I can live with that.

The reason I asked is that I'm writing a tool to convert MusxXML files to NWC. 'Nested' slurs are not provided in NWC itself, but can be done with your user object. So I planned to use that object for every slur, and then I ran into that problem while testing. So now I'm going to make the necessary adjustments to only use in case of a slur within a slur. The chance that such a slur will cross a bar and a system break at the same time is very small, I think.

Keep up the good work!