Microcontroller Based Control Signal Generation for use in Valve Audio Dynamic Range Compression Applications Armando Cevolatti, School of Electrical and Computer Engineering, RMIT University, Australia

Abstract—This paper explores the development of a valve variable gain amplifier and microcontroller based side-chain for use in an audio dynamic range compressor. The microcontroller algorithm has been implemented using the C programming language to emulate a typical peak sensing analogue compressor side-chain circuit. The resultant control signal is also demonstrated as suitable for real-time control of the gain of a semi-remote cut-off valve amplifier stage. Future work will see the development of unique microcontroller based side-chain algorithms as well as emulation of other analogue side-chain topologies such as opto-attenuator architectures.

A

This might be the natural attack and decay function of an opto-attenuator or the time constant of a modest resistorcapacitor (RC) circuit. The use of a standalone microcontroller allows for the emulation of a variety of sidechain architectures with in a single package and the potential development of unique side-chain characteristics while maintaining an analog audio signal path. II. SIDE-CHAIN EMUALATION

I. INTRODUCTION

UDIO dynamic range compressors operate to automatically control the amplitude of an audio signal in real time, faster and more predictably than can be achieved manually on a mixing console [1]. A typical compressor is comprised of two major elements; a sidechain circuit and a variable gain amplifier controlled by the side-chain circuit [2]. In a typical feed-forward compressor architecture, the side-chain detects the amplitude of the incoming audio signal; if the audio level exceeds a given threshold level, the side-chain generates a control signal that reduces the gain of the variable gain amplifier relative to over-threshold level of the incoming signal. This action typically occurs over a given period (in the order of milliseconds) known as the attack time. As the input signal amplitude decreases, the control signal level is reduced over a given period, generally greater than the attack time, known as the release time. Compression use is common in audio recording studios and is applied to a single track, a group of tracks, or stereo master track for either corrective or creative applications [1]. This paper focuses on the emulation of an analogue sidechain circuit within a standalone microcontroller to provide real time control of the gain of a semi-remote cut-off valve variable gain amplifier. The use of semi-remote cut-off valves as variable gain amplifiers in in compressors dates back to designs of the 1950’s such as the Fairchild 670 and remains popular in contemporary compressor designs. [3,4]. Along with the audio signal path and variable gain amplifier selection, side-chain architecture influences the sonic characteristic of the compressor, with particular sonic characteristics preferred for certain program material [5]. The side-chain characteristic is influenced by the audio detection method, be it RMS, peak or average sensing, along with the temporal characteristics of the side-chain circuit.

Fig 1. Functional block diagram of a typical analogue peak-sensing side-chain emulated using the Analog Devices ADuC7024.

An Analog Devices ADuC7024 precision microcontroller has been used to emulate the function of the typical sidechain circuit shown in figure 1 [1]. This microcontroller has been selected for its high-speed 12-bit ADC and 12-bit DAC peripherals [6]. The software is written in C using unsigned fixed point processing for transportability across a variety of microcontroller platforms. In order to optimize processing time, the algorithm has been constructed using simple compound and parabolic functions to emulate the complex exponential soft-knee and RC circuit transfer functions. This eliminates the need for calls to math.h library functions, or the use of extensive exponential function look up tables. The transfer function of the side-chain model can be described as an amalgam of the temporal and steady state transfer characteristics shown in figure 2 [2]. A. Signal Detection and Rectification The input audio signal, offset by ADC VREF/2 is read by an onboard 12-bit ADC into the variable inAudio. The negative portion of the audio signal swing is represented by values below 0x800, while values between 0x800 and 0xFFF represent positive going audio signals. The most significant bit of inAudio is toggled. The effect is two fold, shifting the range of positive going signals to between 0 and 0x7FF, while flagging negative going signals. In order to rectify the negative values, the compliment of the flagged value is found and the flag bit removed. The rectification process results in an 11-bit representation of the input audio signal instantaneous voltage.

(samples)

τatt'

τrel' '

Cout'

soft'knee' Soft knee: Klow
! ! ! ! ! ! ! ! ! ! ! !

R!

Sin' Klow'

T!

Khigh'

Cout' Sin;T'

