SoundshaperLogo
SOUNDSHAPER: CDP REFERENCE

COMBINE - functions combining spectra


CDPLOGO
SPECTRAL
COMBINE
combine
PREVToIndex
SUM/DIFF/INTERL/MAX/MEAN  NEXT

SPECTRAL > COMBINE > SUM/DIFF/INTERLEAVE/MAX/MEAN >

SUMMARY
The COMBINE group combines the spectra from two infiles in various ways:
  SPECSUM adds the amplitudes together, if they differ.
  SPECDIFF takes the difference of the two amplitudes.
  SPECMAX takes the maximum amplitude of the two input files.
  SPECMEAN takes the mean amplitude, and mean pitch or frequency, of the two input files. Or it can take its amps from either file, according to mode.
  SPECINTERL interleaves the analysis windows from multiple infiles.
(CDP's COMBINE group also contains some further processes which Soundshaper treats separately.) 

N.B. in Soundshaper's current stereo implementation, if both infiles are stereo, only channel 1 of Infile 2 is used, hence the pairs are: Infile1L and Infile2L, Infile1R and Infile2L. 

SPECSUM
SPECSUM examines the amplitude levels in each analysis channel of each of the two input files. Where they differ, it adds this difference to the first file, as weighted by crossover. In other words, the result is Infile1 plus the difference between it and Infile2. Beware of possible clipping.

PARAMETERS
 [crossover]  For each frequency-analysis channel, the amount of the second spectrum added to the first.
Range: 0-1

SPECDIFF
SPECDIFF subtracts one spectrum from another, channel by channel, as weighted by crossover. You can opt to retain any resulting negative amplitudes (in which case, beware of possible clipping).

PARAMETERS
 [crossover]  For each frequency-analysis channel, the amount of the second spectrum subtracted from the first.
       
Range: 0-1

OPTION
 keep negatives Retain any resulting negative amplitudes (as positive values).

SPECMAX
SPECMAX compares the amplitudes of the two spectra, channel by channel, and takes the strongest one.

PARAMETERS
None

SPECMEAN
According to mode, SPECMEAN takes its amps as a mean of both infiles, or from one of them. The frequencies are either a mean of the two frequencies or a mean of the two pitches. Again, this is done channel by channel to each analysis window.

MODES
 1. Amp of both (P): Mean channel amplitude of both and mean of pitches
 2. Amp of both (F): Mean channel amplitude of both and mean of frequencies
 3. Amp of 1 (P): Amplitude from InFile1 and mean of pitches
 4. Amp of 1 (F): Amp
litude from InFile1 and mean of frequencies
 5. Amp of 2 (P): Amp
litude from InFile2 and mean of pitches
 6. Amp of 2 (F): Amp
litude from InFile2 and mean of frequencies
 7. Max amp (P): Maximum amplitude of both (per channel) and mean of pitches
 8. Max amp (F): Maximum amplitude of both (per channel) and mean of frequencies

PARAMETERS
  [channels]:  Number of significant channels to compare (optional). A trace option looking only at the loudest N channels.
Range: 2-no. of channels. Default: all in frequency range.
  [low-freq]:   Low frequency limit of channels to look at.
Range5-22028 Hz
  [high-freq]   High frequency limit of channels to look at.
Range: 48.066406 to 22050 Hz

OPTION
  zero outside band: Zero channels outside freq. range specified (hence low and high freq. define a filter band).

SPECINTERL
SPECINTERL interleaves the analysis windows from multiple infiles, according to leaf size.
The outfile length appears to be that of the shortest infile.

PARAMETERS
  leaf size:  Number of windows from each Infile to interleave as a group.
Range: 1 to no. of windows
(Soundshaper show the max. no. of windows from Infile 1, but don't use more than the max. of the shortest Infile: use Info to find this window count as necessary.)

Example: if leaf size equals 1 and there are two infiles, it takes 1 window from Infile 1, then 1 from Infile 2, then repeats this.
If Leaf size=10 and there are 3 Infiles, it takes 1st 10 windows from Infile1 then 1st 10 from Infile 2, then 1st 10 from Infile 3, then next 10 from Infile 1, etc.


NOTES
Using a steady tone for Infile1 and articulated speech for Infile2 produced the following:

SPECSUM: the result was like a simple mix of the two signals.
SPECDIFF:  resulted in an amplitude fluctuation of Infile1 correspnding to the speech rhythm. However, this could have been achieved by envelope-following (envelope impose or replace).
SPECMAX: as SUM. Except where the sounds are competing for the same frequency space, each main frequency component will survive, resulting in a simple mix.
SPECMEAN: As each mode takes a mean of pitch or frequency, the result is always going to be a wierd, somewhat "randomised" frequency stream. Using Mode 1 and Infile1 and 2 as above produced a strange version of the speech without clear words. Mode 2 sounded like a strange new language. Mode 3 was muddy like Mode 1 and Mode 4 was like Mode 2.  Mode 6, taking its amps from the speech was like a slightly modulated speech, whicle Mode 5 was a muddy version of the same. Modes 7 and 8 are a combination of MAX (amp) and MEAN for Pitch/freq; Mode 7 was quite like Mode 1 and 8 like Mode 2.
MEAN has some useful optional extras in its trace-like comparison of N loudest channels and its filtering option, with the possibility of zeroing outside the specified band.

SPECINTERL: A large leaf size flips between chunks of the two or more files. A small leaf size produces a grainy effect.

© Ensemble Software and Composers Desktop Project 2014