[linux-audio-dev] Granular reverberator

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Granular reverberator
From: Juhana Sadeharju (kouhia_AT_nic.funet.fi)
Date: su helmi  20 2000 - 18:07:47 EST


Hello. This about a new reverberator algorithm I have developed.

Having recently a bad experience with patents, I had no time to complete
the program or to think everything properly and mathematically.
If I would spend a year or more on this, at meanwhile somebody might
patent the rhough ideas and then any precisely thought ideas would
be obsolete (to me and other GNU people).

Similarly these ideas should be developed further as soon as possible.
Keep posting any raised ideas.

The document below is published at
  http://www.funet.fi/~kouhia/waves/gverb.txt

Yours,

Juhana

Granular reverberator
---------------------

Juhana Sadeharju
Feb 20, 2000

Traditionally artificial late reverberators are made by combining
simple comb and all-pass filters. Such linear systems may be strongened
with length-modulated delay lines but thanks to Jot, Smith and Rocchesso,
good quality reverberators are available without modulation.

Advantage of Jot/Smith/Rocchesso type FDN reverberators is that their
implementation runs fast for the given quality.

However, FDN reverberator may not be best suited for every task.
Alternatives are Griesinger/Dattorro or Gardner type reverberators
among classical ones.

Author's experience is that FDN reverberator can be a quite hard to write
unless you have a couple of FDN papers available. The reason might be that
FDN is very tightly packed system where everything should be set precisely
and where is no room for artistic changes.

 -*-

Here we introduce a new reverberator type: a granular reverberator.
It means that the signals are granulated and granules are circulated
in multiple delay lines.

First we describe the system using one-channel (mono) signals.

The input signal and all output signals of delay lines are granulated.
A granule is a range of signal with an amplitude envelope. A signal
is granulated by covering the signal with granules. If granule amplitude
envelope is faded in and out at its ends, then granules of a signal should
overlap so that no part of the signals are missed. Random variation
to granule forms, lengths and locations can be added.

After granulation all granules are mapped to delay lines. The mapping
is equivalent to feedback in FDN reverberators. Granules are mapped
to future so that they come out of delay lines later. A granule can be
mapped to several different places in a delay line. All mapped granules
are summed up to the delay line.

Output of the reverberator is the sum of the delay line ouputs.

 -*-

A granular reverberator is able to directly handle n-channel audio.
We now describe how a stereo reverberator works.

Both channels of a stereo input signal and all stereo delay lines
are granulated independently. Random variation between channels
can be added.

In stereo system the mappings should be similar to spatialized early
echoes (see Griensinger's ?? and Gardner's Reverberation Algorithms).
The mappings are stereo so that left and right channels can be mapped
arbitrarily to both left and right channels.

 -*-

Because mappings are similar to spatialized early echo simulators,
two clearly distinct types of mappings comes to mind: mappings which map
a sound to different locations at an acoustical environment, and
mappings which maps a sound to the same location at different acoustical
environments.

To increase randomness to the system, a new mapping should be selected
randomly for each granule. The large collection of possible mappings
should contain only spatially decorrelated mappings. Average of mappings
should tend to zero.

A mapping should decrease the amplitude and frequency contents of a granule
so that a granule decays within time and that the delay line output signals
decays exponentially. This could be achieved by computing power of
mappings, estimating overlapping coverage of mappings, and normalizing
power to or below unity. [ This needs experimentation. ]

No certain length delay lines or FDN type feedback matrix are needed
because mappings define both. If granular reverberator implements the
FDN reverb, then mappings has to be defined as exactly as the FDN system.

 -*-

Implementation of the granular reverberator can be done with a sample-in,
sample-out system without any delay -- like other reverberators. There
is no need to wait for until a complete granule is available before it
can be used in mapping and feedback.

Alternative implementation could handle only granules and have no
delay lines. Old granules would be combined to make new granules
along with new input granules.

 -*-

Further ideas:

1. Keeping computationally expensive parts of the granulation and mappings
fixed or change them less frequently.

2. Feedback filters and gains at delay line outputs instead of at
each granule.

3. Use of the same filter for a granule:
  filtering + mappings instead of mappings + filterings.
(This differs from the 2 in that each granule has its own filter.)

4. Time compression/expansion of granules.

5. Frequency envelope for granules. A signal inserted to a granule
is filtered before granulation. For example, if signal has only high
frequencies, smaller granules could be used. For example, a frequency
bandsplitter could be attached to input and there could be distinct
granular reverberators for each band. Frequency shaping of granules
could be added to any place in the system.

6. Granules could depend on the signal. For example, granule could
begin the same time than a sudden loud sound, or enclose the sound.
For example, granule could extract periodic sound or transition sound.
For example, more granules could be generated from sections having great
frequency content. For example, granule length could follow the period
of the base frequency of the signal.

7. Mapping/shaping of granules could follow the content of the granule.
For example, some mappings could be better suited for granules having
low frequency signals. For example, a sudden loud sounds could be
mapped to a certain place in a room. For example, some granules could
decay faster.

8. Mapping could depend on where from the granules are coming.
For example, input granules could have different mappings than delay line
output granules; this way no separate early echo section is needed in the
reverberator. For example, certain delay lines could simulate a size room
beside the main room.

9. Mappings could depend on any signal in the system. For example,
mappings of the delay line output granules could depend on the input
signal; a reverberator with non-exponential decay particularly for
processing percussive sounds comes to mind.

10. Use of both mono and stereo granules in the system. For example,
stereo granules could be used only at the last phases of the reverberator.
(Reverberators are often mono to stereo reverberators where mono signal
is circulated in the system.)

11. In multichannel version the spatialization can be handled more complex
way: for example, vector based panning can be used to place sounds around
listener and mappings could bounce the sound fully around the listener.

12. Insertion of traditional comb filters, all-pass diffusors, and modulated
delay lines to granular reverberator.
  
There are many variations to these schemes.

 -*-

Some observations:

The difference to FDN is that while FDN restrict impulses in its impulse
response to be only at locations k_1*m_1 + ... + k_n*m_n, where m_i's
are delay line lengths in samples and k_i's are positive integers,
the granular reverberator allow arbitrary locations (by change of mappings
and granulation rules).

Mappings of delay line granules can also be think of being equivalent
to all-pass diffusors inserted after FDN's delay lines. Mappings can
be used similarly to increase the echo density.

 ==end==


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:27 EST