Skip to content

Maestro: Sheet music through an external conversion pipeline

This Maestro fork connects a React upload interface to a Spring backend and external music-conversion tools. Turning a score image into MIDI passes through an optical-recognition stage and an intermediate score representation.

Application and services Fork
  • Updated
  • Java · 47.34%
  • AGPL-3.0
Upstream credited
Repository languagesJava 47.34%6

Shares calculated from GitHub Linguist bytes.

Language%Bytes
Java47.34%33,471
TypeScript32.3%22,838
Python16.02%11,324
Dockerfile3.14%2,222
HTML1%710
Shell0.2%138

GitHub · README · Language statistics

Overview

Why it exists

Optical Music Recognition (OMR) pipeline translating sheet music scans into MIDI score sequences.

Best fit

Digitization of physical sheet music for playback and editing.

Getting started

These commands come from the repository documentation. They were not run during this review.

README.md · Getting Started
  git clone https://github.com/PrimePhil/PFE008
README.md · Frontend
  cd maestro-app
README.md · Frontend
  npm install
README.md · Frontend
  npm run start
README.md · Tests
gradle test
Tasks declared in manifests

maestro-app/package.json

start
react-scripts start
build
react-scripts build
test
react-scripts test

Repository references

Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.

Prerequisites and first run

Requirements

README.md

  • Audiveris
  • Java 22.0.2
  • Python 3.12
  • npm 8.19.4
  • Nodejs 18.13.0
Read the full instructions ↗

Getting Started

README.md

Start by cloning the project
Read the full instructions ↗

Prerequisites

backend/README.md

  1. Java Installation:
  • Ensure you have Java installed. The version used for this project is:
  1. Gradle:
  • The project includes a Gradle wrapper, so you don’t need to install Gradle manually. If needed, you can download Gradle here. The project uses Gradle v8.8.
  1. OCR Language Data:
  • Audiveris relies on Tesseract for Optical Character Recognition (OCR). You’ll need to install language data files. Refer to the Audiveris guide for setup instructions.
  1. Audiveris Setup:
  • The Audiveris distribution is not included in the repository. You need to download it manually and place it in the backend/audiveris/dist directory.
  • Download the Audiveris distribution (Windows installer) from here.
  • After installation, copy the bin and lib directories from the Audiveris installation directory to backend/audiveris/dist/. Your project structure should look like this:
Read the full instructions ↗
API and integration

Endpoint Overview

backend/README.md

There is currently one main route in the API:
Read the full instructions ↗
Operations and troubleshooting

Deployment

README.md

To run locally a docker-compose To build docker’s image move to the root (where the Dockerfile is) and use : When you have a docker’s image, you can run it with the command : Note : To deploy the application, you must install Docker before hand. you can also used an image already build on the offical Docker repo with the command : if you want to update this image, you can use the commands : Note : You need to be a member of the organization to push a new images.
Read the full instructions ↗
Development and contributions

Tests

README.md

To run the tests suites go into the backend repository and run the command It is important to note that the python’s tests will be executed with the gradle command
Read the full instructions ↗

`npm test`

maestro-app/README.md

Launches the test runner in the interactive watch mode.
Read the full instructions ↗
Source documentation

3 documents read from 3 candidates.

Features and components 2

Upload boundary
ConvertController accepts multipart uploads at /convert. It rejects empty files, checks the 10 MiB size limit and calls a file-signature validator before saving the input. Optional tempo input travels with the conversion request.
External processes
AudiverisController builds an OS-dependent command and waits for the Audiveris process. The backend also includes MxlToMidi.py. Process startup, intermediate files and the returned download are separate failure points.

Architecture

The components and their connections remain available as text. The diagram adds an interactive view.

System context Context
  1. React file upload
  2. Spring validation
  3. Audiveris recognition
  4. MusicXML conversion stage
  5. MIDI download

Links verified in the repository.

Mermaid Interactive diagram (loads on open)

System overview of the components and connections verified in the repository.

Static architecture view for Maestro
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
  n0["React file upload"]
  n1["Spring validation"]
  n2["Audiveris recognition"]
  n3["MusicXML conversion stage"]
  n4["MIDI download"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n3 --> n4
Text version of the diagram
  • React file upload → Spring validation
  • Spring validation → Audiveris recognition
  • Audiveris recognition → MusicXML conversion stage
  • MusicXML conversion stage → MIDI download
Follow one path through the code

Follow /convert into the file checks, then inspect how AudiverisController chooses its executable and output directory. A successful HTTP upload is only the start; conversion also depends on the external tool and generated files.

Types and file structure

12 declared types, with 12 in the base-relationship overview.

Type diagram
classDiagram
direction TB
class t0fc2da07ca26["AudiverisController"] {
  AudiverisController()
  convert()
  convertMxlToMidi()
}
class te09535b4ea27["ConvertController"] {
  convert()
  healthCheck()
}
class t5b329a34a4e0["BackendApplication"] {
  main()
}
class t5026bc97d4a6["ConversionResponse"] {
  getFileName()
  setFileName()
  getDownloadUri()
  setDownloadUri()
}
class ta28a28fad99c["FileUtil"] {
  saveFile()
  getFileAsResource()
  isValidFile()
  cleanupDirectories()
}
class t3a8c9a5b3e47["AudiverisController_tests"] {
  setup()
  testConvertSuccess()
  testConvertWrongFile()
  testConvertFileOutput()
}
class tc9ddabb9fef2["ConvertControllerTest"] {
  setup()
  testConvertSuccess()
  testConvertFail()
  testConvertFileNotFound()
}
class tf78cdd633a9f["FileUtil_tests"] {
  setup()
  testSaveFile()
  testGetFileAsResource()
  testSaveFileThrowsIOException()
}
class t306c8eab2abe["TestMxlToMidi"] {
  setUp()
  test_apply_dynamics_to_notes()
  test_print_note_details()
  test_print_part_details()
}
class t5c7dff211126["MusicSheetUploaderProps"] {
  <<interface>>
}
class t28f92fc28615["UseMaestroClientResult"] {
  <<interface>>
}
class td89584c9e8be["MusicSheetUploadFormFooterProps"] {
  <<interface>>
}
class b385cfa4f4c5b["unittest.TestCase"] {
  <<unresolved_base>>
}
b385cfa4f4c5b <|-- t306c8eab2abe

Unresolved bases remain labelled; full signatures are not reconstructed.

Type index

Reference

32 / 32 eligible files read (128 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

File map
flowchart TD
  root["Maestro"]
  f0["maestro-app/package.json"]
  root --> f0
  f1["backend/src/main/MxlToMidi.py"]
  root --> f1
  f2["backend/src/main/java/PFE008/backend/AudiverisController.java"]
  root --> f2
  f3["backend/src/main/java/PFE008/backend/ConvertController.java"]
  root --> f3
  f4["README.md"]
  root --> f4
  f5["docker-compose.yml"]
  root --> f5
  f6["entrypoint.sh"]
  root --> f6
  f7["backend/README.md"]
  root --> f7
  f8["maestro-app/README.md"]
  root --> f8
  f9["maestro-app/src/App.test.tsx"]
  root --> f9
  f10["maestro-app/src/App.tsx"]
  root --> f10
  f11["maestro-app/src/index.tsx"]
  root --> f11
  f12["maestro-app/src/setupTests.ts"]
  root --> f12
  f13["maestro-app/src/hooks/useMaestroClient.ts"]
  root --> f13
  f14["maestro-app/src/i18n/i18n.tsx"]
  root --> f14
  f15["maestro-app/src/mocks/convertToMidiMock.tsx"]
  root --> f15

Files to read 4

References