JeffFessler / Sound.jl

Provide `sound` & `record` functions for playing & recording audio in Julia. Also Julia version of phase vocoder.
MIT License
25 stars 1 forks source link

PortAudio? #2

Closed chakravala closed 2 years ago

chakravala commented 2 years ago

why is this separate from PortAudio?

JeffFessler commented 2 years ago

That's a reasonable question and thanks for asking.

I suppose I could have made a PR over there to test the waters, but my experience is that Julia developers often can be resistant to adding Matlab function names to their packages. I am under a time crunch to finish materials for a Freshman course so I am taking the expedient route, and the route where I can make sure it gets done on time instead of relying on the timeliness of others who are not facing the time pressure that I am.

Another reason is that I am preparing a lot of course materials that will use sound as the key method. Later if I need to switch to a different audio backend, I will not need to revise all the materials. I actually started by using wavplay in WAV.jl but then ran into issues integrating it with Gtk.jl (see https://github.com/dancasimiro/WAV.jl/issues/105) and I simply don't have time to wait for those to be resolved.

If you'd like to take the key code out of this package and make a PR over at PortAudio and see if they are willing to incorporate it quickly, that would be just fine with me. I'll pull the plug on the new package here if your PR gets merged and tagged in time. But such a PR probably will involve a lot of back and forth and will likely not happen so quickly. BTW, PortAudio does not seem to have an example of how to play a signal out of a speaker in the documentation. I was planning to add a PR for that eventually.

chakravala commented 2 years ago

I don't have any stakes in this, but I reccommend you to make a PR yourself if you think you're going to settle on PortAudio, since this is such a small function.

Personally, I am banned from contributing to all official Julia organizations and websites, so there is no way I can make a PR or contribute.

So I understand where you're coming from, the official Julia repositories are not very inclusive, I definitely don't contribute to them either.

On Sat, Nov 27, 2021, 3:40 PM Jeff Fessler @.***> wrote:

That's a reasonable question and thanks for asking.

I suppose I could have made a PR over there to test the waters, but my experience is that Julia developers often can be resistant to adding Matlab function names to their packages. I am under a time crunch to finish materials for a Freshman course so I am taking the expedient route, and the route where I can make sure it gets done on time instead of relying on the timeliness of others who are not facing the time pressure that I am.

Another reason is that I am preparing a lot of course materials that will use sound as the key method. Later if I need to switch to a different audio backend, I will not need to revise all the materials. I actually started by using wavplay in WAV.jl but then ran into issues integrating it with Gtk.jl (see dancasimiro/WAV.jl#105 https://github.com/dancasimiro/WAV.jl/issues/105) and I simply don't have time to wait for those to be resolved.

If you'd like to take the key code out of this package and make a PR over at PortAudio and see if they are willing to incorporate it quickly, that would be just fine with me. I'll pull the plug on the new package here if your PR gets merged and tagged in time. But such a PR probably will involve a lot of back and forth and will likely not happen so quickly. BTW, PortAudio does not seem to have an example of how to play a signal out of a speaker in the documentation. I was planning to add a PR for that eventually.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JeffFessler/Sound.jl/issues/2#issuecomment-980797753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMFOEEEPJDUUGXZSH3KKU3UOE63DANCNFSM5I4JMGKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

JeffFessler commented 2 years ago

For the record, I did try: https://github.com/JuliaAudio/PortAudio.jl/issues/95

I understand the reasons given there.