-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move audio documentation to its own page
- Convert examples to doctests or evaluate during build time -More tests
- Loading branch information
Showing
8 changed files
with
163 additions
and
111 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
FLAC = "abae9e3b-a9a0-4778-b5c6-ca109b507d99" | ||
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" | ||
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" | ||
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228" |
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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Reference | ||
|
||
## Window functions | ||
|
||
```@docs | ||
hann_window | ||
hamming_window | ||
``` | ||
|
||
## Spectral | ||
|
||
```@docs | ||
stft | ||
istft | ||
NNlib.power_to_db | ||
NNlib.db_to_power | ||
``` | ||
|
||
## Spectrogram | ||
|
||
```@docs | ||
spectrogram | ||
``` | ||
|
||
Example: | ||
|
||
```@example 1 | ||
using NNlib | ||
using FileIO | ||
using UnicodePlots | ||
waveform, sampling_rate = load("./assets/jfk.flac") | ||
lineplot(reshape(waveform, :); width=50, color=:white) | ||
``` | ||
|
||
```@example 1 | ||
n_fft = 256 | ||
spec = spectrogram(waveform; n_fft, hop_length=n_fft ÷ 4, window=hann_window(n_fft)) | ||
heatmap(NNlib.power_to_db(spec)[:, :, 1]; width=80, height=30) | ||
``` |
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
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
Oops, something went wrong.