Skip to main content

MusicXML-Synthesizer

This program is still under development and test.

A program can convert solola results to musicXML(.musicxml) format

[Solola results] => MusicXML-Synthesizer => [musicxml format file]

Note: We will set MuseScore and Tux Guitar as validation editor. It means that MusicXML-Synthesizer will ensure both of editor can successfully open output.

Requirements

  • pipenv
  • other dependencies check out Pipfile

Usage

# basic 
python cli.py [-s SOLOLA_PATH] [-db DOWNBEAT_PATH] [-b BEAT_PATH]
              [-o OUTPUT_PATH] [-x EXECTUE_VALIDATION]

python cli.py -s /e/workplace/projects/solola/MusicXML-Synthesizer/input_mock/bend/FinalNotes.txt -db /e/workplace/projects/solola/MusicXML-Synthesizer/input_mock/bend/downbeats.txt -b /e/workplace/projects/solola/MusicXML-Synthesizer/input_mock/bend/beats.txt -o outputs/test/test.musicxml

# detail
python cli.py -h
# example
solola_list = parse_notes_meta_to_list(
      solola_path)
beats_list = parse_notes_meta_to_list(
      beat_path)
downbeats_list = parse_notes_meta_to_list(
      downbeat_path)

output_path = './output.mzxml'

# setup
synthesizer = Synthesizer()
synthesizer.save(solola_list, downbeats_list, beats_list)

# synthesize musicXML
xml = synthesizer.execute(output_path)

# create folder and write file to file system
write_file(output_path, xml)

Test

We use pytest and pytest-watch. Use ptw command in director root

# pytest show verbose & print
pytest -s -v

# pytest watch
ptw . -- -vvv

# coverage
python -m pytest tests -s -v --cov=./

# run single test case
ptw tests/test_unit_Synthesizer.py  -- -k 'test_Synthesizer_annotate_rest_and_tech
nique' -vvv --cov=./

Appendix

SoloLa output format (Input)

Notation:

(0)    (1)   (2)   (3)   (4)   (5)   (6)   (7)   (8)   (9)  (10)  (11) # index
Pit     On   Dur  PreB     B     R     P     H     S    SI    SO     V # attribute abbr. name

Example:

[    66   1.24   0.5     2     0     0     0     0     1     2     1     1]

value

  • Pit: pitch (MIDI number)

  • On: onset (sec.)

  • Dur: duration (sec.)

  • PreB: pre-bend

    - 0 for none,
    - 1 for bend by 1 semitone,
    - 2 for bend by 2 semitone,
    - 3 for bend by 3 semitone
    
  • B: string bend

    - 0 for none,
    - 1 for bend by 1 semitone,
    - 2 for bend by 2 semitone,
    - 3 for bend by 3 semitone
    
  • R: release

    - 0: none, 
    - 1: release by 1 semitone,
    - 2: release by 2 semitone,
    - 3: release by 3 semitone
    
  • P: pull-off

    - 0: none, 
    - 1: pull-off start,
    - 2: pull-off stop
    
  • H: hammer-on

    - 0: none,
    - 1: hammer-on start,
    - 2: hammer-on stop
    
  • S: legato slide

    - 0: none,
    - 1: legato slide start, 
    - 2: legato slide stop
    
  • SI: slide in

    - 0: none,
    - 1: slide in from below,
    - 2: slide in from above
    
  • SO: slide out

    - 0: none,
    - 1: slide out downward,
    
  • V: - 0: none - 1 for vibrato: vibrato with extent smaller or equal to 1 semitone, - 2 for wild vibrato: vibrato with extent larger than 1 semitone

musicXMl (Output)

musicXML example

Release files for musicXML-synthesizer 0.9.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for musicXML-synthesizer 0.9.14
File Size Uploaded
musicXML-synthesizer-0.9.14.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for musicXML-synthesizer 0.9.14
File Interpreter ABI Platform
musicXML_synthesizer-0.9.14-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / musicXML-synthesizer-0.9.14.tar.gz

Download URL musicXML-synthesizer-0.9.14.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0e33f02c077871785b93841bdc6e684559ef2ff60076a266da2f8b66ba6b2d5b
BLAKE2b-256 checksum
How to use checksums
2061bdb8e1b64cb0e6370b7e54271b6fce53355608350446674e24296b33ef88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

Release files / musicXML_synthesizer-0.9.14-py3-none-any.whl

Download URL musicXML_synthesizer-0.9.14-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4714f09a8d8b6feeb4f8f85b77534e146d3e3091f8e99fa3083af8bd0049d30f
BLAKE2b-256 checksum
How to use checksums
733c03ba43023632806e18aeb63f4c3a49cc98720875869be7a717fac33f3d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.9.14 This release

2 release files

0.9.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page