-
Notifications
You must be signed in to change notification settings - Fork 7
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
Re-organize crates #18
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "aubio-sys/aubio"] | ||
path = aubio-sys/aubio | ||
[submodule "sys/aubio"] | ||
path = sys/aubio | ||
url = ../../aubio/aubio |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,55 @@ | ||
[package] | ||
name = "aubio-rs" | ||
version = "0.2.0" | ||
description = "Safe bindings for aubio library to label music and sounds." | ||
categories = ["external-ffi-bindings", "multimedia::audio"] | ||
keywords = ["aubio", "audio", "processing", "recognition", "ffi"] | ||
authors = ["K. <[email protected]>"] | ||
license = "GPL-3.0" | ||
readme = "README.md" | ||
repository = "https://github.com/katyo/aubio-rs" | ||
edition = "2018" | ||
|
||
[dependencies.aubio-sys] | ||
version = "0.2.0" | ||
path = "sys" | ||
|
||
[dependencies.log] | ||
version = "0.4" | ||
optional = true | ||
|
||
[dev-dependencies.hound] | ||
version = "3.4" | ||
|
||
[features] | ||
default = [] | ||
bindgen = ["aubio-sys/bindgen"] | ||
builtin = ["aubio-sys/builtin"] | ||
pkg-config = ["aubio-sys/pkg-config"] | ||
shared = ["aubio-sys/shared"] | ||
static = ["aubio-sys/static"] | ||
fftw3 = ["aubio-sys/fftw3"] | ||
intelipp = ["aubio-sys/intelipp"] | ||
double = ["aubio-sys/double"] | ||
accelerate = ["aubio-sys/accelerate"] | ||
blas = ["aubio-sys/blas"] | ||
atlas = ["aubio-sys/atlas"] | ||
rustdoc = ["aubio-sys/rustdoc"] | ||
check-size = [] | ||
|
||
[package.metadata.docs.rs] | ||
features = ["rustdoc"] | ||
|
||
[workspace] | ||
members = [ | ||
"aubio-sys", | ||
"aubio-rs", | ||
] | ||
members = ["sys"] | ||
|
||
[profile.release] | ||
opt-level = 3 | ||
debug = false | ||
rpath = false | ||
lto = false | ||
lto = true | ||
debug-assertions = false | ||
codegen-units = 16 | ||
codegen-units = 1 | ||
panic = 'unwind' | ||
incremental = false | ||
overflow-checks = false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,58 @@ | ||
# Aubio library bindings | ||
|
||
[![github](https://img.shields.io/badge/github-katyo/aubio--rs-8da0cb.svg?style=for-the-badge&logo=github)](https://github.com/katyo/aubio-rs) | ||
[![crate](https://img.shields.io/crates/v/aubio-rs.svg?style=for-the-badge&color=fc8d62&logo=rust)](https://crates.io/crates/aubio-rs) | ||
[![docs](https://img.shields.io/badge/docs.rs-aubio--rs-66c2a5?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K)](https://docs.rs/aubio-rs) | ||
[![GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-brightgreen.svg?style=for-the-badge)](https://opensource.org/licenses/GPL-3.0) | ||
[![CI](https://img.shields.io/github/workflow/status/katyo/aubio-rs/Rust?style=for-the-badge&logo=github-actions&logoColor=white)](https://github.com/katyo/aubio-rs/actions?query=workflow%3ARust) | ||
|
||
This projects aims provide safe Rust bindings for [_aubio_](//github.com/aubio/aubio) C library. | ||
|
||
> _Aubio_ is a library to label music and sounds. | ||
> | ||
> It listens to audio signals and attempts to detect events. | ||
> For instance, when a drum is hit, at which frequency is a note, | ||
> or at what tempo is a rhythmic melody. | ||
> | ||
> Its features include segmenting a sound file before each of its attacks, | ||
> performing pitch detection, tapping the beat and producing midi streams | ||
> from live audio. | ||
> | ||
> aubio provide several algorithms and routines, including: | ||
> | ||
> * several onset detection methods | ||
> * different pitch detection methods | ||
> * tempo tracking and beat detection | ||
> * MFCC (mel-frequency cepstrum coefficients) | ||
> * FFT and phase vocoder | ||
> * up/down-sampling | ||
> * digital filters (low pass, high pass, and more) | ||
> * spectral filtering | ||
> * transient/steady-state separation | ||
> * sound file read and write access | ||
> * various mathematics utilities for music applications | ||
> | ||
> The name _aubio_ comes from audio with a typo: some errors are likely | ||
> to be found in the results. | ||
|
||
## Crate features | ||
|
||
The following features can be used to customize crate configuration: | ||
|
||
* __bindgen__ Force generate bindings itself instead of use pre-generated (_useful for unsupported archs_) | ||
* __builtin__ Force compile builtin _aubio_ C-library | ||
* __pkg-config__ Use _pkg-config_ to find installed libraries | ||
* __shared__ Build shared _aubio_ C-library | ||
* __static__ Build static _aubio_ C-library | ||
* __fftw3__ Enable using _fftw3_ library | ||
|
||
When __pkg-config__ feature is used the installed __aubio__ library will be used if found. | ||
To force build and link builtin version you can use __builtin__ feature. | ||
# Safe bindings for _aubio_ library | ||
|
||
[![github](https://img.shields.io/badge/github-katyo/aubio--rs-8da0cb.svg?style=for-the-badge&logo=github)](https://github.com/katyo/aubio-rs) | ||
[![crate](https://img.shields.io/crates/v/aubio-rs.svg?style=for-the-badge&color=fc8d62&logo=rust)](https://crates.io/crates/aubio-rs) | ||
[![docs](https://img.shields.io/badge/docs.rs-aubio--rs-66c2a5?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K)](https://docs.rs/aubio-rs) | ||
[![GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-brightgreen.svg?style=for-the-badge)](https://opensource.org/licenses/GPL-3.0) | ||
[![CI](https://img.shields.io/github/workflow/status/katyo/aubio-rs/Rust?style=for-the-badge&logo=github-actions&logoColor=white)](https://github.com/katyo/aubio-rs/actions?query=workflow%3ARust) | ||
|
||
This crate provides safe Rust bindings to [_aubio_](https://github.com/aubio/aubio) C library. | ||
|
||
> _Aubio_ is a library to label music and sounds. | ||
> | ||
> It listens to audio signals and attempts to detect events. | ||
> For instance, when a drum is hit, at which frequency is a note, | ||
> or at what tempo is a rhythmic melody. | ||
> | ||
> Its features include segmenting a sound file before each of its attacks, | ||
> performing pitch detection, tapping the beat and producing midi streams | ||
> from live audio. | ||
> | ||
> Aubio provide several algorithms and routines, including: | ||
> | ||
> - several onset detection methods | ||
> - different pitch detection methods | ||
> - tempo tracking and beat detection | ||
> - MFCC (mel-frequency cepstrum coefficients) | ||
> - FFT and phase vocoder | ||
> - up/down-sampling | ||
> - digital filters (low pass, high pass, and more) | ||
> - spectral filtering | ||
> - transient/steady-state separation | ||
> - sound file read and write access | ||
> - various mathematics utilities for music applications | ||
> | ||
> The name _aubio_ comes from audio with a typo: some errors are likely | ||
> to be found in the results. | ||
|
||
## Crate features | ||
|
||
The following features can be used to customize configuration: | ||
|
||
- __bindgen__ Force generate bindings itself instead of use pre-generated (_useful for unsupported archs_) | ||
- __builtin__ Force compile builtin _aubio_ C library | ||
- __pkg-config__ Use _pkg-config_ to find installed libraries | ||
- __shared__ Build shared _aubio_ C-library | ||
- __static__ Build static _aubio_ C-library | ||
- __fftw3__ Enable using _fftw3_ library | ||
- __intelipp__ Enable using _Intel IPP_ library | ||
- __accelerate__ Enable using acceleration framework on _apple_ platforms | ||
- __blas__ Enable using _blas_ library | ||
- __atlas__ Enable using _atlas_ library | ||
- __double__ Enable double presicion of audio sample data | ||
|
||
When __pkg-config__ feature is used the installed __aubio__ library will be used if found. | ||
|
||
To force build and link builtin version you can use __builtin__ feature. | ||
|
||
The features such as __fftw3__, __intelipp__, __accelerate__, __blas__, __atlas__ and __double__ is take an effect only for builtin _aubio_ C library. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katyo Maybe this needs
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') }}
? Seems like it would otherwise create a PR with readme update as soon as any CI build runs with documentation changes.In Smithay/gbm.rs#11 I'm simply failing the build if the readme doesn't match, I prefer a PR to keep the documentation and readme in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarijnS95 Of course, this is expected behavior.
Any such automatic created sub PRs should be merged with main PR branch before merging the last (see de17d96).
In such case we don't need editing READMEs manually at all.
Note: Only single sub PR will be created per main PR, on any updates it will be updated too. If no updates required then no sub PRs will be generated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it can only create a single PR if this pushes to the same branch. But what happens if two PRs change the documentation? Will those override what the CI pushes to the readme PR? IMO it's saner to run it only on master, that way it's only regenerating things that actually changed and have been accepted. Or require contributors to update it, so that changes can be reviewed/cross-validated directly from the PR.
With the CI creating merges across the merge branch (ie. #19 wanting to merge into
re-org
here) this is only helping users to not have to install+run the command manually. I guess that's... fine? It's not something I'd do for my own projects, that's just way too much noise though.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating READMEs via CI is quite useable because contributors may forget to do it manually.
I don't see serious problems in such design excepting some minor disadvantages like this.
In any case PRs needs to be rebased before merging. New update PR will be created when needed.
Even if contributor do not merged sub PR youself it still can be done later after merging main PR on master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a fair point. It's all about convenience for contributors vs convenience for maintainers in the end (the alternative being a simple CI failure if the file wasn't updated by the contributor).
Since this PRs to the target branch, does it create a PR in the fork if I were to submit a PR to this repo with a change in the module docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer is yes because I set a
github.head_ref
to thebase
property of create-pull-request@v3 action.From gh docs: