MUSIC NAVIGATION WITH SYMBOLS AND LAYERS Press Operating Committee Chair James W. Cortada IBM Institute for Business Value Board Members Mark J. Christensen, Independent Consultant Richard E. (Dick) Fairley, Founder and Principal Associate, Software Engineering Management Associates (SEMA) Cecilia Metra, Associate Professor of Electronics, University of Bologna Linda Shafer, former Director, Software Quality Institute, The University of Texas at Austin Evan Butterfield, Director of Products and Services Kate Guillemette, Product Development Editor, CS Press IEEE Computer Society Publications The world-renowned IEEE Computer Society produces authoritative, peer-reviewed technical journals, magazines, books, and conference publications, in addition to online courses, certification programs, conferences, and career development services, in areas of computer science and engineering. Please visit http://computer.org for the latest information. IEEE Computer Society / Wiley Partnership The IEEE Computer Society and Wiley partnership allows the CS Press authored book program to produce a number of exciting new titles in areas of computer science, computing and networking with a special focus on software engineering. IEEE Computer Society members continue to receive a 15% discount on these titles when purchased through Wiley or at wiley.com/ieeecs. To submit questions about the program or send proposals please contact Diana Gialo: Email: [email protected], Telephone: 201-748-6018, John Wiley & Sons, Inc., 111 River Street, MS 8-02, Hoboken, NJ 07030-5774. MUSIC NAVIGATION WITH SYMBOLS AND LAYERS Toward Content Browsing with IEEE 1599 XML Encoding Edited by Denis L. Baggi Goffredo M. Haus Cover Design: Michael Rutkowski Cover Illustration: © Ming Lok Fung/iStockphoto Copyright © 2013 by the IEEE Computer Society. All rights reserved. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400, fax 978-646-8600, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print, however, may not be available in electronic format. Library of Congress Cataloging-in-Publication Data: Music navigation with symbols and layers : toward content browsing with IEEE 1599 XML encoding / edited by Denis L. Baggi and Goffredo M. Haus. p. cm. Includes index. ISBN 978-0-470-59716-3 (cloth) 1. Information storage and retrieval systems–Music. 2. XML (Document markup language) I. Baggi, Denis. II. Haus, Goffredo. ML74.3.M87 2012 780.285'674–dc23 2012027836 Printed in the United States of America. 10 9 8 7 6 5 4 3 2 1 Illustration of IEEE 1599, artwork by Marco Mariotta, Marco Mariotta Designs, Ascona, Switzerland. CONTENTS Preface xi A Brief Introduction to the IEEE 1599 Standard xv Denis L. Baggi and Goffredo M. Haus List of Contributors xvii 1 THE IEEE 1599 STANDARD 1 Denis L. Baggi and Goffredo M. Haus 1.1 Introduction 1 Important Features of IEEE 1599 2 Examples of Applications of IEEE 1599 to Increase Music Enjoyment 3 Example I: A Score with Different Versions: “King Porter Stomp,” by Jelly Roll Morton 6 Example II: A Jazz Piece with No Score: “Crazy Rhythm” 6 Example III: An Opera Using the Composer’s Manuscript: Tosca, by Giacomo Puccini 9 Example IV: “Peaches en Regalia,” by Frank Zappa 9 Example V: “Il mio ben quando verrà,” by Giovanni Paisiello 12 Example VI: Brandenburg Concerto No. 3, by J.S. Bach 14 Example VII: Blues, a Didactical Tool to Learn Jazz Improvisation 14 Example VIII: “La caccia,” from Antonio Vivaldi’s Four Seasons (“Autumn”) 16 Example IX: A Musicological Fantasy: Tauhid, a Piece of Free Jazz 17 Conclusions 19 Acknowledgments 19 References 19 2 ENCODING MUSIC INFORMATION 21 Luca A. Ludovico 2.1 Introduction 21 2.2 Heterogeneous Descriptions of Music 22 2.3 Available File Formats 23 2.4 Key Features of IEEE 1599 24 2.5 Multi-Layer Structure 25 vii viii Contents 2.6 The Logic Layer 27 2.7 The Spine 29 2.7.1 Inter-layer and Intra-layer Synchronization 31 2.7.2 Virtual Timing and Position of Events 32 2.7.3 How to Build the Spine 33 References 36 3 STRUCTURING MUSIC INFORMATION 37 Adriano Baratè and Goffredo M. Haus 3.1 Introduction 37 3.2 Music Objects and Music Algorithms 38 3.2.1 Music Objects 38 3.2.2 Music Algorithms 38 3.2.3 Music Objects and Music Algorithms in IEEE 1599 39 3.3 Petri Nets 39 3.3.1 Petri Nets Extension: Hierarchy 40 3.3.2 Petri Nets Extension: Probabilistic Arc Weights 43 3.4 Music Petri Nets 44 3.4.1 Music Petri Nets in IEEE 1599 47 3.5 Music Analysis Using Music Petri Nets 47 3.6 Real-Time Interaction with Music Petri Nets 50 3.7 Conclusions 55 References 55 4 MODELING AND SEARCHING MUSIC COLLECTIONS 57 Alberto Pinto 4.1 Introduction 57 4.2 Describing Music Content 58 4.2.1 Music Search Engines 59 4.3 Music Description in IEEE 1599 60 4.3.1 Chord Grid Objects 64 4.3.2 Petri Net Objects 65 4.3.3 Analysis Objects 65 4.3.4 MIR Objects 66 4.4 The Theoretical Framework 66 4.4.1 The Model Perspective 66 4.4.2 Categories 67 4.5 Music Modeling and Retrieval in IEEE 1599 67 4.5.1 MIR Model 68 4.5.2 MIR Object 69 4.5.3 MIR Subobject 70 4.5.4 MIR Morphisms 70 Contents ix 4.5.5 MIR Features 70 4.5.6 GraphXML Encoding 71 4.6 Case Study: Graph-Categorial Modeling 72 4.6.1 Content Description 72 4.6.2 Content Retrieval 72 4.6.3 MIR Model 73 4.6.4 MIR Object and Subobject 74 4.6.5 MIR Morphism 75 References 75 5 FEATURE EXTRACTION AND SYNCHRONIZATION AMONG LAYERS 77 Antonello D’Aguanno, Goffredo M. Haus, and Davide A. Mauro 5.1 Introduction 77 5.2 Encoding Synchronization Information 78 5.2.1 Extraction of Synchronization Data 82 5.2.2 Case Study 84 5.3 Overview of Synchronization Algorithms 84 5.4 VarSi: An Automatic Score-to-Audio Synchronization Algorithm Based on the IEEE 1599 Format 88 5.4.1 Score Analysis 89 5.4.2 Audio Analysis 90 5.4.3 Decisional Phase 91 References 94 6 IEEE 1599 AND SOUND SYNTHESIS 97 Luca A. Ludovico 6.1 Introduction 97 6.2 From Music Symbols to Sound Synthesis 98 6.2.1 Translating Symbols into a Performance Language 99 6.2.2 Interpretative Models 105 6.2.3 Audio Rendering and Synchronization 106 6.3 From Sound Synthesis to Music Symbols 108 6.4 An Example of Encoding 110 6.5 Conclusions 113 References 114 7 IEEE 1599 APPLICATIONS FOR ENTERTAINMENT AND EDUCATION 115 Adriano Baratè and Luca A. Ludovico 7.1 Introduction 115 7.2 IEEE 1599 for Entertainment 116 7.3 IEEE 1599 for Music Education 117 7.4 IEEE 1599-Based Music Viewers 118 x Contents 7.5 Case Studies 120 7.5.1 Navigating and Interacting with Music Notation and Audio 120 7.5.2 Musicological Analysis 121 7.5.3 Instrumental and Ear Training 126 7.5.4 IEEE 1599 Beyond Music 132 References 132 8 PAST PROJECTS USING SYMBOLS FOR MUSIC 133 Denis L. Baggi 8.1 Brief History 133 8.2 Bass Computerized Harmonization (BA-C-H) 134 8.3 Harmony Machine 135 8.4 NeurSwing, an Automatic Jazz Rhythm Section Built with Neural Nets 141 8.5 The Paul Glass System 145 8.6 A Program That Finds Notes and Type of a Chord and Plays It 147 8.7 Summary of Projects 149 8.8 Conclusions 150 References 150 Appendix A. Brief History of IEEE 1599 Standard, and Acknowledgments 151 Appendix B. IEEE Document-Type Definitions (DTDs) 153 Appendix C. IEEE 1599 Demonstration Videos 177 Index 179 PREFACE Computer Generated Music is the term used by the IEEE Computer Society to indicate the vast scientific and engineering area that deals with computer applications to music and musicology. At one extreme, one finds artistic music created, composed, and/or performed with the help of computers—as are the majority of contemporary music pieces. At the other extreme is electronic signal processing, in which the Technical Committee dedicated to this discipline, in existence since 1992, is happy to include all kinds of projects, includ- ing extremes. Fortunately for both the layman and the practitioner, thousands of publications are in existence on the subject, as interest in this field has grown ever since the inception of the computer.1 Here, we provide a brief review of a few well-known textbooks as a starting point for interested readers, and to allow a positioning of this new work within the existing literature. Experimental Music [Hiller and Isaacson 1959; see also Chapter 7] has the merit of being the first-known experiment from which a piece of music was obtained from a com- puter program. One of the authors, Hiller, also contributed an important chapter in [Lincoln 1970], providing an up-to-date report for the time of the publication. Since then, collec- tions of reports on interesting projects have steadily published, such as Roads [1989] and Roads and Srawn [1985], the extension of the special issue of IEEE COMPUTER dedi- cated to Computer Generated Music [Baggi 1992] with companion audio CD, and, earlier, one of the first collections with a floppy record included in the finished result von Foerster and Beauchamp [1969], as well as Brook [1970] with its mention of symbolic code. As curiosities, we shall mention an early work by Barbaud [1965], with programming code in ALGOL, while Forte [1973] is a model for atonal music that could easily be imple- mented as a programmed system similar to Macsyma, Mathematica, and other systems for symbolic mathematics. This book is therefore not a mere addition to the existing collections on the subject, but instead emphasizes the symbolic representation of music—as practiced in virtually all musical cultures worldwide—and retains all other aspects of music, especially sound. IEEE 1599 standard is a new technology in which the core of music representation is a symbolic file in Extensible Markup Language (XML) that refers to all musical layers representing sound, audio, images (scores), video, metadata (historical details, catalogs, visual art), and the like. It is therefore an encompassing guide that represents, addresses, and incorporates all aspects of music, even those not anticipated at the time of standard approval. It includes all past, present, and future formats and standards for sound, perfor- mance, representation, and so on. 1 And for several centuries, if not millennia, if one considers Babylonian algorithms; see the Introduction. xi