Flux-Audio / hysteresis

3 stars 0 forks source link

Major Update Proposal #17

Closed PanieriLorenzo closed 3 years ago

PanieriLorenzo commented 3 years ago

New signal path, all distortion algorithms re-designed.

  1. Pre-gain
  2. Bias
  3. Hysteresis (see below)
  4. Quantum
  5. Saturation (see below)
  6. Voltage-drop compression (see below)
  7. Wow-flutter (see below)
  8. Self-erasure (see below)
  9. Playback-hiss (see below)
  10. Post-eq

All items without "see below" are taken from existing code and are not explained here.

Hysteresis (redesign)

Real hysteresis happens because magnetic particles need a minimum threshold to be moved. Thus the new implementation simply introduces a crossover distortion on the derivative of the input, which is then re-integrated to generate the distorted signal. This is simply what used to be the crossover from the original implementation.

Saturation (redesign)

Saturation algorithms are similar to the existing ones, but less over-engineered. Here x is the absolute value of the input, which is then multiplied with the sign of the input to restore the original polarity.

Voltage-drop compression

Drive is increased (without increasing anti-drive) dynamically after the attack time has past. In essence creating compression. This effect slowly comes in only if the input is loud enough, following a tanh compression curve. Attack and release are set by the user. This is because in real tape, if the tape is saturated and kept saturated for a sustained amount of time, the tape cannot absorb any more energy and the saturation threshold lowers. This let's transients through with little distortion, but sustained sounds are distorted more.

Wow-flutter

Wow is introduced with two lfo's added together. LFO 1 ranges 0.5 Hz to 2.5 Hz. LFO 2 ranges 1.0 Hz to 3.0 Hz. The two are controlled by a third triangle LFO so that when one is at 0.5 Hz, the other is at 3.0Hz, and vice versa. The two are added together creating a somewhat unpredictable oscillation. Flutter is introduced by modulating with filtered noise. The noise is bandpassed by the following filter: Feedback coefficients: [-2.0, 1.0], feed-forward coefficients: [0.012, 0, -0.012].

Self-erasure

Self erasure of treble content happens through soft-clipping of the derivative of the input.

Playback hiss

Playback hiss is introduced by amplitude modulating pink noise with a small DC constant summed with the input itself.

Tube plugin proposal for the future

The tube functinality should be moved to a new plugin. A few features:

PanieriLorenzo commented 3 years ago

A few notes on this update:

Closing statement: it would be nice to have a super rudimentary version of OpenDSPL working to facilitate development (writing difference equations in rust is a pain, as rust really likes to not have side-effects) Or maybe work Faust DSP into the workflow, to generate difference equations which can be pasted in rust.