Comments (7)
I tried this now on my computer, windows 10, python 3.7.9 and it should plays some midi guitar sounds of a chord progression. And since switching to my ffmpeg version still did not solve the issue, I think it might be the problem of your audio driver. You can take a look at your audio driver settings.
from musicpy.
That might be your current file path is at the musicpy package in python path, so the midi file is generated there. You can use os.chdir(path_to_your_current_script)
before the play function. Or you can add name='path_to_your_current_script/temp.mid'
in the play function to make sure the midi file is generated at your current path.
from musicpy.
Just a check, could you use pygame to play any audio files on you computer? You can put an mp3 file on your current script's path, and try to run this part of code (the mp3 file should be played normally when you open it with usual music player):
from musicpy import *
pygame.mixer.music.load(name_of_file)
pygame.mixer.music.play()
(name_of_file should include extension .mp3)
If you cannot hear any sounds or the sounds is different from the sounds when you play it via a music player, then it is sure that your audio driver has some problems.
from musicpy.
This play function uses pygame.midi module to play the midi file generated once the play function is running, you should see a temp.mid
file generated in the same path as your script, you can open it and listen if it is correct.
from musicpy.
Do not see any file generated, I will take a look at audio driver settings.
from musicpy.
Yeah, I cannot hear anything. I do have a Focusrite Audio interface and audio works well, but apparently Python doesn't like it. I will investigate it. Thanks for your help
from musicpy.
You're welcome :)
from musicpy.
Related Issues (20)
- 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
- 小提琴 如何 表达 HOT 2
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.