pyPlayMusic.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:nn_midi_trainer 作者: jmhong-simulation 项目源码 文件源码
def __init__(self,codes=[40], chunk_size=2**15):
        import wave
        cwd = os.path.dirname(os.path.realpath(__file__))
        self._wfs = []

        for code in codes:
            c = ""
            if code > 0 and code < 10:
                c = "0"+str(code)
            elif code < 89:
                c = str(code)
            else:
                print("out of code index")
                exit()
            #self._wfs.append(wave.open(cwd + "\piano88\Piano 0" + c + ".wav", 'rb'))
            self._wfs.append(cwd + "\piano88\Piano 0" + c + ".wav")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号