Skip to content

Rename sample to dasp. Split features into multiple crates.#120

Merged
mitchmindtree merged 29 commits intoRustAudio:masterfrom
mitchmindtree:dasp
May 29, 2020
Merged

Rename sample to dasp. Split features into multiple crates.#120
mitchmindtree merged 29 commits intoRustAudio:masterfrom
mitchmindtree:dasp

Conversation

@mitchmindtree
Copy link
Member

@mitchmindtree mitchmindtree commented May 28, 2020

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
thesample crate. Having the crate split into features as in #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.
  • Complete the "crates" table within the top-level README.
  • Add a graphviz png of the dasp dependency tree to the README.
  • Add CHANGELOG with section on migrating from sample -> dasp.
  • Add a note to the docs of feature-gated items specifying required
    features. Try this.
  • 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 #116.
Closes #112.

Edit: For those migrating from sample, be sure to visit the new CHANGELOG and see the top-level documentation for the new dasp crate.

Pieter Penninckx and others added 7 commits September 21, 2019 15:51
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split into several features

1 participant