Adaptive digital audio effects (a-DAFx): a new class of sound transformations

After covering the basics of sound perception and giving an overview of commonly used audio effects (using a perceptual categorization), we propose a new concept called adaptive digital audio effects (A-DAFx). This consists of combining a sound transformation with an adaptive control. To create A-DAFx, low-level and perceptual features are extracted from the input signal, in order to derive the control values according to specific mapping functions. We detail the implementation of various new adaptive effects and give examples of their musical use


I. INTRODUCTION
A N AUDIO effect is a signal processing technique used to modulate or to modify an audio signal.The word "effect" is also widely used to denote how something in the signal (cause) is being perceived (effect), thus sometimes creating confusion between the perceived effect and the signal processing technique that induces it (e.g., the Doppler effect).
Audio effects sometimes result from creative use of technology with an explorative approach (e.g., phase vocoder, distorsion, compressor); they are more often based on imitation of either a physical phenomenon (physical or signal models), or either a musical behavior (signal models in the context of analysis-transformation-synthesis techniques), in which case they are also called "transformations."For historical and technical reasons, effects and transformations are considered as different, processing the sound at its surface for the former and more deeply for the latter.However, we use the word "effect" in its general sense of musical sound transformations.
The use of digital audio effects has been developing and expanding for the last forty years for composition, recording, mixing, and mastering of audio signals, as well as real-time interaction and sound processing.Various implementation techniques are used such as filters, delay lines, time-segment and time-frequency representations, with sample-by-sample or block-by-block processing [1], [2].
V. Verfaille is with the Sound Processing and Control Laboratory, Schulich School of Music, McGill University, Montréal, QC H3A 1E3, Canada (e-mail: vincent@music.mcgill.ca).
The sound to be processed by an effect is synthesized by controlling an acousticomechanic or digital system, and may contains musical gestures [3] that reflects its control.These musical gestures are well described by sound features: The intelligence is in the sound.The adaptive control is a time-varying control computed from sound features modified by specific mapping functions.For that reason, it is somehow related to the musical gesture already in the sound, and offers a meaningful and coherent type of control.
This adaptive control may add complexity to the implementation techniques the effects are based on; the implementation has to be designed carefully, depending on whether it is based on real-time or nonreal-time processing.
Using the perceptual categorization, we remind basic facts about sound perception and sound features, and briefly describe commonly used effects and the techniques they rely on in Section II.Adaptive effects are defined and classified in Section III; the set of features presented in Section II-B is discussed in Section III-C.The mapping strategies from sound features to control parameters are presented in Section IV.New adaptive effects are presented in Section V, as well as their implementation strategies for time-varying control.

A. Classifications of Digital Audio Effects
There exist various classifications for audio effects.Using the methodological taxonomy, effects are classified by signal processing techniques [1], [2].Its limitation is redundancy as many effects appear several times (e.g., pitch shifting can be performed by at least three different techniques).A sound object typology was proposed by Pierre Schaeffer [4], but does not correspond to an effect classification.
Using the perceptual categorization, audio effects are classified according to the most altered perceptual attribute: loudness, pitch, time, space, and timbre [5].This classification is the most natural to musicians and audio listeners, since the perceptual attributes are clearly identified in music scores.

B. Basics of Sound and Effect Perception
We now review some basics of psychoacoustics for each perceptual attribute.We also highlight the relationships between perceptual attributes (or high level features) and their physical counterparts (signal or low level features), which are usually simpler to compute.These features will be used for adaptive control of audio effects (cf.Section III).
1) Loudness: Loudness is the perceived intensity of the sound through time.Its computational models perform time and frequency integration of the energy in critical bands [6], [7].The sound intensity level computed by root mean square (RMS) is its physical counterpart.Using an additive analysis and a transient detection, we extract the sound intensity levels of the harmonic content, the transient and the residual.We generally use a logarithmic scale named decibels: Loudness is then , with the intensity.Adding 20 dB to the loudness is obtained by multiplying the sound intensity level by 10.The musical counterpart of loudness is called dynamics, and corresponds to a scale ranging from pianissimo (pp) to fortissimo (ff) with a 3-dB space between two successive dynamic levels.Tremolo describes a loudness modulation, which frequency and depth can be estimated.
2) Time and Rhythm: Time is perceived through two intimately intricate attributes: the duration of sound and gaps, and the rhythm, which is based on repetition and inference of patterns [8].Beat can be extracted with autocorrelation techniques and patterns with quantification techniques [9].
3) Pitch: Harmonic sounds have their pitch given by the frequencies and amplitudes of the harmonics; the fundamental frequency is the physical counterpart.The attributes of pitch are height (high/low frequency) and chroma (or color) [10].A musical sound can be either perfectly harmonic (e.g., wind instruments), nearly harmonic (e.g., string instruments) or inharmonic (e.g., percussions, bells).Harmonicity is also related to timbre.
Psychoacoustic models of the perceived pitch use both the spectral information (frequency) and the periodicity information (time) of the sound [11].The pitch is perceived in the quasilogarithmic mel scale which is approximated by the log-Hertz scale.Tempered scale notes are transposed up by one octave when multiplying the fundamental frequency by 2 (same chroma, doubling the height).The pitch organization through time is called melody for monophonic sounds and harmony for polyphonic sounds.
4) Timbre: This attribute is difficult to define from a scientific point of view.It has been viewed for a long time as "that attribute of auditory sensation in terms of which a listener can judge that two sounds similarly presented and having the same loudness and pitch are dissimilar" [12].However, this does not take into account some basic facts, such as the ability to recognize and to name any instrument when hearing just one note or listening to it through a telephone [13].The frequency composition of the sound is concerned, with the attack shape, the steady part and the decay of a sound, the variations of its spectral envelope through time (e.g., variations of formants of the voice), and the phase relationships between harmonics.These phase relationships are responsible for the whispered aspect of a voice, the roughness of low-frequency modulated signals, and also for the phasiness 1 introduced when harmonics are not phase aligned.We consider that timbre has several other attributes, including: • the brightness or spectrum height, correlated to spectral centroid, 2 and computed with various models [16]; 1 Phasiness is usually involved in speakers reproduction, where phases inproperties make the sound poorly spatialized.In the phase vocoder technique, the phasiness refers to a reverberation artifact that appears when neighbor frequency bins representing a same sinusoid have different phase unwrapping. 2 The spectral centroid is also correlated to other low level features: the spectral slope, the zero-crossing rate, and the high-frequency content [14], [15] • the quality and noisiness, correlated to the signal-to-noise ratio (e.g., computed as the ratio between the harmonics and the residual intensity levels [5]) and to the voiciness (computed from the autocorrelation function [17] as the second highest peak value of the normalized autocorrelation); • the texture, related to jitter and shimmer of partials/harmonics [18] (resulting from a statistical analysis of the partials' frequencies and amplitudes), to the balance of odd/even harmonics (given as the peak of the normalized autocorrelation sequence situated half way between the first and second highest peak values [19]) and to harmonicity; • the formants (especially vowels for the voice [20]) extracted from the spectral envelope; the spectral envelope of the residual; and the mel-frequency cepstral coefficients (MFCC), perceptual correlate of the spectral envelope.Timbre can be verbalized in terms of roughness, harmonicity, as well as openness, acuteness, and laxness for the voice [21].At a higher level of perception, it can also be defined by musical aspects such as vibrato [22], trill, and flatterzung, and by note articulation such as appoyando, tirando, and pizzicato.5) Spatial Hearing: In the last, spatial hearing has three attributes: the location, the directivity, and the room effect.The sound is localized by human beings in regards to distance, elevation and azimuth, through interaural intensity (IID) and interaural time (ITD) differences [23], as well as through filtering via the head, the shoulders and the rest of the body [head-related transfer function (HRTF)].When moving, sound is modified according to pitch, loudness, and timbre, indicating the speed and direction of its motion (Doppler effect) [24].The directivity of a source is responsible for the differences of transfer function according to the listener position related to the source.The sound is transmitted through a medium as well as reflected, attenuated and filtered by obstacles (reverberation and echoes), thus providing cues for deducing the geometrical and material properties of the room.

6) Relationship Between Low Level Features and Perceptual Attributes:
We depict in Fig. 1 a feature set we used in this study.The figure highlights the relationships between the signal features and their perceptual correlates, as well as the possible redundancy of signal features.

C. Commonly Used Effects
We now present an overview of commonly used digital audio effects, with a specific emphasis on timbre, since that perceptive attribute is the more complex and offers a lot more possibilities than the other ones.
1) Loudness Effects: Commonly used loudness effects modify the sound intensity level: the volume change, the tremolo, the compressor, the expander, the noise gate, and the limiter.The tremolo is a sinusoidal amplitude modulation of the sound intensity level with a modulation frequency between intensity level, thus giving more percussive sounds, whereas the latter has the opposite effect and is used to extend the dynamic range of the sound.With specific nonlinear functions, we obtain noise gate and limiter effects.The noise gate bypasses sounds with very low loudness, which is especially useful to avoid the background noise that circulate throughout an effect system involving delays.Limiting the intensity level protects the hardware.Other forms of loudness effects include automatic mixers, automatic volume/gain control, which are sometimes noise-sensor equipped.
2) Time Effects: Time scaling is used to fit the signal duration to a given duration, thus affecting rhythm.Resampling can perform time scaling, resulting in an unwanted pitch shifting.The time-scaling ratio is usually constant, and greater than 1 for time expanding (or time stretching, time dilatation: sound is slowed down) and lower than 1 for time compressing (or time contraction: sound is sped up).Three block-by-block techniques permit to avoid this: the phase vocoder [25]- [27], SOLA [28], [29] and the additive model [30]- [32].
Time scaling with the phase vocoder technique consists of using different analysis and synthesis step increments.The phase vocoder is performed using the short-time Fourier transform (STFT) [33].In the analysis step, the STFT of windowed input blocks is performed with a samples step increment.In the synthesis step, the inverse Fourier transform delivers output blocks which are windowed, overlapped and then added with a samples step increment.The phase vocoder step increments have to be suitably chosen to provide a perfect reconstruction of the signal [33], [34].Phase computation is needed for each frequency bin of the synthesis STFT.The phase vocoder technique can time-scale any type of sound, but adds phasiness if no care is taken: A peak phase-locking technique solves this problem [35], [36].
Time scaling with the SOLA technique3 is performed by duplication or suppression of temporal grains or blocks, with pitch synchronization of the overlapped grains in order to avoid low frequency modulation due to phase cancellation.Pitch synchronization implies that the SOLA technique only correctly processes the monophonic sounds.
Time scaling with the additive model results in scaling the time axis of the partial frequencies and their amplitudes.The additive model can process harmonic as well as inharmonic sounds while having a good quality spectral line analysis.
3) Pitch Effects: The pitch of harmonic sounds can be shifted, thus transposing the note.Pitch shifting is the dual transformation of time scaling, and consists of scaling the frequency axis of a time-frequency representation of the sound.A pitch shifting ratio greater than 1 transposes up; lower than 1 it transposes down.It can be performed by a combination of time scaling and resampling.In order to preserve the timbre and so forth the spectral envelope [19], the phase vocoder decomposes the signal into source and filter for each analysis block: The formants are precorrected (in the frequency domain [37]), the source signal is resampled (in the time domain), and phases are wrapped between two successive blocks (in the frequency domain).The PSOLA technique preserves the spectral envelope [38], [39], and performs pitch shifting by using a synthesis step increment that differs from the analysis step increment.The additive model scales the spectrum by multiplying the frequency of each partial by the pitch-shifting ratio.Amplitudes are then linearly interpolated from the spectral envelope.Pitch shifting of inharmonic sounds such as bells can also be performed by ring modulation.
Using a pitch-shifting effect, one can derive harmonizer and auto-tuning effects.Harmonizing consists of mixing a sound with several pitch-shifted versions of it, to obtain chords.When controlled by the input pitch and the melodic context, it is called smart harmony [40] or intelligent harmonization [41].Auto tuning consists of pitch shifting a monophonic signal so that the pitch fits to the tempered scale [5], [42].
4) Timbre Effects: Timbre effects is the widest category of audio effects and includes vibrato, chorus, flanging, phasing, equalization, spectral envelope modifications, spectral warping, whisperization, adaptive filtering and transient enhancement or attenuation.
Vibrato is used for emphasis and timbral variety [43], and is defined as a complex timbre pulsation or modulation [44] implying frequency modulation, amplitude modulation, and sometimes spectral shape modulation [43], [45], with a nearly sinusoidal control.Its modulation frequency is around 5.5 Hz for the singing voice [46].Depending on the instruments, the vibrato is considered as a frequency modulation with a constant spectral shape (e.g., voice, [20] and string instruments [13], [47]), an amplitude modulation (e.g., wind instruments), or a combination of both, on top of which may be added a complex spectral shape modulation, with high-frequency harmonics enrichment due to nonlinear properties of the resonant tube (voice [43], wind and brass instruments [13]).
A chorus effect appears when several performers play together the same piece of music (same in melody, rhythm, dynamics) with the same kind of instrument.Slight pitch, dynamic, rhythm, and timbre differences arise because the instruments are not physically identical, nor are perfectly tuned and synchronized.It is simulated by adding to the signal the output of a randomly modulated delay line [1], [48].A sinusoidal modulation of the delay line creates a flanging or sweeping comb filter effect [48]- [51].Chorus and flanging are specific cases of phase modifications known as phase shifting or phasing.
Equalization is a well-known effect that exists in most of the sound systems.It consists in modifying the spectral envelope by filtering with the gains of a constant-Q bank filter.Shifting, scaling, or warping of the spectral envelope is often used for voice sounds since it changes the formant places, yielding to the so-called Donald Duck effect [19].
Spectral warping consists of modifying the spectrum in a nonlinear way [52], and can be achieved using the additive model or the phase vocoder technique with peak phase locking [35], [36].Spectral warping allows for pitch shifting (or spectrum scaling), spectrum shifting, and in harmonizing.
Whisperization transforms a spoken or sung voice into a whispered voice by randomizing either the magnitude spectrum or the phase spectrum STFT [27].Hoarseness is a quite similar effect that takes advantage of the additive model to modify the harmonic-to-residual ratio [5].
Adaptive filtering is used in telecommunications [53] in order to avoid the feedback loop effect created when the output signal of the telephone loudspeaker goes into the microphone.Filters can be applied in the time domain (comb filters, vocal-like filters, equalizer) or in the frequency domain (spectral envelope modification, equalizer).
Transient enhancement or attenuation is obtained by changing the prominence of the transient compared to the steady part of a sound, for example using an enhanced compressor combined with a transient detector.
5) Spatial Effects: Spatial effects describe the spatialization of a sound with headphones or loudspeakers.The position in the space is simulated using intensity panning [e.g., constant power panoramization with two loudspeakers or headphones [23], vector-based amplitude panning (VBAP) [54] or Ambisonics [55] with more loudspeakers], delay lines to simulate the precedence effect due to ITD, as well as filters in a transaural or binaural context [23].The Doppler effect is due to the behavior of sound waves approaching or going away; the sound motion throughout the space is simulated using amplitude modulation, pitch shifting, and filtering [24], [56].Echoes are created using delay lines that can eventually be fractional [57].The room effect is simulated with artificial reverberation units that use either delay-line networks or all-pass filters [58], [59] or convolution with an impulse response.The simulation of instruments' directivity is performed with linear combination of simple directivity patterns of loudspeakers [60].The rotating speaker used in the Leslie/Rotary is a directivity effect simulated as a Doppler [56].
6) Multidimensional Effects: Many other effects modify several perceptual attributes of sounds: We review a few of them.Robotization consists of replacing a human voice with a metallic machine-like voice by adding roughness, changing the pitch and locally preserving the formants.This is done using the phase vocoder and zeroing the phase of the grain STFT with a step increment given as the inverse of the fundamental frequency.All the samples between two successive nonoverlapping grains are zeroed4 [27].Resampling consists of interpolating the wave form, thus modifying duration, pitch and timbre (formants).Ring modulation is an amplitude modulation without the original signal; as a consequence, it duplicates and shifts the spectrum and modifies pitch and timbre, depending on the relationship between the modulation frequency and the signal fundamental frequency [61].Pitch shifting without preserving the spectral envelope modifies both pitch and timbre.The use of multitap monophonic or stereophonic echoes allow for rhythmic, melodic, and harmonic constructions through superposition of delayed sounds.

A. Definition
We define adaptive digital audio effects (A-DAFx) as effects with a time-varying control derived from sound features transformed into valid control values using specific mapping functions [62], [63] as depicted in Fig. 2. They are also called "intelligent effects" [64] or "content-based transformations" [5].They generalize observations of existing adaptive effects (compressor, auto tune, cross synthesis), and are inspired by the combination of amplitude/pitch follower combined with a voltage controlled oscillator [65].We review the forms of A-DAFx depending on the input signal that is used for feature extraction, and then justify the sound feature set we chose in order to build this new class of audio effects.

B. A-DAFx Forms
We define several forms of A-DAFx, depending on the signal from which sound features are extracted.Auto-adaptive effects have their features extracted from the input signal 5. Adaptive or external-adaptive effects have their features extracted from at least one other input signal .Feedback adaptive effects have their features extracted from the output signal ; it follows that auto-adaptive and external-adaptive effects are feed forward.Cross-adaptive effects are a combination of at least two external-adaptive effects (not depicted in Fig. 2); they use at least two input signals and .Each signal is processed using the features of another signal as controls.These forms do not provide a good classification for A-DAFx since they are not exclusive; however, they provide a way to better describe the control in the effect name.

C. Sound Features
Sound features are used in a wide variety of applications such as coding, automatic transcription, automatic score following, and analysis synthesis; they may require accurate computation depending on the application.For example, an automatic score following system must have accurate pitch and rhythm detection.To evaluate brightness, one might use the spectral centroid, with an eventual correction factor [66], whereas another may use the zero-crossing rate, the spectral slope, or psychoacoustic models of brightness [67], [68].
In the context of adaptive control, any feature can provide a good control: Depending on its mapping to the effect's controls, it may provide a transformation that sounds.This is not systematically related to the accuracy of the feature computation, since the feature is extracted and then mapped to a control.For example, a pitch model using the autocorrelation function does not always provide a good pitch estimation; this may be a problem for automatic transcription or auto tune, but not if it is low-pass filtered and drives the frequency of a tremolo.There is a complex and subjective equation involving the sound to process, the audio effect, the mapping, the feature, and the will of the musician.For that reason, no restriction is given a priori to existing and eventually redundant features; however, perceptual features seem to be a better starting point when investigating the adaptive control of an effect.We used the nonexhaustive set of features depicted in Section II-B and in Fig. 1, that contains features commonly used for timbre space description (based on MPEG-7 proposals [69]) and other perceptual features extracted by the PsySound software [16] for nonreal-time adaptive effects.Note that also for real-time implementation, features are not really instantaneous: They are computed with a block-by-block approach so the sampling rate is lower than the audio sampling rate .

D. Are Adaptive Effects a New Class?
Adaptive control of digital audio effects is not new: It already exists in some commonly used effects.The compressor, expander, limiter and noise gate are feed-forward auto-adaptive effects on loudness, controlled by the sound intensity level with a nonlinear warping curve and hysteresis effect.The auto tuning (feedback) and the intelligent harmonizer (feed forward) are auto-adaptive effects controlled by the fundamental frequency.The cross synthesis is a feed-forward external adaptive effect using the spectral envelope of one sound to modify the spectral envelope of another sound.
The new concept that has been previously formulated is based on, promotes and provides a synthetic view of effects and their control (adaptive as described in this paper, but also gestural [63]).The class of adaptive effects that is built benefits from this generalization and provides new effects, creative musical ideas and clues for new investigations.

A. Mapping Structure
Recent studies defined specific strategies of mapping for gestural control of sound synthesizers [70] or audio effects [71], [72].We propose a mapping strategy derived from the threelayer mapping that uses a perceptive layer [73] (more detailed issues are discussed in [63]).
To convert sound features , into effect control parameters , , we use an M-to-N explicit mapping scheme 6 divided into two stages: sound feature  combination and control signal conditioning (see Fig. 3 and [63] and [74]).
The sound features may often vary rapidly and with a constant sampling rate (synchronous data) whereas the gestural controls used in sound synthesis vary less frequently and sometimes in an asynchronous mode.For that reason, we chose sound features for direct control of the effect and optional gestural control for modifications of the mapping between sound features and effect control parameters [63], [75], thus providing navigation by interpolation between presets.

B. Sound Feature Combination
The first stage combines several features, as depicted in Fig. 4. First, all the features are normalized in for unsigned values features and in for signed value features.Second, a warping function-a transfer function that is not necessarily linear-can then be applied: a truncation of the feature in order to select an interesting part, a low-pass filtering, a scale change (from linear to exponential or logarithmic), or any nonlinear transfer function.Parameters of the warping function can also be derived from sound features (for example the truncation boundaries).Third, the feature combination is done by linear combination, except when weightings are derived from other sound features.Fourth, and finally, a warping function can also be applied to the feature combination output in order to symetrically provide modifications of features before and after combination.

C. Control Signal Conditioning
Conditioning a signal consists of modifying the signal so that its behavior fits to prerequisites in terms of boundaries and variation type; it is usually used to protect hardware from an input signal.The second mapping stage conditions the effect control signal coming out from the feature combination box, as shown in Fig. 5, so that it fits the required behavior of the effect controls.It uses three steps: an effect-specific warping, a low-pass filter, and a scaling.First, the specific warping is effect dependent.It may consist of quantizing the pitch curve to the tempered scale (auto-tune effect), quantizing the control curve of the delay time (adaptive granular delay, cf.Section V-F2), or modifying a time-warping ratio varying with time in order to preserve the signal length (cf.Section V-B2).Second, the low-pass filter ensures the suitability of the control signal for the selected application.Third, and last, the control signal is scaled to the effect control boundaries given by the user, that are eventually adaptively controlled.When necessary the control signal, sampled at the block rate , is resampled at the audio sampling rate .

D. Improvements Provided by the Mapping Structure
Our mapping structure offers a higher level of control and generalizes any effect: with adaptive control (remove the gestural control level), with gestural control (remove the adaptive control), or with both controls.Sound features are either shortterm or long-term features; therefore, they may have different and well identified roles in the proposed mapping structure.Short-term features (e.g., energy, instantaneous pitch or loudness, voiciness, spectral centroid) provide a continuous adaptive control with a high rate that we consider equivalent to a modification gesture [76] and useful as inputs (left horizontal arrows in Figs. 4 and 5).Long-term features computed after signal segmentation (e.g., vibrato, roughness, duration, note pitch, or loudness) are often used for content-based transformations [5].They provide a sequential adaptive control with low rate that we consider equivalent to a selection gesture, and that is useful as controls of the mapping (upper vertical arrow in Figs. 4 and 5).

V. ADAPTIVE EFFECTS AND IMPLEMENTATIONS
Based on time-varying controls that are derived from sound features, commonly used A-DAFx were developed for technical or musical purposes, as answers to specific needs (e.g., auto tune, compressor, and automatic mixer).In this section, we illustrate the potential of this technique and investigate the effect control by sound features; we then provide new sound transformations by creative use of technology.For each effect presented in Section V, examples are given with specific features and mapping functions in order to show the potential of the framework.
Real-time implementations were performed in the Max/MSP programming environment, and nonreal-time implementations in the Matlab environment.

A. Adaptive Loudness Effects 1) Adaptive Loudness Change:
Real-time amplitude modulation with an adaptive modulation control provides the following output signal: (1)

By deriving
from the sound intensity level, one obtains the compressor/expander (cf.Section II-C1).By using the voiciness and the mapping law , one obtains a timbre effect: A "voiciness gate" that removes voicy sounds and leaves only noisy sounds (which differs from the de-esser [77] that mainly removes the "s").Adaptive loudness change is also useful for attack modification of instrumental and electroacoustic sounds (differently from compressor/expander), thus modifying loudness and timbre.
2) Adaptive Tremolo: This consists of a time-varying amplitude modulation with the rate or modulation frequency in Hertz, and the depth, both being adaptively given by sound features.The amplitude modulation is expressed using the linear scale (2) where is the audio sampling rate.It may also be expressed using the logarithmic scale The modulation function is sinusoidal but may be replaced by any other periodic function (e.g., triangular, exponential, logarithmic or drawn by the user in a GUI).The real-time implementation only requires an oscillator, a warping function and an audio rate control.Adaptive tremolo allows for a more natural tremolo that accelerates/slows down (rhythm modification) and emphasizes/de-emphasizes (loudness modification) depending on the sound content.An example is given Fig. 6, where the fundamental frequency Hz and the sound intensity level are mapped to the control rate and the depth according to the following mapping rules: .The adaptive control is provided with the input signal (feed forward adaption).The implementation can be achieved either using constant analysis step increment and time-varying synthesis step increment or using time-varying and constant , thus providing more implementation efficiency.In the latter case, the recursive formulae of the analysis time index and the synthesis time index are (6) (7) with the analysis step increment (8) Adaptive time warping provides improvement to usual time scaling, for example by minimizing the timbre modification.
It allows for time scaling with attack preservation when using an attack/transient detector to vary the time-scaling ratio [78], [79].It also allows for time-scaling sounds with vibrato, when combined with adaptive pitch-shifting controlled by a vibrato estimator: Vibrato is removed, the sound is time scaled, and vibrato with same frequency and depth is applied [37].
Using auto-adaptive time warping, we can apply fine changes in duration.A first example consists of time compressing the gaps and time expanding the sounding parts: The time-warping ratio is computed from the intensity level using a mapping law such as , with a threshold.A second example consists of time compressing the voicy parts and time expanding the noisy parts of a sound, using the mapping law , with the voiciness and the voiciness threshold.When used for local changes of duration, it provides modifications of timbre and expressiveness by modifying the attack, sustain and decay durations.Using cross-adaptive time warping, time folding of sound A is slowed down or sped up depending on the sound B content.Generally speaking, adaptive time warping allows for a re-interpretation of recorded sounds, for modifications of expressiveness (music) and perceived emotion (speech).Further research may investigate the link between sound features and their mapping to the effect control on one side, and the modifications of expressiveness on the other side.
2) Adaptive Time Warping That Preserves Signal Length: When applying a time warping with an adaptive control, the signal length is changed.To preserve the original signal length, we must first evaluate the adaptive time-warped signal length according to the adaptive control curve given by the user, thus leading to a synchronization constraint.Second, we propose three specific mapping functions that modifies the time-warping ratio so that it verifies the synchronization constraints.Third, we modify the three functions so that they also preserve the initial boundaries of .
a) Synchronization Constraint: Time indices in ( 6) and ( 7) are functions of and ( 9) (10) The analysis signal length differs from the synthesis signal length .This is no more the case for verifying the synchronization constraint An example is provided in Fig. 7.Each of the three modification types of imposes a specific behavior to the time-warping control.For example, the exponential weighting is the only synchronization technique that preserves the locations where the signal has to be time compressed or expanded: when and when .However, none of these three methods take into account the boundaries of given by the user.A solution to this is provided below. 7There is no analytical solution, so an iterative scheme is necessary.is computed according to ( 6), verifying the synchronization constraint of (11).

c) Synchronization That Preserves Boundaries:
We define the clipping function if if if (13) and denote the boundaries given by the user.The iterative solution that both preserves the synchronization constraint of (11) and the initial boundaries is derived as (14) where 1, 2, 3, respectively, denotes addition, multiplication and exponential weighting.
The adaptive time warping that preserves the signal length provides groove change when giving several synchronization points [63], that are beat dependent for swing change [80] (time and rhythm effect).It also provides a more natural chorus when combined with adaptive pitch shifting (timbre effect).

C. Adaptive Pitch Effects 1) Adaptive Pitch Shifting:
As for the usual pitch shifting, three techniques can perform adaptive pitch shifting with formant preservation in real time: PSOLA, the phase vocoder technique combined with a source-filter separation [81], and the additive model.The adaptive pitch-shift ratio is defined in the middle of the block as (15) where (respectively, ) denotes the fundamental frequency of the input (respectively, the output) signal.The additive model allows for varying pitch-shift ratios, since the synthesis can be made sample by sample in the time domain [30].The pitch-shifting ratio is then interpolated sample by sample between two blocks.PSOLA allows for varying pitchshifting ratios as long as one performs at the block level and performs energy normalization during the ovelap-add technique.
The phase vocoder technique has to be modified in order to permit that two overlap-added blocks have the same pitch-shifting ratio for all the samples they share, thus avoiding phase cancellation of overlap-added blocks.First, the control curve must be low-pass filtered to limit the pitch-shifting ratio variations.Doing so, we can consider that the spectral envelope does not vary inside a block, and then use the source-filter decomposition to resample only the source.Second, the variable sampling rate implies a variable length of the synthesis block and so a variable energy of the overlap-added synthesis signal.The solution we chose consists in imposing a constant synthesis block size , either by using a variable analysis block size and then , or by using a constant analysis block size and post correcting the synthesis block according to (16) is the Hanning window; is the number of samples of the synthesis block ; is the resampled and formant-corrected block ; is the warped analysis window defined for as ; and is the pitch-shifting ratio resampled at the signal sampling rate .A musical application of adaptive pitch shifting is the adaptive detuning, obtained by adding to a signal its pitch-shifted version with a lower than a quarter-tone ratio (this also modifies timbre): An example is the adaptive detuning controlled by the amplitude as , where louder sounds are the most detuned.Adaptive pitch shifting allows for melody change when controlled by long-term features, such as the pitch of each notes of a musical sentence [82].The auto tune is a feedback adaptive pitch-shifting effect, where the pitch is shifted so that the processed sound reaches a target pitch.Adaptive pitch shifting is also useful for intonation change, as explained below.
2) Adaptive Intonation Change: Intonation is the pitch information contained in prosody of human speech.It is composed of the macrointonation and the microintonation [83].To compute these two components, the fundamental frequency is segmented over time.Its local mean is the macrointonation structure for a given segment, and the reminder is the microintonation structure 8 , as seen in Fig. 8.This yields the following decomposition of the input fundamental frequency: The adaptive intonation change is a nonreal-time effect that modifies the fundamental frequency trends by deriving from sound features, using the decomposition (18) where is the mean of over the whole signal [72].One can independently control the mean fundamental frequency ( , e.g., controlled by the first formant frequency), the macrointonation structure ( , e.g., controlled by the second formant frequency) and the microintonation structure ( , e.g., controlled by the intensity level ); as well as strengthen ( and ), flatten ( and ), or inverse ( and ) an intonation, thus modifying the voice ambitus.Another adaptive control is obtained by replacing by a sound feature.
1) Adaptive Equalizer: This effect is obtained by applying a time-varying equalizing curve which is constituted of filter gains of a constant-Q filter bank.In the frequency domain, we extract a vector feature of length denoted 9 Fig. 9. Block-by-block processing of adaptive equalizer.The equalizer curve is derived from a vector feature that is low-pass filtered in time, using interpolation between key frames.from the STFT of each input channel (the sound being mono or multichannel).This vector feature is then mapped to , for example by averaging its values in each of the constant-Q segments, or by taking only the first values of as the gains of the filters.The equalizer output STFT is then (19) If varies too rapidly, the perceived effect is not varying equalizer/filtering but ring modulation of partials, and potentially phasing.To avoid this, we low-pass filter in time [81], with the under sampling ratio, the equalizer control sampling rate, and the block sampling rate.This is obtained by linear interpolation between two key vectors denoted and (see Fig. 9).For each block position , , the vector feature is given by (20) with the interpolation ratio.The real-time implementation requires to extract a fast computing key vector , such as the samples buffer , or the spectral envelope .However, nonreal-time implementations allow for using more computationally expensive features, such as a harmonic comb filter, thus providing an odd/even harmonics balance modification.
2) Adaptive Spectral Warping: Harmonicity is adaptively modified when using spectral warping with an adaptive warping function .The STFT magnitude is (21) The warping function is (22) and varies in time according to two control parameters: a vector , (e.g., the spectral envelope or its cumulative sum) which is the maximum warping function, and an interpolation ratio (e.g., the energy, the voiciness), which determines the warping depth.An example is given in Fig. 10, with derived from the spectral envelope as (23) This mapping provides a monotonous curve, and prevents from folding over the spectrum.
Adaptive spectral warping allows for dynamically changing the harmonicity of a sound.When applied only to the source, it allows for better in harmonizing a voice or a musical instrument since formants are preserved.

E. Adaptive Spatial Effects
We developed three adaptive spatial effects dealing with sound position in space, namely adaptive panoramization, adaptive spectral panoramization, and adaptive spatialization.
1) Adaptive Panoramization: It requires intensity panning (modification of left and right intensity levels) as well as delay, that are not taken into account in order to avoid the Doppler effect.The azimuth angle varies in time according to sound features; constant power panoramization with the Blumlein law [23] gives the following gains: (24) (25) A sinusoidal control with Hz is not heard anymore as motion but as ring modulations (with a phase decay of between the two channels).With more complex motions obtained from sound feature control, this effect does not appear because the motion is not sinusoidal and varies most of the time under 20 Hz.The fast motions cause a stream segregation effect [87], and the coherence in time between the sound motion and the sound content gives the illusion of splitting a monophonic sound into several sources.
An example consists of panoramizing synthesis trumpet sounds (obtained by frequency modulation techniques [88]) with an adaptive control derived from brightness, that is a strong perceptual indicator of brass timbre [89], as (26) Low-brightness sounds are left panoramized whereas high brightness sounds are right panoramized.Brightness of trumpet sounds evolves differently during notes attack and decay, implying that the sound attack moves fastly from left to right whereas the sound decay moves slowly from right to left.This adaptive control then provides a spatial spreading effect.
2) Adaptive Spectral Panoramization: Panoramization in the spectral domain allows for intensity panning by modifying the left and right spectrum magnitudes as well as for time delays by modifying the left and right spectrum phases.Using the phase vocoder, we once again only used intensity panning in order to avoid the Doppler effect.To each frequency bin of the input STFT we attribute a position given by the panoramization angle derived from sound features.The resulting gains for left and right channels are then (27) (28) In this way, each frequency bin of the input STFT is panoramized separately from its neighbors (see Fig. 11): The original spectrum is then split across the space between two loudspeakers.To avoid the phasiness effect due to the lack of continuity of the control curve between neighbor frequency bins, a smooth control curve is needed, such as the spectral envelope.In order to control the variation speed of the spectral panoramization, is computed from a time-interpolated value of a control vector (see the adaptive equalizer, Section V-D1).Adaptive spectral panoramization adds envelopment to the sound when the panoramization curve is smoothed.Otherwise, the signal is split into virtual sources having more or less independent motions and speeds.In the case the panoramization vector is derived from the magnitude spectrum with a multipitch tracking technique, it allows for source separation.When derived from the voiciness as , the sound localization varies between a point during attacks and a wide spatial spread during steady state, simulating width variations of the sound source.
3) Spatialization: Using VBAP techniques on an octophonic system, we tested the adaptive spatialization [63], [90].A trajectory is given by the user (for example an ellipse), and the sound moves onto that trajectory, with adaptive control onto the position, the speed or the acceleration.Concerning the position control, the azimuth can depend on the chroma , then splitting the sounds onto a spatial chromatic scale.The speed control adaptively depending on voiciness as allows for the sound to move only during attacks and silences; on the contrary an adaptive control of speed given as allows for the sound to move only during steady states, and not during attacks and silences.

F. Multidimensional Adaptive Effects
Various adaptive effects affect several perceptual attributes simultaneously: Adaptive resampling modifies time, pitch, and timbre; adaptive ring modulation modifies only harmonicity when combined to formant preservation, and harmonicity and timbre when combined with formants modifications [81]; gender change combines pitch shifting and adaptive formant shifting [86], [91] to transform a female voice into a male voice, and vice versa.We now present two other multidimensional adaptive effects: Adaptive robotization that modifies pitch and timbre and adaptive granular delay that modifies spatial perception and timbre.
1) Adaptive Robotization: Adaptive robotization changes expressiveness on two perceptual attributes, namely intonation (pitch) and roughness (timbre), and allows for transforming a human voice into an expressive robot voice [62] This consists of zeroing the phase of the grain STFT at a time index given by sound features: , and zeroing the signal between two blocks [27], [62].The synthesis time index is recursively given as (29) The step increment is also the period of the robot voice, i.e., the inverse of the robot fundamental frequency to which sound features are mapped (e.g., the spectral centroid as , in Fig. 12).Its real-time implementation implies the careful use of a circular buffer, in order to allow for varying window and step increment [92].Both the harmonic and the noisy part of the sound are processed, and Fig. 13.Illustration of the adaptive granular delay: Each grain is delayed, with feedback gain g(m) = a(m) and delay time (m) = 0:1 1 a(m) both derived from intensity level.Since intensity level of the four first grains is going down, the gains (g(m)) and delay time n (m) of the repetitions are also going down with n, resulting in a granular time-collapsing effect.
formants are locally preserved for each block.However, the energy of the signal is not preserved, due to the zero phasing, the varying step increment and the zeroing process between two blocks, thus resulting in giving a pitch and modifying the loudness of noisy contents.An annoying buzz sound is then perceived, and can be easily removed by reducing the loudness modification: After zeroing the phases, the synthesis grain is multiplied by the ratio of analysis to synthesis intensity level computed on the current block (30) A second adaptive control is given on the block size and allows for changing the robot roughness: the lower the block length, the higher the roughness.At the same time, it allows for preserving the original pitch (e.g., ) or removing it (e.g., ), with an ambiguity in between.This is due to the fact that zero phasing a small block creates a main peak in the middle of the block and implies amplitude modulation (and then roughness).Inversely, zero phasing a large block creates several additional peaks in the window, the periodicity of the equally spaced secondary peaks being responsible for the original pitch.
2) Adaptive Granular Delay: This consists of applying delays to sound grains, with constant grain size and step increment [62], and varying delay gain and/or delay time derived from sound features (see Fig. 13).In nonreal-time applications, any delay time is possible, even fractional delay times [57], since each grain repetition is overlaped and added into a buffer.However, real-time implementations require to limit the number of delay lines, and so forth to quantize delay time and delay gain control curves to a limited number of values.In our experience, 10 values for the delay gain and 30 for the delay time is a good minimum configuration, yielding 300 delay lines.
In the case where only varies, the effect is a combination between delay and timbre morphing (spatial perception and timbre).For example, when applying this effect to a plucked string sound and controlling the gain with a voiciness feature as , the attacks are repeated a much longer time than the sustain part.With the complementary mapping , the attacks rapidly disappear from the delayed version whereas the sustain part is still repeated.
In the case where only varies, the effect is a kind of granular synthesis with adaptive control, where grains collapse in time, thus implying modifications of time, timbre, and loudness.With a delay time derived from voiciness (in seconds), attacks and sustain parts of a plucked string sound have different delay times, so sustain parts may be repeated before the attack with repetitions going on, as depicted Fig. 13: Not only time and timbre are modified, but also loudness, since the grains superposition is uneven.
Adaptive granular delay is a perfect example of how the creative modification of an effect with adaptive control offers new sound transformation possibilities; it also shows how the frontiers between the perceptual attributes modified by the effect may be blurred.

VI. CONCLUSION
We introduced a new class of sound transformations that we call adaptive digital audio effects and note A-DAFx, and that generalizes audio effects and their control from observations of existing adaptive effects.Adaptive control is obtained by deriving effect controls from signal and perceptual features, thus changing the perception of the effect from linear to evolutive and/or from simple to complex.This concept also allows for the definition of new effects, such as adaptive time warping, adaptive spectral warping, adaptive spectral panoramization, prosody change, and adaptive granular delay.
A higher level of control can be provided by combining the adaptive control with a gestural control of the sound feature mapping, thus offering interesting interactions including interpolation between adaptive effects and between presets.
A classification of effects was derived relying on the basis of perceptual attributes.Adaptive control provides creative tools to electroacoustic music composers, musicians, and engineers.This control allows for expressiveness changes and for sound re-interpretation, as especially noticeable in speech (prosody change, robotization, ring modulation with formant preservation, gender change, or martianization).
Further applications concern the study of emotion and prosody, for example, to modify the prosody or to generate it appropriately.Formal listening tests are needed to evaluate the mapping between sound features and prosody, thus giving new insights on how to modify the perceived emotion.

Fig. 1 .
Fig. 1.Set of features used as control parameters, with indications about the techniques used for extraction (left and plain lines) and the related perceptual attribute (right and dashed lines).Italic words refer to perceptual attributes.

Fig. 2 .
Fig. 2. Diagram of the adaptive effect.Sound features are extracted from an input signal x (n) or x (n), or from the output signal y(n).The mapping between sound features and the control parameters of the effect is modified by an optional gestural control.

Fig. 3 .
Fig. 3. Diagram of the mapping between sound features and one effect control c (n): Sound features are first combined, and then conditioned in order to provide a valid control to the effect.

Fig. 4 .
Fig. 4. Diagram of the feature combination, first stage of the sound feature mapping.f (n), i = 1; . . .; M are the sound features, and d (n), j = 1; . . .; N are the combined features.

Fig. 5 .
Fig. 5. Diagram of the signal conditioning, second stage of the sound feature mapping.c (n), n = 1; . . .; N are the effect controls derived from sound features f (n), i = 1; . . .; M .The DAFx-specific warping and the fitting to boundaries can be controlled by other sound features.

1 )
Adaptive Time warping: Time warping is a nonlinear time scaling.This nonreal-time processing uses a time-scaling ratio that varies with the block index.The sound is then alternatively locally time expanded when , and locally time compressed when

Fig. 6 .
Fig. 6.Control curves for the adaptive tremolo.(a) Tremolo frequency f (n) is derived from the fundamental frequency as in (4).(b) Tremolo depth d(m) is derived from the signal intensity level as in (5).(c) Amplitude modulation curve using the logarithmic scale given in (3).

Fig. 10 .
Fig. 10.A-Spectral Warping: (a) Output STFT.(b) Warping function derived from the cumulative sum of the spectral envelope.(c) Input STFT.The warping function gives to any frequency bin the corresponding output magnitude.The spectrum is then nonlinearly scaled according to the warping function slope p: compressed for p < 1 and expanded for p > 1.The dashed lines represent W (m; k) = C (m; k) and W (m; k) = k.

Fig. 11 .
Fig. 11.Frequency-space domain for the adaptive spectral panoramization (in black).Each frequency bin of the original STFT X(m; k) (centered with = 0, in gray) is panoramized with constant power.The azimuth angles are derived from sound features as (m; k) = x(mR 0 N=2 + k) 1 =4.