-
Notifications
You must be signed in to change notification settings - Fork 25
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
Create a shared package for samplerate
and nchannels
??
#56
Comments
Yeah I've been thinking it would be useful to move those definitions to a lightweight Good point on the inconsistency with |
Hey, here is a draft of my proposed There were a few additional name overlaps, in addition to the ones noted above:
If you're happy with this proposed shared API, I can make a PR to have SampledSignals use it, once I add it the registry, or we can discuss any changes that could be made for us to both be happy. Feel free to make a PR on SignalBase as needed.
|
I think that looks great - no objections here. I think that it's good to bias towards keeping SignalBase as small an unoinionated as possible, so having To be honest in my own code I've been leaning more an more towards using as many built-in data types as possible and not trying too hard to make more convenient wrapper types. I've actually been considering re-working PortAudio.jl and LibSndFile.jl to return regular unwrapped |
Great! And yeah, I see what you mean about fewer specialized types: that could make it easier to separate out functionality common across different contexts. |
Great move to move these out to |
Would it make sense to have an abstract type or a trait defined in |
An abstract type seems tough, because many, but not all sampled types would also want to be Before we go down that route, can you come up with some concrete situations where we'd actually use it? I'm not opposed, but I want to make sure we're not overcomplicating things. Maybe start an issue over in SignalBase. |
I already use a trait for this in SignalOperators. As of now, I think the implementation there is unnecessarily complicated. It is working well there for my purposes but I need to go back and clean things up a bit. Also, on that note I have yet to make a PR to make SampledSignals support SignalBase; I've been a bit bogged down with some completely unrelated data analysis, but I should be able to get to that in the next 2 weeks or so if someone doesn't do it before me. |
I have a working version of |
Sure! If you already have started working on it, it is probably less work overall. (And I can't imagine it is a hard PR to make in any case). |
Cool. I'll try to get it done this weekend. |
Great, thanks! Things are a little hectic for me but I should be able to review and merge within a couple days if it's not too complicated. |
The package I'm working on,
SignalOperators
, a uses few of the same function names as the SampledSignals package. I'm wondering if we might discuss moving shared functions to some parent package (AudioBase
,SignalBase
, or a PR toDSP
?), and then depending on that shared package. The goal would be to allow people to use bothSampledSignals
andSignalOperators
OR to just use one of them, without running into clashes in the namespace.The shared functions are
samplerate
andnchannels
.I use
nsamples
, and you usenframes
. I could see changing the name of my function tonframes
, in which case there would be three shared functions. However, for consistency, it seems like, if it is callednframes
it should be calledframerate
, notsamplerate
. If a sample is defined to include just one channel's value, than the sample rate is twice as fast for a 2-channel signal than a 1-channel signal.The text was updated successfully, but these errors were encountered: