Opening PDF with Audiveris in MuseScore

• Nov 9, 2011 - 13:56

Hi,

By using Audiveris and MuseSCore you can import PDFs in MuseScore, as shown here http://www.youtube.com/watch?v=n6x7KBA8BmM&feature=related

I'm trying to install Audiveris as a plugin in MuseScore as described here http://wiki.musichackday.org/index.php?title=MuseScore_PDF_import

Starting MuseScore I get the following message "C:/Program Files (x86)/MuseScore/plugins/audiveris.js in line 1: Syntax Error: Parse Error"

Line 1 define the location of Audiveris this way: var audiverisHome = "C:/Audiveris4.1beta";

Does anyone have any idea what might be the problem?

All help would be appreciated!

regards
Haakon Kvidal
email: post@musikkteknologi.no
web: www.musikkteknologi.no


Comments

Works just fine for me. I had to rename the Audivers dir though to match the entry in the plugin (could have done it in there instead)

Hey, lasconic: why isn't this plugin available on the plugins page ?

In reply to by [DELETED] 5

I believe to have found an issue with the plugin: it is lacking the init function. This seems only to lead to errors if it is the 1st plugin in the list, could that be? It usually would be the 2nd, after ABC-Import, but becomes the first when instelld in the user's plugin dir rather than the system one.

However, the fix is simple: just add an empty init function, like the plugin documentation says:
[code]
function init () {};
[/code]

BTW: I've translated it into German, attached

Attachment Size
locale_de.ts 1.92 KB

In reply to by [DELETED] 5

It complains

 omr.ui.symbol.MusicFont.checkMusicFont(MusicFont.java:189) -- SEVERE: *** MusicalSymbols font not found. Please install MusicalSymbols.ttf ***

It works though, sort of (the result is not as usefull as I hoped for).

Where to get that font and where to to it?
Well, actually this, again, is more an Audiveris problem, than one of the plugin... but maybe you know anyway?

My fault! Used Notepad in Windows to edit the .js file, and your answer reminded me that Notpad aint’ the right tool. Edited the .js with Notepad++ and now the plugin is available in MuseScore. Thanks!

But: Seems like I can’t get Audiveris to perform the OMR process. Have tried with several PDFs and a .png fila but the analyzing process stops with: “Conversion failed: No MusicXML file generated” and last lines below reads:

Error in performing [SCALE, GRID, SPLIT, MEASURES, VERTICALS, HORIZONTALS, SYMBOLS, PATTERNS, PAGES, MERGE, EXPORT] [java.lang.NullPointerException]
omr.Main.doMain(Main.java:436) -- INFO: Checking 1 task(s)
omr.Main.doMain(Main.java:455) -- INFO: SHUTTING DOWN ...

In reply to by haakonk

(corrected)
To get better error reports when importing an image, modify the file "audiveris.js" located in folder "plugins/audiveris" of MuseScore installation folder.
Around line #51 of file audiveris.js, before or after the "-batch" parameter line, insert the following line:
"-option log.Logger.printStackOnWarning=TRUE",

This option tells Audiveris to print out the call stack whenever an exception is encountered (this option will be on by default in next Audiveris release).

You can then publish the log in this MuseScore forum, or directly in Audiveris issues at http://kenai.com/projects/audiveris

/Hervé

In reply to by hbitteur

My mistake! The correct constant name is omr.log.Logger.printStackOnWarning (and not log.Logger.printStackOnWarning as written too quickly in my previous post)
/Hervé

Corrected message:
To get better error reports when importing an image, modify the file "audiveris.js" located in folder "plugins/audiveris" of MuseScore installation folder.
Around line #51 of file audiveris.js, before or after the "-batch" parameter line, insert the following line:
"-option omr.log.Logger.printStackOnWarning=TRUE",

This option tells Audiveris to print out the call stack whenever an exception is encountered (this option will be on by default in next Audiveris release).

