Noise Substitution Python Code v0
Colin Raffel

A description of this code's functionality can be found at https://ccrma.stanford.edu/~craffel/software/noise/

To create a .wav file consiting of coded MP3 audio summed with the synthesized error representation can be created by, eg
python makeRowMp3.py input.wav input.mp3 output.wav
There are a variety of options (see the paper); the usage is:
python makeRowMp3.py input.wav input.mp3 output.wav -flux|-cepstrum -alpha 0.2 -mean|-rms|-rc 
-flux or -cepstrum determines the noise analysis technique, -alpha is the amount to modulate the error estimate by the coded audio's envelope,
  and -mean or -rms or -rc determines the level detection technique.  Defaults are cepstrum, .8, and mean.

The required modules are
- Numpy for numerical functions
- Scipy for wav file reading and writing (can be replaced by another module with similar functionality)
- Pymad for decoding MP3 files

Creation of the requisite MP3 files should be done outside of the programs, preferably using LAME with the commands given by the progrma, eg lame --resample 44.1 --cbr -b 64 -h filename.wav. This particular encoding format is recommended so that the error extraction and analysis works properly. The files contained are
- makeRowMp3.py - Wrapper script for creating example files like thos above.
- getError.py - Aligns and subtracts the coded and original audio file to obtain the coding residual.
- noiseAnalyze.py - Functionality for determining per-band critical levels.
- noiseSynthesize.py - Functionality for generating the noise representation.
- utility.py - Some useful functions.
- README - A file containing some of this information in addition to some example calls.
- LICENSE - These source files are distributed under the MAME license for now.
