Comments (2)
This is because musicpy uses midiutil to write MIDI files, and the time_signature MIDI event in midiutil handles the denominator as the power of 2, you can refer to the function addTimeSignature
here, and when reading MIDI files, musicpy uses mido which reads time_signature MIDI event's denominator as normal number, so I need to do a conversion of logarithm here, when writing the time_signature MIDI event the denominator in terms of power of 2 straight passes to the midiutil addTimeSignature
function.
So here what you get is actually correct, here the actual denominator is 2 ** 2
which is 4. But yes, I think this can be improved, I can do conversion when writing out the time_signature MIDI events using midiutil instead, and you can access (msg.numerator, msg.denominator)
as 3/4 when you have the time_signature messages. I will make an update of this in the new version, thanks for the feedback.
from musicpy.
Thanks for the reply
from musicpy.
Related Issues (20)
- '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
- Question about running code in colab enviroment and exporting as midi / wav file HOT 5
- 关于让构建和弦时和弦音的显示更符合乐理的建议 HOT 1
- error: mixer not initialized HOT 3
- [feature req] Integration with hookpad ? HOT 1
- nice to have complete note conversion feature HOT 1
- 速查表在 readthedocs 网页端的排版问题 | Layout Problem of Cheat Sheet on Readthedocs Web Pages 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.