Jean-Luc Sinclair • Granular synthesis is a synthesis method that operates on the microsonic time scale. • It was first articulated in a paper written in 1946 by Dennis Gabor, in which he describes a synthesis method modeled on quantum physics ideas. The concept of Gabor Atoms was born. • Quanta: indivisible unit of sound • Time is reversible at the quantum level. A granular sound will sound the same whether the grains are played forward or backward. This property allows for time stretching and pitch shifting applications of granular synthesis.

“The grain is an apt representation of sound because it combines time domain information (starting time, envelope shape, duration) with domain information (period of the inside grain, spectrum of the waveform). This stands in opposition to representation at the sample level that do not capture frequency-domain information and abstract Fourier methods that presume that are summation of infintely long sine waves”

Curtis Roads. • It wasn’t until 1971 and that this technique was used for audio synthesis.

• A high density of small audio events, called grains and usually less than 50ms in duration are generated creating granular clouds and streams.

• The typical duration of a grain is 10 to 30ms • Typical densities range from a few dozens to several thousand grain per seconds • The grains may come from a wavetable, another synthesis technique or sampled sounds organizes granular synthesis techniques into five categories:

• Quasi-synchronous granular synthesis • Asynchronous granular synthesis • Pitch-synchronous granular synthesis • Granulation of concrete (sampled) sounds • Fourier and wavelet grids • Quasi-synchronous granular synthesis: one or more streams are generated each keeping the interval between grains equally spaced. The overall envelope of the stream forms a periodic function. This can be looked upon as a form of amplitude modulation, generating sidebands. When several streams are added it is possible to model complex sounds such as the human voice.

(Carrier = waveform within grain, modulator = grain envelope)

“The sidebands are separated from the carrier by a distance equal to the inverse of the period of the envelope function. For a stream of 20ms grains following each other the sidebands in the output spectrum are spaced at 50Hz intervals.” (Roads)

We can think of QSGS as amplitude modulation since AM occurs when the shape of a signal, the modulator affects that of another, the carrier

The effect of amplitude modulation can be thought of as formant synthesis, similar to methods used in such as FOF (formes d’ondes formantiques).

FOF synthesis was developed at IRCAM as the basis for the CHANT program for speech synthesis.

The basic idea behind FOFs is the addition of formants in order to recreate a complex tone such as the human voice. Each grain is fed into a resonator with control over center frequency and bandwidth. http://www.sfu.ca/~truax/GranQs.gif • Asynchronous granular synthesis:

Grains are distributed stochastically with no quasi regularity (Truax ‘98). The overall characteristics of each cloud is determined by the following parameters.

1. Start time and duration of the cloud 2. Grain duration (Variable for the duration of the cloud) 3. Density of grains per second (Also variable) 4. Frequency band of the cloud (Usually high and low limits) 5. Amplitude envelope of the cloud 6. within the grains 7. Spatial dispersion of the cloud asynchronous granular synthesis

http://www.sonicspace.org/ver4/GS.htm • Pitch-Synchronous Granular Synthesis:

This technique was designed for the generation of sounds with one or more formants in their spectra. PSGS is an analysis synthesis technique which first requires an analysis stage involving pitch detection, where each pitch period is assigned its own grain.A spectral analysis is performed on each grain from which an impulse response is derived for the re-synthesis process. Based on the set of impulse response obtained a pulse train is generated at each pitch period and at each time frame the system emits a grain overlapped with the previous one to create a smooth time varying signal.

Granulation of sampled sounds:

Sampled sounds are fed into a granulator which reads a small portion of the sample and applies an envelope to it. Grains are then processed in a ‘traditional’ granular fashion, giving the composer control over the order of the grains, density of the streams etc…

Csound has several opcodes allowing for the granulation of sampled sounds: granule, grain, fog among others.

Fourier and wavelet grids:

“These techniques take in a time-domain sound signal and measure its frequency content versus time. Each point in the analysis is associated with a unit of time-frequency energy.” (Roads)

These are primarily analysis-resynthesis techniques which are well suited to the transformation of sampled sounds, the most obvious application being time stretching or compression and transposition.

The grain envelope is central to all granular synthesis techniques and has profound implications on the overall spectrum generated.

The envelope applied to each grain prevents pops and clicks from showing up in the final output. Changing the shape/slope of the envelope also has a direct consequence on the sound being generated, sharper attacks producing broader bandwidth. (Truax)

The envelope for each grain varies widely from simple AD envelopes, to Gaussian, bell like shapes.

Gaussian envelopes Hanning window a. Gaussian b. Quasi Gausian c. Tree Stage Line segment d. Triangular e. Sin function f. Expodec g. Rexpodec

When granulated sounds (concrete) are played thru a rexpodec envelopes they tend to sound reversed. Humans have difficulties in perceiving pitch in sounds below 50 ms

