OptiMusic
Status
Current version is OptiMusic V1.1
This is free software, released under the terms of the GNU
General Public License.
Feel free to contact Hervé
Bitteur to report bugs & suggestions or any related information.
I would appreciate your remarks.
Description
OptiMusic is an Optical Music Recognition software
: Its purpose is basically to infer musical information from standard notations
recognized in scanned music sheets.
- Input : the image of a score using standard notation (not tablature). You
generally get this image using a scanner.
- Possible Outputs :
- Binary MIDI file, so you can use any sequencer such as
CakeWalk later on,
- ASCII Score file, using the SharpEye specific interchange format,
- XML file, using a specific DTD that I'm still working on,
- MIDI messages, so you can directly hear the music from within
OptiMusic.
So for example, the most basic use of Optimusic can consist in opening the bitmap
of a music sheet and let Optimusic play it directly. (Well, sort of, because of
eventual non recognized items).
A Quick Glance
Two user interfaces are available : a graphic one and a command line one.
Let's have a glance at the GUI which shows how OptiMusic can be used.
The following image is what you get right after bitmap loading (this
is what the 'Step' panel indicates): the music sheet is simply a black
and white bitmap, only physical information can be retrieved. When you
move the cursor, the current pixel is displayed in the 'Picture' panel
with the coordinates and the pixel value (an 'X' for black foreground).
The next image is what you get after all processing steps have been
performed (the 'Step' panel indicates that the score checking is done).
Notice some difference with the first display :
-
When the cursor is moved above a music item, its key characteristics are
displayed in the 'Picture' panel. Here the cursor was located right on
the whole rest sign (middle of first measure of second stave)
-
The original bitmap is now colorized according to the recognized shapes
: this 2-stave system exhibits Staff lines, Braces, Bar lines, Treble key,
Bass key, Time signature, Quarter heads, Half heads, Duration dots, Rests,
Flat signs, Sharp signs, Stems, Beams, etc... and the non recognized shapes
are left black. It's then rather easy to visually check the correctness
of OptiMusic work. If needed, it's always possible to point to a given
item and manually assign a shape to it. By the way, this is how OptiMusic
can be trained to progressively improve its recognition rate.
You may have noticed in this image that some items were still in black
and thus not recognized, namely from left to right : grace notes, mezzo
forte indication, tuplets (although the tuplets are handled properly in
the music analysis later on). See the section on software current status
for a detailed list of known deficiencies.
NB : You need to configure your window display so that at least 65536
colors are available. If you cannot differentiate the various items in
the image above, you should check your display configuration.
Distribution
OptiMusic runs under Windows 95/98 and Windows NT.
The source code (Ada 95) is provided in the archive. The archive
is available as omr-src.zip.
The pre-built executables are provided in 2 separated archives omr-gui.zip
(for the Graphical interface) and omr-cli.zip (for
the Command Line interface).
Other Ada95 software pieces are needed to build OptiMusic, they are
listed in the following table, together with the URL where you can find
each of them :
Name
|
Description
|
Author
|
Location
|
OS_Services |
This component provides OS-related
services in a portable way across various OSes such as DOS, NT, OS/2, Unix. |
Jean-Pierre Rosen
|
|
SCL |
I use a subset of this Software Component
Library, the interface to a library of routines.
Note : You don't actually need to retrieve the whole SCL software, since
the few files I use are already bundled with the OptiMusic archive.statistical |
Marin David Condic
|
|
MD5 |
I use an Ada implementation of this Message Digest algorithm found
on AdaPower.
Note : The used files are bundled with the OptiMusic archive. |
Christoph Grein
|
|
Windex 1.05 |
Windex is an object-oriented
thick binding of Ada to a subset of the Microsoft Win32 API, along with
extensions to make it easier to use.
Note : I still have to refine this documentation and be more specific
on the additions (and some modifications) made to the Windex software. |
Stephen Leake
|
|
GNAT 3.13p |
Besides the compiler itself,
I use some GNAT components such as GNAT.Table, GNAT.Case_Util and GNAT.Debug_Utilities. |
ACT
|
|
Installation
Pre-built version
Two files (omr-gui.exe and omr-cli.exe) are provided in the dedicated
executables archives named omr-gui.zip and omr-cli.zip
respectively . You can use them directly, provided that they find two companion
files (omr.ini and history.dat) in the same directory as the executable
files (a default version of these companion files is included in each of these
archives as well).
Source version
You can also rebuild the software from its sources as found in the archive omr-src.zip.
To do so, retrieve the reused components (OS_Services, SCL and
Windex) using the links in the table above and unzip them in a single or separate
directories. Then unzip the Optimusic archive in a directory of its own, or at
least unzip it as the last archive if you want to put it in the same directory
as the reused components (doing so is mandatory, since the OptiMusic archive contains
updated versions of some of the reused components).
You need also the GNAT environment. I've used GNAT 3.13p for the last
build. Other Ada compilers should work equally well, thanks to Ada high
portability, provided that the source of GNAT.Table, GNAT.Case_Util and
GNAT.Debug_Utilities can be found on the source path.
Then define the proper source and objects paths for the GNAT gnatmake
utility, and simply run gnatmake on omr-gui.adb (for the gui interface)
or on omr-cli.adb (for the command line interface).
Development Status
OptiMusic is an evolving exercise : the framework is up and running, with
both command line and graphical user interfaces, but should not be considered
as a real product. If what you need is a reliable industry-level
product, you should consider MidiScan or SharpEye instead. I'm a frequent
user of SharpEye and I can personally recommend it. (I've no serious
experience of MidiScan).
There is plenty of room for improvement in the current version (see
the Design section). This is the reason why I've put the emphasis on the
design and implementation documentations, so that anyone interested could
easily grab the major principles of the software, and perhaps bring his
own contribution.
Feel free to send any remark on bug or improvement to Hervé
Bitteur.
Documentation
Links
Some Commercial OMR programs
File updated on Friday 29-Dec-2000 16:57