Comments (4)
另外,同为音乐爱好者,我最近也开发了个类似的程序,可以相互参考和交流奥 https://github.com/fkxxyz/simp-score
from musicpy.
play函数在linux下,会报错
In [8]: play(note('A',5)) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-8-e5677dd3da72> in <module> ----> 1 play(note('A',5)) ~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/musicpy/musicpy.py in play(chord1, tempo, track, channel, time1, track_num, name, modes) 198 track_num=1, 199 mode=modes) --> 200 os.startfile(f'{name}.mid') 201 202 AttributeError: module 'os' has no attribute 'startfile'
但是在当前目录生成了个 temp.mid 能够播放。目测是 linux下的python没有 os.startfile 这个函数,仅仅windows才有,希望跨平台适配。
好的,会去增加一下跨平台的支持。
from musicpy.
另外,同为音乐爱好者,我最近也开发了个类似的程序,可以相互参考和交流奥 https://github.com/fkxxyz/simp-score
好的,我会关注这个项目,另外关于和弦的部分,我这个musicpy的库值得一提的是有一个智能判断任意一组音是什么和弦的算法,以及智能分离一首钢琴曲的主旋律和和弦部分的算法。这两个算法分别在detect函数和split_melody函数里,在musicpy.py文件里可以看到代码。
from musicpy.
目前已经把musicpy里的play函数的跨平台支持写完了,目前支持windows/Linux/MacOS这几个系统。已经更新到github了,可以直接下载,我待会上传到PYPI。如果在Linux播放还有出现问题,请看README的注意事项。
from musicpy.
Related Issues (20)
- Cannot hear any sound from sample code HOT 7
- 以五线谱形式显示对象 HOT 5
- 控制播放 HOT 1
- 关于track类型与build函数的几个问题(可能是bug) HOT 4
- 音符的degree属性可修改,但修改后其他属性并不会跟着改 HOT 1
- I'm curious about why "math.log" applies to denominator of time_signature message HOT 2
- 'str' object has no attribute 'track_number' HOT 1
- Can you provide a basic example of how to use the sampler HOT 2
- Can't load the module if there is no audio interface HOT 1
- Sampler doesn't properly handle 32bit wav files HOT 1
- Note example HOT 1
- Question on using `build` and `interval` notation as pertains to `chord_analysis` HOT 5
- Unable to set volume for tracks HOT 2
- 请教大佬如何在一个chord的起始位置添加休止符? HOT 3
- split_melody返回的note对象 HOT 2
- 这里是不是没有考虑num小于0的情况呀 HOT 1
- 这里是不是应该修改为 current_note = self[current_degree-1].name HOT 1
- Demos won't work without an explicit sleep HOT 7
- 翻譯和弦判斷算法github wiki的文檔 HOT 5
- Friendly reminder of updating the scale page on Wiki HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from musicpy.