Git Product home page Git Product logo

projectmu's Introduction

ProjectMu

ProjectMu 是一个用于通过简谱生成 .wav 格式音频文件的工具。

ProjectMu is a tool for generating audio files in .wav format from numbered musical notations.

使用方法

usage: mu.py [-h] [-o OUTPUT] [-t {sn,pl,sq,tr,st}]
             [-r SAMPLE_RATE] [-w {1,2}] [-a ATTACK] [-d DECAY]
             [-v VOLUME]
             filename

ProjectMu - A Numbered Notation Score Compiler

positional arguments:
  filename              path to the input numbered notation score file

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output wav file path
  -t {sn,pl,sq,tr,st}, --timbre {sn,pl,sq,tr,st}
                        timbre of the output sound
  -r SAMPLE_RATE, --sample-rate SAMPLE_RATE
                        sample rate of the output sound
  -w {1,2}, --sample-width {1,2}
                        sample width of the output sound
  -a ATTACK, --attack ATTACK
                        attack time of the output sound
  -d DECAY, --decay DECAY
                        decay time of the output sound
  -v VOLUME, --volume VOLUME
                        volume of the output sound

示例:

mu -o 'Bad Apple!!.wav' -t sine 'example/Bad Apple!!.nmn'

简谱格式说明

示例

  • Amazing Grace
1=G 3/4 88
0 0 <5,1> |
1 - [3]<321> | 3 - <32> | 1 - 6, |
5, - <5,1> | 1 - [3]<321> | 3 - <23> | 5 - - |
- - <35> | 5 - [3]<321> | 3 - <32> | 1 - 6, |
5, - <5,1> | 1 - [3]<321> | 3 - 2 | 1 - - | - - ||
  • Bad Apple!! - nomico
1=F# 4/4 137
6,, <<06,,5,,6,,>> 6,, <<06,,5,,6,,>> | 6,, <<06,,5,,6,,>> <6,,<6,,1,>> <2,<1,2,>> |
6,, <<06,,5,,6,,>> 6,, <<06,,5,,6,,>> | 6,, <<06,,5,,6,,>> <2,<1,2,>> <1,<6,,1,>> |,

<6,7,> <12> 3 <65> | 3 6, <32> <17,> | <6,7,> <12> 3 <21> | <7,6,> <7,1> <7,6,> <#5,7,> |
<6,7,> <12> 3 <65> | 3 6, <32> <17,> | <6,7,> <12> 3 <21> | 7, 1 2 3 |,

<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <67> | <1'7> <65> 3 <23> | <21> <7,5,> 6, |,

<35> |,

0 |;

G 4/4 137
<35> |
<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <23> | <21> <7,5,> 6, <5,6,> | <7,1> <23> 6, <35> |
<56> <32> 3 <23> | <56> <32> 3 <67> | <1'7> <65> 3 <23> | <21> <7,5,> 6, 0 |
<6,.6,/> <-6,> <6,.6,/> <-6,> | <6,.6,/> <-6,> <6,.6,/> <-6,> |
<6,.6,/> <-6,> <6,.6,/> <-6,> | <6,.6,/> <-6,> <6,.6,/> <-0> |:

1 1 2 2 3 4 3 5 1 1 2 2 3 6

段落格式

符号 说明
1=F# 调式。1=F# 表示升 F 大调,又如,降 C 小调表示为 6=Cb
4/4 节奏型。如 4/4, 6/8, 1/2 ...
174 每分钟节拍数(BPM)
| 小节线
|, 用于表示该段乐谱结束,且下一段的调号、节奏型、速度和当前段相同。(通常用于当乐曲中存在反复记号时)
|; 用于表示该段乐谱结束,下一段需要重新设置调号、节奏型和速度。(用于当乐曲的调号、节奏型与速度中途改变时)
|| 用于表示乐谱结束。
|: 当乐谱中存在反复记号(各段的演奏顺序需要手动排列)时,用此符号表示乐谱结束。并在后面输入乐谱各段在整首乐曲中的排列顺序。

音符格式

符号 说明
1 ~ 7 音符
0 休止符
# 升号(加在数字前)
b 降号(同上)
@ 还原号(同上)
' 将当前音符升高八度
, 将当前音符降低八度
- 延长线,每加一条横线相当于延长一个四分音符的长度,也可用于替代延音线第一个以后的音符(表示延续前一个音符)
. 附点
/ 用于表示下加线
<...> 表示为 <> 之间的所有音符添加下加线。例如,<<1/2/>2/> 等同于 1///2///2//.
[3]{...} 三连音,同理, [5]{...} 表示五连音。由四拍分拆而来的七连音可写作 [7]{...}[7:4]{...},而由六拍分拆而来或由八拍结合合而来的七连音则分别需表示为 [7:6]{...}[7:8]{...},依此类推。此外,[x]{<...>} 可略写为 [x]<...>

更多乐谱示例见此处

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.