-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SignalBase #5
Comments
Also you might want to consider using https://github.com/JuliaPackaging/Requires.jl to add support for |
Thanks for the suggestion of using |
I don't understand how to use |
Fair enough. Slightly tricky. The way The only tricky bit is that @haberdashPI, @ssfrr any thoughts? |
Fallback methods have to be opinionated, and it is not clear what the fallback should be, in general. The fact that SignalAnalysis and SignalOperators use different defaults seems indicative of this problem to me (sometimes 1 makes sense, sometimes More generally, To use something that supported Signal Base you would have to use duck typing. I.e. just try the methods on some generic |
Perhaps a fallback could go here then, because 8192 Hz is specific to Matlab's history. framerate(x::Any) = 8192 # fallback
framerate(x::SampleBuf) = x.samplerate # might be unnecessary eventually?
sound(x::AbstractArray, S::Real = framerate(x)) = ... Thoughts? |
Just my two cents, and I don't have a horse in this race but I personally feel, given the use here, that a request for a samplerate from a signal without one should be an error of some sort.
|
This discussion has compelled me to jettison the obsolete default of 8192 Hz and instead defer to Personally I like Thanks for the great input and feedback. I think that #7 should close this issue but I'll leave it open for a bit in case anyone sees any issues with that PR. |
Agree with defaulting to |
Yeah, one of the original motivations for SignalsBase was the name clash of
(originally) samplerate. It's nice if all the sound packages can be
imported and you don't have a different method for every package just to
find the framerate, which is really the same concept everywhere. I went
with framerate because in principle you can have multiple samples per
frame, even for audio.
…On Mon, Nov 29, 2021, 10:47 PM Mandar Chitre ***@***.***> wrote:
Agree with defaulting to framerate rather than 8192 Hz. The only reason
you may still need the dependency on SignalBase is that framerate needs
to be the exported symbol from that module for it to be compatible with it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB37KWFSP5BJ5HWDQQ5SQ3TUORXPFANCNFSM5I6ILT3Q>
.
|
Ok I updated #7 to import Since you both obviously work a lot with audio signals in Julia, whereas I am new to this aspect, I wonder if you have any insights about how to make the CI run more smoothly. My runtests are passing fine on macOS, but are failing on windows and linux. My guess is that it is because the mac servers in github's cloud have audio devices in them but the linux and windows servers do not (or something like that) so the CI runs fail out somewhere deep inside PortAudio calls because there is no sound car there. Is there a work around you have found for CI of audio in a cross-platform way? |
Great! I don't have much experience doing CI on a sound card code. The way I'd probably approach it would be to stub the call to the sound card (in this case to PortAudio), and check that the correct values are passed in to the call. |
Thanks for the suggestion. FYI, I found an answer in the PortAudio test suite: check |
May I recommend that you support https://github.com/haberdashPI/SignalBase.jl (almost the same API as
SampledSignals.jl
-- and somedaySampledSignal.jl
is meant to migrate to it -- see JuliaAudio/SampledSignals.jl#56)? That way you'll also end up adding support for other implementations ofSignalBase
(e.g. https://github.com/haberdashPI/SignalOperators.jl, https://github.com/org-arl/SignalAnalysis.jl, etc).The text was updated successfully, but these errors were encountered: