Skip to content

Commit

Permalink
Merge branch 'release-5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
hbitteur committed Dec 13, 2018
2 parents ec29281 + 9a7d578 commit 4f234fe
Show file tree
Hide file tree
Showing 849 changed files with 45,805 additions and 46,386 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ target/*
# Ignore system files
.DS_Store
Thumb.db
/bin/
/build/
/.gradle/

# Eclipse added files
.classpath
.project
.settings
111 changes: 35 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,52 @@
# audiveris

This repository contains source code for the latest generation of Audiveris optical
music recognition (OMR) engine.
This repository contains source code for the latest generation of Audiveris Optical
Music Recognition (OMR) application.

## Main features

As opposed to Audiveris [earlier generation][6], which was a stand-alone OMR application composed
of an engine and a (limited) user interface, this repository is focused on the OMR engine.

The internals of the OMR engine are made publicly available, either directly by XML-based ".omr"
project files or via the Java API of this software.

The engine can directly export data using [MusicXML][8] 3.0 format, via an integrated exporter.
Other exporters could build upon the engine to support other target formats.

NOTA: The engine provides a small integrated UI which is meant for the developer to analyze,
tune or train the various parts of the engine, but not to correct the final score.
Full GUIs, meant for the end-user, are expected to be provided by external editors.

## Building and running

First of all, you'll need the following dependencies installed and working from
the command line:

+ [Java Development Kit (JDK) version 7 or 8 (version 8 is recommended; version 9 is not yet supported)][1].
**Please ensure you're running a 64-bit JVM. Audiveris doesn't support a 32-bit
JVM because deeplearning4j is 64-bit only.**
+ [Git](https://git-scm.com) version control system.
## Releases

Besides the above mentioned tools you'll need to have Tesseract language files for
[Tesseract OCR][2] to work properly. Please keep in mind that Tesseract is mandatory
for both building and running Audiveris. __It's currently not possible to use
Audiveris without Tesseract.__
All releases are available on [Audiveris Releases][releases] page.

You'll need at least the english language data. Other required languages can be
installed, too. Please check [this guide][3] for further details.
The most recent stable version is release 5.1, published on December 13, 2018.

Moreover, opening PDFs containing vector graphics on Unix-like platforms
(including the Mac) requires [FreeType library][4] to be available in your $PATH.
Fortunately, every known OS distribution already contains a package for FreeType.

To download Audiveris project, use the following command in a directory of your choice:

`git clone https://github.com/Audiveris/audiveris.git`

This will create a sub-directory named "audiveris" in your current directory and populate it with
project material (notably source code and build procedure).

Now move to this "audiveris" project directory:

`cd audiveris`
## Main features

Once in this "audiveris" project directory, you can:
Derived from Audiveris [earlier generation][audiveris-eg] (4.x versions),
which was limited to fast processing
of small high-quality scores in memory, this repository (starting with Audiveris 5.x versions) is
significantly more ambitious:

* Build the software via the command:
* Good recognition efficiency on real-world quality scores (as seen on [IMSLP][imslp] site)
* Effective support for large scores (with up to hundreds of pages)
* Convenient user-oriented interface to detect and correct most OMR errors
* Openness to external access
* Available on Windows, Linux and MacOS

`./gradlew build` (Linux & Mac)
The core of engine music information (OMR data) is fully documented and made publicly available,
either directly via XML-based `.omr` project files or via the Java API of this software:

`gradlew.bat build` (Windows)
* Audiveris includes an integrated exporter, which can write a subset of OMR data into
[MusicXML][musicxml] 3.0 format.
* Other exporters are expected to build upon this OMR data to support other target formats.

* Run the software, as GUI tool, via the command:
## Installing and running, for Windows only

`./gradlew run` (Linux & Mac)
Refer to HandBook [Binaries][binaries] section.

`gradlew.bat run` (Windows)
## Building and running, for Windows, MacOS, Linux and ArchLinux

### Arch Linux
For the AUR(Arch User Repository) there exist two packages which can be installed by hand(or with your AUR-helper of trust). One is [`audiveris`](https://aur.archlinux.org/packages/audiveris) which uses the [`5.1.0-rc` release](https://github.com/Audiveris/audiveris/releases/tag/5.1.0-rc) and the other one is [`audiveris-git`](https://aur.archlinux.org/packages/audiveris-git) which tracks the `master` branch. To install, simply execute:
```bash
git clone https://aur.archlinux.org/audiveris.git
#git clone https://aur.archlinux.org/audiveris-git.git
cd audiveris
makepkg -fsri
```
Or with an AUR-helper(pikaur/yaourt/...):
```bash
pikaur -S audiveris
#pikaur -S audiveris-git
```
Refer to HandBook [Sources][sources] section.

## Further Information

Users and Developers are encouraged to read our [Wiki][5].

[1]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
[2]: https://github.com/tesseract-ocr/tesseract
[3]: https://github.com/tesseract-ocr/tesseract/wiki
[4]: https://www.freetype.org
[5]: https://github.com/Audiveris/audiveris/wiki
[6]: https://github.com/Audiveris/audiveris-eg
[7]: https://github.com/Audiveris
[8]: http://www.musicxml.com/
Users and Developers are advised to read the specific [User Handbook for 5.1 release][handbook],
and the more general [Wiki][audiveris-wiki] set of articles.

[audiveris-wiki]: https://github.com/Audiveris/audiveris/wiki
[audiveris-eg]: htps://github.com/Audiveris/audiveris-eg
[musicxml]: http://www.musicxml.com/
[imslp]: https://imslp.org/
[handbook]: https://bacchushlg.gitbooks.io/audiveris-5-1/content/
[binaries]: https://bacchushlg.gitbooks.io/audiveris-5-1/content/install/binaries.html
[sources]: https://bacchushlg.gitbooks.io/audiveris-5-1/content/install/sources.html
[releases]: https://github.com/Audiveris/audiveris/releases
95 changes: 94 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ ext.companyId = "${programName}Ltd"
ext.targetOSName = System.getProperty('os.name').toLowerCase()\
.startsWith('mac os x') ? 'macosx' :\
System.getProperty('os.name').split(' ')[0].toLowerCase()
ext.targetOSArch = ["i386":"x86", "i486":"x86", "i586":"x86", "i686":"x86",
ext.targetOSArch = ["i386":"x86", "i486":"x86", "i586":"x86", "i686":"x86", "x86":"x86",
"amd64":"x86_64", "x86-64":"x86_64", "x86_64":"x86_64"]\
[System.getProperty('os.arch').toLowerCase()]
ext.targetOS = "${project.ext.targetOSName}-${project.ext.targetOSArch}"
println "targetOS=${project.ext.targetOS}"

ext.makensisPath = null

//ext.dl4jVersion = '0.8.0'
//ext.nd4jVersion = '0.8.0'

Expand Down Expand Up @@ -132,6 +134,13 @@ dependencies {
)
}

// Specific configurations for specific OS dependencies
['windows-x86', 'windows-x86_64'].each { os ->
configurations.create("runtime-$os")
dependencies.add("runtime-$os", [group: 'org.bytedeco.javacpp-presets', name: 'leptonica', version: '1.73-1.3', classifier: "$os"])
dependencies.add("runtime-$os", [group: 'org.bytedeco.javacpp-presets', name: 'tesseract', version: '3.04.01-1.3', classifier: "$os"])
}

jar {
// override default output archive name
archiveName = "audiveris.jar"
Expand Down Expand Up @@ -172,6 +181,8 @@ task "git_build"(type:Exec) {
}

task generateProgramId(dependsOn: git_build) {
group "build"
description "Generates ProgramId source"
doLast{
project.ext.outputDir = file("$buildDir/generated-src/org/audiveris/omr")

Expand Down Expand Up @@ -204,6 +215,88 @@ sourceSets {
}
}

// Make sure we have an NSIS compiler available and store it into project.ext.makensisPath
task findNsisCompiler {
description "Find path to NSIS compiler"
onlyIf {"windows" == "${project.ext.targetOSName}"}

doLast {
// First test on PATH, then on standard program files locations
["", "C:/Program Files (x86)/NSIS/", "C:/Program Files/NSIS/"].each { prefix ->
if (project.ext.makensisPath == null) {
try {
def path = "${prefix}makensis.exe"
def proc = [path, "/VERSION"].execute()
proc.waitFor()
println "NSIS compiler $path found, version " + proc.in.text.trim()
project.ext.makensisPath = path
} catch (ignored) {
}
}
}

if (project.ext.makensisPath == null) {
throw new RuntimeException("Cannot find NSIS compiler (makensis.exe)!")
}
}
}

// All installers
task installers {
group "Installers"
description "Builds all installers"
}

// Windows installers for 32-bit and 64-bit
['windows-x86', 'windows-x86_64'].each { os ->
task "installer_$os"(type: Exec, dependsOn: [findNsisCompiler, jar, startScripts]) {
group "Installers"
description "Builds installer for $os"
onlyIf {"windows" == "${project.ext.targetOSName}"}

// Filter line that starts with "CLASSPATH=" or "set CLASSPATH=" findClasspath,
// and update os-based classifier information.
def updateClassPath = { findClasspath, line ->
line.startsWith("${findClasspath}=") ? line.replaceAll("-${project.ext.targetOS}.jar", "-${os}.jar") : line
}

doFirst {
mkdir "$buildDir/installers"

// Fresh population of os-dependent folder with bin+lib items
delete "$buildDir/installers/$os"

// bin: Scripts and icon
copy {
into "$buildDir/installers/$os/bin"
from("$buildDir/scripts/Audiveris") {filter updateClassPath.curry('CLASSPATH') }
from("$buildDir/scripts/Audiveris.bat") {filter updateClassPath.curry('set CLASSPATH')}
from "$projectDir/res/icon-256.ico"
}

// lib: Libraries
copy {
into "$buildDir/installers/$os/lib"
from "$buildDir/jar" // audiveris.jar
from configurations.compile // Compile jars
from configurations."runtime-$os" // OS-specific jars
}

// Set NSIS compiler command line
def suffix = (os == "windows-x86_64")? "" : "32"
commandLine "cmd", "/c",\
"${project.ext.makensisPath}",\
"/DPRODUCT_VERSION=$programVersion",\
"/DPROJECT_DIR=$projectDir",\
"/DTARGET_OS=$os",\
"/DSUFFIX=$suffix",\
"$projectDir/dev/installer-windows/Installer.nsi"
}
}

installers.dependsOn("installer_$os")
}

javadoc {
doFirst {
copy {
Expand Down
20 changes: 0 additions & 20 deletions config/plugins/finale-notepad.js

This file was deleted.

20 changes: 0 additions & 20 deletions config/plugins/finale.js

This file was deleted.

21 changes: 0 additions & 21 deletions config/plugins/musescore.js

This file was deleted.

File renamed without changes
Binary file removed data/train/samples.zip
Binary file not shown.
Loading

0 comments on commit 4f234fe

Please sign in to comment.