Skip to main content

A package to transform solola output to standard musicXML format

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

musicXML-synthesizer-0.9.14.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

musicXML_synthesizer-0.9.14-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file musicXML-synthesizer-0.9.14.tar.gz.

File metadata

  • Download URL: musicXML-synthesizer-0.9.14.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for musicXML-synthesizer-0.9.14.tar.gz
Algorithm Hash digest
SHA256 0e33f02c077871785b93841bdc6e684559ef2ff60076a266da2f8b66ba6b2d5b
MD5 c72636a1266aee9a8c58f28864f4dd79
BLAKE2b-256 2061bdb8e1b64cb0e6370b7e54271b6fce53355608350446674e24296b33ef88

See more details on using hashes here.

File details

Details for the file musicXML_synthesizer-0.9.14-py3-none-any.whl.

File metadata

  • Download URL: musicXML_synthesizer-0.9.14-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for musicXML_synthesizer-0.9.14-py3-none-any.whl
Algorithm Hash digest
SHA256 4714f09a8d8b6feeb4f8f85b77534e146d3e3091f8e99fa3083af8bd0049d30f
MD5 891d90c6f830c8fdb84a81d30e20ff7f
BLAKE2b-256 733c03ba43023632806e18aeb63f4c3a49cc98720875869be7a717fac33f3d72

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page