Docstoc

introducing

Document Sample
introducing Powered By Docstoc
					                              INTRODUCING BELLE, BONNE, SAGE

                                                William Andrew Burnson
                                  University of Illinois at Urbana-Champaign
                               Composition-Theory Division, Urbana, Illinois, USA
                                     andrew@williamburnson.com


                                                                make use of its utilities to practical application. It attempts
                                                                to fill a gap in music notation technology not covered by cur-
                                                                rent commercial music notation programs or freely-available
                                                                software such as Lilypond, Common Music Notation[3], or
                                                                the PWGL Expressive Notation Package[2].
                                                                    The library takes its name from a famous piece of eye
                                                                music by Baude Cordier from the 14th century, and these
                                                                three words are in turn, the tenets of its evolution.

                                                                1.1. “Beautiful”
                                                                Since the library is used not just for printing (usually involv-
                                                                ing fairly high resolutions), but also for interfaces which can
                                                                involve lower resolutions, microscopic detail is given to the
                                                                output.

                                                                1.1.1. Path-Based Geometry
                                                                The problem of music notation is unique for vector-graphics
                                                                applications in that it requires precise placement of text,
Figure 1. Belle, Bonne, Sage by Baude Cordier from 14th
                                                                symbols, lines, and other types of geometry. When these
century France.
                                                                different types of graphical entities are combined, they are
                                                                often sent through different rendering pipelines. For exam-
                                                                ple, a quarter-note consisting of a notehead taken from a mu-
                       ABSTRACT
                                                                sic symbols font must be precisely joined to a stem which is
    In the search for a suitable tool for notation to engrave   often a stroked line. Since most scanline renderers use one
his graphic symbol piece Bike Ride, the composer starts         algorithm optimized for drawing text and another optimized
from scratch, developing a corpus of vector-graphics tools      for drawing lines, the results can be irregular, even if the
for music notation Belle, Bonne, Sage in deference to a 14th    typesetting application sent exact coordinates.
century piece of eye music under the same name by Baude             Belle, Bonne, Sage converts lines, text, symbols, and
Cordier. The technical problems posed by this feat, once        all other geometry into vector-based paths so that they are
solved, become solutions to other gaps in current music no-     rendered in the same graphics pipeline. In some instances,
tation technology. Given that there are still no open-ended     when joins are difficult to control, a single union path is
music typesetting software libraries, it is paramount to de-    created. For example, stemmed notes are drawn as single
velop the software from the perspective of having uses be-      outlines so that the scanline renderers have an easier time
yond single notational paradigms, envisioning new inter-        creating a smooth join.
faces, algorithmic composition via notation, and custom en-
graving.                                                        1.2. “Good”
                                                                1.2.1. Multiparadigm
               1. BELLE, BONNE, SAGE
                                                                The library can be used and extended by anyone for their
Belle, Bonne, Sage is an open-source C++ vector-graphics        own purposes and is heavily documented so that users with
library for music notation with a range of examples which       only basic programming experience can learn to use it given
Figure 2. Bike Ride (2007, rev. 2009) for solo piano by William Andrew Burnson. Dedicated to Barry and Mary Hannigan.
The print is 18” x 32”.


the extensive tutorials and examples. For users who want         years to come. Also, extensive work has been done to ensure
to try out the library without having to learn C++, the Lune     that the library compiles strictly without warnings or errors
application can be used online to write scripts that generate    on all the above-mentioned platforms so that as compilers
scores.                                                          change and evolve, the library will be easily maintained.

1.2.2. Native Compiling                                          1.3.3. Open Source
The library builds native executables for Linux, Mac OS X,       The library is released under the open-source GNU Lesser
and Windows using any of the familiar build environments:        General Public License to help impact its adoption in per-
the GNU Compiler Collection, Apple Xcode, and Microsoft          sonal, academic and commercial pursuits.
Visual C++ (Express), all of which are freely available. Ad-
ditionally, the library compiles for both 32-bit Intel x86 and                      2. ARCHITECTURE
64-bit AMD x64 architectures.
                                                                 The C++ code is organized into a core library consisting of
1.3. “Wise”                                                      three interdependent layers and two third-party extensions
1.3.1. Unity                                                     upon which customized notation programs may be imple-
                                                                 mented. With the core library, a user builds console appli-
