**AVERAGE**- Average the waveshape over
*N*'wavecycles' **CYCLECNT**- Count 'wavecycles' in soundfile
**DELETE**- Time-contract soundfile by deleting 'wavecycles'
**DIVIDE**- Distortion by dividing 'wavecycle' frequency
**ENVEL**- Impose envelope over each group
of
*cyclecnt*'wavecycles' **FILTER**- Time-contract a sound by filtering out 'wavecycles'
**FRACTAL**- Superimpose miniature copies of source 'wavecycles' onto themselves
**HARMONIC**- Harmonic distortion by superimposing 'harmonics' onto 'wavecycles'
**INTERACT**- Time-domain interaction of two sounds
**INTERPOLATE**- Time-stretch file by repeating 'wavecycles' and interpolating between them
**MULTIPLY**- Distortion by multiplying 'wavecycle' frequency
**OMIT**- Omit
*A*out of every*B*'wavecycles', replacing them with silence **OVERLOAD**- Clip the signal with noise or a (possibly timevarying) waveform
**PITCH**- Pitchwarp 'wavecycles' of sound
**PULSED**- Impose regular pulsations on a sound
**REFORM**- Modify the shape of 'wavecycles'
**REPEAT**- Timestretch soundfile by repeating 'wavecycles'
**REPEAT2**- Repeat 'wavecycles' without time-stretching
**REPLACE**- The strongest 'wavecycle' in
a
*cyclecnt*group replaces the others **REPLIM**- Timestretch by repeating 'wavecycles' (below a specified frequency)
**REVERSE**- Cycle-reversal distortion in which the 'wavecycles' are reversed in groups
**SHUFFLE**- Distortion by shuffling 'wavecycles'
**TELESCOPE**- Time-contract sound by
telescoping
*N*wavecycles into 1 **Technical Discussion**- Description of a 'Pseudo-wavecycle'
**The Wavecycle DISTORT Functions**- Richard Dobson's Introduction to the T Wishart Wavecycle Distort Functions

On the whole, words cannot be found to describe the aural results of the DISTORT processes, so the Musical Applications sections below are notably sparse. You'll just have to run them for yourselves!

infile– soundfile to process (mono only)

outfile– output soundfile

cyclecnt– number of cycles over which to average (Range: > 1)cyclecntmay vary over time.-mmaxwavelen– maximum permissible wavelength in seconds (Default: 0.50)

-sskipcycles– (integer) number of wavecycles to skip at start of file

DISTORT AVERAGE performs a mathematical averaging of the data in

cyclecntpseudo-wavecycles. The effect is more akin to a loss of resolution than the blurring which might be expected. Values below 10 retain some semblance of the original, while values of, for example, 100 seem to create a kind of 'sample hold' effect. For modest distortion, values 5 or less are recommended.

Mushy, watery, aspects of tracing, discrete sample-hold effects...

End of DISTORT AVERAGE

**Return** to list of DISTORT functions
at top of this file

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

**Return** to
'Groucho' Time-Domain Index

infile– soundfile to examine (mono only)

DISTORT CYCLECNT checks the waveform of the

infilefor zero crossings, determining how many segments lie between these crossings. It then displays this figure on screen.

This information – the number of 'waveycles' in a file – can help predict the level of distortion a given process might produce.

Knowing the total number of 'wavecycles' also enables you to set a suitable value for several parameters found in the DISTORT programs.

End of DISTORT CYCLECNT

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

1One 'wavecycle' in everycyclecnt'wavecycles' is retained

2The strongest (single) 'wavecycle' in everycyclecnt'wavecycles' is retained

3The weakest (single) 'wavecycle' in everycyclecnt'wavecycles' is deleted

infile– soundfile to process (mono only)

outfile– output, time-contracted, soundfile

cyclecnt– groups of 'wavecycles': really the level of resolution at which the process will workcyclecntmay vary over time.-sskipcycles– (integer) number of 'wavecycles' to skip at start of file

Mode

1dramatically removes data from theinfile, leaving very little behind. Mode2, because it sets out to retain the strongest (i.e., highest amplitude) 'wavecycle' in each set, retains more recognisable features from the original. Mode3takes this further be deleting the weakest (i.e., lowest amplitude) 'wavecycle' in each set. The three Modes, therefore, enable the user to target levels of recognisability.Because the 'wavecycles' are of irregular lengths, the idea of 'resolution' is only relative. However, it helps picture the degree to which the

infileis divided up into units. Then one 'wavecycle' from each of these units is retained or deleted according to the operation of each mode.The

skipcyclesparameter makes it possible to have this process begin some time after the start of the sound, e.g., so that its start transient, so vital to the recognition of the source of a sound, is not affected.

This process achieves a time-compression and textural roughening of the source.

End of DISTORT DELETE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

N– divider (Range: integer only, 2 to 16)

-i– use waveform interpolation: slower but cleaner

Without altering duration, this process effectively lowers the sound while adding a rough texture.

This is a useful form of distortion because it roughens the sound without being too violent about it.

End of DISTORT DIVIDE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

1Rising envelope

2Falling envelope

3Troughed envelope

4User-defined envelope

infile– input soundfile (mono only)

outfile– output soundfile

envfile– defines user envelope astime valuepairs (Range ofvalueis 0 to 1)The time units inenvfileare in fact arbitrary because in each case the envelope is stretched to fit the duration of eachcyclecntset.cyclecnt– number of 'wavecycles' under a single envelope

[-t]troughing– the trough depth of the envelope (Range: 0 [most troughed] to 1 [least troughed], Default = 0)

-eexponent– exponent to shape envelope rise or decay

- < 1 will produce a curve which starts quickly and slows down
- > 1 will produce a curve which starts slowly and speeds up
- Omitting this parameter will result in a linear rise or decay
cyclecnt,troughingandexponentmay vary over time.

The process takes the amplitude envelope data for each group of

cyclecnt'wavecycles' and adjusts this data to form a single envelope shape (for that group) according to the mode selected.

The same pattern repeats (irregularly), being reasonably fine or quite coarse depending on the size of

cyclecnt. This can be likened to creating a somewhat irregular sawtooth edge on the sound.The

exponentandenvfileparameters can be used to customise/intensify the effect of the enveloping.Here are some possible results with different values for

cyclecnt:

Small values(1 – 3), can produce a timbral distortion of the source.Medium valuescan produce a granular modification.Very Large values(64+) can result in the superposition of a repeating envelope (e.g., like a tremolando). But, with a natural rather than a synthetic source, this is likely to have a natural-sounding variability, due to the variable durations of the wavecycles which are being counted.- It is interesting to
gradually increasethecyclecntand hear the sound cross these different perceptural boundaries.One of the most telling applications of DISTORT ENVEL is to create irregular phasing effects. The most important tool for this is a time-varying breakpoint file for

cyclecnt, which can be used to introduce large variations in the length of each envelope shape. If this is done in two different ways (i.e., two different breakpoint files), then the two resultant (mono) files can be combined with SUBMIX INTERLEAVE to form a stereo file with phasedcyclecntenvelope shapes.

End of DISTORT ENVEL

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

1Omit cycles belowfreq

2Omit cycles abovefreq

3Omit cycles belowfreq1and abovefreq2

infile– input soundfile (mono only)

outfile– output soundfile

freq– frequency in Hz (Range: 10.0 to 22050.0)

freq1– frequency in Hz to delete below

freq2– frequency in Hz to delete above

freq,freq1andfreq2may vary over time.NB:Time-varyingfreq1andfreq2may not cross each other, nor be equal.Freqhere relates simply to the length of a 'wavecycle'. A high value signifies a short 'wavecycle', andv.vs.-sskipcycles– (integer) number of 'wavecycles' to skip at start of file

Period and frequency are inverse functions. Therefore it is possible to relate the length of a 'wavecycle' to the frequency it would have were it to recur regularly. This program therefore filters by removing 'wavecycles' shorter or longer than those relating to a specific, user-defined, frequency.

The duration of the

outfileis affected by this process: because 'wavecycles' are being removed, theoutfilewill be shorter, by varying degrees.

The aural effect of the DISTORT FILTER process is actually like gating. In gating, you can imagine a horizontal line drawn through the time/amplitude display of a soundfile. If the peaks above the line are retained (by filtering out lower frequencies), you just hear them (joined up). Similarly, if you filter out above the line, the peaks are gone, leaving the lower sound material (joined up).

The difference here is that the process is operating on 'pseudo-wavecycles' according to their length, so here the results are more unpredictable and also distort the sound to some degree, depending on where the horizontal line – the frequency variable(s) – is drawn. Technically, the process is akin to low-, high- and band-pass filters, but aurally it is more like gating.

You can therefore use this procedure to cut out some and distort other material in a sound.

End of DISTORT FILTER

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

scaling– (integer) division of scale of source wave (Range: 2 to sample_rate/2)

loudness– loudness of scaled component relative to source (Loudness of source is reckoned to be 1.0)scalingandloudnessmay vary over time.-ppre_attenuation– apply attenuation toinfilebefore processing

Note the very wide range of

scaling. Because it is a divisor, the larger the value ofscalethe shorter will be the miniature copies to be superimposed.These superimposed copies can be made to increase (be careful!) or decrease in amplitude with the

loudnessparameter. Using a value of 1.0 maintains the original amplitude of theinfile, which will be heard as pretty much as the original, but with the superimpositions on top of it.Loudnessis therefore a means of balancing the input and the processed sound components.

This is a powerful and somewhat wild tool for producing distortion effects. The higher the value of

scaling, the more the superimposed copies appear as a sheen of distortion above the original sound.

End of DISTORT FRACTAL

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

harmonics-file– containsharmonic_number amplitudepairs

- The amplitude of the source sound is taken to be 1.0
Amplituderange: 0.000031 to 32.0- Harmonics range from 2 to 1024
-ppre_attenuation– apply attenuation toinfilebefore processing

Harmonic distortion multiplies and adds within a single 'wavecycle' – possibly several times. For each

harmonic_numberin theharmonics-file, DISTORT HARMONIC scales and copies the shape of the 'wavecycle'harmonic_numbertimes and adds the result to the original at the givenamplitude(relative to that of theinfile). This is by direct analogy to harmonic additive synthesis, in which a complex pitched sound is created by adding sinusoidal partials. Indeed, DISTORT HARMONIC can be used for just this purpose by using a sine wave as input.There is no internal scaling of harmonic amplitude values. It will be necessary in many cases to scale the

infilewith theprescaleparameter to avoid overflow.Prescaleis a multiplier, like an ordinary gain factor. (See theGain – dB Chart).

The higher 'harmonics' of the 'wavecycles' are heard as faster versions superimposed on the original 'wavecycle' and on the lower 'harmonics'. Therefore, the application is to add these higher and denser levels of distortion to the sound.

End of DISTORT HARMONIC

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

1Interleave 'wavecycles' from the two infiles

2Impose 'wavecycle' lengths of 1^{st}file on 'wavecycles' of 2^{nd}

infile1– input soundfile number 1 (mono only)

infile2– input soundfile number 2 (mono only)

outfile– output soundfile

In Mode

1material from both soundfiles is audibly apparent due to the interleaving process. In Mode2, the distortion is almost total: the alteration of the 'wavecycle' lengths of the second sound changes it to a burbly, bubbly, seething mass.

DISTORT INTERACT can be used to achieve distortion which combines data from two different sounds or distortion which totally alters a sound.

End of DISTORT INTERACT

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

multiplier– (integer) number of times each 'wavecycle' repeatsmultipliermay vary over time.-sskipcycles– (integer) number of 'wavecycles' to skip at start of file

With this process, the shape of a 'wavecycle' is transformed into that of the next over

multiplierrepetitions. Note that this is waveshape-based interpolation, not a spectral interpolation, and that the length of the 'wavecycle' is also transformed by the process.The effect of the transformation is drastic, leading to a strongly granular

outfile. The length of theoutfileincreases in step with the value ofmultiplier, as does the apparent pitchiness.

The interpolation process adds a modulatory quality to the output, so that the successive wavecycles gliss and bend as they flow into one another. Even so, as

multiplierincreases, the perception of separate 'grains', i.e., 'wavecycles' increases. A value of 32, for example, changes the sound to a strange stream of modulating tones.

End of DISTORT INTERPOLATE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

N– multiplier (Range: 2 to 16, integer only)

-s– smoothing (try this if glitches appear)

The duration of the sound is not changed, only the frequency of the 'wavecycles', with the result that the pitch rises.

The distortion is relatively mild, in that the original sound remains recognisable. However, the surface is textured and the pitch rises with each increase in the value of

N. DISTORT MULTIPLY can be used, for example, to create high, modulating, grainy vocal sounds.

End of DISTORT MULTIPLY

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

A– number of 'wavecycles' to omit

B– size of group of 'wavecycles' out of which to omitA'wavecycles'Amay vary over time, but mustalwaysbe less thanB.

Because the omitted 'wavecyles' are replaced by silence, the overall duration of the sound does not change. The larger the proportion of 'wavecycles' omitted from

B, of course, the more distorted the the sound becomes. This distortion is like a rough texturing, rather than the highly modulatory results of some of the other processes.

This process can be used, therefore, to achieve a rough texturing with no loss of duration.

End of DISTORT OMIT

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

1Clip signal

2Clip and add waveform

infile– input soundfile (mono only)

outfile– output soundfile

clip-level– level at which the signal is to be clipped (Range: 0 to 1) The signal level is renormalised after clipping.

depth– depth of the pattern of distortion imposed on clipped stretches of the signal. (Range: 0 to 1)

freq– frequency of the waveform imposed on clipped stretches of the signalclip-level,depth, andfreqmay vary over time.

The

clip-levelparameter is rather like a 'gate' level. If the signal level is already high, anything over, for example, 0.1 is likely to push it into distortion, and values considerably higher than this will make it heavily distorted. However, if it only distorts, Trevor advises me, when it reaches a level of, for example, 0.99, it is not going to be distorted very often.The sound doesn't actually have amplitude overload, because it is distorted by 'slicing off' the top (clipping) where it would have overloaded. The sound becomes loud and 'strained', like a voice which is shouting too loudly.

Mode

2can add an extra ringing sound as the value forfreqgets higher, e.g., 2000Hz and beyond.

Given the trials made so far, this can be a fairly subtle effect, but the words 'straining', 'loud', 'uncompromising' seem appropriate as the amplitude gets pushed towards the top of the range.

End of DISTORT OVERLOAD

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

octvary– maximum possible transposition up or down in (fractions of) octaves (Range > 0.0 to 8.0)Note that the pitch ofeach'wavecycle' is varied by a random amount within the range ofoctvaryoctaves up tooctvaryoctaves down: i.e., the value foroctvarycovers a total up/down range of 2 *octvary.-ccyclelen– mamimum number of 'wavecycles' between the generation of transposition values (Range: > 1, Default: 64)octvaryandcyclelenmay vary over time.-sskipcycles– (integer) number of 'wavecycles' to skip at start of file

The random up/down movement of the 'wavecycles' within the total

octvaryrange produces a great deal of bending of the sound, especially if the original alters its pitch a good deal. It is better, therefore, to start with relatively small values foroctvary– e.g., less than 1 – so that you start to use this function with some degree of control over the results.The full power of DISTORT PITCH doesn't really come into its own until time-varying parameters are used, especially for

cyclecnt. Large values for the latter will serve to slow down the rate of change.

DISTORT PITCH is useful for creating 'flexitones' (to coin a term) – with distortion, of course.

End of DISTORT PITCH

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

OR

1Impose impulse-train on source

2,3Use a segment of the source as the looped content of a synthetic impulse-train

stime– time in the source sound where the impulses begin. In Mode3,stimeis given assamplecnt, i.e., number of samples

dur– length of time that the impulses continue

frq– number of impulses per second

frand– number of semitones by which to randomise the frequency of the impulses

trand– amount of time in seconds by which to randomise the relative time positions of amplitude peaks and troughs from impulse to impulse

arand– randomisation of the amplitude shape created by the peaks and troughs from impulse to impulse

cycletime– Mode2: duration in seconds of wavecycles to grab as sound substance inside the impulses

OR Mode3: number of wavecycles to grab as sound substance inside the impulses

transp– transposition contour of sound inside each impulse

tranrand– randomisation of transposition contour from impulse to impulse

-s– keep start of source sound, before impulses begin (if any)

-e– keep end of source sound, after impulses end (if any)

Only works on MONO files

Distort a sound by imposing a series of impulses on the source, or on a specific waveset segment of the source. An impulse is like a brief event created by a sharp envelope on the sound. The sound inside the impulse might glissando slightly, as if whatever is causing the impulsion has warped the sound by its impact.

.

End of DISTORT PULSED

Return to List of functions for interacting
spectra at top of this file

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

**Return**
to 'Groucho' Time-Domain Index

1Convert to fixed level square wave

2Convert to square wave

3Convert to fixed level triangular wave

4Convert to triangular wave

5Convert to inverted half-cycles

6Convert to click stream

7Convert to sinusoid

8Exaggerate waveform contour

infile– input soundfile (mono only)

outfile– output soundfile

exaggeration– exaggeration factor (Range: 0.000002 to 40.0)exaggerationmay vary over time.

This process reads each 'wavecycle' (sound inbetween zero crossings) and replaces it with a different waveform of the same length. Several waveform options are provided. Those which do not fix the amplitude level respond to the varying amplitude levels of each successive wavecycle, thus producing an additional (and arbitrary) distortion feature.

The 'fixed level' options produce consistently loud output.

The 'click' option replaces each 'wavecycle' with a mishmash of square pulses several samples long (random sizes), which sounds a bit like a rattle.

The 'sinusoid' option, as might be expected, is relatively smooth. It is actually a subtle form of filtering. The sine waves vary in length and amplitude because they are based on 'wavecycles' and because only some of the 'wavecycles' are replaced.

The 'exaggeration' option just seems to add a surface buzz.

Modes

1and3create quite vigorous forms of distortion. The other modes are more restrained, offering a variety of gently distorted versions of the original.

End of DISTORT REFORM

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

Example command line:

`distort repeat infile outfile 5 -c3 -s20`

infile– input soundfile to process (mono only)

outfile– soundfile output after processing

multiplier– number of times (integer) each 'wavecycle' (group) repeats

-ccyclecnt– number of 'wavecycles' (integer) in repeated groups

-sskipcycles– number of 'wavecyles' (integer) to skip at start of filemultiplierandcyclecntmay vary over time.

The repetition of the 'wavecycles' stretches out the sound, making it both longer and more granular in texture. This granularity is increased if (increasingly larger) groups of

cyclecnt'wavecycles' are used: then the whole group repeatsmultipliertimes.

DISTORT REPEAT produces long, grainy (distorted) sounds. The sense of stretching out the original is very apparent.

A significant application of DISTORT REPEAT is that, by increasing the

cyclecntfactor, one crosses the pitch-perception boundary: that is, starting with a noisy sound in which all the wavecycles are randomly different, one ends up with, for example, 7 repetitions of thesamewavecycle, followed by 7 of another and so on – and each of these comprise sufficient repetitions for us to hearpitch. Thus the noise source becomes a string of pitch beads, each of arbitrary timbre. With acyclecntof, for example, 128, one can even get a slowish random melody.

End of DISTORT REPEAT

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

Example command line:

`distort repeat2 infile outfile 10 -c10 -s0`

infile– input soundfile to process (mono only)

outfile– soundfile output after processing

multiplier– number of times (integer) each 'wavecycle' (group) repeats

-ccyclecnt– number of 'wavecycles' (integer) in repeated groups

-sskipcycles– number of 'wavecyles' (integer) to skip at start of filemultiplierandcyclecntmay vary over time.

Repeating the 'wavecycles' without time-stretching (as in DISTORT REPEAT) enables you to increase the strength of the distortion with the

multiplierparameter without making the output file any longer than the original. Larger values forcyclecntincreases the length ofinfilethat is affected.

Higher values for

multiplierincrease the distortion, while higher values forcyclecntincrease the length ofinfilethat is processed as one unit.Thus we could have:

- a low value for
multipliercoupled with a high value forcyclecnt– this will produce a bit of distortion while the source remains recognisable- a high value for
multipliercoupled with a low value forcyclecnt– this will produces a great deal of distortion, but the effect is limited because only a few cycles are affected as a unit- high values for both parameters – this appears to create the most distortion

End of DISTORT REPEAT2

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

cyclecnt– (integer) size of group of 'wavecycles'cyclecntmay vary over time.-sskipcycles– number of 'wavecyles' (integer) to skip at start of file

The replacing action serves to simplify the sound. Note that the single strong 'wavecycle' in the group will take the place of several others, which will be deleted. This simplification becomes extreme when the

cyclecntis high, leading to a 'sample-hold' kind of stepped effect. Time-varyingcyclecntmakes it possible to introduce gradual change.

With DISTORT REPLACE we can achieve a simplification of the sound, up to very clear 'sample-hold' type stepped tones.

End of DISTORT REPLACE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

multiplier– the number of times each wavecycle (group) repeats (Integer)

-ccyclecnt– the number of wavecycles in repeated groups

-sskipcycles– the number of wavecycles to skip at the beginning of the soundfile

-fhilim– the frequency below which cycles are counted

multiplierandcyclecntmay vary over time

NB: Works only on MONO soundfiles.

This function is like DISTORT REPEAT, but with a slight change. Here the length of wavecycle to be affected can be set. Thus, if you set a mid-range frequency, only those

belowthat frequency will repeat, and the others (above the frequency) will be discarded (filtered out). Hence the name 'REP-LIM', meaning 'repeat (with a) limit'.DISTORT REPLIM is therefore like a filtering program that also repeats wavecycles. In the DISTORT set, the wavecycles are wavelengths that occur between zero crossings, so distortion also occurs.

It is helpful to remember that wavelength is inversely proportional to frequency. Wavelength is the actual physical length of the oscillation, and frequency is the number of cycles that occur in one second (i.e., Hertz). These two aspects of sound are inversely proportional to one another:

P= 1/f. For example, a sound oscillating at 100 Hz will have a period, i.e., a wavelength of 1/100 meters = 0.01 meters (0.39 inch). A sound oscillating at 1000Hz will have a wavelength of 1/1000 meters = 0.001 meters (0.039 inch).Short wavecycles are therefore higher in pitch and long ones are lower in pitch. When the frequency setting for DISTORT REPLIM is high, the filter point is set higher and more of the sound will be retained. Here we are dealing with 'pseudo-wavecycles' (portions of soundfile between zero crossings), which is what introduces distortion into the equation.

The net result of the function is to create repetition distortion while filtering out a user-definable amount of the higher frequencies. Remember that the relative amounts of high and low frequencies in the

infilewill affect the results.

End of DISTORT REPLIM

Return to List of functions for interacting
spectra at top of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

cyclecnt– number of 'wavecycles' in a reversed group (Range: > 0)cyclecntmay vary over time.

Here the original soundfile is grouped into a series of 'wavecycles' with

cyclecnt'wavecycles' in each group. Then each of these groups of 'wavecycles' is reversed.The term 'distortion' here is something of a misnomer, because no distortion process is applied to the 'wvecycles' themselves. Instead,

cyclecntsets the number of 'wavecycles' which are to be copied in reverse as a group to theoutfile. For example, ifcyclecnt= 3, 15 'wavecycles' reversed in groups of 3 will assume the order: 3-2-1, 6-5-4, 9-8-7, 12-11-10, 15-14-13. Thus, not only is the sound material backwards, but the reversed 1^{st}'wavecycle' is now adjacent to the reversed 6^{th}'wavecycle'.This mimics the classical tape studio technique of cutting up a length of tape into segments (of varying lengths), reversing the segments, and joining up the reversed pieces.

The result will be similar to a random brassage because of the differing lengths of the 'wavecycles'.

The process moves steadily through the

infilefrom beginning to end, so the normal order of the (reversed) events is preserved. It is surprising how normal the output can be. With mid-range values forcyclecnt(say, 30 to 100), one hears the original breaking up, but only with very large values forcyclecntdoes one hear the sound sweeping backwards in large swathes. Again, it is a question of 'resolution': the size of the units being manipulated.

A small value for

cyclecntwill produce a grainy result, mid-values a 'broken up' result, and large values swathes of reversed sound. If the value forcyclecntexceeds the number of 'wavecycles' in theinfile, you will be told that the "sound source is too short...".DISTORT CYCLECNTreturns the number of 'wavecycles' in a sound, should you want to provide a value forcyclecntwhich is right up to the limit.Reversing the output of DISTORT REVERSE turns the

cyclecntgroups back the other way while reading the whole soundfile from back to front, producing an interesting mixture of forwards and backwards!Using the time-varying option for

cyclecntprovides an opportunity for dramatic or gradual changes in the output.

End of DISTORT REVERSE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

domain– set of letters representing consecutive (groups of) 'wavecycles'

image– set of letters which forms some permutation of thedomainset

- Items from
domainmay be reordered, omitted or duplicated.- A typical
domaincould beabcd- A typical
imagemight beaacccbddordccbbaordacetc.- The
domainandimagesetsmustbe connected with a dash- Full example:
abcd-aacccbdd-ccyclecnt– the size of 'wavecycle' groups to process: each character indomain-imagerepresentscyclecntgroups of 'wavecycles' (Default: 1)cyclecntmay vary over time.-sskipcycles– number of 'wavecyles' (integer) to skip at start of file

A simple reordering in which

domainandimagehave the same number of characters will suitably roughen up the sound. As theimageduplicates characters, some time-stretching will occur.Introducing higher

cyclecntvalues will mean that theinfileis processed in larger units, increasing the recognisability of the original. Note that, in spite of the highercyclecnt, time-stretching does not result – unlessdomaincharacters repeat in theimage.Thus, a

domain-imageofabc-cbawould be:but with a3-2-1, 6-5-4etc.cyclecntof 5,Note how theand the

awould comprise1-2-3-4-5(in thedomain)bwould comprise6-7-8-9-10(in thedomain)cwould comprise11-12-13-14-15(in thedomain)imagec-b-awould now be:

11-12-13-14-15, 6-7-8-9-10, 1-2-3-4-5–26-27-28-29-30, 21-22-23-24-25, 16-17-18-19-20cyclecnt'wavecycles' proceed sequentially forward in the file, even though theimageinvolves a reversal of thedomain. This is what produces the increased recognisability.

The possibilities focus here on sculpting the roughness of the distortion along with time-stretch factors. Lots of room for playing with the

imageshapes.

End of DISTORT SHUFFLE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

infile– input soundfile (mono only)

outfile– output soundfile

cyclecnt– the number of 'wavecycles' in a group

cyclecntmay vary over time.-sskipcycles– number of 'wavecyles' (integer) to skip at start of file

-a– telescope to an average 'wavecycle' length (Default: telescope to the longest 'wavecycle' length)

Although at first rather like DISTORT OMIT, here the 'wavecycles' are not deleted as such. Instead, they are superimposed (i.e., mixed) onto each other, with shorter 'wavecycles' being stretched to fit the longest one in each group of

cyclecnt'wavecycles'. Theoutfilewill usually be much shorter than theinfileand can be reduced to a mere blip with this process.The

-aflag tells the program to telescope to theaverage'wavecycle' length, rather than to the longest. Since the longest 'wavecycle' in each group is compressed by this method, theoutfilewill be even shorter.

Interesting results can be achieved with small values for

cyclecnt, the output tending to have a 'mushy' quality. It responds well to pitched material, producing a singing, if mushy, tone.

End of DISTORT TELESCOPE

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

A pseudo-wavecyle is a way of dividing up the

wholesignal by taking chunks which stretch fromonezero-crossing, through asecondto athird. The reason these divisions of the signal are called 'pseudo' is because these segments of the waveform do notnecessarilycorrespond torealwavecycles.For example, a possible

truewavecycle (corresponding to the fundamental of a pitch) of a sound might cross the zero more than twice, as in Figure 1. But this divides into two pseudo-wavecycles, as in Figure 2. Note that each of these pseudo-wavecycles crosses the zero at three points.

For more technical discussion of these processes, see Richard Dobson'sIntroduction to the T Wishart DISTORT Functions

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

These functions have in common a graphical approach to sound transformation.
That is to say, whereas orthodox time-domain transformation techniques
apply some mathematical modification to successive samples (see, for
example, ring modulation with **MODIFY RADICAL**), these DISTORT functions take as their basis the concept of the 'wavecycle', i.e., the set of
samples between two sucessive zero crossings.

They are therefore highly non-linear, in the sense that the output of one of these DISTORT functions depends on the waveform contour of the infile. This contour does of course reflect the general sonic nature of the infile – a simple periodic sound will have regular, clearly defined and similar wavecycles, whereas a noisy or otherwise complex sound will be seen as a chain of wavecycles each different in shape, amplitude and duration.

The functions therefore take an essentially 'granular' view of a soundfile, much as a graphic artist might view an image as a set of variably-sized pixels (picture elements). Composers working with granulation techniques should find them especially interesting. While they can be applied to any sort of source sound, the most controlled and predictable results (given that they can often be impossible to predict!) are likely to be obtained from source sounds designed for the purpose of applying granular transformations.

For a simple geometric waveform such as a sine or triangle wave, the size of a wavecycle will indeed correspond to the true wavelength (or 'instantaneous pitch') of the input signal, but for more complex (i.e., wiggly) sounds, periodic or otherwise, it can be expected to vary widely and irregularly, as multiple zero-crossings within a single period of the infile are counted (erroneously, in a sense) as complete wavecycles in their own right. Therefore, although it is true to say that, the higher the pitch of the infile, the greater the number of wavecycles in each second, it is not completely true. Rather, there will be AT LEAST that many, and probably many more. In short, no general advice can be given about cyclecount parameter values, as these will depend almost entirely on the nature of the infile.

The factors determining the degree of predictability in using these functions may be summarized as follows:

- High predictability:
- Simple geometric waveforms – sine, triangle, etc
- Simple periodic waveforms – upper partials weaker than fundamental
- Low rates of change in the above – simple vibrato or tremolo
- Heavily low-pass filtered sounds
- Output from
**DISTORT OMIT**,**DISTORT REVERSE**,**DISTORT SHUFFLE**(see below) - Use of large wavecycle groups.
- Medium predictability:
- Periodic waveforms with one or more partials stronger than the fundamental – many acoustic intrumental sounds
- Moderately low-pass filtered sounds
- Presence of transients – instrumental attacks, noise
- Fast or irregular modulation
- 'Granular' sounds
- Low level of noise
- Phase shifts
- Use of medium-length wavecycle groups (brassage rates)
- High to impossible predictability:
- Inharmonic sounds – bells, etc
- High levels of noise
- Rapid or chaotic transients
- Speech
- Dominant high frequencies
- Processing confined to single wavecycles.

In a periodic (pitched) sound, the phase relationships between individual harmonic partials will often determine the number of zero-crossings internal to a period. Thus two soundfiles, identical apart from some (ofen inaudible) differences in phase, can lead to widely different outfiles when distorted by the same function. Note also that the wavecycle technique, while 'accurate' for simple pitched sounds, shows a deliberate disregard for phase or other forms of discontinuity, resulting in the introduction of various forms of mostly mild transient distortion (glitches) in the outfile. These may of course be desired, but in perhaps the majority of cases some form of filtering will need to be applied.

Given the graphic nature of these functions, it follows that inspection of outfiles and prospective infiles with a graphic display of the soundfile will help in understanding how a particular function works, and also in predicting the effect a function will have.

As is the nature of experimental software, error checking is kept to
a minimum. Some essential tests are made, for example to avoid division
by zero and similar hazards. Beyond these, few constraints are imposed
on parameter ranges. It is especially important to remember the fact
that you are working with digital samples - trying to envelope wavecycles
in high frequency signals (where a wavecycle may only amount to a handful
of samples) cannot be expected to produce predictable results. A 'robust'
function might set a lower limit on the length of a wavecycle, but none
of these functions do so – the only method is to use **DISTORT FILTER**
(see below) to remove wavecycles below a user-defined cut-off
length.

In almost all situations, therefore, putting prospective sounds through
a strong low-pass filter such as **FILTER LOHI** will minimize unpleasant distortion and maximize interesting and attractive transformations.
It follows that it is also worth using the highest possible sample rate.

There are two primary uses for these functions. The first is simply to apply more or less extreme distortion or granulation to a specific infile. The second is the development of granular textures through the manipulation of wavecycles – infiles are thought of as 'libraries' or databases of wavecycles. It is important to develop a clear strategy for using a sequence of distort functions. A key stage in this strategy might well be step one: to create a soundfile of KNOWN WAVECYCLE CHARACTERISTICS.

Note that there are two general types of distort function: those that
operate on **individual** wavecycles (**DISTORT DIVIDE**,
**DISTORT FRACTAL**,**DISTORT HARMONIC**,
**DISTORT INTERACT**), and the rest, which work on or output
**groups** of wavecycles. **DISTORT MULTIPLY** also outputs groups of
wavecycles when multiplying the wavecycle frrequency. Considerable
flexibility can be obtained if the size of each group is highly composite
(.e.g., a power of 2), so that 'groups within groups' can be manipulated.
Note the use of a several linked DISTORT operations in the following
procedures.

For example, weak wavecycles can be removed (**DISTORT OMIT**,
**DISTORT DELETE**,**DISTORT REPLACE**).
The remainder might be repeated with interpolation
(**DISTORT INTERPOLATE**) to form larger groups, which are then reordered
(**DISTORT SHUFFLE**) or enveloped (**DISTORT ENVEL**).

Alternatively, they might be enveloped first, and the resulting wavecycles
reordered or repeated. A short section might be removed (**SFEDIT CUT**) and interpolated (**DISTORT INTERPOLATE**) over a long range, to create a timbrally simple file which might then be the source for a new sequence of
operations, such as fractal or harmonic transformation
(**DISTORT FRACTAL**, **DISTORT HARMONIC**).

Finally, it is well worth exploring the potential of the function
**DISTORT PITCH** to colour vocal sounds. Voices can be made higher and
lighter or deeper and more growley, either all at once or over a period of time.

**Return** to list of DISTORT functions at top
of this file

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

**Return**
to 'Groucho' Time-Domain Index

Last updated: 2 May 2001

Indexing Updated: 30 June 2015

© 1996 Richard Dobson & CDP