spatialaudio / jackclient-python

🂻 JACK Audio Connection Kit (JACK) Client for Python :snake:
https://jackclient-python.readthedocs.io/
MIT License
132 stars 26 forks source link

WIP: Playback example with NumPy #34

Closed LibrEars closed 7 years ago

LibrEars commented 8 years ago

Is it possible to add an playback example with numpy. This pull request is how I think it is somehow done.

For my application i need low-latency multichannel output/recording (reference: https://github.com/bastibe/PySoundCard/issues/59). As I understand it, jack should be a good choice for that?

mgeier commented 8 years ago

If you want a simple way to do that, you should try play(), rec() and/or playrec() from the sounddevice module.

One of the example programs shows how to load a sound file and play it back.

The sounddevice module uses PortAudio, so you can still use JACK if you want. However, you can also use all the other host APIs, which will make your code more portable.

mgeier commented 7 years ago

@LibrEars I've just added a file playback example (using NumPy) in #38. What do you think about it? Any suggestions for improvements?

LibrEars commented 7 years ago

Looks nice. Thanks a lot. I try it out and report

mgeier commented 7 years ago

@LibrEars I changed the implementation of #38, making it significantly simpler (and a little less efficient).

mgeier commented 7 years ago

@LibrEars Do you want to further pursue this at some point?

If not, I'd like to reject this PR.

LibrEars commented 7 years ago

@mgeier sorry for not replying. You can reject the PR. But thank you again for the example! I still want to try it out and just wasn't able to take the time for it and my project.. -.-