# Third-party code in dirtbox

Some boxes in this directory are JavaScript ports of DSP published under the MIT licence. The ports keep the arithmetic and the constants of the originals. What was changed is listed at the top of each file: which knobs are tied to AMOUNT, which are fixed, and what is left out.

The remaining files (`frame.js`, `boxes.js`, `drawn.js`, `boxed.js`, `colour.js`) were written for this site.

## Airwindows

Project: https://github.com/airwindows/airwindows
Author: Chris Johnson
Licence: MIT

| File here | Upstream file |
|-|-|
| `clip-only.js` | `plugins/LinuxVST/src/ClipOnly2/ClipOnly2Proc.cpp` |
| `slew.js` | `plugins/LinuxVST/src/Slew/SlewProc.cpp` |
| `spiral.js` | `plugins/LinuxVST/src/Spiral/SpiralProc.cpp` |
| `density.js` | `plugins/LinuxVST/src/Density/DensityProc.cpp` |
| `drive.js` | `plugins/LinuxVST/src/Drive/DriveProc.cpp` |
| `mackity.js` | `plugins/LinuxVST/src/Mackity/MackityProc.cpp` |
| `mojo.js` | `plugins/LinuxVST/src/Mojo/MojoProc.cpp` |
| `dyno.js` | `plugins/LinuxVST/src/Dyno/DynoProc.cpp` |
| `hard-vacuum.js` | `plugins/LinuxVST/src/HardVacuum/HardVacuumProc.cpp` |
| `fracture.js` | `plugins/LinuxVST/src/Fracture2/Fracture2Proc.cpp` |
| `derez.js` | `plugins/LinuxVST/src/DeRez/DeRezProc.cpp` |
| `bit-glitter.js` | `plugins/LinuxVST/src/BitGlitter/BitGlitterProc.cpp` |

Each of these upstream files opens with the notice "Copyright (c) 2016 airwindows, Airwindows uses the MIT license". The text below is the repository's `LICENSE` file.

```
MIT License

Copyright (c) 2018 Chris Johnson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## Mutable Instruments

Projects: https://github.com/pichenettes/eurorack and https://github.com/pichenettes/stmlib
Author: Emilie Gillet
Licence: MIT (the repository's README: "Code (STM32F projects): MIT license", and the header of each file)

| File here | Upstream file | What was taken |
|-|-|-|
| `rectifier.js` | `warps/dsp/modulator.cc` in eurorack | `Modulator::Diode` and the sum of two diodes in the analog ring modulation |
| `rectifier.js` | `dsp/dsp.h` in stmlib | `SoftLimit` and `SoftClip` |

The diode curve is, in upstream's words, an approximation from Julian Parker, "A simple Digital model of the diode-based ring-modulator", Proc. DAFx-11.

```
Copyright 2014 Emilie Gillet. (warps/dsp/modulator.cc)
Copyright 2012 Emilie Gillet. (stmlib dsp/dsp.h)

Author: Emilie Gillet (emilie.o.gillet@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

See http://creativecommons.org/licenses/MIT/ for more information.
```
