Super-Alias Virtual Digital: simulation of quantization, vari-speed, sampling, aperture, jitter, brick-wall band-pass filtering, and VCF
Copyright (c) 2008-2012 by Klaus Michael Indlekofer. All rights reserved.
Note: Special restrictions apply. See disclaimers below and within the distribution.

Release superaliasvd-1.14 (28-MAR-2012)

Email: m.indlekofer@gmx.de



Usage: (if command line version)
------

superaliasvd [<batch-file> ...]



Batch file commands:
--------------------

inpfname <PATH>		input audio file (WAV or AIFF, 8/16/24/32bit or mu-law or float32, any number of channels, any sampling rate)
outfname <PATH>		output audio file (WAV or AIFF)
fsout <FFLOAT>		processing and output sampling rate in Hz (0: input sampling rate)
fssim <FFLOAT>		simulated sampling rate in Hz
fssimalign <BOOL>	approximation of fssim (alignment to FFT bin, faster computation)
aperture <FLOAT>	aperture ratio (0 ... 1, default=0)
bitnr <UINT>		uniform quantization in bit (1 ... 32) or mu-law (255)
dpcm <BOOL>		enable DPCM processing flag
headroom <FLOAT>	headroom for quantization in dB (<0 for clipping)
fcloin <FFLOAT>		input filter: lower cutoff frequency in Hz
fchiin <FFLOAT>		input filter: upper cutoff frequency in Hz
fcloout <FFLOAT>	output filter: lower cutoff frequency in Hz
fchiout <FFLOAT>	output filter: upper cutoff frequency in Hz
outvcffc <FFLOAT>	output VCF: cutoff frequency in Hz
outvcfq <FFLOAT>	output VCF: quality factor (0: VCF disabled)
varispeedf <FFLOAT>	vari-speed factor for frequency-domain algorithm (default=1)
varispeedt <FFLOAT>	vari-speed factor for time-domain algorithm (default=1)
varispeedth <BOOL>	"hold-last-sample" vari-speed flag
jitterts <FLOAT>	jitter amplitude in 1/fs-sim (0 ... <0.5, default=0)
jitterns <FLOAT>	jitter amplitude in ns
jitterbin <BOOL>	binary jitter distribution flag
outbitnr <UINT>		output file uniform quantization in bit (8/16/24/32)
intlen <UINT>		interpolation length (>=0, default=128, 0: hold-last-sample, 2: linear)
default			sets all parameters to default values
process			starts processing
stop			stops batch

with argument data types:
	UINT		unsigned integer number
	FLOAT		floating point number
	FFLOAT		floating point number or "STi" (with signed integer i for semitone steps)
	BOOL		boolean ("TRUE" or "FALSE")
	PATH		path/name string (can contain spaces, terminated by end of line)



Notes:
------

This program intends to create typical artefacts that can be found in "old-school" digital audio equipment
of the 1970s-1980s, in particular early samplers and wavetable synthesizers with low bit resolution,
low (and perhaps variable) sampling rates, and non-perfect filters.
In detail, the digital artefacts that we consider are:
* Quantization distortion and/or noise due to quantization (i.e. value-discrete signal).
  This becomes audible with low bit resolution (typically below 8bit or 12bit).
  Sound impression: distorted, rough, noisy.
* Frequency images at the DAC output due to sampling (i.e. time-discrete signal),
  which are supposed to be removed completely by a brick-wall low-pass (interpolation filter) following the DAC.
  If low sampling rates and non-perfect post-DAC filters are used, images (or some parts) may become audible.
  Sound impression: dirty high frequencies, crispy, bright.
* Aliasing within the audio band due to violation of the Nyquist sampling criterion.
  If a non-perfect anti-aliasing filter is used at the ADC input, or if an inadequate
  pitch-change interpolation algorithm is used, aliasing is introduced irreversibly.
  Sound impression: non-harmonic tones, dirty frequencies.

It is a challenge to simulate these (non-LTI) artefacts on digital audio workstations,
which typically use a fixed sampling rate (wordclock).
Frequency images due to sampling with a lower sample clock which is not a simple fraction of the
system's sample clock (wordclock) cannot be generated by simple means.

"superaliasvd" simulates such artefacts. In this sense, we call the idea "virtual digital".
In particular, the following components are incorporated:
* sample rate conversion
* vari-speed, interpolation algorithm in time- and/or frequency-domain
  (Note: this is the typical ingredient to change pitch in normal samplers, might create aliasing)
