Giter VIP home page Giter VIP logo

musicxml-synthesizer's Introduction

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

musicxml-synthesizer's People

Contributors

ykhorzon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.