Skip to content

Commit

Permalink
final adjustments + README updates for v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Mar 28, 2021
1 parent 4967505 commit 14de697
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ script:
- cargo check --target thumbv7em-none-eabihf --no-default-features --features "microfft-complex"
- cargo check --target thumbv7em-none-eabihf --no-default-features --features "microfft-real"

# examples
- cargo run --release --example mp3-samples
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.4.0
- MSRV is now Rust 1.51 (sorry but that's the only way I can make it `no_std`-compatible)
- This crate is now really `no_std`
- you can choose between three FFT implementations at compile time via Cargo features.
The new default feature is `rustfft-complex` (which is still `std`) but there are also
the two new `no_std`-compatible targets `microfft-complex` (more accurate, like rustfft)
and `microfft-real` (faster, less accurate)
- several small improvements and fixes, see: https://github.com/phip1611/spectrum-analyzer/milestone/3?closed=1

## v0.3.0
- `FrequencySpectrum::min()` and `FrequencySpectrum::max()`
now return tuples/pairs (issue #6)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = """
A simple and fast `no_std` library to get the frequency spectrum of a digital signal (e.g. audio) using FFT.
It follows the KISS principle and consists of simple building blocks/optional features.
"""
version = "0.3.0"
version = "0.4.0"
authors = ["Philipp Schuster <[email protected]>"]
edition = "2018"
keywords = ["fft", "spectrum", "frequencies", "audio", "dsp"]
Expand Down
23 changes: 23 additions & 0 deletions EDUCATIONAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## How to use FFT to get a frequency spectrum?

This library is full of additional and useful links and comments about how an FFT result
can be used to get a frequency spectrum. In this document I want to give a short introduction
where inside the code you can find specific things.

**TL;DR:** Although this crate has 1400 lines of code, **the part which gets the frequency and
their values from the FFT is small and simple**. Most of the code is related to my convenient
abstraction over the FFT result including several getters, transform/scaling functions, and
tests.

**I don't explain how FFT works but how you use the result!**
If you want to understand that too:

- check out all links provided [at the end of README.md](/README.md)
- look into `lib.rs` (**probalby gives you 90 percent of the things you want to know**)
and the comments over the FFT abstraction in `src/fft/mod.rs` and
`src/fft/rustfft-complex/mod.rs`.


This is everything important you need. Everything inside
`spectrum.rs` and the other files is just convenient stuff + tests for when you
want to use this crate in your program.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ via Cargo features.
**The MSRV (minimum supported Rust version) is 1.51 Stable because this crate needs the
"resolver" feature of Cargo to cope with build problems occurring in `microfft`-crate.**

## I want to understand how FFT can be used to get a spectrum
Please see file [/EDUCATIONAL.md](/EDUCATIONAL.md).

## How to use (including `no_std`-environments)
Most tips and comments are located inside the code, so please check out the repository on
Github! Anyway, the most basic usage looks like this:
Expand Down
4 changes: 4 additions & 0 deletions check-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ cargo test --all-targets
rustup target add thumbv7em-none-eabihf
cargo check --target thumbv7em-none-eabihf --no-default-features --features "microfft-complex"
cargo check --target thumbv7em-none-eabihf --no-default-features --features "microfft-real"


# run examples
cargo run --release --example mp3-samples

0 comments on commit 14de697

Please sign in to comment.