Skip to content

Commit

Permalink
update README and mark not yet implemented functions
Browse files Browse the repository at this point in the history
  • Loading branch information
csteinmetz1 committed Nov 4, 2023
1 parent 8215377 commit 9eca2ac
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 47 deletions.
54 changes: 30 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
## Installation

```
pip install dasp-pytorch
git clone https://github.com/csteinmetz1/dasp-pytorch
cd dasp-pytorch
pip install -e .
```

Note: Coming to PyPi soon to enable `pip install dasp-pytorch`.

## Examples

`dasp-pytorch` is a Python library for constructing differentiable audio signal processors using PyTorch.
Expand Down Expand Up @@ -81,63 +85,57 @@ unzip audio_mono-mic.zip
rm audio_mono-mic.zip
```

### More examples

- [Virtual Analog Modeling](examples/virtual_analog.py)
- [Automatic Equalization](examples/auto_eq.py)
- [Audio Production Style Transfer](examples/style_transfer.py)

## Audio Processors

<table>
<tr>
<th>Audio Processor</th>
<th>Interface</th>
<th>Reference</th>
<th>Functional Interface</th>
</tr>
<tr>
<td>Simple Distortion</td>
<td><code>simple_distortion()</code></td>
<td></a></td>
<td>Gain</td>
<td><code>gain()</code></td>
</tr>
<tr>
<td>Advanced Distortion</td>
<td><code>advanced_distortion()</code></td>
<td></a></td>
</tr>
<td>Distortion</td>
<td><code>distortion()</code></td>
</tr>
<tr>
<td>Parametric Equalizer</td>
<td><code>parametric_eq()</code></td>
<td></td>
</tr>
<tr>
<td>Graphic Equalizer</td>
<td><code>graphic_eq()</code></td>
<td></td>
</tr>
<tr>
<td>Dynamic range compressor</td>
<td><code>compressor()</code></td>
<td></td>
</tr>
<tr>
<td>Dynamic range expander</td>
<td><code>expander()</code></td>
<td></td>
</tr>
<tr>
<td>Reverberation</td>
<td><code>reverberation()</code></td>
<td></td>
<td><code>noise_shaped_reverberation()</code></td>
</tr>
<tr>
<td>Stereo Widener</td>
<td><code>stereo_widener()</code></td>
<td></td>
</tr>
<tr>
<td>Stereo Panner</td>
<td><code>stereo_panner()</code></td>
<td></td>
</tr>
<tr>
<td>Stereo Bus</td>
<td><code>stereo_bus()</code></td>
</tr>
</table>

## Examples

## Citations

If you use this library consider citing these papers:
Expand Down Expand Up @@ -186,3 +184,11 @@ Differnetiable IIR filters
```

## Acknowledgements

Supported by the EPSRC UKRI Centre for Doctoral Training in Artificial Intelligence and Music (EP/S022694/1).

<p float="left">
<img src="docs/assets/logos/qm.png" height="50px"> &nbsp; &nbsp;
<img src="docs/assets/logos/aim.png" height="50px"> &nbsp; &nbsp;
<img src="docs/assets/logos/ukri.png" height="50px"> &nbsp; &nbsp;
</p>
24 changes: 1 addition & 23 deletions dasp_pytorch/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,29 +400,7 @@ def compressor(


def expander():
# static characteristics with soft-knee
x_sc = x_db.clone()

# below knee
idx = x_db < (threshold_db - knee_db / 2)
x_sc_below = threshold_db + (x_db - threshold_db) * ratio
x_sc[idx] = x_sc_below[idx]

# at knee
idx_1 = x_db <= (threshold_db + (knee_db / 2))
idx_2 = x_db >= (threshold_db - (knee_db / 2))
idx = torch.logical_and(idx_1, idx_2)
x_sc_at = x_db + ((1 - ratio) * ((x_db - threshold_db - (knee_db / 2)) ** 2)) / (
2 * knee_db
)
x_sc[idx] = x_sc_at[idx]

# above knee signal remains the same

# gain
g_c = x_sc - x_db

return x
raise NotImplementedError


def noise_shaped_reverberation(
Expand Down
Binary file added docs/assets/logos/aim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/logos/qm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/logos/ukri.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9eca2ac

Please sign in to comment.