D. Integration of Attack and Release Functions A compound function is used to emulate the exponential charge and discharge characteristic of the of the RC network. If C_out is found to be greater than C_outMem, Cout is adjusted to produce an inverse pseudo-exponential transfer function, similar to that of a charging RC network, with a time constant defined by the attack variable. Similarly, if C_out is less than C_outMem, C_out is adjusted to produce an exponential decay over a period defined by the release variable. E. Software Implementation

Cout'

! !

n(samples)' τrel' ' Fig. 2. Typical temporal and steady-state compressor side-chain transfer functions, where: Sin is the input signal amplitude, Cout is the control signal amplitude, T is the nominal threshold level, Klow is the lower limit of the soft knee curve, Khigh is the upper limit of the soft knee curve, CRout'is the compression ratio or slope, τatt is the control signal attack time and τrelease is the control signal release time.

τatt'

B. Generation of the Soft Knee Coefficient The soft knee function soft'knee' provides a graduation of the R! control signal gradient about the threshold. In an analogue hard'knee' system, this non-linear function can be realized through the exponential transfer characteristics of a diode at theSinonset of ' conduction [7]. Consequently, the fixed 300mV range of the Klow' T! Khigh' diodes soft knee characteristic results in a change in the relative span of the knee with respect to a change in the threshold in linear detecting circuits. The software has been designed to maintain a constant range, 3.5dB above (kneehigh) and 6dB below (kneelow) the nominal threshold (threshold) resulting in a linear symmetry about the threshold. A 13-bit knee coefficient knee_coeff is generated with respect to the amplitude of inAudio. As inAudio shifts between kneelow and kneehigh, knee_coeff increases linearly from 0 to 0x1FFF. C. Over Threshold Calculation The previous 24-bit control signal value is stored in variable C_outMem for use in the attack and release time integration. If inAudio falls within the knee function, the threshold is effectively shifted to kneelow. The 13-bit knee coefficient is multiplied with the 11-bit over threshold value (inAudio-kneelow) resulting in the 24-bit C_out. This multiplication squares the over threshold value resulting in a parabolic transfer function that emulates the exponential soft knee characteristic of a diode. The result must be halved to ensure continuity between soft-knee and regular over threshold operation. If inAudio exceeds kneehigh, the nominal threshold is used for over threshold calculation.

Figure 3 lists the C program code described. All variables used are unsigned integer type, up to 24-bit. Code directly related to the ADC and DAC functions of the ADuC7024, ratio function and user interface have been omitted in the figure. In practical tests, the program was executed using a timer interrupt at a rate of 5.8kHz. As situations of equality between the subsequent C_out may produce ambiguous steady state values, calculations are executed at 24-bit. Therefore C_out must be logically shifted right 12-bits before being applied to the 12-bit DAC. At this stage a ratio coefficient can be applied to the control signal to modify the ratio (or slope) of the compressor transfer function. In turn, the DAC produces a control signal voltage between 0V and 3.3V. In the experimental model, the ADuC7024 was also used to control a basic user interface. Potentiometers fitted to unused ADC inputs of the ADuC7024 enable user input of threshold, ratio, attack and release variables while a ten LED peak program representation of the audio throughput, and a second ten LED matrix displaying instantaneous gain reduction values provide the user with instantaneous visual feedback of the compressors performance. inAudio ^= 0x800; if (inAudio & 0x800) inAudio = ~inAudio & 0x07FF; kneehigh = threshold + (threshold >>1); kneelow = threshold >>1; knee = kneehigh-kneelow; knee_coeff = 0x1FFF; if ((inAudio > kneelow) && (inAudio < kneehigh) { knee_coeff *= (inAudio - kneelow); knee_coeff /= knee; } if (inAudio < kneelow) knee_coeff = 0x0000; C_outMem = C_out; C_out = 0x0000; if (knee_coeff != 0x1FFF) C_out = ((knee_coeff) * (inAudio - kneelow))>>1; else if (inAudio > threshold) C_out = knee_coeff * (inAudio - threshold); if (C_out > C_outMem) C_out = C_outMem + ((C_out - C_outMem)/(attack)); else C_out = C_outMem - ((C_outMem - C_out)/(release));

Fig. 3. C implementation of the soft-knee peak-detecting side-chain emulation algorithm executed in the ADuC7024.

III. VARIABLE GAIN VALVE AMPLIFIER As a consequence of the graduated spacing of the grid electrode helix, the amplification factor (µ) of a semi-remote cut-off triode such as the 12AT7 (ECC81) can be controlled by varying the bias voltage VGK applied between the valve grid and cathode [8]. In the circuit shown in figure 4 the operational amplifier output connects to the cathode of each triode in the long-tailed-pair via a 300Ω cathode resistor RK (R4). 470kΩ resistors are used to hold the grid of each triode at 0V. Under normal bias conditions, the operational amplifier output is set to 0V, resulting in 10mA of current through RK, producing VGK of -3V. As the control signal is increased, VGK decreases and so to does the gain of the circuit as the operating point approaches cut-off.

attack time could be adjusted between approximately 0.28msec and 119msec, while the release time could be adjusted between 37msec and 2200msec. The threshold level was adjustable over a 40dB range. Simulation results indicate that the ADuC7024’s 0V to 3.3V DAC output scaled and buffered by an operational amplifier could be used to vary the gain of the 12AT7 longtailed pair circuit by up to 14dB. Figure 6 illustrates the simulated variation in output level for a given input signal with respect to control signal values of 0V, 1.1V, 2.2V and 3.3V applied to the circuit in figure 4.

Fig. 6. Simulation result illustrating the output of the circuit in figure 4 for a common input signal with control signal voltages of 0V, 1.1V, 2.2V and 3.3V applied.

V. CONCLUSION

Fig. 4. Variable gain amplifier circuit based on a long tailed pair circuit using semi-remote cut-off valves, the microcontroller DAC control signal is applied via an operational amplifier. IV.

RESULTS

This paper has demonstrated the development of a microcontroller-based algorithm to emulate a typical peak sensing audio dynamic compressor side-chain circuit. Many other existing analogue side-chain topologies could similarly be explored, including RMS detection models such as optoattenuator based side-chains topologies. Furthermore, there is potential to design novel side-chain algorithms that extend beyond the capabilities of analogue circuits as demonstrated in this paper through the application of a constant relative knee-to-threshold function. The application of a microcontroller based side-chain is not limited to use with a semi-remote cut-off valve variable gain amplifier stage, and could similarly be applied to solid-state audio signal path designs. REFERENCES [1] [2] [3]

Fig. 5. Steady-state and temporal control signal function measured at the ADuC7024 DAC output.

Figure 5 illustrates the measured temporal and steady state control signal output of the microcontroller DAC. The steady state transfer function was generated in response to a 2kHz sine wave with linearly increasing amplitude applied at the ADC input. The temporal transfer function was generated in response to a 200msec 2kHz pulse at the ADC input. Using the user interface potentiometers, the measured

[4] [5] [6] [7] [8]

A.Tutton, Ed. M. Talbot-Smith Audio Engineers Reference Book, Oxford: Focal Press, 1995 F. Floru “Attack and Release Time Constants in RMS-Based Feedback Compressors” in 104th Audio Eng. Soc. Convention, 1998 Fairchild Recording Equipment Corporation 670 Dual Limiter Schematic, New York: Fairchild Recording Equipment Corporation [Schematic Diagram] c1959 Manley Laboratories Inc. Manley Variable MU Stereo Limiter/Compressor, Manley Laboratories Inc. [Online (viewed 2012, Mar)] available at: http://www.manley.com/mslc.php M. Senior (2009, Sept.) Classic Compressors: Choosing the Right Compressor for the Job, Sound On Sound [Online] available at: www.soundonsound.com/sos/sep09/articles/classiccompressors.htm Analog Devices Inc, Precision Analog Microcontroller, 12-Bit Analog I/O, AMRTDMI® MCU: ADuC7019/20/21/22/24/25/26/27/28; Revision B. (Data Sheet), Analog Devices Inc, 2005 THAT Corporation “A simple/effective soft knee compressor limiter” Design Note 107/111 Revision 3, THAT Corporation, 2000 E. Lurch Fundamentals of Electronics, 2nd ed. NewYork: John Wiley and Sons Inc. 1971

Microcontroller Based Control Signal Generation for ...

microcontroller algorithm has been implemented using the C programming language to emulate a typical peak sensing analogue compressor side-chain circuit.

497KB Sizes 0 Downloads 109 Views

Recommend Documents

MSP430 Family Mixed-Signal Microcontroller ... - Texas Instruments
Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service ...... MSP430 in a Battery-Powered Personal Computer With Battery Management. 4-113 . . . . . . 4–70 ...... The

MSP430 Family Mixed-Signal Microcontroller Application Reports
TI warrants performance of its semiconductor products to the specifications applicable at the ... Specific testing of all parameters of each device is not necessarily.

106.MICROCONTROLLER BASED ANTI THEFT SECURITY ...
MICROCONTROLLER BASED ANTI THEFT SEC ... WORKS WITH NTEXT MESSAGE AS FEEDBACK.pdf. 106.MICROCONTROLLER BASED ANTI THEFT ...

VISION-BASED CONTROL FOR AUTONOMOUS ...
data, viz. the mean diameter of the citrus fruit, along with the target image size and the camera focal length to generate the 3D depth information. A controller.

VISION-BASED CONTROL FOR AUTONOMOUS ... - Semantic Scholar
invaluable guidance and support during the last semester of my research. ..... limits the application of teach by zooming visual servo controller to the artificial ... proposed an apple harvesting prototype robot— MAGALI, implementing a spherical.

VISION-BASED CONTROL FOR AUTONOMOUS ... - Semantic Scholar
proposed an apple harvesting prototype robot— MAGALI, implementing a ..... The software developed for the autonomous robotic citrus harvesting is .... time network communication control is established between these computers using.

Innovative Tools for Radar Signal Processing Based on ...
THALES AIR SYSTEMS, Surface Radar Business Line, Strategy Technology ... phone: +33. ... Mathematical literature) and its natural extension to “median.

