-
-
Notifications
You must be signed in to change notification settings - Fork 130
Rainbow Dreamer edited this page Mar 13, 2023
·
17 revisions
Musicpy是一门基于python的领域特定的音乐编程语言,是设计给音乐人通过乐理逻辑和算法在非常简洁的语法下创作音乐的。
Musicpy不只可以用来写代码作曲,它还有一些我自己开发的音乐分析算法,包括判断任何一组音组成的和弦类型的乐理逻辑算法,分离出一首曲子的主旋律与和弦部分的算法。
在这个百科,我将主要讲解musicpy的数据结构,基本语法以及如何使用。
我写这门语言的初衷就是能够用简洁的代码来作曲,更重要的是这门语言完全融入了乐理逻辑,因此你可以在乐理上面做出各种尝试。
我致力于在这个项目中将整个乐理体系彻底地数学模型化,计算机化,构建一整个计算机能够理解的乐理系统,让大家可以在musicpy这个世界里研究任何跟音乐,乐理相关的算法,智能分析,实验性作曲等等。(除此之外,你可以用musicpy来写任何你喜欢的类型的音乐,古典音乐,爵士,摇滚,流行,电音,等等)
关于musicpy的数据结构,请看数据结构部分。
关于musicpy的基本语法和其他有用的功能,请看基本语法部分。
关于musicpy作曲代码的例子,请看作曲代码示例部分。
我在2021年6月为musicpy添加了一个新的模块daw
,这个模块可以加载音源,比如音频文件和soundfonts音源文件(.sf2, .sf3, .dls),使用musicpy播放或导出音频文件,使用起来非常简单和方便。
如果你想了解如何使用这个模块,请看musicpy宿主模块部分。
如果你想在musicpy在音乐分析算法方面进行更多的探索,请看算法部分,这部分包括了我使用musicpy设计的乐理分析算法。
注意:如果你在使用musicpy时遇到任何问题,你可以先看看这个章节 常见的问题,看看你的问题是否是其中之一,并在这里找到解决方法。
- Basic syntax of note type
- Basic syntax of chord type
- Basic syntax of scale type
- Basic syntax of piece type
- Basic syntax of track type
- Basic syntax of tempo type
- Basic syntax of pitch_bend type
- Basic syntax of pan type
- Basic syntax of volume type
- Basic syntax of drum type
- Basic syntax of rhythm type
- Musicpy composition code examples Part 1
- Musicpy composition code examples Part 2
- Musicpy composition code examples Part 3
- Introduction of musicpy algorithms module
- The algorithm to split the main melody and chords from a piece of music
- The algorithm to determine the chord type of any group of notes according to the logic of music theory
- The algorithm to analyze the chord progressions of a piece of music
- The algorithm to analyze tonality and modulations in a piece of music