You can then publish the log in this MuseScore forum, or directly in Audiveris issues at http://kenai.com/projects/audiveris

In reply to by Jojo-Schmitz

I don't see the need to make the plugin more accessible in term of languages now. It's a small plugin, tied to Audiveris and Audiveris is still in heavy development. If one doesn't speak english or french, one will not report bugs to Audiveris.

In general, I don't support translations in my plugin. The current workflow for translation is too time consuming. When we will have an actual plugin manager and plugin translation integrated with e.g. http://translate.musescore.org that might change.

Hello,
i have a similar problem and i really hope someone can make a suggestion since i'm no programmer, just following instructions works for me.
When trying to open the PDF with the audiveris plugin I get the following error:
"Error loading plug-in "C:/users/herairness/application data/local/muse/musescore/plugins line 90:
TypeError: Result of expression 'form' [null] is not an object."
Unfortunatelly I have no idea what it means, so any help would be appreciated!

In reply to by [DELETED] 5

Great, thanks, I had missed the ui. But now there's another error, which i don't get because I've set the path to the file and it's not read only or anything. Help?
"Conversion failed. No MusicXML file generated:
Unable to access jarfile D:/Audiveris4.1beta/dist/audiveris-4.1beta.jar"

In reply to by herairnes

Hello!
I have the same error with Audiveris in MuseScore when I tried open the PDF file with Audiveris (plugin):

Error
Conversion failed: No MusicXML file generated
Error: Unable to access jarfile D:/Audiveris4.1beta/dist/audiveris-4.1beta.jar

Solution
In audiveris.js file find this line with /*comments*/

/*********** MODIFY THIS VALUE *****************/
var audiverisHome = "D:/Audiveris4.1beta";
/*********** MODIFY THIS VALUE *****************/

and modify the directory where you have installed (unpacked) your Audiveris file (from Kenai website), for example: C:/Program Files/audiveris-4.1beta-full-20120201 and save the audiveris.js file.

With Best regards anta

In reply to by anta

Hi,
I tried modifying the value, but the same error occurs:

Conversion failed: no MusicXML file generated
Unable to access jarfile C:Program Files (x86)AudiverisLtdaudiveris-4.1beta/dist/audiveris-4.1beta.jar

I edited the js file using notepad on my windows 7, do I need to use notepad++?

Here is how I edited it:

/*********** MODIFY THIS VALUE *****************/
var audiverisHome = "C:\Program Files (x86)\AudiverisLtd\audiveris-4.1beta";
/*********** MODIFY THIS VALUE *****************/

Thanks in advance!

In reply to by [DELETED] 830681

MuseScore can't convert PDF into any of its own formats (the upcoming version 2.0 might, not sure).
Audiveris can convert PDF to MusicXML and MuseScore can read that.
The plugin that is the topic of this thread is connecting the dot, i.e. calls audiveris with the PDF, lets it convert into MusicXML and opens that in MuseScore.
But don't expect too much, the result is not likely to be too usefull in most cases.

In reply to by [DELETED] 830681

Did you install audiveris? Can you run it directly from your desktop? You don't really need the plugin for MuseScore - you can simply run Audiveris yourself, load the PDf, save as MusicXML, then load the MusicXML into MuseScore. The plugin just automates this.

But don't get your hopes up. The technology employed by Audiveris to try to "understand" a PDF and convert it to MusicXML is still very much experimental. It's still entirely likely that youd get better results faster entering a score by hand.

In reply to by [DELETED] 830681

@Mario
1/ Make sure you download and install latest Audiveris version (4.2) from http://www.audiveris.org
2/ Adjust the plugin content so that it points to the precise location where you installed Audiveris.
I don't have the plugin source available right now, but I think I remember there is a line similar to the following:
var audiverisHome = <path-to-audiveris-jar-file>
You have to manually modify this <path-to-audiveris-jar-file> so that it points to Audiveris jar file

In reply to by hbitteur

