You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run the following code, I get this error after playing for a few seconds and stuttering.
Portaudio error in Pa_AbortStream (pa_stop): Unanticipated host error
Portaudio error in Pa_CloseStream (pa_deinit): PortAudio not initialized
Portaudio error in Pa_Terminate (pa_deinit): PortAudio not initialized
Pyo error: Error closing audio backend.
import numpy as np
n = 20
# I get data from files, but I use random for this demo.
data = np.random.random((n, n))
panData = np.random.random(n)
speed = 0.5
from pyo import *
import time
s = Server()
s.boot()
s.start()
pink = PinkNoise()
split = BandSplit(pink, num=n, q=500)
panTableReader = TableRead(DataTable(n, init=panData.tolist()), freq=speed, loop=1, interp=1)
dataTableReader = [TableRead(DataTable(n, init=data[i].tolist()), freq=speed, loop=1, interp=1) for i in range(n)]
pans = []
for i in range(n):
pans.append(SPan(split[i], pan=panTableReader.play(), mul=dataTableReader[i].play()).out())
time.sleep(3)
exit()
The text was updated successfully, but these errors were encountered:
You should exit your program more gracefully than simply exit() after a given time. A good habit is to stop the audio server before leaving the program.
If I run the following code, I get this error after playing for a few seconds and stuttering.
Portaudio error in Pa_AbortStream (pa_stop): Unanticipated host error
Portaudio error in Pa_CloseStream (pa_deinit): PortAudio not initialized
Portaudio error in Pa_Terminate (pa_deinit): PortAudio not initialized
Pyo error: Error closing audio backend.
The text was updated successfully, but these errors were encountered: