Aliasing Reduction in Soft-Clipping Algorithms

Aliasing Reduction in Soft-Clipping Algorithms

23rd European Signal Processing Conference (EUSIPCO) ALIASING REDUCTION IN SOFT-CLIPPING ALGORITHMS Fabian´ Esqueda∗, Vesa Valim¨ aki¨ Stefan Bilbao Aalto University School of Electrical Engineering Acoustics and Audio Group Dept. of Signal Processing and Acoustics University of Edinburgh Espoo, Finland Edinburgh, UK ABSTRACT components exceed the Nyquist limit, the components are re- Soft-clipping algorithms used to implement musical distor- flected back into the baseband, causing aliasing. In this work, tion effects are major sources of aliasing due to their nonlinear we will concentrate exclusively on static memoryless distor- behavior. It is a research challenge to design computation- tion algorithms. ally efficient methods for alias-free distortion without over- Aliasing causes severe undesired distortion, inharmonic- sampling. In the proposed approach, soft clipping is decom- ity and beating. Nevertheless, if the aliased components are posed into a hard clipper and a low-order polynomial part. A sufficiently attenuated, they become inaudible [3]. Currently technique for aliasing reduction of the hard-clipped signal is available methods to prevent aliasing in nonlinear systems in- presented based on a polynomial approximation of the ban- clude oversampling and the harmonic mixer [4]. However, dlimited ramp function. This correction function operates by these techniques represent a considerable increase in compu- quasi-bandlimiting the discontinuities introduced in the first tational costs [5]. For instance, sampling rates in the range derivative of the signal. The proposed method effectively re- of several MHz are necessary to remove aliasing above −100 duces perceivable aliasing in soft-clipped audio signals hav- dB relative to full scale [6]. ing low frequency content. This work presents the first step Aliasing in clipped signals can be attributed to the dis- towards alias-free implementations of nonlinear virtual ana- continuities introduced in the derivatives of the signal, which log effects. require an infinite bandwidth to be represented digitally. A Index Terms— Audio signal processing, antialiasing, similar problem arises in the field of digital subtractive syn- music, nonlinear distortion thesis, where periodic signals of a simple geometric form are typically used as source waveforms [3]. Since these signals 1. INTRODUCTION are inherently discontinuous, synthesizing them trivially gen- erates aliasing. One solution is to replace each step-like dis- Music technology is one of the few fields of electronics in continuity in the waveform with a bandlimited step function which digital signal processing has not yet managed to fully (BLEP) [3, 7, 8]. This study proposes a similar approach, in displace traditional analog systems. Musicians still tend to which the discontinuities introduced in the derivatives of the favor analog audio equipment over their digital counterparts signal are replaced with bandlimited versions of themselves. due to their alleged distinctive tonal qualities [1]. However, This proposed solution consists of a two-stage system in analog systems also have the disadvantage of being expen- which the input signal is pre-processed by a hard clipper be- sive, bulky and hard to acquire. Therefore, it is desirable to fore entering the soft-clipping stage. Between the two stages, emulate their behavior in the digital domain, where more flex- aliasing generated by the hard clipper is attenuated using a ibility is available and costs can be significantly reduced [2]. polynomial correction function modeled after the ideal ban- Distortion is an example of a popular audio effect com- dlimited ramp function (BLAMP). This BLAMP function monly implemented using analog circuitry [1]. Historically, was originally proposed as a way to correct aliasing in tri- guitarists would achieve distortion by operating vacuum tube angular oscillators [8, 9]. The BLAMP method is proved to amplifiers at high gain levels, causing the output to saturate reduce the level of aliasing distortion seen at the output of [1]. This saturation would cut off portions of the waveform clipping algorithms. above or below certain threshold—a process known as clip- This paper is organized as follows. Section 2 deals with ping. Signal clipping is a nonlinear operation and thus in- the distinction between hard and soft clipping. Section 3 troduces frequency components not present in the original presents the derivation of the BLAMP correction function and signal. In the digital domain, when the frequencies of these proposes a polynomial approximation. Section 4 evaluates the ∗The work of Fabian´ Esqueda is supported by the CIMO Centre for Inter- performance of the proposed algorithm. Finally, some con- national Mobility and the Aalto ELEC Doctoral School. cluding remarks and perspectives appear in Section 5. 978-0-9928626-3-3/15/$31.00 ©2015 IEEE 2059 23rd European Signal Processing Conference (EUSIPCO) 1.5 0 Soft clipping 1 Hard clipping 0.5 −20 1 −40 Operation region 0 −60 −0.5 −80 0.5 Magnitude (dB) −1 −100 0 18 35 53 71 0 5 10 15 20 0 Time (samples) Frequency (kHz) Output (a) (b) −0.5 1 0 0.5 −20 −40 −1 0 −60 −0.5 −80 −1.5 −1 Magnitude (dB) −1.5 −1 −0.5 0 0.5 1 1.5 −100 Input 0 18 35 53 71 0 5 10 15 20 Time (samples) Frequency (kHz) (c) (d) Fig. 1. Input–output relationship for the hard clipper and the soft clipper designed by Araya and Suyama [11]. Fig. 2. Waveforms for a 1245 Hz sinewave with L = 0:6 (a) hard clipping, (c) soft clipping and their respective magnitude 2. ALIASING IN CLIPPING ALGORITHMS spectra (b) and (d). The circles indicate non-aliased compo- nents, which correspond to harmonic distortion. Signal clipping can be divided into two types: hard and soft. In hard clipping, signal values that exceed a predetermined threshold are set to a maximum value (positive or negative), For the sake of simplicity, we assume normalized input sig- creating a sharp edge followed by a flat region. This sharp nals (i.e. bounded between [−1; 1]). Therefore, in order to im- edge generates a discontinuity in the first derivative of the plement any arbitrary clipping level, L, the signal must first signal. In soft clipping, the transition between non-clipped be scaled by a factor 1=L before being processed by either to clipped samples is made gradual rather than abrupt, usu- one of the aforementioned clipping functions. The resulting ally by a low-order polynomial transition region. As a result, waveform must be then scaled by L to return to the original the signal will now be continuous in its first derivative and range. Fig. 2 shows the waveform and frequency spectrum of aliasing will be significantly lower than in the hard clipping a 1245 Hz sinewave clipped using (1) and (2). A sampling fre- case. In general, if all derivatives up to the kth derivative are quency of 44.1 kHz (standard for audio) was used for this and continuous, the frequency spectrum will decrease at approxi- the rest of the examples in this paper. As expected, the level mately 6(k + 1) dB per octave [10]. of aliasing distortion seen at the output of the hard clipper Digital distortion is usually implemented using soft clip- (see Fig. 2b) is much more dramatic than its soft counterpart ping algorithms. In addition to the improved frequency re- (see Fig. 2d). Nevertheless, the soft-clipped signal still shows sponse in terms of aliasing, soft clipping is usually perceived clear aliasing issues throughout its spectrum. as having a “smoother” sound than the hard clipper, which is usually described as being “harsh” and “tinny”. Fig. 1 com- 3. PROPOSED ALIASING REDUCTION METHOD pares the input–output relationships of a hard clipper and a third-order soft clipping function. The static soft clipping The main challenge when designing a correction function for function cs(x) used in this example was designed as part of a soft-clipped signals is finding a solution that fits all problems. multi-effects processor by Yamaha [11]. It is defined as In the previous section, we used a third-order function to per- form soft distortion; however, soft clippers come in different 3x x2 cs(x) = 1 − ; (1) shapes and sizes. There is no standardized form to implement 2 3 them. Fortunately, this is not the case for the hard clipper, where x is the input signal and is defined between [−1; 1]. which can only be implemented as defined by (2). Since the This cubic algorithm exhibits a fairly linear behavior for low first derivative of a hard-clipped signal will always be discon- input levels and a smooth curve as it approaches its maximum tinuous, we can design a general correction function based operation values of -1 and 1. The function for hard clipping, on this information. Therefore, if we wish to apply soft clip- ch(x), can be defined as ping to a signal we can pre-process it using a hard clipper and ( its correction function. This approach, while unconventional, x if jxj < 1 yields output signals with significantly less aliasing distor- ch(x) = (2) sgn(x) otherwise. tion. Fig. 3 shows the block diagram for the proposed sys- 2060 23rd European Signal Processing Conference (EUSIPCO) 1 0.5 BLAMP x[n] y[n] 0 correction −0.5 −4T −3T −2T −T 0 T 2T 3T 4T (a) 1 Fig. 3. In the proposed system, the input signal is first hard- 0.5 0 clipped and corrected using the polyBLAMP method before −4T −3T −2T −T 0 T 2T 3T 4T entering the soft-clipping stage of the system. (b) 4T 2T tem. The following subsections detail the derivation of the −4T −3T −2T −T 0 T 2T 3T 4T BLAMP correction stage of the system. (c) 0.1T 0.05T 3.1. Ideal Bandlimited Ramp Function 0 −0.05T −4T −3T −2T −T 0 T 2T 3T 4T In hard-clipped signals, discontinuities in the first derivative (d) Time (s) are caused by sharp edges or corners introduced on the wave- form.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us