Skip to content
Discussion options

You must be logged in to vote

To get the audio to a NumPy array you can use getBuffer(). I'm not sure if all classes share this, probably, since all classes inherit from the PyoObject class. What I've done in my book is this:

tab = DataTable(s.getBufferSize())
np_array = np.asarray(tab.getBuffer())

About synchronizing, since you convert audio streams to NumPy arrays and back, there will be at least one sample block latency and I don't think you can avoid this.
For example, to write data to a NewTable() that you can then read with TableRead(), you will need a whole sample block to write that data to NewTable().
I don't think though that one sample block latency is all that bad.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@snuq
Comment options

@alexdrymonitis
Comment options

@snuq
Comment options

Answer selected by snuq
Comment options

You must be logged in to vote
5 replies
@alexdrymonitis
Comment options

@snuq
Comment options

@snuq
Comment options

@alexdrymonitis
Comment options

@snuq
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants