Return to Main Index for the CDP System.
Return to Spectral Index

CDP circles logo

CDP Interacting Spectra
(with Command Line Usage)

Functions to COMBINE spectra from different sounds

CROSS
Replace spectral amplitudes of 1st file with those of 2nd
DIFF
Subtract one spectrum from another
INTERLEAVE
Interleave (groups of) windows of several spectra
MAKE
Generate spectrum from pitch & formant data only
MAKE2
Generate spectrum from pitch, formant & envelope data only
MAX
In each analysis channel, in each window, take the maximum value amongst the input files
MEAN
Generate the spectral 'mean' of 2 sounds
SUM
Find the sum of two spectra
Technical Discussion
Interacting Spectra

Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE CROSS – Replace spectral amplitudes of 1st file with those of 2nd

Usage

combine cross infile infile2 outfile [-binterp]

Parameters

-binterp interp is the degree of replacement

interp may vary over time

Understanding the COMBINE CROSS Function

Formerly SPECCROS, this function makes a weighted substitution of the amplitude of one spectral envelope for that of the other. It is therefore a fairly straightforward way to achieve a crossover between the timbral characteristics of two different sounds.

Musical applications

The spectral envelope contains the data for spectral peaks/formants. Thus the transfer of timbral characteristics. However, it is not a full substitution of the whole envelope, but only a (weighted) crossover. It can therefore be used, for example, to prepare two sounds for morphing, especially when the timbral characteristics differ to a considerable extent. By moving one sound gradually into the timbral field of the other prior to morphing, a smoother morph transition can be achieved.

End of COMBINE CROSS
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE DIFF – Find difference of two spectra

Usage

combine diff infile infile2 outfile [-ccrossover] [-a]

Parameters

-ccrossover crossover is the amount of 2nd spectrum which is subtracted from the 1st (Range 0 to 1)

crossover may vary over time

-a retains any subzero amplitudes produced (Default: sets these to zero)

Understanding the COMBINE DIFF Function

In COMBINE DIFF one spectrum is subtracted from another on a channel-by- channel basis (weighted by crossover). If amplitude in any channel goes negative, you can opt whether or not to retain the negative amplitudes.

By default, the setting of any amplitudes < 0 to 0 protects against negative overflow, but you can use the -a flag and see what happens.

Musical applications

This is a way to change a sound on a very experimental basis.

Also see COMBINE SUM.

End of COMBINE DIFF
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE INTERLEAVE – Interleave windows from infiles, leafsize windows per leaf

Usage

combine interleave infile infile2 [infile3 ...] outfile leafsize

Parameters

infile(s) an indefinite number of input files (at least two), which will be processed sequentially in the same order as given on the command line
leafsize number of analysis windows in each leaf

Understanding the COMBINE INTERLEAVE Process

INTERLEAVE is a new version of the former SPECLIFN. It interleaves N spectra from N analysis files, thereby constructing a new analysis file as output. The spectral characteristics of several sounds are thus amalgamated into one new sound.

The degree to which the original sounds are retained depends on the number of analysis windows used.

A leafsize is simply a specified group of analysis windows. If leafsize is 1, then the windows from each file are interleaved one at a time. If leafsize is 2, then the windows from each file are interleaved two at a time, etc. Larger leafsize retains more recognisable chunks of the original sounds.

Musical applications

With very small values for leafsize, the various sounds are mingled quite thoroughly and relatively smoothly – relative to the nature of the input sounds, though a somewhat grainy effect may result. With larger values for leafsize, say 8, 10, 20 or more, more of each component sound is heard in each leaf and the result is more like a churning or pulsating effect as the new soundfile oscillates among the sound material in the various source soundfiles. To churn means to shake, stir or agitate violently, as when making butter from milk, which is nicely descriptive of what happens when several sound sources, each fairly strong, are interleaved in this way. [It's one of my favourites! – Ed.].

End of COMBINE INTERLEAVE
Return to List of combine functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE MAKE – Generate spectrum from pitch & formant data only

Usage

combine make pitchfile formantfile outfile

Parameters

pitchfile a binary pitch data file .frq as produced by REPITCH GETPITCH, REPITCH GENERATE or REPITCH COMBINE, Mode 2
formantfile a binary formant data file .for as produced by FORMANTS GET
outfile analysis file .ana which can be resynthesized with PVOC

Understanding the COMBINE MAKE Function

.frq + .for = .ana
This is an interesting way to combine the pitch data and the timbral (formant) data from any two arbitrarily chosen sounds.

End of COMBINE MAKE
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE MAKE2 – Generate a spectrum from only pitch, formant and envelope data

Usage

combine make2 pitchfile formantfile envfile outfile

Parameters

pitchfile is a binary pitch data file (.frq) as produced by REPITCH GETPITCH, REPITCH GENERATE or REPITCH COMBINE, Mode 2
formantfile is a binary formant data file (.for) as produced by FORMANTS GET
envfile is a binary envelope file (.evl) produced / modified in the Time Domain or derived from an analysis file (.ana) by REPITCH ANALENV
outfile is an analysis file .ana that can be resynthesised with PVOC

Understanding the COMBINE MAKE2 Function

.frq + .for + .evl = .ana
This function can be used to combine the pitch contour, formant envelope, and loudness envelope of different sounds, thereby transferring the characteristics of one sound onto another. MAKE2 extends the functionality of MAKE by enabling (spectral) envelope data to be used as well.

The source sound could also be recreated from the data in the pitch, formant and envelope files extracted from its own spectrum. This provides a way to check on the accuracy of the extraction – small details, especially of noise sounds, often get changed.

Musical applications

New sounds can be engineered with this procedure by combining three different features of up to three different sounds. The pitch data file contains an extracted pitch contour, the formant data file contains the strongest, most resonant, frequency bands of the spectrum, and the envelope file contains the contour of the spectral envelope, the (changing) amplitude pattern made by the frequencies. Given that you are alert to the distinctive characteristics of your sounds, this function provides a tremendously powerful tool with which to construct new sonic material.

This is important not just from a purely sonic point of view. It is also an important tool for creating structural relationships between sounds, that is, the duplication of identical or similar shapes within a composition. This can create obvious relationships or it can be used to create subtle, hardly perceptible connections. Overall, the result is to achieve a sense of unity within the composition, even when diverse materials are being used. We are familiar with this in note-based music, where motifs and themes can have similar components, contours etc. COMBINE MAKE and COMBINE MAKE2 therefore provide a vital compositional tools in the spectral realm.

Recreating the original sound from its own pitch, formant and envelope data provides a diagnostic tool for assessing how the analysis is coping with the frequency contents of a sound.

End of COMBINE MAKE2
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE MAX – In each analysis channel, in each window, take the maximum value amongst the input files

Usage

combine max infile infile2 [infile3 ...] outfile

Parameters

infile infile2 [infile3 ...] arbitrary number of input analysis files
outfile the output is an analysis file

Understanding the COMBINE MAX Function

COMBINE MAX studies the data in all the input analysis files. For each channel it retains only the single loudest spectral component among all the input files. In spite of the loss of the other components, the sound often remains the same to a remarkable degree. But how several sounds will merge in this way will be a little unpredictable: because data from the files which DO NOT have the loudest spectral component will simply be omitted.

The spectral characteristics of the input sounds are just merged, producing an ultra-seamless mix. The input sounds remain recognisable, just like an ordinary mix. Note that this is different from the programs which transfer the spectrum or spectral envelope of a sound. With the latter, the audible characteristics of one of the sounds are noticeably changed.

Rob Waring's wonderful hornwhivoc sound, which we often use for demos, was made with this function. It merges a horn, a whistle and a voice (note that these are timbrally very different sounds). You can find it on the Future Music cover CD for December 1993.

End of COMBINE MAX
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE MEAN – Generate the spectral 'mean' of 2 sounds

Usage

combine mean mode infile infile2 outfile [-llofrq] [-hhifrq] [-cchans] [-z]

Modes

1 mean channel amp of 2 files : mean of two pitches
2 mean channel amp of 2 files : mean of two frequencies
3 channel amp from file 1     : mean of two pitches
4 channel amp from file 1     : mean of two frequencies
5 channel amp from file 1     : mean of two pitches
6 channel amp from file 1     : mean of two frequencies
7 max channel amp of 2 files : mean of two pitches
8 max channel amp of 2 files : mean of two frequencies

Parameters

-llofrq low frequency limit of channels to look at
-hhifrq high frequency limit of channels to look at
-cchans number of significant channels to compare. Default: ALL within range.
-z zeroes channels OUTSIDE the frequency range specified

Understanding the COMBINE MEAN Function

This program takes 2 input sounds and calculates the average of the 2 signals, spectral window by spectral window. The average in loudness between, for example, two speech sounds, should reach some vague mean between the formants of the speech components being used. The frequency average is altogether more strange. It may, for example, convert harmonic into inharmonic spectra. Seriously wierd.

Musical applications

It is not really possible to predict the results of this way to combine sounds, as they are so dependent on the nature of the sources. It is best to try it with the type of source file you favour and try to build up some experimental data about what happens.

End of COMBINE MEAN
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


COMBINE SUM – Find the sum of two spectra

Usage

combine sum infile infile2 outfile -ccrossover

Parameters

-ccrossover crossover is the amount of 2nd spectrum which is added to the 1st (Range 0 to 1)

crossover may vary over time

Understanding the COMBINE SUM Function

COMBINE SUM examines the amplitude levels in each channel of each of the two input analysis files. Where they differ, it adds this difference to the 1st file, as weighted by crossover. In other words, the result is infile plus the difference between it and infile2. When resynthesising, watch out for clipping.

Musical applications

This is a way to adjust the timbre of a sound by adding to it some part of of the timbral features which belong to another sound. Very often, the change is both major and relatively unpredictable.

Also see COMBINE DIFF.

End of COMBINE SUM
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


Technical Discussion of Interacting Spectra

As mentioned in the text for MAKE2, there are both sonic and compositional reasons for combining the features of different sounds.

Another application is for morphing, to create intermediate stages when morphing from one sound to another. This presumes that a morph is meant to be perceptually different from a transition. The latter implies a smooth changeover from the first to the second. A morph, however, can imply a gradual and perceptible reshaping of the first with the features of the second. All of the COMBINE functions can be explored with this in mind: sums (SUM), differences (DIFF), means (MEAN) of sounds, unpredictable mixes of the loudest frequencies (MAX), combinations of pitch traces, resonant frequencies and spectral amplitude contours MAKE and MAKE2), and even an intermediate stage that interleaves the two files (INTERLEAVE).

End of Technical Discussion
Return to List of functions for interacting spectra at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index



Last Updated: 20 February 2005
All observations & ideas for improvements appreciated
Documentation: Archer Endrich
Composers Desktop Project
12 Goodwood Way
Cepen Park South
Chippenham, Wiltshire
SN14 0SY ENGLAND
Tel. +44 (0)1249 461361
Email: archer@trans4um.demon.co.uk
© Copyright 1998-2005 Archer Endrich & CDP