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

CDP circles logo

CDP Spectral PITCH (& Harmony/Freq) Functions
(with Command Line Usage)

Functions to Create PITCH (& Harmony/Freq) Relationships Between Partials

ALTHARMS
Delete alternate harmonics
CHORD
Transposed versions of the sound are transposed onto the original
CHORDF
Transposed versions of the spectrum are superimposed within the existing spectral envelope
OCTMOVE
Octave transpose without formant shift
PICK
Only retain channels which might hold the partials specified
TRANSP
Shift pitch of (part of) the spectrum
TUNE
Replace spectral frequencies by harmonics of specified pitch(es)
Technical Discussion
Harmonic and Inharmonic Relationships Among Partials

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


PITCH ALTHARMS – Delete alternate harmonics

Usage

pitch altharms mode infile pitchfile outfile -x

MODES

1 delete odd harmonics

This usually produces a transposition an octave higher, with no formant change.

2 delete even harmonics

Parameters

pitchfile binary file data file

The pitchfile must be derived from the infile by running REPITCH GETPITCH

-x alternative spectral reconstruction

Understanding the PITCH ALTHARMS Process

To run this function, you must first extract the pitch information from the infile by running REPITCH GETPITCH. When you run PITCH ALTHARMS, it first automatically removes all the non-harmonic partials from the infile (the SPEC BARE process is built into it). Using the combination of this harmonic data and the pitch information in pitchfile, it can then remove the odd or even partials, depending on which mode you choose.

Using Mode 1 to remove the odd partials makes the transposition without changing the spectral contour: the formants are preserved.

Removing the even partials will timbrally colour the original sound, also without changing the spectral contour.

Musical applications

A reference point for this program could be the difference between the timbre of a clarinet and that of an oboe. The sharper tone of the oboe is a result of the predominance of odd harmonics. So PITCH ALTHARMS is all about altering the tone of a sound. It does this without altering the formants, i.e., the frequency regions with the highest amplitude, so the recognisability of the sound remains, but the tone changes.

It is likely that this function will produce more interesting results the more the source sound is rich in harmonics.

End of PITCH ALTHARMS
Return to List of PITCH functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH CHORD – Transposed versions of the sound are transposed onto the original

Usage

pitch chord infile outfile transpose_file [-bbot] [-ttop] [-x]

Parameters

transpose_file a file of (possibly fractional) semitone transposition values
-bbot bottom frequency, below which data is filtered out
-ttop top frequency, above which data is filtered out

bot and top may vary over time

-x for a fuller spectrum

Understanding the PITCH CHORD Process

The transpose_file, bot and top parameters are handled as in PITCH CHORDF below.

The difference here is that the formants are not extracted. This results in an increase in the inharmonic relationships among partials.

Musical applications

The process enriches the sound timbrally, though also with a certain degree of resonance resulting from the presence of the 'chord'.

End of PITCH CHORD
Return to List of PITCH functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH CHORDF – Transposed versions of the spectrum are superimposed within the existing spectral envelope

Usage

pitch chordf infile outfile -fN | -pN [-i] transpose_file [-bbot] [-ttop] [-x]

Parameters

-f extract formant envelope linear frequency-wise, using 1 point for every N equally-spaced frequency-channels
-p extract formant envelope linear pitchwise, using N equally-spaced pitch-bands per octave
-i quicksearch for formants (less accurate)
trans_file a file of (possibly fractional) semitone transposition values
-bbot bottom frequency, below which data is filtered out
-ttop top frequency, above which data is filtered out

bot and top may vary over time

-x for a fuller spectrum

Understanding the PITCH CHORDF Process

A brief discussion of the extraction options can be found in the documentation for FORMANT GET.

The bot and top parameters allow the user to optimise the operation of PITCH CHORDF by focusing on the main part of the sound. The output of PITCHINFO INFO might be useful for this, as it provides data on the pitch range of the sound. (Remember that you need a binary pitch file as produced by REPITCH GETPITCH as an input for PITCHINFO INFO.)

The transpose_file is written as a series of semitone transposition values. 0 is used for no transposition and the 'chord' is built up from the bottom. The values can be written on separate lines or in a row, separated by spaces. Here's an example:

 0
 3
 4.5
 6
 7
10
12

Or:

0 3 4.5 6 7 10 12

If the chord began on C, for example, this chord would be C-Eb-E¼#- F#-G-Bb-C1.

Musical applications

This function provides a way to tune a sound to a chordal harmony. It is a spectral equivalent of a harmoniser: i.e., a multi-pitch shift which preserves formant information. This makes it especially suitable for the processing of vocal sounds. The net result is that the original sound becomes a chord of arbitrary dimensions.

Once a sound is tuned to a chord, it can be developed in various ways. To explore this, you might try tuning a sound with the transpose_file above, then stretching the resulting file x3 with STRETCH TIME, and then sustaining the data of the stretched sound with FOCUS ACCU, giving a value of 0.1 for decay.

End of PITCH CHORDF
Return to List of PITCH functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH OCTMOVE – Octave transpose without formant shift

Usage

pitch octmove 1–2 infile pitchfile outfile -i transposition
pitch oct 3 infile pitchfile outfile -i transposition bassboost

MODES

1 transpose up
2 transpose down
3 transpose down, with bass reinforcement

Parameters

infile and outfile are analysis files
pitchfile binary pitch data file (.frq) containing the pitch trace of a sound

The pitchfile must be derived from the infile by running REPITCH GETPITCH, the input for which is an analysis file.

transposition an integer transposition ratio (2 is an octave, 3 is a 12th, etc.)
bassboost bass reinforcement (Range: >= 0.0)
-i quicksearch for formants (less accurate)

Understanding the PITCH OCTMOVE Process

OCTMOVE provides a straightforward way to effect an octave shift of the spectrum. Note that it does this while preserving the formant characteristics of the original.

Step One is to run REPITCH GETPITCH

Step two is to run PITCH OCTMOVE, using the GETPITCH pitchfile.

Caution: PITCH OCTMOVE can only work if pitch is satisfactorily extracted by REPITCH GETPITCH. Any source with more than one pitch in it as a time (e.g., a chord, an orchestral passage etc.) does not have 'a pitch' as far as GETPITCH is concerned. Transposition of harmonically complex sound material is best done with REPITCH TRANSPOSEF. However, there is nothing to stop you exploring what might happen by running PITCH OCTMOVE with this kind of input.

Musical applications

The transformation here results from the preserved formants appearing in different (octave) frequency locations. (The process works by deleting alternate harmonics.) You might want to compare this result with that of PITCH TRANSP which does not preserve formants.

If you wanted to emphasise harmonic material, you could try running SPEC BARE on the infile first, and using the harmonics-only result as the revised infile for PITCH OCTMOVE.

From an idea of Miller Puckette.

End of PITCH OCTMOVE
Return to List of PITCH functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH PICK – Only retain channels which might hold the partials specified

Usage

pitch pick 1–3 infile outfile fundamental -cclarity
pitch pick 4–5 infile outfile fundamental frqstep -cclarity

MODES

1 Harmonic series
2 Octaves
3 Odd partials of harmonic series only
4 Partials are successive linear steps (each of frqstep from the fundamental
5 Add linear displacement (frqstep) to harmonic partials over the fundamental

Parameters

fundamental actual fundamental frequency in Hz of the harmonic series, or arbitrary fundamental frequency in Hz used for the calculation
frqstep frequency step in Hz to be added to another frequency. If you are thinking in semitones or intervals, use INFO UNITS to convert to Hz.
clarity extent to which data in other channels is suppressed. Range: 0–1. Default 1.

clarity may vary over time

Understanding the PITCH PICK Process

This function locates the analysis channels which would contain the specified sets of partials, and adjusts the frequency data in those channels onto the specified frequencies. The data in the other channels may or may not be (partially) suppressed with the clarity parameter.

Musical applications

PITCH PICK will tune a spectrum onto the partial sets specified by the Mode. This tuning can be made to emerge or disappear gradually by increasing or decreasing the clarity factor through time.

Various degrees of data reduction are likely to appear in the various modes. Modes 1 and 5 appear to maintain a fairly rich version of the original, while Modes 2 and 3 significantly thin the sound, the latter sounding a bit 'hollow'.

End of PITCH PICK
Return to List of PITCH functions top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH TRANSP – Shift pitch of (part of) the spectrum, keeping harmonic relationships

Usage
Modes
Parameters
Understanding
Musical Applications

Usage

pitch transp 1–3 infile outfile frq_split [-ddepth]
pitch transp 4–5 infile outfile frq_split transpos [-ddepth]
pitch transp 6 infile outfile frq_split transpos1 transpos2 [-ddepth]

E.g.,
pitch transp 6 inf outf 880.0 7 -4 -d0.6

Modes

1 Octave shift up, above frq_split
2 Octave shift down, below frq_split
3 Octave shift up and down from frq_split
4 Pitch shift up, above frq_split
5 Pitch shift down, below frq_split
6 Pitch shift up and down from frq_split

Parameters

infile input analysis file
outfile output analysis file
frq_split frequency in Hz above or below which the shift takes place
transpos transposition above or below frq_split (semitones)
transpos1 transposition above frq_split (semitones)
transpos2 transposition below frq_split(semitones)
-ddepth transposition effect on source: from 0 (no effect) to 1 (full effect)
The semitone transposition values may be fractional.

Understanding the PITCH TRANSP Process

PITCH TRANSP transposes (part of) the spectrum up or down a specified number of semitones (including fractional parts of semitones). All the partials are moved, preserving the relationships among the partials: because the semitone transposition value becomes a multiplier within the program.

Musical applications

What this means musically, is that some of the timbral character of the original remains with the PITCH SHIFT process (relationships among partials maintained), and some of the timbral character is lost (formants not preserved).

The output of PITCHINFO INFO can be useful because it returns the maximum, minimum and mean pitch of a soundfile. Remember that it works on a binary pitch data file as produced by REPITCH GETPITCH.

It would be useful to compare, experimentally, the results of PITCH TRANSP with PITCH OCTMOVE and with STRETCH SPECTRUM. PITCH OCTMOVE preserves formants, whereas PITCH TRANSP does not. And with PITCH TRANSP, the relationships between the partials are maintained, whereas with STRETCH SPECTRUM, the stretch factor is applied to the uppermost (or lowest) channel only, and all the partials inbetween are rescaled by intermediate amounts, depending on their relative position. Try listening to these subtle differences: 1) formants preserved (OCTMOVE), 2) formants not preserved, but harmonic relationships maintained (TRANSP), and 3) rescaling the partial relationships (STRETCH SPECTRUM).

End of PITCH TRANSP
Return to List of PITCH functions at top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


PITCH TUNE – Replace spectral frequencies by harmonics of the specified pitch(es)

Usage
Modes
Parameters
Understanding
Musical Applications

Usage

pitch tune mode infile outfile pitch_template [-ffocus] [-cclarity] [-ttrace] [-bbcut]

E.g.,
pitch tune 2 inf outf tunemidi.txt -c0.8 -ttunetrce.txt

Modes

1 enter pitch_template data as frequency (in Hz)
2 enter pitch_template data as (possibly fractional) MIDI values

Parameters

-ffocus determines the degree of focusing of the partial pitches onto the template (Range: 0 to 1. Default is 1)
-cclarity determines the degree to which non-template partials are suppressed (Range 0 to 1. Default is 0)
-ttracespecifies the number of (window-by-window) most prominent channels to be replaced by the template frequencies
-bbcut ignore frequencies below bcut, the Bass cutoff frequency

All parameters may vary over time

Understanding the PITCH TUNE Process

This program provides the most elegant way to tune a spectrum to a specified pitch set, or 'harmony'. Every component of the analysis is tuned to either one of the specified pitches, or to one of their harmonics. The final sound is a very 'natural' sounding resonance based on the specified chord. carrying the spectral articulation of the original sound. The process works best on unpitched, pitch-unspecific, or noisy materials, but can be applied to any sound.

The specified pitch set is best situated within the main pitch range of the sound: in the region of the fundamental(s). The simplest way to do this is with a tuning fork. SPECINFO REPORT Mode 3 will also list the frequencies of the peaks in the evolving spectrum. And if there is sufficient pitch material to get a 'reading', PITCHINFO INFO can give a useful overview of the maximum, minimum and mean frequencies. NB: the PITCHINFO functions will not work with binary pitch data files (produced by REPITCH GETPITCH) if the -z flag was used.)

The data is entered on the same line separated by spaces, or as a vertical list. A pitch name to MIDI note number chart (e.g., C-x : 60) arranged in octaves can be handy when entering pitch data in MIDI values. The 'x' indicates which octave, starting from the bottom of the MIDI range.

Musical applications

This tuning process can be used simply to colour or sound, to build harmonic structure into the composition, or to make direct links with other pitch material, such as from live acoustic instruments. Note that the 'specified pitch set' can be arbitrarily constructed.

End of PITCH TUNE
Return to List of PITCH functions to top of this file
Return to Main Index for the CDP System.
Return to Spectral Index


Technical Discussion of Pitch Relationships Among Partials

...

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



Last Updated: 26 July 2001
Documentation: Archer Endrich
All observations & ideas for improvement appreciated
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-2001 Archer Endrich & CDP