def play(self, channels=1):
'''Plays notes'''
for note in self.notes:
stream = self.audio_adapter.open(
format=pyaudio.paFloat32,
channels=channels,
rate=note.rate,
output=True
)
stream.write(self.volume*note.sample)
评论列表
文章目录