Below 2ms, grains tend to sound like clicks

Even with durations this short varying the waveform and shape of the Envelope will affect the tone color of the click (Roads ‘96)

Pitch perception in relation to grain duration:

2ms 5ms 25ms 50ms ------|------|------|------> clicks vague clearer clear

When using synchronous techniques metric are produced when grains Are fired at a rate of 0.1 to 20 per seconds. (density)

Above 20 grains per second the grains fuse into a continuous tone.

Depending on the grain envelope and duration the streams may also exhibit Sidebands or formants.

The perceived pitch of a synchronous stream depends on: a. The period corresponding to the frequency of the waveform in the grain b. The period corresponding to the grain envelope c. The period corresponding to the grain density (Roads ‘96)

Roads:

“The grain envelope contributes an Amplitude Modulation effect.

Sidebands around the carrier frequency are generated at intervals of the envelope’s period. Therefore:

For a given grain duration D, the center frequency of AM in an asynchronous Cloud will be 1/D

The laws of micro-acoustics tell us that the shorter the duration of a signal, the greater its bandwidth, Thus the width of the frequency bands B caused by the sidebands is inversely proportional to the duration of the grain D.”

In Short: The longer the grain length, the lower the sidebands frequency “Although the internal structure of sounds is the cause of what we hear , we do not resolve this structure in our perception. The experience of a grain is indivisible” (Wishart ‘94)

The time reversibility properties of a grain only hold true if:

1. the grain envelope is symetrical 2. the grain waveform is static 3. the waveform of all grains is identical 4. the cloud/stream’s density is kept constant

“Granular synthesis using can be achieved by using conditional statements or a combination of existing units generator, but this is complicated and would require a large orchestra and score file to generate a short output.”

Allan S. C. Lee

Csound provides an extensive set of tools for granular synthesis, the following are only listed as a reference and not meant to be an extensive list of granular opcodes. syncgrain: synchronous granular synthesis Syncgrain implements synchronous granular synthesis. The source sound for the grains is obtained by reading a function table containing the samples of the source waveform. For sampled-sound sources, GEN01 is used. Syncgrain will accept deferred allocation tables (with aif files). grain: Generates simple granular textures. grain3:Generates granular textures with more user control than grain. granule: A more complex granular . granule is a Csound unit generator which employs a wavetable as input to produce granularly synthesized audio output. Wavetable data may be generated by any of the GEN subroutines such as GEN01 which reads an audio data file into a wavetable. This enable a sampled sound to be used as the source for the grains. Up to 128 voices are implemented internally. sndwarp: sndwarp reads sound samples from a table and applies time-stretching and/or pitch modification. Time and frequency modification are independent from one another. For example, a sound can be stretched in time while raising the pitch fof: Produces sinusoid bursts useful for formant and granular synthesis. fof2: Produces sinusoid bursts including k-rate incremental indexing with each successive burst, making it more suitable for time warping applications fof: Produces sinusoid bursts useful for formant and granular synthesis. syncloop: a variation on syncgrain, which implements synchronous granular synthesis. Syncloop adds loop start and end points and an optional start position A simple implementation of granular synthesis: res grain xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn, iwfn, imgdur [, igrnd] An exhaustive implementation of granular synthesis: ares granule xamp, ivoice, iratio, imode, ithd, ifn, ipshift, igskip, igskip_os, ilength, kgap, igap_os, kgsize, igsize_os, iatt, idec [, iseed] [, ipitch1] [, ipitch2] [, ipitch3] [, ipitch4] [, ifnenv] With 22 parameters the granule opcode gives the sound designer a lot of control over The synthesis proccess, although the opcode is not as daunting as it first appears as most of Its parameters are I-rate.

FOF synthesis (fonctions d’ondes formantiques) is based on techniques Developed by Xavier Rodet and his CHANT program. The concept is to produce formant regions that when added together Can be used for speech synthesis.

Typically fof generators use a sine-wave as a waveform as source material, but the fog opcode was developed and added to csound(both by Michael Clarke) to specifically deal with concrete sounds and allow for more radical transformations of sampled material.

FOFs work in the time domain. They produce periodic sequence of excitations whose rate is perceived as the fundamental frequency of the formant region.

“The output of the unit generator is a set of overtones of this fundamental, whose relative amplitude is shaped by a spectral envelope” (Clarke)

The shape of the excitation envelope is crucial in determining the overall contour of the formant region. A short envelope yelds a broad spectral envelope of the formant regions and a longer envelope produces a narrower output. ares fof xamp, xfund, xform, koct, kband, kris, kdur, kdec, iolaps, ifna, ifnb, itotdur [, iphs] [, ifmode] [, iskip]

“The spectral output of a fof unit-generator resembles that of an impulse generator Filtered by a bandpass filter”