Determining local transientness of audio signals

Determining local transientness of audio signals

Stéphane Molla and Bruno Torrésani Both authors are with LATP, CMI, 39 rue Joliot-Curie, 13453 Marseille cedex 13, France; email:; Work supported in part by the European Union’s Human Potential Programme, under contract HPRN-CT-2002-00285 (HASSIP)

We describe a new method for estimating the degree of “transientness” and “tonality” of a class of compound signals involving simultaneously transient and harmonic features. The key assumption is that both transient and tonal layers admit sparse expansions, respectively in wavelet and local cosine bases. The estimation is performed using particular form of entropy (or theoretical dimension) functions. We provide theoretical estimates on the behavior of the proposed estimators, as well as numerical simulations. Audio signal coding provides a natural field of application.


audiophonic signal, transient, tonal, wavelet basis, local cosine basis, sparsity.

I Introduction

Many generic signal classes feature significantly different “components”, such as transients, (locally) sinusoidal or harmonic “partials”, or stochastic-like components in sounds, or edges, textures, etc. in images. Detecting the presence of such components is one of the classical signal processing problems (see for example  [1] and [2] and references therein for reviews.) Another interesting problem is to estimate whether a given portion of a signal is for example more transient than harmonic or periodic, or in other words to estimate “transientness” or “tonality” indices: quantitative measures of the local proportion of transient and tonal features in a signal. Such indices find immediate applications in several contexts, including the hybrid signal coders [3, 4, 2] which use different methods for encoding transient or tonal regions (and were the main motivation of this work), more general purpose hybrid models [5], or similar recent ideas in image coding [6, 7]. While there exist fairly standard tools for transient detection or harmonic signal detection, the problem of quantitative measure of proportion does not seem to have received much attention.

We propose here simple criteria, based on transform coding ideas, for estimating such indices. The main idea is to use orthonormal bases in signal spaces which are significantly different from each other in the following sense: a given component has a sparse expansion in a given basis, while the others have dense expansions. Information theoretic criteria (we elaborate on the case of a variant of Shannon’s entropy) therefore yield estimates for the indices.

We focus here on the case of transient and locally sinusoidal (or harmonic) layers in audio signals, using wavelet and local cosine bases. However, the approach we develop may be adapted to different signal layers (chirps for example), and to higher dimensions. We provide theoretical estimates for the behavior of transientness and tonality indices, and illustrate our results by numerical simulations and tests on real sounds.

Ii Theoretical analysis

We focus on the particular application to audio signals, and limit ourselves to transient and tonal features. Our starting point is the assumption that transient signals admit a sparse expansion in a wavelet basis (provided the wavelets have small enough time support), and that tonals admit a sparse expansion in local cosine basis (with smooth enough window function.) We are naturally led to consider a generic redundant “dictionary” made out of two such orthonormal bases, denoted by and respectively (we refer to [8, 9] for detailed tutorials), and signal expansions of the form


where and are (small, and this will be the main sparsity assumption) subsets of the index sets, termed significance maps. The nonzero coefficients are assumed to be independent random variables, and the nonzero coefficients are assumed to be independent random variables. is a residual signal, which is not sparse with respect to the two considered bases (we shall talk of spread residual), and is to be neglected or described differently.

Given a signal assumed for simplicity to be of the form (1), with unknown values of and (the cardinalities of and respectively), we are interested in finding estimates for the latter. More precisely, we seek estimates for the “transientness” and “tonality” indices


We propose a procedure close to the notions of theoretical dimension or -entropies, advocated by Wickerhauser (see [10] for a review.) Our approach is based upon the following heuristics. Consider a signal , and expand it into an orthonormal basis. Estimating the “size” of in this basis may clearly be done by counting the number of nonzero coefficients (the norm of the sequence of coefficients), or the number of coefficients above some threshold. It has been shown [10] that alternative approaches are possible, including norms (with ) or entropy, yielding comparable results. Considering a hybrid signal as in (1) neither its wavelet expansion nor its local cosine expansion will be sparse. However, since by assumption only very few coefficients and are nonzero, most wavelet coefficients actually originate from the tonal part , and most local cosine coefficients originate from the transient part . Therefore, calculating these norms or entropy from the wavelet coefficients is expected to provide (approximately) estimates on the number of nonzero (or significant) coefficients, and vice versa. We elaborate below on the specific case of the logarithmic dimensions, for which such a behavior may be proved. For the sake of simplicity, we shall work in this section in a finite dimensional context.

Definition 1

Given an orthonormal basis of a given -dimensional signal space , define the logarithmic dimension of in the basis by


It follows from a simple calculation that in the framework of the signal models under consideration,

Lemma 1

Given an orthonormal basis , assuming that the coefficients are random variables, one has


where is a universal constant ( being Euler’s constant.)

Returning to the model (1), and assuming that the coefficients and are respectively and independent random variables, the coefficients , , are zero-mean normal random variables, whose variance depends on whether (or ) or not. For example,


and we obtain, for the basis


and a similar expression for the logarithmic dimension with respect to the basis.

In the simpler case where , and , , we introduce the Parseval weights


The following property is an immediate consequence of Parseval’s formula (i.e. for all , .)

Lemma 2

The Parseval weights satisfy

Introducing the relative redundancies of the bases and with respect to the significance maps


we obtain simple estimates for the logarithmic dimension.

Theorem 1

With the above notations, assuming that the coefficients and are independent identically distributed and normal variables respectively, and assuming , the following bounds hold


with . Exchanging the roles of and , a similar bound holds for the other logarithmic dimension .

Proof: The proposition follows directly from the fact that in such a situation, equation (6) reduces to


from Lemma 2 and the definition of .

This result may be understood and utilized as follows. First notice that the bounds in Equations (9) and (10) differ by . Let us assume for a while that this term may be neglected (more on that below.) Then the behavior of is essentially controlled by . The behavior of this term is not easy to understand, but a first idea may be obtained by replacing by its “ensemble average” which yields the approximate expression:


Therefore, if the “-component” of the signal is sparse enough, i.e. if is sufficiently small (compared with 1), may be expected to behave as . Set


Replacing with its expectation, we see that , which yields an estimate (up to the multiplicative constant ) for the “size” of the tonal component of the signal. Similarly, defining


we obtain a similar estimate (up to the multiplicative constant ) for the “size” of the component of the signal. Both and are computable from the signals wavelet and local cosine expansions, and we finally consider their relative proportions, or “rates”


which provide the desired estimates for the indices in Eq. (2).

A few comments are in order here.

  • The difference between the lower and upper bounds depends on the sparsity of the -component and the relative redundancy parameters . The latter actually describe the intrinsic differences between the two considered bases. When the bases are significantly different, the relative redundancy may be expected to be small (notice that in any case, it is smaller than 1.)

  • The relative redundancy parameters and differ from the one which is generally considered in the literature, namely the coherence of the dictionary (see e.g. [11, 12, 13].) The latter is intrinsic to the dictionary, while the Parseval weights and corresponding and provide a finer information, as they also account for the signal models, via their dependence in the significance maps and .

  • Precise estimates for and are difficult to obtain (numerical simulations yield values around 1/4.) More precise models for the significance maps and could provide better understanding. In particular, structured models such as those described in [14] (implementing time persistence in and scale persistence in ) are expected to yield smaller values for the relative redundancies than models featuring uniformly distributed significance maps.

Another interesting point is the sensitivity of such tools with respect to departures from the model, or noise. We show that results similar to the above ones still hold true in the presence of white noise, i.e. assuming that the residual in (1) is a zero-mean Gaussian white noise. In such a situation, denoting by the variance of the noise , equation (6) becomes

and a similar expression for the logarithmic dimension with respect to the basis. Hence, the approximate expression (12) becomes

The discussion above (suitably adaptated) still holds as long as the signal energy exceeds the noise energy .

These estimates yield the following algorithm for estimating transientness and tonality indices for sparse hybrid signals as given in (1).

  1. Compute logarithmic dimensions and

  2. Compute and as in (13) and (14).

  3. Compute the estimated rates as in (15).

Iii Numerical results

We generated several realizations of the signal model (with first), with variable numbers of wavelet atoms and fixed number of local cosines and vice versa, and computed the estimated rates and , to be compared with the ground truth (2), i.e. and . As may be seen from Figure 1 (which corresponds to averages over 10 realizations of the model), the estimated curves reproduce quite well the correct ones. Some discrepancies may be observed at the right hand side of the curves, where the sparsity assumptions are not valid any more, and the correction terms in (12) come into play. Observe that the curves cross precisely at the correct location . The influence of the noise may be seen in Figure 2: a white noise, whose energy equals 30% of the signal’s energy, has been added. The effect is what can be anticipated from (II), namely the presence of an additional noise term moves the experimental curves away from the theoretical ones.

Fig. 1: Transientness and tonality estimates for the model (averaged over 10 realizations.) Top: , and ; increasing curves: and ; decreasing curves: and . Bottom: , and ; increasing curves: and ; decreasing curves: and .

Fig. 2: Influence of white noise: Transientness and tonality estimates for the model (averaged over 10 realizations) with additional white noise. Same legends as before.

Besides the numerical simulations above, the transientness and tonality indices have been tested on real audio signals, yielding very sensible results.111Additional material, including sound files, may be found at the web site A first example, based upon a simple ’castanet’ signal (6 s long, sampled at 44,100 kHz) is shown in Figure 3. A value for the transientness index and the tonality index was computed for all time frames (23 ms long.) Since , only the transientness index is displayed for the sake of clarity. This signal is quite simple, as it essentially exhibits attacks followed by harmonic tones, and is thus a “perfect” test for the proposed approach. As may be seen from the bottom plot of Figure 3, all attacks are correctly captured, and the corresponding index is quite high. In between attacks, the transientness index is very low, which is also natural since the signal is essentially harmonic, thus sparsely represented by local cosine basis.

Fig. 3: Transientness index for the test ’castanet’ signal. Signal (top) and transientness index (bottom.)

The second sound example displayed here is a more complex audio signal, extracted from a jazz recording (about 6 s. long, sampled at 44,100 kHz) which features “mixed” tonals and transients. The numerical results are displayed in Figure 4. Notice again that the “obvious” attacks of the signal have been captured by the method. A closer examination of the signal (using a “spectrogram type” representation, not shown here) shows that in the middle part of the signal (more precisely, between seconds 3 and 5), the harmonic content is stronger, which explains the lower average value of there. This illustrates the fact that really provides an estimate of the proportion of transients relative to tonals, rather than an absolute indicator of the presence of transient, such as the ones used in transient detection [4] for example.222

Fig. 4: Transientness index for the test “jazz” signal. Signal (top) and transientness index (bottom.)

More numerical results, in the framework of the hybrid audio coding scheme developed in [3], will be given in a forthcoming publication [14].

Iv Conclusions

Sparsity of wavelet and local cosine signal representations may be exploited in order to estimate the relative amount of tonal and transient components present in the signal. This approach proves to be extremely effective in the context of hybrid audio signal coding [3, 15], and possesses a wider range of applications, including image coding [6].

The theoretical analysis we have presented is based on strong a priori assumptions on the signal (essentially, a hybrid model such as (1), with sparse significance maps and .) While this sparsity assumption is completely necessary, the equality of variances may be relaxed; in that situation, the indices provide estimates on the proportion of energies and of the two layers, rather than their size and . This is the case for the numerical results on real signals, for which the variances of the two layers are not known.

Finally, let us simply mention that the approach may be extended to more than two layers, provided that the considered orthonormal bases are sufficiently different (in terms of their “Parseval weights”, see above) to allow the separation. Again, this may prove useful in the context of image coding, where new types of waveforms (e.g. curvelets) may be introduced.


  • [1] X. Rodet and F. Jaillet, Detection and modeling of fast attack transients, in Proc. ICMC, La Habana, Cuba, 2001, pp. 30–33.
  • [2] T. Verma, A perceptually based audio signal model with application to scalable audio compression, PhD Thesis, Stanford University (2000).
  • [3] L. Daudet and B. Torrésani, Hybrid representations for audiophonic signal encoding. Signal Processing, vol. 82(11), pp. 1595–1617, 2002.
  • [4] S. Levine and J. O. Smith, A switched parametric and transform audio coder, in Proc. ICASSP., Phoenix, vol. 2, pp. 985-988, March 1999.
  • [5] J. Berger, R. Coifman, and M. Goldberg, Removing noise from music using local trigonometric bases and wavelet packets. J. Audio Eng. Soc., vol. 42(10), pp. 808–818, 1994.
  • [6] F.G. Meyer, A.Z. Averbush and R.R. Coifman, Multilayered image representation: application to image compression. IEEE Trans. on Image Processing, vol. 11, pp. 1072–1080, 2002.
  • [7] J. Romberg, M. Wakin and R. Baraniuk, Approximation and compression of piecewise smooth images using a wavelet/wedgelet geometric model. in Proc. IEEE ICIP, sept. 2003.
  • [8] R. Carmona, W.L. Hwang, and B. Torrésani, Practical Time-Frequency Analysis: continuous wavelet and Gabor transforms, with an implementation in S, Academic Press, San Diego, 1998.
  • [9] S. Mallat, A Wavelet Tour of Signal Processing. Academic Press, 1998.
  • [10] M. V. Wickerhauser, Adapted Wavelet Analysis from Theory to Software. AK Peters, Boston, MA, USA, 1994.
  • [11] D.L. Donoho and X. Huo, Uncertainty principles and ideal atomic decompositions. IEEE Trans. Inf. Th., vol. 47(7), pp. 2845–2862, 2001.
  • [12] M. Elad and A.M. Bruckstein, A generalized uncertainty principle and sparse representations. IEEE Trans. Inf. Th., vol. 48(9), pp. 2558–2567, 2001.
  • [13] R. Gribonval and M. Nielsen, Sparse representations in union of bases. Institut National de Recherches en Informatique et Automatique, IRISA Rennes, Tech. Rep. 1499, 2003.
  • [14] S. Molla and B. Torrésani, An Hybrid Audio scheme using hidden Markov models of waveforms. Submitted to Appl. and Comp. Harm. Anal. Preprint, Sept. 2003.
  • [15] S. Molla and B. Torrésani, Hidden Markov trees of wavelet coefficients for transient detection in audiophonic signals. To appear in Annales de l’Université Blaise Pascal A. Benassi Ed., 2003.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description