* sampling (fs-sim=0 ... fS), creates frequency images and possibly aliasing
  (Note: this is mandatory to simulate samplers with pitch-change via variable sample clock).
* uniform quantization (bitnr=1bit ... 32bit) or mu-law (bitnr=mu-255),
  headroom and clipping (if headroom<0dB), DPCM processing
* aperture effect of DAC
  (Note: determines pulse width, zero-order hold would be aperture=1)
* jitter in fs-sim, white, uniform or binary distribution
  (Note: excessive jitter in fs-sim is typical for sampling clocks that are generated by use of BRMs.)
* brick-wall band-pass filtering, at input and output, with user-defined cutoff frequencies
  (Note: this is useful at the input if one wants to avoid aliasing if fs-sim<fs or vari-speed>1)
* 4th order low-pass output filter with resonance, "virtual analog" stage
  (Note: this simulates an analog VCF which is typically employed in older digital samplers/synthesizers)
The internal resolution of "superaliasvd" is 64bit floating point.
Further LTI-filtering and effects can be added externally by other programs.

Apart from the simulation (emulation) of the sound of "old-school" equipment,
this program is also useful for the demonstration of quantization, sampling, and aliasing.
As an example, to simulate the sound of an old sample player,
one could generate a set of multi-samples of varying pitch via vari-speed by use of "superaliasvd",
corresponding to the musical notes on a keyboard.
A modern sample player, in turn, could playback these samples, mapped to individual MIDI keys.
As for the employed simulated sampling rate (fs-sim), one could choose a fixed value,
corresponding to a typical "phase-acumulator" sample player.
If a "variable-samplerate" player shall be simulated, the simulated sampling rate (fs-sim) should
be changed proportional to pitch.
The typical "old-school" sound could be achieved with bitnr=8 or 12, fs-sim below 30kHz,
and optionally some amount of jitter.
For the audio files, the best would be to work with a high sampling rate (e.g. 96kHz or 192kHz) and high resolution.
Note that audio material which was perceptually coded (lossy) might not be suitable for vari-speed
due to the resulting frequency scaling, which renders the initally employed masking calculations inadequate
for the modified material.

Please note that in the current release, some algorithms are still not exact
(from a mathematical point of view). On the other hand, some are not optimized yet.
In particular, concerning the combination of quantization, vari-speed, and sampling,
working in time- and/or frequency-domain.
Improvements are possible, depending on the employed models and the computational resources that are available...



---
The following holds for all files in this distribution (unless stated otherwise on an
individual basis for each file and statement):

These program/data/document/HTML/picture/media files (materials) are distributed in the
hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the author be
liable for any direct, indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitue goods or services; loss of use,
data, or profits; or business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence or otherwise) arising
in any way out of the use of data/information/software from this distribution, even if
advised of the possibility of such damage. 

The contents of this distribution are intended for educational, non-commercial purposes
only. Materials contained herein are property of their respective owners. If any
copyrighted works/trademarks have been used, please contact the author K. M. Indlekofer
and the item will be either removed or properly credited (at the copyright/trademark
owner's discretion). We have no intention of violating any copyrights or trademarks.
This distribution might use inlining and deep-linking, i.e. links in this distribution
might lead directly to materials on other web sites/distributions (in which case the
target page normally should be listed/credited in a "links" section). The author does
not take responsibility for the contents of any links referred to. We do not necessarily 
endorse, sanction, support, encourage, verify or agree with the contents, opinions or
statements of/on any of the linked pages. These statements hold for all links/references
in all files in this distribution. We are in no way affiliated with any
companies/institutions/individuals which might be mentioned in any manner in this
distribution.

The author does not take responsibility for incorrect, incomplete or misleading information.
Statements are to be considered as the author's free personal opinion. The author does not
necessarly possess any of the items mentioned in files in this distribution.

Files (and the information therein) created by the author K. M. Indlekofer are copyright
(c) by K. M. Indlekofer. Unless protected/restricted otherwise, the author permits
reproduction/redistribution of material contained in this distribution under the condition
that the item is properly credited. Links to items/materials in this distribution are welcome.
Projects/publications/papers that make use of materials, programs, or generated output
of this distribution must properly credit the author and mention the usage of this distribution.
Please contact the author K. M. Indlekofer for comments or further questions
and permission to use materials/information from this distribution.

Some programs/data files are released under the terms of the GNU General Public License
as published by the Free Software Foundation. (Address: Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Internet: GNU General Public
License (GPL) from The GNU Project) 



---
End of file
