Menu

Introduction

SunnyFish
Attachments

Live Score Display

Author: Zeyu Jin (Carnegie Mellon University)

Contents

  1. [Introduction]
  2. [LSD API Usage]
  3. [Hcmp Communication Spec]

Introduction

Live Score Display (LSD for short) is an API for displaying musical score in live performance. This project is a part of Human-computer music performance which is intended to make virtual players (computers) cooperate with human in real music performance senario. The score display is such a virtual player who shows the proper part of score to human as music goes on.

The main challenge for a designing a live score display lies mainly in the complication of score notations, such as repeats (|: :|), brackets ( 1---- :| 2----- ), DS/DC family (like toCoda-DS.al.Coda-Coda), and so on. In some cases where nested repeats exist ( |: |: :| :| ), sophisticated algorithms are needed to deal with the confusion. In LSD, the main idea is to flattened the score to a new model of no repeats or jumps. And to do this, the score is first convert to a intermediate form called static score where all types of symbols are translated into a small set of instructions (loops and jumps) that are sufficient to describe the score. The process from notation to static score is very much like compiling. Then the static score is converted to the flattened score model by unwrapping all the loops and jumps, which is very easy. To display the score in live performance, the flattened score is further converted to a form called dynamic score where the time (in beats) and the areas of page are associated.

To play with LSD, one needed to notated the score image manually (sorry, no automatic score recognition tool, maybe later); this process is to tell the program where the system, measures and symbols are on the score. Then the program will convert the user's notation automatically to flattened score model. If needed the user can re-arranged the score based on labels (like A, A1, B, etc). Then the program can generate dynamic score model and the live display window that plays with HCMP conductor.

This API package is not just specialized for HCMP. You can wire it into your own application and control it yourself. To play it with HCMP conductor, follow the [HCMP messaging protocol].

For more detailed API usage, go to [LSD API Usage]. To get started quickly, please read on.

Getting Started

The fastest way: use LDMainWindow, a fully-featured application as it is.
The standard way: use LDController:

  1. set workplace
    • use setWorkplace(String dir) to set your workspace
    • retrieve names of folders that contains score images by getDirList()
    • set working folder by setDir(int index), the index is indicated by returned list of getDirList()
  2. get GUI component
    • for notation, use getNotationPanel()
    • for toolbars related with notation, use getToolbarXXXX()
    • to open dialogs for arrangement, use openDialogArrangement(JFrame, FlattenedScore)
    • to open dialogs for live display, use openDialogLive(JFrame, DynamicScore)
  3. To open dialogs, you need the corresponding score models, and it can be done by
    • getScoreSymbols(): return the model of the original notations
    • boolean parse(): parse notation to flattened score. If false returned, the notation may contain unsolved errors. In this case, use getErrorList() to see the error.
    • boolean getScoreStatic(): return static score model. Use if after parse().
    • boolean getScoreFlat(): return flattened score model. Use if after parse().
    • boolean getArragement(): build the arrangement model of the current flattened score model.
    • boolean getScoreDynamic(): build dynamic score based on the flattened score and the user's arrangement.

If you want to know other functions of this API (which may not be as useful as the above), see [LSD API Usage].

Example

Example for opening a Live View window:

LDController controller = new LDController("/somefolder/myworkspace");
String[] folders = controller.getDirList();
if (folders.length < 1) return;
controller.setDir(0);
if (controller.parse()) {
    controller.openDialogLive(null, controller.getScoreFlat());
} else {
    System.out.println(controller.getErrorList());
}

it looks like:

That is done.

FYI, this wiki uses Markdown syntax.

Project Admins:


Related

Wiki: HCMP messaging protocol
Wiki: Introduction
Wiki: LSD API Usage

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.