The library is built around the principles of unity and self-    cations that create custom scores in C++ and generate PDF
sufficiency between all layers and that there should be one       files. With the extensions, interfaces may be built or script-
clearly defined way to do the usual tasks.                        ing can be used.

1.3.2. Future-Proofing                                            2.1. Core Library
Work on the library anticipates developments in technolo-        The core library contains three layers each building on top
gies in an attempt to future-proof its effectiveness. The use    of the previous. In the first layer, primitive types and classes
of PDF, which was recently accepted as an ISO standard,          are exposed. File-manipuation, math functions, lists, ar-
ensures that its output will remain in a first-class format for   rays, strings, iterators, integers, numbers, and other essential
types and classes are defined under a unified namespace that       computer-based music notation, the seemingly trivial task
allow the user to circumvent use of the more complicated         of joining a notehead to a stem has been, as a result, non-
(and sophisticated) C++ standard library. Strings are a par-     trivial. Even drawing lines (as opposed to filled rectangles
ticularly important feature, since they are directly encoded     or rounded-rectangles) has also seen issue with some printer
as UTF-8 allowing the entire Unicode codepoint range to be       drivers not properly recognizing stroke widths and leading
used, thus facilitating the use of music fonts and languages     to unpredictable results.
using non-Roman scripts.                                             To circumvent these fundamental issues of rasterization,
    The second layer is music-specific. It defines notions of      a decision was made to primarily use filled-paths for both
fonts and things useful to drawing music such as notes, and      lines and text. Fonts are converted to a custom Scalable
establishes three abstractions that target applications imple-   Vector Graphics (SVG) format, acting both as a typeface
ment to control the behavior of the output. These are score-     specimen that can be opened in any SVG-compliant web-
canvas, create-paint, and the painter. A score contains a        browser for viewing and as the native font format used by
number of canvases (pages) that can be of varying shapes         the library.
and sizes. When a score is created, the implementation of            Another benefit of using the custom format is that Uni-
the score (say a notation program or a composer’s instruc-       code characters are easily accessed. In a typical font for-
tions) creates a number of canvases. After the score is cre-     mat such as TrueType (TTF), glyph mapping is platform-
ated, each canvas is painted in turn. The implementation of      dependent and encoded through any one of a handful of eso-
canvas tells the painter what to draw on its surface.            teric algorithms. When the font is embedded into a PDF file,
    The third layer is implementation specific. It currently      the process of glyph mapping Unicode characters is compli-
defines a reference PDF painter and a JUCE renderer for           cated even further. 1
interfaces. In the future, other formats such as SVG and
JPG may be added as native painters.
                                                                                    4. USING THE LIBRARY
2.2. Third-Party Extensions
                                                                 There are several ways in which the library can be used. The
The JUCE library allows developers to create cross-platform
                                                                 easiest way to understand what the library does is to use any
windowed interfaces. In conjunction with the supplied ex-
                                                                 of the sample applications which have been precompiled for
amples discussed later, a user can quickly start building a
                                                                 each target platform available at the project website.2 For
notation interface. JUCE is dual-licensed under the GNU
                                                                 those with basic programming experience, one way to use
General Public License and a proprietary license, so com-
                                                                 the library is to try the online interactive Lune application.
mercial applications require paying a fee to its developer.
    The Lua programming language is included to facili-
tate scripting and is used by the Lune application, discussed
later. Lua is an expressive Lisp-like language with a syn-                        5. SCRIPTING WITH LUNE
tax resembling many procedural languages. Lua is licensed
under the MIT License.                                           Lune is the most recent addition to Belle, Bonne, Sage and
                                                                 provides a way to access the powerful drawing capabilities
                                                                 of the library via the expressive Lua programming language.
                     3. RENDERING                                Lune is also available online as an interactive server-side
                                                                 application at the project homepage.
As the first of the tenets of Belle, Bonne, Sage is “beauty”,
much work has gone into the suboptical details of not just           Lune redirects the C++ painting abstractions to the Lua-
what is rendered, but how it is rendered. Vector-graphics        implemented functions. For the score.create() func-
technologies usually implement a notion of stroked and filled     tion, the user requests the creation of any number of pages
paths (i.e., a line versus a shape such as an elliptical note-   of arbitrary size. When that function finishes, each page’s
head) as well as glyph-based fonts. Unfortunately, the ras-      page.paint() function is called with a painter ob-
terization process for each of these types of drawing is often   ject, passed as a parameter. The painter can then be used
optimized for one particular purpose—for text, legibility;       to draw anything the user wishes to create. As Lune is a re-
and for stroked lines and curves, reducing jaggedness. How-      cent addition to the library, work is still underway to finish
ever, since a filled path can describe any shape the others       mapping the Lua painter to its C++ counterpart.
can describe, its scanline algorithm is usually more general-
                                                                     1 Belle, Bonne, Sage used to directly embed fonts into PDF files before
purpose and stable for the purposes of music notation. More-
                                                                 this technique was adopted and still retains this ability, however it is not
over, in Postscript (and later its derivative PDF) drawing       capable of embedding fonts that use characters outside the non-diacritic
commands were never intended to exactly join font-based          Roman alphabet.
glyphs with other geometry. Ever since the beginning of the          2 See: http://bellebonnesage.sf.net
           6. PRACTICAL APPLICATIONS

Over the course of its development, Belle, Bonne, Sage has
been influenced by the practical applications that depend
on it. The library was developed with real-time interfac-
ing in mind, so that just as one can implement a customized
manner of notation, one can similarly develop need-specific
interfaces, and includes the cross-platform JUCE user in-
terface library to facilitate the rapid development of cross-
platform custom music notation interfaces. Two examples
of interfaces, Chorale Composer and Blume are shown in
the figures.


                                                                 Figure 4. A set of geoemetric-series accelerations created
                                                                 by the Blume interface. The image is projected onto a page
                                                                 and hand-traced by the composer to fill in the other musi-
                                                                 cal details. The interface is named after the colleague who
                                                                 requested it.


                                                                                    7. FUTURE WORK

                                                                 Since Belle, Bonne, Sage defines an assumption-free model
                                                                 of notation, hopefully the ongoing projects that use it will
                                                                 propel the creation of diverse utilities to solve increasingly
                                                                 sophisticated notational requirements. Eventually, a library
                                                                 of interdependent modules could form the basis of a sys-
                                                                 tem for professional publishing, composition of nonstandard
                                                                 scores, algorithmic composition via notation, and custom
                                                                 notation interaces. The creation of a visual interface, such
                                                                 as those which have found widespread popularity in com-
                                                                 mericial music notation software, is an apparent direction of
                                                                 development.

                                                                                     8. REFERENCES

                                                                 [1] H. G. Kaper and S. Tipei, “Dissco: A unified approach
Figure 3. A page from Chorale Composer showing an                    to sound synthesis and composition,” in Proceedings
on-the-fly analysis of the first of Bach’s 371 Harmonized              of 2005 Int’l Computer Music Conference, Barcelona,
Chorales. Work on Chorale Composer[4] began in 2008                  Spain, 2005, pp. 375–378.
with the goal of providing an educational environment for
advanced music theory training to complement previously          [2] M. Kuunskankare and M. Laurson, “Expressive nota-
created four-part harmonic analysis software.                        tion package,” in Computer Music Journal, vol. 30, no.
                                                                     4, Montreal, QC, Canada, 2006, pp. 67–79.
                                                                 [3] W. Schottstaedt, ”Common Music Notation”. Stanford
6.1. Applications in Development                                     University: Stanford: Center for Computer Research in
                                                                     Music and Acoustics, 1992.
Belle, Bonne, Sage is currently being used to implement
an automatic score generator for instruments, voices, and        [4] H. Taube and Author, “Software for teaching music the-
electro-acoustic sounds for DISSCO.[1] As there are no mu-           ory,” in Proceedings of 2009 Int’l Computer Music Con-
sic notation programs that can easily generate sophisticated         ference, Montreal, QC, Canada, 2009, pp. 175–178.
tape scores in conjunction with traditional notation, Belle,
Bonne, Sage is being used to help fill another gap in computer-
based music notation.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:7
posted:10/16/2012
language:English
pages:4