Code Monkey home page Code Monkey logo

docx2musicxml's Introduction

Word录入简谱 + Python转MusicXML格式

Step1:在Word中安装新的字体

将DiziFont.ttf下载至本地后,在Word中进行安装,就可以和Word中普通的字体(eg: 宋体,黑体)一样使用了。

Step2:在Word中进行简谱录入

开始进行简谱的录入。首先,第一行为乐曲标题,第二行为调号和节拍。然后,在Word中将字体调至DiziFont,并使用如下的规则进行具体音符的录入:

  • 1 2 3 4 5 6 7:基本音符
  • 8:高音
  • *:低音
  • z:八分音符
  • x:十六分音符
  • c:三十二分音符
  • b:十六分音符低音
  • n:三十二分音符低音
  • \:小节线

一个示例如下所示:

image

Step3:将简谱显示的Word文档转成MusicXML/MIDI格式

使用Word2XML.ipynb可将Word文档转换成MusicXML文件。

在MuseScore中可对MusicXML格式文件进行五线谱式的显示,一个例子如下,之后也可以通过MuseScore导出MIDI格式文件:

image


环境

  • Windows系统
  • Microsoft Word
  • Python 3
    • Music21
    • Docx

docx2musicxml's People

Contributors

hrsoup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

apspecial

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.