Closed JeffFessler closed 2 years ago
Have you seen SampleBuf
in SampledSignals? https://github.com/JuliaAudio/SampledSignals.jl/blob/0d9954409d877f2bd74671d31fd1cdd7acc548c1/src/SampleBuf.jl#L11 that's a good way to do this. Maybe you could add a note in the README of SampledSignals for matlab users?
I don't think we want to necessarily mirror the syntax and functions from MATLAB. This is a common discussion in other packages too, and the conclusion is generally to do things the Julian way. Also we have many converts from python, C, etc.
Have you seen
SampleBuf
in SampledSignals?
SampleBuf
is a useful data type, but sound
and soundsc
are methods, not types.
So my question is about adding the methods.
Your suggestion leads to a natural additional method:
sound(sb::SampleBuf) = sound(sb.data, sb.samplerate)
I don't think we want to necessarily mirror the syntax and functions from MATLAB.
Thanks for the quick reply. That's kind of what I figured, so I will pursue other avenues.
Perhaps at least this discussion will be helpful for other people trying to migrate.
Perhaps at least this discussion will be helpful for other people trying to migrate.
Absolutely, and please dont let me discourage you from making suggestions. Its great to see the package being used. And if you took time to find this solution, then we should address the issue. But maybe rather than adding functions, we could add a few really simple scripts to the examples directory to show these basics?
PR #94 would help show those basics.
For anyone who ends up here looking for a sound
method, see
https://github.com/JeffFessler/Sound.jl
Would the maintainers of this package be open to a PR that adds support for functions
sound
andsoundsc
to facilitate migration of code from Matlab to Julia?Here's a draft of the code: