Skip to content

Releases: burakuyar/MusicXMLConverter

MusicXMLConverter v1.2.1

21 Aug 12:02
Compare
Choose a tag to compare

MusicXMLConverter

Tools to generate MusicXML scores from SymbTr txt and mu2 files.

Usage

from musicxmlconverter.symbtr2musicxml import SymbTrScore

txtpath = 'path_to_symbtr_txt_file'
mu2path = 'path_to_symbtr_mu2_file'

# the symbtr-name without the extension, can be omitted if the original
# filename is kept
symbtrname = 'kurdi--turku--sofyan--dalda_cikmis--'

# the related musicbrainz mbid is supplied as a url
mbid_url = 'http://musicbrainz.org/work/50bc4b54-5e14-4a98-bd44-ee5493479c7d'

# output path
outpath = 'path_to_symbtr_musicxml_output_file'

# instantiate the score object
piece = SymbTrScore(txtpath, mu2path, symbtrname=symbtrname, mbid_url=mbid_url)

# xml conversion; outputs the xml score as string
xmlstr = piece.convertsymbtr2xml()

# you can also save the score to a file after conversion
piece.writexml(outpath)

You can refer to demo.ipynb for an interactive demo.

Installation

If you want to install musicxmlconverter, it is recommended to install musicxmlconverter and its dependencies into a virtualenv. In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install musicxmlconverter like this instead:

pip install -e .

Now you can install the rest of the dependencies:

pip install -r requirements

Changelog

  • Updated the requirement packages

Authors

Burak Uyar burakuyar@gmail.com
Sertan Şentürk contact@sertansenturk.com

musicxmlconverter v1.2.0

19 Apr 00:28
Compare
Choose a tag to compare

MusicXMLConverter

Tools to generate MusicXML scores from SymbTr txt and mu2 files.

Usage

import os
from musicxmlconverter.symbtr2musicxml import SymbTrScore

txtpath = 'path_to_symbtr_txt_file'
mu2path = 'path_to_symbtr_mu2_file'

# the symbtr-name without the extension, can be omitted if the original
# filename is kept
symbtrname = 'kurdi--turku--sofyan--dalda_cikmis--'

# the related musicbrainz mbid is supplied as a url
mbid_url = 'http://musicbrainz.org/work/50bc4b54-5e14-4a98-bd44-ee5493479c7d'

# output path
outpath = 'path_to_symbtr_musicxml_output_file'

# instantiate the score object
piece = SymbTrScore(txtpath, mu2path, symbtrname=symbtrname, mbid_url=mbid_url)

# xml conversion; outputs the xml score as string
xmlstr = piece.convertsymbtr2xml()

# you can also save the score to a file after conversion
piece.writexml(outpath)

You can refer to demo.ipynb for an interactive demo.

Installation

If you want to install musicxmlconverter, it is recommended to install musicxmlconverter and its dependencies into a virtualenv. In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install musicxmlconverter like this instead:

pip install -e .

Now you can install the rest of the dependencies:

pip install -r requirements

Changelog

  • Refactoring according tp PEP8 conventions
  • Added missing makam and usul attributes
  • Froze requirements

Authors

Burak Uyar burakuyar@gmail.com
Sertan Şentürk contact@sertansenturk.com

MusicXMLConverter v1.1

09 Mar 23:54
Compare
Choose a tag to compare

MusicXMLConverter

Tools to generate MusicXML scores from SymbTr txt and mu2 files.

Usage

import os
from musicxmlconverter.symbtr2musicxml import symbtrscore

txtpath = 'path_to_symbtr_txt_file'
mu2path = 'path_to_symbtr_mu2_file'

# the symbtr-name without the extension, can be omitted if the original filename is kept
symbtrname = 'kurdilihicazkar--sarki--agiraksak--ehl-i_askin--tatyos_efendi'

# the related musicbrainz mbid is supplied as a url
mbid_url = 'http://musicbrainz.org/work/b43fd61e-522c-4af4-821d-db85722bf48c' 

# output path
outpath = 'path_to_symbtr_musicxml_output_file'

piece = symbtrscore(txtpath, mu2path, symbtrname=symbtrname, mbid_url=mbid_url) #txt info is fetched and attributes are calculated
xmlstr = piece.convertsymbtr2xml()  # xml conversion; outputs the xml score as string
piece.writexml(outpath)  # you can also save the score to a file after calling the conversion method above

You can refer to demo.ipynb for an interactive demo.

Installation

If you want to install musicxmlconverter, it is recommended to install musicxmlconverter and its dependencies into a virtualenv. In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install musicxmlconverter like this instead

pip install -e .

Now you can install the rest of the dependencies:

pip install -r requirements

What's changed in MusicXmlConverter v1.1

  • Refactored the section extraction code to call the new symbtrdataextractor v2.0.0-alpha syntax

Authors

Burak Uyar burakuyar@gmail.com
Sertan Şentürk contact@sertansenturk.com

MusicXMLConverter v1.0.1

24 Jan 20:17
Compare
Choose a tag to compare

MusicXMLConverter

Tools to generate MusicXML scores from SymbTr txt and mu2 files.

Usage

import os
from musicxmlconverter.symbtr2musicxml import symbtrscore

txtpath = 'path_to_symbtr_txt_file'
mu2path = 'path_to_symbtr_mu2_file'

# the symbtr-name without the extension, can be omitted if the original filename is kept
symbtrname = 'kurdilihicazkar--sarki--agiraksak--ehl-i_askin--tatyos_efendi'

# the related musicbrainz mbid is supplied as a url
mbid_url = 'http://musicbrainz.org/work/b43fd61e-522c-4af4-821d-db85722bf48c' 

# output path
outpath = 'path_to_symbtr_musicxml_output_file'

piece = symbtrscore(txtpath, mu2path, symbtrname=symbtrname, mbid_url=mbid_url) #txt info is fetched and attributes are calculated
xmlstr = piece.convertsymbtr2xml()  # xml conversion; outputs the xml score as string
piece.writexml(outpath)  # you can also save the score to a file after calling the conversion method above

You can refer to demo.ipynb for an interactive demo.

Installation

If you want to install musicxmlconverter, it is recommended to install musicxmlconverter and its dependencies into a virtualenv. In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install musicxmlconverter like this instead

pip install -e .

Now you can install the rest of the dependencies:

pip install -r requirements

Authors

Burak Uyar burakuyar@gmail.com
Sertan Şentürk contact@sertansenturk.com

MusicXMLConverter v1.0

20 Jan 18:33
Compare
Choose a tag to compare

MusicXMLConverter v1.0

Introduction

This tool is prepared for generating MusicXML scores from SymbTr txt and mu2 files.

This is the first release of MusicXMLConverter. The tool generates a valid MusicXML score for given txt and mu2 scores of a piece from the SymbTr collection.

Some features of MusicXML files generated by this tool are:

  • Includes related metadata
  • Includes the link of related work in MusicBrainz
  • Supports the accidentals and ornaments in this music tradition
  • Includes musical section information
  • Includes phrase and flavor information for some pieces
  • Includes lyrics-related information (eg.syllable, word, line)

Outputs are tested in MuseScore. For correct pitch in playback, plugins can be used.

Usage

import os
from musicxmlconverter.symbtr2musicxml import symbtrscore

txtpath = 'path_to_symbtr_txt_file'
mu2path = 'path_to_symbtr_mu2_file'

# the symbtr-name without the extension, can be omitted if the original filename is kept
symbtrname = 'kurdilihicazkar--sarki--agiraksak--ehl-i_askin--tatyos_efendi'

# the related musicbrainz mbid and the type is supplied as a dictionary
mbid = {u'mbid': u'b43fd61e-522c-4af4-821d-db85722bf48c', u'type': u'work'}  

# output path
outpath = 'path_to_symbtr_musicxml_output_file'

piece = symbtrscore(txtpath, mu2path, symbtrname=symbtrname, mbid=mbid) #txt info is fetched and attributes are calculated
xmlstr = piece.convertsymbtr2xml()  # xml conversion; outputs the xml score as string
piece.writexml(outpath)  # you can also save the score to a file after calling the conversion method above

You can refer to demo.ipynb for an interactive demo.

Installation

If you want to install musicxmlconverter, it is recommended to install musicxmlconverter and its dependencies into a virtualenv. In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install musicxmlconverter like this instead

pip install -e .

Now you can install the rest of the dependencies:

pip install -r requirements

Known Issues

  • Metadata special to this music tradition (makam, usul, form) will be printed in a more appropriate field when MusicXML supports it.
  • The measures of pieces with long usuls (eg. 28/4) are divided into subdivisions optionally. This changes the usul labeling and the original measure information. Changes will be applied when MusicXML supoorts it.
  • Beam information will be retrieved according to the usul of the piece and added into the MusicXML file.

Authors

Burak Uyar burakuyar@gmail.com
Sertan Şentürk contact@sertansenturk.com