A framework for invertible, real-time constant-Q transforms

A framework for invertible, real-time constant-Q transforms

Abstract.

Audio signal processing frequently requires time-frequency representations and in many applications, a non-linear spacing of frequency-bands is preferable. This paper introduces a framework for efficient implementation of invertible signal transforms allowing for non-uniform and in particular non-linear frequency resolution. Non-uniformity in frequency is realized by applying nonstationary Gabor frames with adaptivity in the frequency domain. The realization of a perfectly invertible constant-Q transform is described in detail. To achieve real-time processing, independent of signal length, slice-wise processing of the full input signal is proposed and referred to as sliCQ transform.

By applying frame theory and FFT-based processing, the presented approach overcomes computational inefficiency and lack of invertibility of classical constant-Q transform implementations. Numerical simulations evaluate the efficiency of the proposed algorithm and the method’s applicability is illustrated by experiments on real-life audio signals.

Nicki Holighaus]nicki.holighaus@univie.ac.at

Monika Dörfler]monika.doerfler@univie.ac.at

Gino Angelo Velasco]gamvelasco@math.upd.edu.ph

Thomas Grill]gr@grrrr.org

1. Introduction

Analysis, synthesis and processing of sound is commonly based on the representation of audio signals by means of time-frequency dictionaries. The short-time Fourier transform (STFT), also referred to as Gabor transform, is a widely used tool due to its straight-forward interpretation and FFT-based implementation, which ensure efficiency and invertibility [15, 7]. STFT features a uniform time and frequency resolution and a linear spacing of the time frequency bins.

In contrast, the constant-Q transform (CQT), originally introduced in [22] and in music processing by J. Brown [2], provides a frequency resolution that depends on geometrically spaced center frequencies of the analysis windows. In particular, the Q-factor, i.e. the ratio of center frequency to bandwidth of each window, is constant over all frequency bins; the constant Q-factor leads to a finer frequency resolution in low frequencies whereas time resolution improves with increasing frequency. This principle makes the constant-Q transform well-suited for audio data, since it better reflects the resolution of the human auditory system than the linear frequency-spacing provided by the FFT, cf. [20] and references therein. Furthermore, musical characteristics such as overtone structures remain invariant under frequency shifts in a constant-Q transform, which is a natural feature from a perception point of view. In speech and music processing, perception-based considerations are important, which is one of the reasons why CQTs, due to their previously discussed properties, are often desirable in these fields. An example of a CQ-transform, obtained with our algorithm, is shown in Figure 1.

The principal idea of CQT is reminiscent of wavelet transforms, compare [19]. As opposed to wavelet transforms, the original CQT is not invertible and does not rely on any concept of (orthonormal) bases. On the other hand, the number of bins (frequency channels) per octave is much higher in the CQT than most traditional wavelet techniques would allow for. Partly due to this requirement, the computational efficiency of the original transform as well as its improved versions, cf. [3], may often be insufficient. Moreover, the lack of invertibility of existing CQTs has become an important issue: for some desired applications, such as extraction and modification, e.g. transposition, of distinct parts of the signal, the unbiased reconstruction from analysis coefficients is crucial. Approximate methods for reconstruction from constant-Q coefficients have been proposed before, in particular for signals which are sparse in the frequency domain [5] and by octave-wise processing in [18].

In the present contribution, we are interested in inversion in the sense of perfect reconstruction, i.e. up to numerical precision; to this end, we investigate a new approach to constant-Q signal processing. The presented framework has the following core properties:

  1. Relying on concepts from frame theory, [15], we suggest the implementation of a constant-Q transform using the nonstationary Gabor transform (NSGT), which guarantees perfect invertibility. This perfectly invertible constant-Q transform is subsequently called constant-Q nonstationary Gabor transform (CQ-NSGT).

  2. We introduce a preprocessing step by slicing the signal to pieces of (usually uniform) finite length. Together with FFT-based methods, this allows for bounded delay and results in linear processing time. Thus, our algorithm lends itself to real-time processing and the resulting transform is referred to as sliced constant-Q transform (sliCQ).

NSGTs, introduced in [11, 1], generalize the classical sampled short-time Fourier transform or Gabor transform [15, 10]. They allow for fast, FFT-based implementation of both analysis and reconstruction under mild conditions on the analysis windows. The CQ-NSGT was first presented in [21]; the frequency-resolution of the proposed CQ-NSGT is essentially identical to that of the CQT, cf. Figure 1 for an example.

Figure 1. Time-frequency representations on a logarithmically scaled frequency axis: STFT spectrogram (top) and constant-Q NSGT spectrogram (bottom).

The main drawback of the CQ-NSGT is the inherent necessity to obtain a Fourier transform of the entire signal prior to actual processing. This problem prohibits real-time implementation and is overcome by a slicing step, which preserves the perfect reconstruction property. However, blocking effects and time-aliasing may be observed if the coefficients are modified in applications such as de-noising or transposition and time-shift of certain signal components. While slicing the signal naturally introduces a trade-off between delay and finest possible frequency resolution, the parameters can be chosen to suppress blocking artifacts and to leave the constant-Q coefficient structure intact.

The rest of this paper is organized as follows. In Section 2 we introduce the concepts of frames as overcomplete, stable spanning sets, with a focus on nonstationary Gabor (NSG) systems and their properties. We recall the conditions for these systems to constitute so-called painless frames, a special case that allows for straightforward inversion. Section 3 describes the construction of the CQ-NSGT by NSG frames with adaptivity in the frequency domain. This is the starting point for the sliCQ transform, which is explored in Section 4. After giving the general idea, we describe interpretation of the sliCQ-coefficients in relation to the full-length transform in Section 4.3. Subsequently, Section 5 is concerned with an analysis of the transforms’ numerical properties, in particular computation time and complexity, as well as the quality of approximation of the CQ-NSGT coefficients by the sliCQ, accompanied by a set of simulations. Finally, in Section 6 the CQ-NSGT is applied and evaluated in the analysis and processing of real-life signals. The paper is closed by a short summary and conclusion.

2. Nonstationary Gabor Frames

Frames, first mentioned in [8], also cf. [4, 15], generalize (orthonormal) bases and allow for redundancy and thus design flexibility in signal representations. Frames may be tailored to a specific application or certain requirements such as a constant-Q frequency resolution. Loosely speaking, we wish to represent a given signal of interest as a sum of the frame members , weighted by coefficients :

(1)

The double indexes allude to the fact that each atom has a certain location and concentration in time and frequency. Frame theory establishes conditions under which an expansion of the form (1) can be obtained with coefficients leading to stable, perfect reconstruction.

For this contribution, we only consider frames for , that is vector spaces of finite, discrete signals, understood as functions on . We denote by the inner product of and , i.e. and The structures introduced here can easily be extended to the Hilbert space of quadratically integrable functions, .

2.1. Frames

Consider a collection of atoms with for finite index sets . We then define the frame operator by

(2)

for all . If the linear operator is invertible on , then the set of functions , is a frame1. In this case, we may define a dual frame by

(3)

and reconstruction from the coefficients is straight-forward:

We next introduce a case of particular importance, the so-called Gabor frames, for which the elements are obtained from a single window by time- and frequency-shifts along a lattice. Let and denote a time-shift by and a frequency shift (or modulation) by , i.e.

where is considered modulo . Furthermore, we use the normalization

for the discrete Fourier transform of . It follows that and .

Fixing a time-shift parameter and a frequency-shift parameter , with , we call the collection of atoms , with , a Gabor system. If is a frame, it is called a Gabor frame. For Gabor frames, the frame coefficients are given by samples of the short-time Fourier transform (STFT) of with respect to the window :

(4)

In a general setting, the inversion of the operator poses a problem in numerical realization of frame analysis. However, for Gabor frames, it was shown in [6], that under certain conditions, usually fulfilled in practical applications, is diagonal, and a dual frame can be calculated easily. This situation of painless non-orthogonal expansions can now be generalized to allow for adaptive resolution.

2.2. Frequency-Adaptive Painless Nonstationary Gabor Frames

In classical Gabor frames, we obtain all samples of the STFT in (2.1) by applying the same window , shifted along a regular set of sampling points and taking an FFT of the same length. In order to achieve adaptivity of the resolution in either time or frequency, we relax the regularity of classical Gabor frames to derive nonstationary Gabor frames.

The original motivation for the introduction of NSGT was the desire to adapt both window size and sampling density in time, cf. [11, 1], in order to accurately resolve transient signal components. Here, we apply the same idea in frequency, i.e. adapt both the bandwidth and sampling density in frequency. From an algorithmic point of view, we apply a nonstationary Gabor system to the Fourier transform of the input signal.

The windows are constructed directly in the frequency domain by taking real-valued filters centered at . The inverse Fourier transforms are the time-reverse impulse responses of the corresponding (frequency-adaptive) filters. Therefore, we let , , denote the members of a finite collection of band-limited windows, well-localized in time, whose Fourier transforms are centered around possibly irregularly (or, e.g. geometrically) spaced frequency points .

Then, we select frequency dependent time-shift parameters (hop-sizes) as follows: if the support (the interval where the vector is nonzero) of is contained in an interval of length , then is chosen such that

(5)

In other words, the time-sampling points have to be chosen dense enough to guarantee (5). If we denote by the modulation of by , i.e. , then we obtain the frame members by setting

where and . The system is a painless nonstationary Gabor system, as described in [1], for . We also define and . By Parseval’s formula, we see that the frame coefficients can be written as

(6)

For convenience, we use the notation to refer to the full set of coefficients and channel coefficients, respectively. By abuse of notation, we indicate by that is an irregular array with columns, the -th column possessing entries. The NSG coefficients can be computed using the following algorithm.

1:Initialize for all
2:
3:for  do
4:     
5:end for
Algorithm 1 NSG analysis:

Here denotes a (inverse) Fast Fourier transform of length , including the necessary periodization or zero-padding preprocessing to convert the input vector to the correct length . The analysis algorithm above is complemented by Algorithm 2, an equally simple synthesis algorithm that synthesizes a signal from a set of coefficients .

1:Initialize for all ,
2:for  do
3:     
4:end for
5:
6:
Algorithm 2 NSG synthesis:

If and are a pair of dual frames, then we can reconstruct a function perfectly from its NSG analysis coefficients. For more details and a proof of the following propositions, see Appendix 8.1.

Proposition 1.

Let and be a pair of dual frames. If is the output of (Algorithm 1), then the output of (Algorithm 2) equals , i.e.

(7)

The remaining problem is to ascertain that is a frame and to compute the dual frame. The following proposition is a discrete version of an equivalent result for NSG systems in and achieves both, using the painless case condition (5).

Proposition 2.

Let an NSG system satisfying (5). This system is a frame if and only if

(8)

and the generators of the canonical dual frame are given by

(9)

In the next section, we construct a constant-Q NSG system satisfying (5) and (8).

Remark 1.

Note that NSG frames can be equivalently used to design general nonuniform filter banks [14, 16] in a similar manner.

3. The CQ-NSGT Parameters: Windows and Lattices

The parameters of the NSGT can be designed as to implement various frequency-adaptive transforms. Here, we focus on the parameters leading to an NSGT with constant-Q frequency resolution, suitable for the analysis and processing of music signals, as discussed in the introduction. In constant-Q analysis, the functions are considered to be filters with support of length centered at frequency (in samples), such that for the bins corresponding to a certain frequency range, the respective center frequencies and lengths have (approximately) the same ratio. Using these filters, the CQ-NSGT coefficients are obtained via Algorithm 1, where indexes the frequency bins, and .

                                      Â

  Â

Table 1. Center frequency and bandwidth values

As detailed in [21], the construction of the filters for the CQ-NSGT depends on the following parameters: minimum and maximum frequencies and (in Hz), respectively, the sampling rate , and the number of bins per octave . The center frequencies satisfy , similar to the classical CQT in [2], for , where is an integer such that , the Nyquist frequency. Note that the correspondence between and is the conversion ratio from Hz to samples, as detailed in the next paragraphs.

The bandwidths are set to be , for , which lead to a constant Q-factor , while and are taken to be and , respectively. Since the signals are real-valued, additional filters are considered which are positioned in a symmetric manner with respect to the Nyquist frequency. Moreover, to ensure that the union of filter supports cover the entire frequency axis, filters with center frequencies corresponding to the zero frequency and the Nyquist frequency are included. The values for and over all frequency bins are summarized in Table 1.

With these center frequencies and bandwidths, the filters are set to be , for , where is some continuous function centered at , positive inside and zero outside of , i.e. each is a sampled version of a translated and dilated . Meanwhile, and are taken to be plateau functions centered at the zero and the Nyquist frequencies respectively. Thus, each filter is centered at and has support .

It is easy to see that this choice of satisfies the conditions of Proposition 2 for any sequence with for all . Note that while might be rational, must be integer-valued. Consequently, perfect reconstruction of the signal is obtained from the coefficients by applying Algorithm 2 with a dual frame, e.g. the canonical dual given by (9).

4. Real-time processing and the sliCQ

The CQ-NSGT implementation introduced in the previous sections a priori relies on a Fourier transform of the entire signal. This contradicts the idea of real-time applications, which require bounded delay in processing incoming samples and linear over-all complexity. These requirements can be satisfied by applying the CQ-NSGT in a blockwise manner, i.e. to (fixed length) slices of the input signal. However, the slicing process involves two important challenges: First, the windows used for cutting the signal must be smooth and zero-padding has to be applied to suppress time-aliasing and blocking artifacts when coefficient-modification occurs. Second, the coefficients issued from the block-wise transform should be equivalent to the CQ-coefficients obtained from a full-length CQ-NSGT. This can be achieved to high precision by careful choice of both the slicing windows and the analysis windows used in the CQ-NSGT.

4.1. Structure of the sliCQ transform

Figure 2. Tukey windows used in the slicing process. Note that the chosen amount of zero-padding leads to a half-overlap situation.

We now summarize the individual steps of the sliCQ algorithm and introduce the involved parameters.

  • Sliced constant-Q NSGT analysis:

    1. Cut the signal into overlapping slices of length by multiplication with uniform translates of a slicing window , centered at .

    2. For each , obtain coefficients , by applying (Algorithm 1).

    3. Due to the overlap of the slicing windows, cf. Figure 2, each time index is related to two consecutive slices. For visualization and processing, the slice coefficients are re-arranged into a -layer array , with , cf. Figure 3.

  • Sliced constant-Q NSGT synthesis:

    1. Retrieve by partitioning .

    2. Compute the dual frame for and, for all , (Algorithm 2).

    3. Recover by (windowed) overlap-add.

Note that must be a multiple of ; this is achieved by zero-padding, if necessary. By construction, the positions of the coefficients in reflect their time-frequency position with respect to the full-length signal, for .

Figure 3. Structure of the sliCQ coefficients - schematic illustration

4.2. Computation of a sliced constant-Q NSGT

The sliced constant-Q NSGT (sliCQ) coefficients of with respect to and and slice length are obtained according to the following algorithm.

1:Initialize for all
2:
3:for  do
4:     for  do
5:         
6:     end for
7:     
8:     
9:     for  do
10:         
11:     end for
12:end for
Algorithm 3 sliCQ analysis:

Note that in this and the following algorithm, negative indices are used in a circular sense, with respect to the maximum admissible index, e.g. or . As the CQ-NSGT analysis before, Algorithm 3 is complemented by a synthesis algorithm with similar structure, Algorithm 4, that synthesizes a signal from a -layer coefficient array .

1:Initialize for all
2:
3:
4:for  do
5:     
6:     for  do
7:         
8:     end for
9:     
10:     for  do
11:         
12:            
13:     end for
14:end for
Algorithm 4 sliCQ synthesis:

The following proposition states that is perfectly recovered from its sliCQ coefficients by applying Algorithm 4, see Appendix 8.2 for a proof.

Proposition 3.

Let and be dual NSG systems for . Further let satisfy

(10)

If is the output of (Algorithm 3), then the output of (Algorithm 4) equals , i.e., .

4.3. The relation between CQ-NSGT and sliCQ

To maintain perfect reconstruction in the final overlap-add step in Algorithm 4, we assume

(11)

and use a dual window satisfying (10) in the synthesis process.

Another obvious option for the design of the slicing windows is to require , which would allow for using the same windows in the final overlap-add step. However, if we want to approximate the true CQ-coefficients as obtained from a full-length transform, (11) is the more favorable condition.

In our implementation, slicing of the signal is accomplished by a uniform partition of unity constructed from a Tukey window with essential length and transition areas of length , for some with (usually ). The slicing windows are symmetrically zero-padded to length , reducing time-aliasing significantly. The uniform partition condition (11) leads to close approximation of the full-length CQ-NSGT by sliCQ. This correspondence between the sliCQ and the corresponding full-length CQ-NSGT is made explicit in the following proposition, proven in Appendix 8.2.

Proposition 4.

Let be a nonstationary Gabor system for . Further, let be such that (11) holds and define , for all by

For , denote by the CQ-NSGT coefficients of with respect to and by the sliCQ coefficients of with respect to and . Then

(12)

for , with and .

Remark 2.

In practice, is chosen such that the translates are essentially concentrated in

i.e. , for all . Therefore, the value of (12) is negligibly small. While more precise estimates of the error are beyond the scope of the present contribution, numerical evaluation of the approximation quality is given in Section 5.3.

As a consequence of the previous proposition, we define the sliCQ spectrogram as and propose to simultaneously treat and , corresponding to the same time-frequency position, when processing the coefficients.

5. Numerical Analysis and Simulations

In this section we treat the computational complexity of CQ-NSGT and sliCQ and how they compare to one another. In [21] it was shown that despite superlinear complexity, CQ-NSGT outperforms state-of-the-art implementations of the classical constant-Q transform. Since sliCQ is a linear cost algorithm, it further improves the efficiency of the CQ-NSGT for sufficiently long signals. Section 5.3 provides experimental results confirming the good approximation of CQ-NSGT by the corresponding sliCQ coefficients, cf. Proposition 4.

The CQ-NSGT and sliCQ Toolbox (for MATLAB and Python) used in this contribution is available at http://www.univie.ac.at/nonstatgab/slicq, alongside extended experimental results complementing those presented in Section 6.

5.1. Computation Time and Computational Complexity

We assume the number of filters in the CQ-NSGT to be independent of the signal length and Proposition 2 to hold, in particular . The support size of each filter depends on . Hence, the number of operations for Algorithm 1 is as follows:

With and bounded by , this can be simplified to .

The computation of the dual frame involves inversion of the multiplication operator and applying the resulting operator to each filter. This results in operations, where the support of the was taken into account.

Complexity of Algorithm 2 can be derived to be , analogous to Algorithm 1.

For (Algorithm 3), we assume the slice length to be independent of , resulting in a computational complexity of

Both the dual frame and can be precomputed independent of , whilst Algorithm 4 is of complexity , analogous to Algorithm 3.

5.2. Performance evaluation

Figure 4. Computation time versus signal length of the CQ transform (dark gray) and CQ-NSGT. For the CQ-NSGT we show separate graphs including (light gray), respectively neglecting prime signal lengths (black). Graphs show the mean performance (solid) and variance (dashed) over 50 iterations.
Figure 5. Computation time versus signal length of the CQ transform (dotted gray), CQ-NSGT (dashed gray) and various sliCQ transforms. The sliCQ transforms were taken with slice lengths 4096 (solid gray), 16384 (dotted black), 32768 (dashed black) and 65536 (solid black) samples.

A comparison of the CQ-NSGT algorithm with previous constant-Q implementations was given in [21]. Figure 4 reproduces and extends some of the results; it shows, for both the constant-Q implementation provided in [18] and CQ-NSGT, mean computation duration and variance for analysis followed by reconstruction, against signal length. The plot also illustrates the dependence of CQ-NSGT on the prime factor decomposition of the signal length .

Figure 5 illustrates the performance of sliCQ compared to the constant-Q and CQ-NSGT algorithms shown in Figure 4. Linearity of the sliCQ algorithm becomes obvious, deviations occurring due to unfavorable FFT lengths in . Performance improvements for increasing slice length can be attributed to the advanced nature of MATLAB’s internal FFT algorithm, as compared to the current implementation of the sliCQ framework.

The performance of the involved algorithms does not depend on signal content. Consequently, random signals were used in the performance experiments, although we implicitly assumed the signals to be sampled at  kHz. All the results represent transforms with bins per octave, minimum frequency  Hz and maximum frequency  kHz, in Section 6 a maximum frequency of  kHz is used instead. For a more comprehensive comparison of the CQ-NSGT to previous constant-Q transforms, please refer to [21]. Results for other parameter values do not differ drastically and are omitted.

All computation time experiments were run in MATLAB R2011a on a 3 Gigahertz Intel Core 2 Duo machine with 2 Gigabytes of RAM running Kubuntu 10.04 using the MATLAB toolboxes available at http://www.elec.qmul.ac.uk/people/anssik/cqt/ and http://www.univie.ac.at/nonstatgab/.

5.3. Approximation properties

Figure 6. SliCQ coefficient approximation error against the minimal admissible bandwidth for Set (top) and Set (bottom). All transforms use Blackman-Harris windows in the CQ-NSGT step. Solid and dashed lines represent long ( slice length) and short ( slice length) transition areas respectively, while colors correspond to the slice length: (light gray), (dark gray) and samples (black).

To verify the approximate equivalence of the sliCQ coefficients to those of a full-length CQ-NSGT and thus to a constant-Q transform, we computed the norm difference between and as in Proposition 4, for two sets of fundamentally different signals. Set contains random, complex-valued signals of samples length, while Set consists of music samples of the same length, sampled at  kHz each, covering pop, rock, jazz and classical genres. The signals of the second set are well-structured and often well-concentrated in the time-frequency plane, characteristics that the first set lacks completely.

For discretization reasons as well as to achieve good concentration of in Proposition 4, sliCQ implementations must impose a lower bound on the length of . Approximation results for various lower bounds on the filter length are summarized in Figure 6, showing the mean approximation quality over the whole set.

All errors are given in signal-to-noise ratio, scaled in dB:

Figure 6 shows that, independent of other parameters, a minimal filter length smaller than samples leads to a representation that is visibly different from, while values above samples yield coefficients that are largely equivalent to those of a constant-Q transform. We can see that the slice length itself has rather small influence on the results, while the interplay of slicing window shape, specified by the ratio of transition area length to slice length, and minimal filter length is illustrated nicely; remarkably, this ratio influences the approximation quality mainly for moderately well localized filters. This is in correspondence with the characterization given in (12): the circular overspill, given by the second term of the right hand side in (12), depends on the shape and support of the sum of two adjacent slicing windows, in particular for moderately well localized filters. If the windows are very well localized, the overspill is small independent of the particular shape of the slicing area. On the other hand, very badly localized windows make the distinct influence of the slicing windows negligible. Finally, a comparison of the top and bottom graphs in Figure 6 shows that the approximation quality is largely independent of the signal class. For Set the variance is generally negligible ( dB) and was omitted. Despite some outliers in Set , we have found the approximation quality to depend on the minimal filter length in a stable way, cf. Figure 7. These outliers can be attributed to signals particularly sparse (smaller error) or dense (larger error) in low frequency regions, where is least concentrated.

Figure 7. Coefficient approximation error (12) for all signals from Set and slice and transition length of , resp. samples. Line style indicates the minimal filter length: (dotted), (dashed) and (solid) samples.

6. Experiments on Applications

Experiments in [21] show how the CQ-NSGT can be applied in the processing of signals taking advantage of the logarithmic frequency scaling and the perfect reconstruction property. In particular, the transposition of a harmonic structure amounted to just a translation of the spectrum along frequency bins, while the masking of the CQ-NSGT coefficients allowed for the extraction or suppression of a component of the signal. In our experiment, we show that the two procedures can be used to modify a portion of a signal.

Figure 8. Masks for extracting a transient (top) and sinusoidal component (bottom) of the Glockenspiel signal. The gray level plot describes the amplitude of the mask, with black and white representing and , respectively.

Figure 8 shows masks for isolating a transient part and the corresponding sinusoidal part of a Glockenspiel signal, created using an ordinary image manipulation program. Therein, the layers paradigm has been used to be able to quickly switch on and off the masks in order to accurately adapt them to the CQ-NSGT representation of the audio. An “inverse mask” is also constructed for the remainder part of the signal, essentially decomposing the signal into transient, sinusoidal and background portions. The masks have been drawn in the logarithmic domain, to be able to handle the dynamics of the audio. They are linearly scaled in dB units, so that in the mask corresponds to ( dB) and corresponds to ( dB).

Figure 9. CQ-NSGT spectrograms showing an excerpt of the Glockenspiel signal before (top) and after transposition of a component (bottom).

While keeping the transient part, the isolated sinusoidal component of the signal is transposed upward by semitones, corresponding to frequency bins. The transient, the remainder, and the modified sinusoidal coefficients are then added and the inverse transform is applied to obtain the resulting processed signal. For ease of use, this process is done with a rectangular representation of the slices, obtained by choosing constant for all frequency bands which corresponds to a sinc-interpolation of the coefficients.

Figure 9 compares the CQ-NSGT spectrograms of the original and the modified signal, while Figure 10 shows the results for the same experiment using sliCQ transforms with different slice lengths. Note that the plots show the spectrogram of the synthesized signal, not the time-frequency coefficients before synthesis. Further, the exact same mask was used for CQ-NSGT and sliCQ transpositions. The sound files for this and other transposition experiments are available at http://www.univie.ac.at/nonstatgab/slicq. A script for the Python toolbox that executes the experiment, is available on the same page.

For synthesis, performed from modified coefficients, as opposed to mere reconstruction, an evaluation of the results is a highly non-trivial matter. This is due to the lack of a properly defined notion of accuracy or the existence of a target signal, not only for the algorithms presented here, but for any analysis/synthesis based signal processing framework. Thus, while the examples in this section should indicate that CQ-NSGT synthesis and sliCQ synthesis can produce results in accordance with intuition, an in-depth treatment of this subject is far beyond the scope of this article.

7. Summary and Conclusion

In this contribution, we have introduced a framework for real-time implementation of an invertible constant-Q transform based on frame theory. The proposed framework allows for straight-forward generalization to other non-linear frequency scales, such as mel- or Bark scale, cp. [9]. While real-time processing is possible by means of a preprocessing step, we investigated the possible occurrence of time-aliasing. We provided a numerical evaluation of computation time and quality of approximation of the true NSGT coefficients.

In analogy to the classical phase vocoder, phase issues have to be addressed, if CQ-transformed coefficients are processed, cp. [12, 13, 17]. While preliminary experiments using the proposed framework for real-life signals were presented, undesired phasing effects, mainly due to the contribution of a signal component to several adjacent filters, will be investigated in detail in future work. Furthermore, future work will consider the efficient realization of adaptivity in both time and frequency by varying the length of the preprocessing windows used for slicing.

8. Appendix

8.1. Derivation of CQ-NSGT properties

Proof of Proposition 1.

By Algorithm 1, we have

(13)

Since , only one element of the inner sum above is non-zero, for each . It follows that

(14)

Inserting into Algorithm 2 yields, for all ,

the discrete frame synthesis formula. By assumption, and are dual NSG frames and thus

Applying the inverse discrete Fourier transform completes the proof. ∎


Figure 10. sliCQ spectrograms showing an excerpt of the Glockenspiel signal after transposition of a component. The top plot was done with a slice length of and a transition area of samples, the bottom plot with a slice length of and a transition area of samples.
Proof of Proposition 2.

Denote by an interval of length , as in Section 2, containing the support of . By assumption

and . Note that the frame operator (2) can be written as follows

(15)

for all . Furthermore, with the characteristic function of the interval ,

and, obviously, . Inserting into (15) yields

(16)

With the sum bounded above and below, the inverse frame operator can be written as

(17)

Since the elements of the canonical dual frame are given by (3), this completes the proof. ∎

8.2. Derivation of sliCQ properties

Proof of Proposition 3.

According to Proposition 1, , the output of iCQ-NSGT in Step 9 of Algorithm 4 satisfies to . Since holds,

follows. ∎


Proof of Proposition 4 .

Since is obtained by sampling with sampling period , the (inverse) Fourier transform of is given by periodization of as follows:

(18)

Recall from (6) that the CQ-NSGT coefficients of with respect to are given by , while the CQ-NSGT coefficients of are, for and

(19)

where the final inner product is taken over . Observe that every can be written as with from and thus

(20)

Here,

(21)

Hence . The result follows from Cauchy-Schwartz’ inequality, applied to the case , observing independence from . ∎

Acknowledgment

This research was supported by the WWTF project Audio-Miner (MA09-024), the Austrian Science Fund (FWF):[T384-N13] and the EU FET Open grant UNLocX (255931). The authors wish to thank the reviewers for their extremely helpful and constructive remarks on the first version of the manuscript.

Footnotes

  1. Note that, if is an orthonormal basis, then is the identity operator.

References

  1. P. Balazs, M. Dörfler, F. Jaillet, N. Holighaus, and G. A. Velasco, “Theory, implementation and applications of nonstationary Gabor Frames,” J. Comput. Appl. Math., vol. 236, no. 6, p. 1481–1496, 2011.
  2. J. Brown, “Calculation of a constant Q spectral transform,” J. Acoust. Soc. Amer., vol. 89, no. 1, p. 425–434, 1991.
  3. J. C. Brown and M. S. Puckette, “An efficient algorithm for the calculation of a constant Q transform,” J. Acoust. Soc. Am., vol. 92, no. 5, pp. 2698–2701, 1992.
  4. A. Chebira and J. Kovacevic, “Life Beyond Bases: The Advent of Frames (Part I),” IEEE Signal Processing Magazine, vol. 24, no. 4, pp. 86–104, 2007.
  5. M. Cranitch, M. Cychowski, and D. FitzGerald, “Towards an Inverse Constant Q Transform,” In Audio Engineering Society Convention 120, 5 2006.
  6. I. Daubechies, A. Grossmann, and Y. Meyer, “Painless nonorthogonal expansions,” J. Math. Phys., vol. 27, no. 5, pp. 1271–1283, May 1986.
  7. M. Dolson, “The phase vocoder: a tutorial,” Computer Musical Journal, vol. 10, no. 4, pp. 11–27, 1986.
  8. R. J. Duffin and A. C. Schaeffer, “A class of nonharmonic Fourier series.” Trans. Amer. Math. Soc., vol. 72, pp. 341–366, 1952.
  9. G. Evangelista, M. Dörfler, and E. Matusiak, “Phase Vocoders With Arbitrary Frequency Band Selection,” in Proceedings of the 9th Sound and Music Computing Conference (SMC’12), Copenhagen, July 2012.
  10. H. G. Feichtinger and T. Strohmer, Gabor Analysis and Algorithms. Theory and Applications.   Boston: Birkhäuser, 1998.
  11. F. Jaillet, “Représentation et traitement temps-fréquence des signaux audionumériques pour des applications de design sonore,” Ph.D. dissertation, Université de la Méditerranée - Aix-Marseille II, 2005.
  12. J. Laroche and M. Dolson, “Phase-vocoder: about this phasiness business,” IEEE ASSP Workshop on Applications of Signal Processing to Audio and Acoustics 1997, pp. 4, October 1997.
  13. J. Laroche and M. Dolson, “Improved phase vocoder time-scale modification of audio,” IEEE Transactions on Speech and Audio Processing, vol. 7, no. 3, pp. 323-332, May 1999.
  14. J. Li, T. Nguyen, and S. Tantaratana, “A simple design method for near-perfect-reconstruction nonuniform filter banks,” IEEE Transactions on Signal Processing, vol. 45, no. 8, 1997.
  15. R. Marks, Handbook of Fourier Analysis and its Applications.   Oxford University Press, 2009.
  16. K. Nayebi, I. Barnwell, T.P., and M. Smith, “Nonuniform filter banks: a reconstruction and design theory,” IEEE Transactions on Signal Processing, vol. 41, no. 3, 1993.
  17. J. Roe, Lectures on Coarse Geometry, ser. University Lecture Series.   Providence, RI: American Mathematical Society, 2003, vol. 31.
  18. C. Schörkhuber and A. Klapuri, “Constant-Q toolbox for music processing,” in Proceedings of 7th Sound and Music Computing Conference (SMC’10), Barcelona, July 2010.
  19. I. Selesnick and I. Bayram, “Frequency-domain design of overcomplete rational-dilation wavelet transforms,” IEEE Trans. Signal Process., vol. 57, no. 8, pp. 2957–2972, 2009.
  20. J. O. Smith, “Audio FFT Filter Banks,” in Proceedings of 12th International Conference on Digital Audio Effects (DAFx-09), Como, September 2009.
  21. G. A. Velasco, N. Holighaus, M. Dörfler, and T. Grill, “Constructing an invertible constant-Q transform with non-stationary Gabor frames,” in Proceedings of 14th International Conference on Digital Audio Effects (DAFx-11), Paris, September 2011.
  22. J. Youngberg and S. Boll, “Constant-Q signal analysis and synthesis,” In IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP ’78), volume 3, pages 375 – 378, 1978.