A Web-Based Laboratory for Digital Signal Processing
interface directly accessible through Internet and employees a wide range of modern Web 2.0 .... The console output is generated as plain text and it is. Figure 1.

Search-Based Test Case Generation for Object-Oriented Java ...
Jul 16, 2008 - Java Software Using Strongly-Typed Genetic Programming. José Carlos ..... ObjectVector of JDK 1.4.2), the statistics show a clear re- duction in ...

Search-Based Test Case Generation for Object ...
Search-Based Test Case Generation for Object-Oriented Java Software Using Strongly-Typed Genetic .... Test data quality evaluation includes instrumenting the.

Model generation for robust object tracking based on ...
scription of the databases of the PASCAL object recogni- tion challenge). We try to overcome these drawbacks by proposing a novel, completely unsupervised ...

Metamodel-based Test Generation for Model ...
makes existing test techniques hard to use, especially for test data generation ... there are no precise stopping criteria to formally ensure that the transformation ...

Search-Based Test Case Generation for Object ...
Search-Based Test Case Generation for Object-Oriented Java Software Using Strongly-Typed ... half of the total costs involved in software development –.

Eikonal based region growing for superpixels generation
Dec 12, 2013 - Fast and accurate computer aided organ seg- mentation is more and ..... 481×312 (or 321×481) and approximately 10 ... dataset [10] consists of 20 CT 3D images. (volumes) .... proximately 0.01 seconds on a standard laptop.

Search-Based Test Case Generation for Object-Oriented Java ...
tal principle of OO programming known as data encapsulation. The goal of the evolutionary search is to find MCS that define interesting state scenarios for the variables which will be passed, as arguments, in the call to the MUT. The input domain thu

An Electroencephalogram Signal based Triggering ...
1 Department of Biomedical Engineering, SSN College of Engineering, Chennai, ... 2 School of Medical Science and Technology, Indian Institute of Technology, ...

An Electroencephalogram Signal based Triggering ...
Electronic equipment, Filters, Instrument amplifiers, Inte- grated circuits, Logic ... Most of the early FES devices were based upon pure ana- log designs which ...

Understanding MapReduce-based Next-Generation ... - GitHub
solutions leveraging algorithmic advances, tools and services, and .... Figure 1: PMR architecture and the workflow for a MapReduce task: The compute and data units are basic blocks of scheduling in Pilot abstractions ... network resources.

incentive-based resource allocation and control for ...
In this dissertation, we discuss four distinct models which address the issues ..... various features of “grid,” “utility,” and “cloud” computing, has received much re-.

Game-Based Admission Control for Wireless Systems
Our preliminary results show that these schemes have the potential ... mobile devices, by design, have only limited battery capac- ity. ... the signal-to-inference ratio (SIR) in the associated wireless channel. .... Thus, the latter point is the “

An Energy Based Two Level Prioritized Control for ...
an initial state to a desired state. For example, we can define a task for the center of mass (CoM) for balance control, or tasks for the end-effectors for motion tracking control. In a physics simulation environment, a VH body can be considered as a