@hbitteur: I' just downloaded and installed Audiversi 4.2, modified the plugin code in 2 places (the path to the jar file and the name of the jar file) and tried to convete a PDF. I got an alert:
"
Runtime Error!

Program: C:\Womdows\system32\java.exe

R6034
An application has made an attempt to load the C runtime libtrary incorrectly,
Please contact the application's support team for more information.
"

I'm getting this twice. I get it too, when opening and transscribing the PDF in Audiveris directly, so it is not connected to anything the plugin does.

Here's the log:
omr.Main.process(Main.java:436) -- INFO: Running in batch mode

omr.Main.doMain(Main.java:132) -- INFO: Submitting 1 task(s)
omr.Main$1.call(Main.java:240) -- INFO: Launching [EXPORT] on C:/Dokumente und Einstellungen/Jojo/Eigene Dateien/Neue Wege/Web/011_Kommt_herbei,_singt_dem_Herrn.pdf
omr.sheet.picture.PictureLoader.loadImages(PictureLoader.java:96) -- INFO: Loading C:\Dokumente und Einstellungen\Jojo\Eigene Dateien\Neue Wege\Web\011_Kommt_herbei,_singt_dem_Herrn.pdf ...

omr.sheet.picture.PictureLoader.loadImageIO(PictureLoader.java:183) -- INFO: Loaded image #1 (2,479 x 3,508)

omr.step.Stepping.scheduleScoreStepSet(Stepping.java:592) -- INFO: scheduling [SCALE, GRID, SYSTEMS, MEASURES, TEXTS, STICKS, SYMBOLS, PAGES, SCORE, EXPORT]
omr.step.Stepping.notifyMsg(Stepping.java:539) -- INFO: SCALE

omr.sheet.ScaleBuilder.retrieveScale(ScaleBuilder.java:186) -- INFO: Binarization {GLOBAL threshold:140}

omr.sheet.ScaleBuilder.retrieveScale(ScaleBuilder.java:227) -- INFO: {Scale line:(1,2,3) interline:(16,18,21) beam:10}
omr.step.Stepping.notifyMsg(Stepping.java:539) -- INFO: GRID

omr.grid.LinesRetriever.retrieveLines(LinesRetriever.java:411) -- INFO: Global slope: 0

omr.grid.ClustersRetriever.buildInfo(ClustersRetriever.java:227) -- INFO: Retrieved line clusters: 4 of size: 5 with interline: 18

omr.grid.BarsRetriever.buildSystems(BarsRetriever.java:581) -- INFO: Systems top staff ids: [1, 1, 3, 4]

omr.grid.BarsRetriever.retrieveMeasureBars(BarsRetriever.java:268) -- INFO: Parts top staff ids: [1, 2, 3, 4]
omr.step.Stepping.notifyMsg(Stepping.java:539) -- INFO: SYSTEMS

omr.sheet.SystemsBuilder.reportResults(SystemsBuilder.java:360) -- INFO: 2 parts, 3 systems
omr.sheet.BorderBuilder.getRawBorder(BorderBuilder.java:411) -- WARNING: Border between systems S#1 & S#2 got closed at x:2,072 y:1,094

omr.step.Stepping.notifyMsg(Stepping.java:539) -- INFO: MEASURES

omr.score.entity.Page.dumpMeasureCounts(Page.java:195) -- INFO: 16 raw measures: [5 in system#1, 5 in system#2, 6 in system#3]
omr.step.Stepping.notifyMsg(Stepping.java:539) -- INFO: TEXTS

omr.Main.doMain(Main.java:139) -- INFO: Checking 1 task(s)
omr.Main.doMain(Main.java:146) -- WARNING: Future exception [java.util.concurrent.CancellationException]
java.util.concurrent.CancellationException
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at omr.Main.doMain(Main.java:144)
at Audiveris.main(Audiveris.java:47)
omr.Main.doMain(Main.java:167) -- WARNING: Exit with failure status

omr.step.ProcessingCancellationException: java.lang.InterruptedException
at omr.step.AbstractSystemStep.doitPerSystem(AbstractSystemStep.java:212)
at omr.step.AbstractSystemStep.doit(AbstractSystemStep.java:122)
at omr.step.AbstractStep.doStep(AbstractStep.java:103)
at omr.step.Stepping.doOneSheetStep(Stepping.java:103)
at omr.step.Stepping.doSheetStepSet(Stepping.java:517)
at omr.step.Stepping.doScoreStepSet(Stepping.java:493)
at omr.step.Stepping.scheduleScoreStepSet(Stepping.java:625)
at omr.step.Stepping.processScore(Stepping.java:279)
at omr.Main$1.call(Main.java:248)
at omr.Main$1.call(Main.java:234)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at java.util.concurrent.AbstractExecutorService.invokeAll(Unknown Source)
at omr.step.AbstractSystemStep.doitPerSystem(AbstractSystemStep.java:209)
... 14 more

It did finish though and the result looks quite OK, much better that I had expected from past experience.

In reply to by Thomas

1.6 (actually 1.6.0_30-12) doesn't work at all:
java.lang.UnsupportedClassVersionError: Audiveris : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Audiveris. Program will exit.
Exception in thread "main"

http://audiveris.kenai.com/docs/manual/handbook.html mentions that Java 1.7 is needed.
The latest and greates 1.7.0_10 doesn't solve the problem.

In reply to by Jojo-Schmitz

I found the installing and use of audiveris very easy. the only thing I needed to do was to get a Java update to 7. 10. No need for updates. my platform is Windows XP and the MuseScore 1.2. As far as I can see there is no errors in the peace.

The document was a PDF I already had on my computer.

It may just be the good air hear in Wales!!!!

Wena

In reply to by [DELETED] 830681

Under Plugins in audiveris there is one that produces an xml for musecore.
I find that the ap don't seem to be able to see repeats. It often gets the time signature incorrect. I wonder if there is a system for reporting bugs?

It dose not seem to like one of my favorite peaces "Blaenwern" HAVE A GO ANY ONE!!!

Wena D Parry
Form South Wales, U.K.

Attachment Size
Blaenwern 122.pdf 16.26 KB

Is there someone who would be willing to help me and take the time to either convert 5 PDF's to xml for me, or show me how? My email is roblo1@aol.com I have tried using audiveris but i am too technically stupid. What I am trying to do is take 5 lead sheets to songs that just have the melody line and chord symbols and I want to actually write out the notes for the chords as I dont do well with chord symbols. Can someone be generous with their time and help me?
Thanks

In reply to by roblo1

It does make sense. I'm not talking about that second part - turning the chord symbols into notes. I'm just talking anout the first part - getting the notes from the lead sheet into MuseScore. And what I'm saying is, you'll almost certainly get better results faster simoly entering the motes by hand, as opposed to trying to get some sort of automatic reading of the PDF. It takes all of a few minutes to enter the notes for a lead sheet by hand, but you could easily spend hours or days fighting with scanners and PDF reading software to attempt to get anything at all onto MuseScore. and then you'd still need to spend time fixing up the results.

As an analogy, say you had a YouTube video of a two-minute speech, and you wanted to get a transcript of that speech into Microsoft Word. Well, you could either spend hours or days fighting with software that might be able to transcribe the speech from the video, and then still spend time correcting the mistakes the software would probably make - or you could simply type it in yourself. Typing it in yourslef would almost certainly get you better results faster. And it's the same with teyng to get music into MuseScore via PDF versus simply entering it yourself.

In reply to by Marc Sabatella

,for instance.

Each to his own, of course, but once I got used to MuseScore I found that trying to scan files, importing MP3s etc. was a waste of time. My best strategy to date is to use a wide monitor and have MS taking up the left and central 1/3s and an image of the original score on the right of the screen.

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