Rename sample to dasp. Split features into multiple crates.#120
Merged
mitchmindtree merged 29 commits intoRustAudio:masterfrom May 29, 2020
Merged
Rename sample to dasp. Split features into multiple crates.#120mitchmindtree merged 29 commits intoRustAudio:masterfrom
sample to dasp. Split features into multiple crates.#120mitchmindtree merged 29 commits intoRustAudio:masterfrom
Conversation
This PR is based on @PieterPenninckx's great work in RustAudio#116 and some of the past discussion that has occurred around improving the modularity of the`sample` crate. Having the crate split into features as in RustAudio#116 made it easier for me to identify how to untangle the various modules into independent crates. **sample** -> **dasp** The direction of splitting up the crate into multiple sub crates has been on my mind for a long time, though the name `sample` always seemed unsuitable to as an umbrella term for the sub-crates of the project. After spending a bit of time throwing around different acronyms and abbreviations, @JoshuaBatty suggested **dasp** for digital audio signal processing. I think it rolls off the tongue pretty well! **Repo structure** The repository is now structured as a workspace consisting of a suite of subcrates. The **dasp** crate is the top-level crate, re-exporting each of the sub-crates and providing features that map not only to each of the sub-crates, but also to each of the sub-crate features too. **TODO** I thought I'd post this PR now to allow for feedback and thoughts. That said, there are still a few things I'd like to address before landing this: - [ ] Remove travis-ci in favour of github workflow CI with auto-publishing and a nice way of testing feature set permutations and with/without std. - [ ] Port synth.rs and play_wav.rs examples from portaudio to cpal. - [ ] Add CHANGELOG wich section on migrating from `sample` -> `dasp`. - [ ] Complete the "crates" table within the top-level README. - [ ] Add a graphviz png of the dasp dependency tree to the README. - [ ] Add a note to the docs of feature-gated items specifying required features. - [ ] Publish a new version of `sample` with a README notice about switching to `dasp`. There are many other items I'd like to address, but they are likely best left for future PRs. cc @PieterPenninckx, @andrewcsmith Closes RustAudio#116. Closes RustAudio#112.
Also adds auto-publishing when pushing to master and more thorough testing of different combinations of features and no_std.
Rather than starting from version 0.1.0, I thought it would make sense for versioning to continue on from where the `sample` crate left off.
This allows for **Window** trait implementations to be more specific about the supported phase and output amplitude types of the implementation. The Hanning and Rectangle implementations currently remain generic, however we should consider restricting their implementations to floating point sample types in order to not hide the intermediate conversions that are required.
Makes the following changes: - `FloatSample::identity` -> `FloatSample::IDENTITY` - `Sample::equilibrium` -> `Sample::EQUILIBRIUM` - `Sample::identity` -> `Sample::IDENTITY` - `Frame::equilibrium` -> `Frame::EQUILIBRIUM` - `Frame::identity` -> `Frame::IDENTITY` - `Frame::n_channels` -> `Frame::CHANNELS`
This greatly simplifies working with monophonic signals, as we no longer have to use a fixed size array of one element everywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is based on @PieterPenninckx's great work in #116 and some of
the past discussion that has occurred around improving the modularity of
the
samplecrate. Having the crate split into features as in #116 madeit easier for me to identify how to untangle the various modules into
independent crates.
sample -> dasp
The direction of splitting up the crate into multiple sub crates has
been on my mind for a long time, though the name
samplealways seemedunsuitable to as an umbrella term for the sub-crates of the project.
After spending a bit of time throwing around different acronyms and
abbreviations, @JoshuaBatty suggested dasp for digital audio signal
processing. I think it rolls off the tongue pretty well!
Repo structure
The repository is now structured as a workspace consisting of a suite of
subcrates. The dasp crate is the top-level crate, re-exporting each
of the sub-crates and providing features that map not only to each of
the sub-crates, but also to each of the sub-crate features too.
TODO
I thought I'd post this PR now to allow for feedback and thoughts. That
said, there are still a few things I'd like to address before landing
this:
auto-publishing and a nice way of testing feature set permutations and
with/without std.
sample->dasp.features. Try this.
samplewith a README notice aboutswitching to
dasp.There are many other items I'd like to address, but they are likely best
left for future PRs.
cc @PieterPenninckx, @andrewcsmith
Closes #116.
Closes #112.
Edit: For those migrating from
sample, be sure to visit the new CHANGELOG and see the top-level documentation for the newdaspcrate.