In this app note we will explore the topic of modeling a physical device using DSP techniques.

Similar documents
DESC9115 Written Review 2: Digital Implementation of a Leslie Speaker Effect. Digital Audio Systems: DESC9115, Semester

DREAM DSP LIBRARY. All images property of DREAM.

SABOTAGE 3-BAND CROSSOVER FX [RACK EXTENSION] v. 1.0 MANUAL

Acoustic Doppler Effect

Processor Setting Fundamentals -or- What Is the Crossover Point?

MUS420 Lecture Time Varying Delay Effects

IT Series Woofers and Compression Drivers

ONLINE TUTORIALS. Log on using your username & password. (same as your ) Choose a category from menu. (ie: audio)

The SPD-SX provides four types of master effect. While performing, you can turn the [CONTROL 1] knob or [CONTROL 2] knob to vary the master effect.

NOZORI 84 modules documentation

Loudspeakers. Juan P Bello

MUS 302 ENGINEERING SECTION

What is Sound? Simple Harmonic Motion -- a Pendulum

BoomTschak User s Guide

9 A small tutorial. 9.1 Loudspeaker boxes

Distortions phase and temporal effects audio systems

Copyright 2009 Pearson Education, Inc.

Some say car audio tuning is an ART! System Setup. Digital Signal Processor

AR-112 SIDEWINDER -WARNING-

AM404. architectual. Large format mid/high horn. features. applications

PRELIMINARY. group S. M i cro W e dge M W 15 Speci f i cations. 2-Way full-range stage monitor See NOTES TABULAR DATA for details FEATURES DESCRIPTION

PRELIMINARY. group S. MicroWedge MW12 Specifications 2-WAY FULL-RANGE STAGE MONITOR FEATURES DESCRIPTION. CONFIGURATION Subsystem

Chapter 16 Sound. Copyright 2009 Pearson Education, Inc.

Structure of Speech. Physical acoustics Time-domain representation Frequency domain representation Sound shaping

Concepts in Physics. Friday, November 26th 2009

SOUND. Second, the energy is transferred from the source in the form of a longitudinal sound wave.

EQ s & Frequency Processing

OWNER S MANUAL. Model: 002-LESLIE PEDAL

3D Intermodulation Distortion Measurement AN 8

Owner s Guide. DB-303 Version 1.0 Copyright Pulse Code, Inc. 2009, All Rights Reserved

Acoustical Testing I Loudspeaker Study

The Sampling Theorem:

FLOATING WAVEGUIDE TECHNOLOGY

Pre-Lab. Introduction

Suppose you re going to mike a singer, a sax, or a guitar. Which mic should you choose? Where should you place it?

Sound Quality. Crossovers. High-Precision Stereo 2-Way/3-Way/ Mono 4-Way Crossover with Limiters, Adjustable Time Delays and CD Horn Correction

Laboratory Assignment 5 Amplitude Modulation

Important Safety Information

The Mimir. Enclosure and stuffing. Drive units

Chapter 19. Basic Filters

OCTAPAD SPD-30 Effects List

NJU26125 Application Note Acoustical Property Adjustment Procedure Manual New Japan Radio Co., Ltd

Introduction Unique Electronics

RaneNote 119 LINKWITZ-RILEY ACTIVE CROSSOVERS UP TO 8TH- ORDER: AN OVERVIEW

Sound waves. septembre 2014 Audio signals and systems 1

2-Way Active Crossover Model XOVER-2. Xkitz.com. User s Manual. Features. Rev 5.0

Owners Manual For The. Marquis HD. Loudspeaker System

EXOS TM. User s Manual. Electronic Crossover for the STATEMENT. Electrostatic Hybrid High Resolution Loudspeaker System. electronic crossover

ALTERNATING CURRENT (AC)

Overview of the EQ50 Filter Functions. Bypass Hardwire Bypass

3-Way Active Crossover Model XOVER-3. Xkitz.com. User s Manual. Features. Rev 2.1

How to use the. AutoStrobe 490. for Tap Tuning. by Roger H. Siminoff PO Box 2992 Atascadero, CA USA

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Date Period Name. Write the term that corresponds to the description. Use each term once. beat

Sound recording & playback

AUDIO EfFECTS. Theory, Implementation. and Application. Andrew P. MePkerson. Joshua I. Relss

How to Connect a Three-Way (Six Speaker) Legatia Speaker System to a 4-Channel Amplifier in a Quasi-Active Crossover Configuration

Resonant Self-Destruction

A White Paper on Danley Sound Labs Tapped Horn and Synergy Horn Technologies

The Logic Pro ES1 Synth vs. a Simple Synth

Shattered Glass Audio

What is Helix??? It s a

Low Pass Filter Introduction

Additional Reference Document

Synthesis Techniques. Juan P Bello

TECHNICAL WHITE PAPER THE BENEFIT OF USING SPEAKER TUNINGS FOR COMMERCIAL LOUDSPEAKERS

MEASURING DIRECTIVITIES OF NATURAL SOUND SOURCES WITH A SPHERICAL MICROPHONE ARRAY

Every design element crucial to LEGACY Series breath-taking dynamic range, clarity of sound and classic look has been faithfully preserved.

Project 2. Project 2: audio equalizer. Fig. 1: Kinter MA-170 stereo amplifier with bass and treble controls.

Acoustic Resonance Lab

Chapter 2 Signal Conditioning, Propagation, and Conversion

Infernal Noise Machine

Blackline F215. portable club. Two-way passive, vented trapezoidal enclosure with dual low frequency drivers

THANK YOU REGISTER ONLINE. ABM-EVO-IV - Front Panel Facilities

Finding the Prototype for Stereo Loudspeakers

SSE 26 SPECIFICATIONS

PowerCore 01 Manual. Manual for PowerCore 01

An Enclosure Design for TEBM35C10-4 BMR Loudspeaker Driver

A Low-Power Broad-Bandwidth Noise Cancellation VLSI Circuit Design for In-Ear Headphones

ECMA-108. Measurement of Highfrequency. emitted by Information Technology and Telecommunications Equipment. 4 th Edition / December 2008

Copyright 2012, Samson Technologies Corp. v2

How to Record & Mix Acoustic Guitars

[Q] DEFINE AUDIO AMPLIFIER. STATE ITS TYPE. DRAW ITS FREQUENCY RESPONSE CURVE.

Sound Design and Technology. ROP Stagehand Technician

Learning Objectives:

THE SPEAKER. The decibel scale is related to the physical sound intensity measured in watts/cm 2 by the following equation:

AP Homework (Q2) Does the sound intensity level obey the inverse-square law? Why?

PRODUCT SUPPORT. (516) USER (8737) Fax: (516) Triton Series Products

MaxxBass Development Recommendations

Copyright LinPlug Virtual Instruments GmbH, 2002 All rights reserved. User Guide

Application Note 7. Digital Audio FIR Crossover. Highlights Importing Transducer Response Data FIR Window Functions FIR Approximation Methods

NAME STUDENT # ELEC 484 Audio Signal Processing. Midterm Exam July Listening test

Chapter 2. Meeting 2, Measures and Visualizations of Sounds and Signals

AXIHORN CP5TB: HF module for the high definition active loudspeaker system "NIDA Mk1"

WPE 48N USER MANUAL Version1.1

Native Instruments B4 - OpenArt-System Edition

Operating Mode: PERFORMANCE Operating Range: Nominal Beamwidth: (rotatable) Horz 90 Vert 45 Axial Sensitivity (whole space SPL):

Operating Mode: PERFORMANCE 1 Operating Range: 57 Hz to 15 khz Nominal Beamwidth: (rotatable) Horz 120 Vert 60 Axial Sensitivity (whole space SPL):

VMS ML-2 Quick Start

EQUIVALENT THROAT TECHNOLOGY

Transcription:

Ross Penniman Introduction In this app note we will explore the topic of modeling a physical device using DSP techniques. One of the most distinctive sounds of popular music in the last 50-plus years has been the sound of the Hammond B3 organ. From lush, atmospheric textures, to screaming roars, the instrument has a wide range of expressive possibilities. Part of what makes the sound so unique, and so expressive, is that it is usually played through a rotating speaker, the most famous being those made by the Leslie company. For convenience we will refer to this speaker simply as the Leslie speaker. Rotary Speaker Sim is our plug-in that we will develop in this app note that simulates the sound of the Leslie speaker using digital signal processing. While this plug-in is by no means a perfect re-creation of the original, we will try to capture the most prominent features of the sound while retaining a relatively low complexity. The great majority of the technical information needed to create this plug-in can be conveniently found in an article by Clifford Henricksen [1]. The information in said article pertains to Leslie Models 122, 145, and 147. These models all share similar features: a single-channel 40-watt tube amplifier, an 800 Hz passive crossover, a rotating treble horn, and a bass speaker that fires into a rotating drum-shaped baffle (see Fig. 1). Modeling Techniques As we begin a plan of how to create a model of the Leslie speaker, it is best to look at the major features of the Leslie sound and how they can be emulated using DSP techniques. Fig. 1: The back side of a Leslie Model 147 speaker. The first feature to simulate is the tube amplifier which powers the speakers. The saturation of this amplifier is an important part of the sound, so it is simulated using a waveshaper based on the equation: 1 y(n) = ( ) arctan(k x(n)) arctan(k) In this equation (from [2], p. 497), the amount of distortion can easily be altered by changing the value of k.

The rotating treble horn is by-and-large the essence of the Leslie sound. The basic idea is that the sound is reproduced from a compression driver connected to a horn that spins in a circle. As the horn moves closer or further away from the microphone (in this case a simulated microphone), there are three things that happen. 1) Due to the motion of the horn, there is a small Doppler shift in the pitch. As the horn is moving towards the microphone, the pitch rises, and as the horn moves away, the pitch falls. In musical terms, this creates frequency modulation, or vibrato. 2) Due to the narrow directivity of the horn, and the changing distance between the horn and the microphone, the loudness of the sound changes with time. This creates an amplitude modulation, or tremolo effect. 3) Also due to the directivity of the horn, the tonal quality, or timbre, changes as the horn alternately points towards or away from the microphone. When the horn is pointing away, the high frequencies will be muffled, as they are much more directional than the low frequencies. It should be mentioned that while the treble rotor has two horns facing in opposite directions, only one of them produces sound. The other is simply a counter balance to keep the whole assembly from wobbling as it spins. Fig. 2: Geometry of simulated rotating horn and microphones. Zero-degree axis points to the right. A complete physical model of the speaker and all possible microphone positions could be difficult to design, and computationally expensive to implement, so we can make a few simplifications. The pick-up of sound is assumed to be two virtual microphones placed at the corners of a square which inscribes the path of the rotating horn (as shown in Fig. 2). These microphones are assumed to be omnidirectional with flat frequency response and are placed in anechoic surroundings (not very realistic, but it saves quite a bit of additional DSP). The three features described above are simulated, respectively, by the following methods: 1) A circular delay buffer is used to simulate the propagation time from the mouth of the horn to the left and right microphones. As the delay time shortens and lengthens, the Doppler effect will happen automatically. Only one delay line is needed since there is only one source. The left and right signals each have their own read index which moves independently through the buffer. 2) The relative distance between the horn and microphones is used as the basis for the amplitude (tremolo) effect. This will be applied as a simple modulated gain. 3) A second order Butterworth low-pass filter with changing cutoff frequency is used to simulate the tonal modulation effect.

Fig. 3: Block diagram of the Rotary Speaker Sim algorithm In addition to these dynamic elements, it is also important to emulate the static frequency response of the horn. The real Leslie speaker exhibits a strong band-pass characteristic centered at 2 khz [1]. We will simulate this using a peaking filter with a center frequency of 2 khz and gain of 10 db. The crossover between the treble and bass speakers is a passive circuit with a crossover frequency of 800 Hz. We will implement this using a second order Linkwitz-Riley crossover. In a real Leslie speaker, the bass driver fires downward into a scoop-shaped baffle that is mounted inside a rotating drum. When the scoop is facing out toward the open side of the cabinet, the sound is un-inhibited, however when the scoop is facing in toward the closed side the cabinet, the sound is muffled, and reduced in volume. The modulation effect of the rotating baffle is simulated using a tremolo effect with an envelope that has a sinusoidal shape in decibels. However, not all frequencies are affected equally by the baffle. Frequencies below 200 Hz are likely unaffected because of their long wavelength and acoustic energy. Thus, there is an additional Linkwitz-Riley crossover to separate the modulated bass from the un-modulated bass. Because of the phase response of the crossover, the higher, modulated, signal is inverted to assure the correct frequency response when the signals are recombined. One of the advantages of having a modeled device is that you can adjust parameters that are fixed on the real thing. A convenience feature we can put in is the ability to balance the overall levels of the bass and treble signals before they are combined into the final stereo output. Refer to the block diagram in Fig. 3 to see the algorithm as a whole. Geometry Calculation At any instance in time, there are two values that must be computed for each virtual microphone: the distance between the mouth of the horn and the microphone, and the angle between the same. Fig. 2 shows the geometry used to solve for the distance and angle, the 0 degree axis points to the right. This distance can be calculated by the following equations: x L = r h + r h cos θ x R = r h r h cos θ

y = r h + r h sin θ d L = x L 2 + y 2 d R = x R 2 + y 2 Fig. 4: Distance between the treble horn and each microphone, with respect to rotation angle. Where θ is the rotation angle, x L and x R represent the x distance to each microphone, r h is the radius of the horn, and d L and d R represent the total distance to each microphone. The distance is the basis of the frequency and amplitude modulation (see Fig. 4). When the horn is pointed directly at the microphone the angle between them is 0 degrees, and when pointed directly away, this angle is 180 degrees. The left microphone has a rotation angle of -135 degrees, and the right microphone has a rotation angle of -45 degrees. The angle between horn and microphone is the basis of the tonal modulation (see Fig. 5). Motor Control Fig. 5. Angle between treble horn and each microphone, with respect to rotation angle. and are not synchronized. In addition, one of the distinctive characteristics of the Leslie speaker is that it has both a fast and a slow speed. The change in sound as it accelerates or decelerates is a much-loved expressive feature. The plug-in has an auto speed control mode that allows the user to choose between Off, Slow, and Fast for the desired speed. The plug-in will accelerate and decelerate the rotation according to parameters set by the user. Once the target rotation speed is reached, it will remain constant until another speed is selected. The treble and bass rotor are controlled separately so that they can have separate acceleration/deceleration speeds Controls The parameters for the plug-in are as follows:

Input Drive (distortion level) Treble Rotational Speed (in RPM) Treble Horn Radius (in feet) Treble Amplitude Modulation Depth LPF Modulation Depth (in octaves) LPF Center-Cutoff Frequency Treble Horn Resonance Center Frequency Treble Horn Resonance Gain Bass Rotational Speed (in RPM) Bass Amplitude Modulation Depth Bass to Treble Crossover Frequency Overall Treble Volume Overall Bass Volume In addition, if the user selects automatic speed control, the manual rotational speed controls for bass and treble are disabled, and instead the user can adjust the acceleration and deceleration time (in seconds) for the bass and treble rotation. Key Functions Following through the block diagram we will discuss the basic techniques of coding this plug-in. The complete code is given in the project files. The first item, the waveshaper, is a single equation and does not require further explanation. The two sets of Linkwitz-Riley crossovers are handled by means of four CBiQuad objects called mhornhpf, mbasslpf, mbasshpf, and mbypasslpf. The coefficients for these filters are calculated in the crosscoeffs function. The design equations for the filters can be found on p. 186 of [2]. The modulated delay buffer has a single write index mdwriteidx, and two read indices, mfreadidxl, and mfreadidxr. The write index simply increments one step each time processaudioframe is called, and wraps when it reaches the end of the delay buffer. The read function is where the work is done, it uses linear interpolation to obtain fractional delay outputs from the delay buffer: void CRotarySpeakerSim::getDelOutputs() // This function uses linear interpolation to obtain fractional delay // outputs from the delay buffer. int mdreadidxl0, mdreadidxl1, mdreadidxr0, mdreadidxr1; float fracdel; // Left Channel // calc indicies mfreadidxl = (float)mdwriteidx - mfdelayl; mdreadidxl0 = (int)floorf(mfreadidxl); mdreadidxl1 = mdreadidxl0 + 1; fracdel = mfreadidxl - (float)mdreadidxl0;

// wrap indicies if (mfreadidxl < 0) mfreadidxl += mdbuffersize; if (mdreadidxl0 < 0) mdreadidxl0 += mdbuffersize; if (mdreadidxl1 < 0) mdreadidxl1 += mdbuffersize; // interpolate output mfdeloutl = ((1.0 - fracdel) * mpdelaybuf[mdreadidxl0]) + (fracdel * mpdelaybuf[mdreadidxl1]); // Right Channel // calc indicies mfreadidxr = (float)mdwriteidx - mfdelayr; mdreadidxr0 = (int)floorf(mfreadidxr); mdreadidxr1 = mdreadidxr0 + 1; fracdel = mfreadidxr - (float)mdreadidxr0; // wrap indicies if (mfreadidxr < 0) mfreadidxr += mdbuffersize; if (mdreadidxr0 < 0) mdreadidxr0 += mdbuffersize; if (mdreadidxr1 < 0) mdreadidxr1 += mdbuffersize; // interpolate output mfdeloutr = ((1.0 - fracdel) * mpdelaybuf[mdreadidxr0]) + (fracdel * mpdelaybuf[mdreadidxr1]); return; The coefficients for the low-pass filters (LPF s) are calculated using the design equations given on p. 183 of [2] in the function calccoeffs. This function is called from the updatetheta function (discussed soon) which is also called on every iteration of processaudioframe. The coefficients for the horn frequency response are calculated using the constant Q peaking filter design equations given on pp. 192-193 of [2]. The function for calculating these values for the horn filter is called calchorncoeffs. As mentioned, the updatetheta function handles the calculation of geometry as well as relating the horn position to delay, cutoff frequency, and amplitude modulation. The first half of the function is given here: void CRotarySpeakerSim::updateTheta() float xbase = mfhornrad1 * cos(mftheta); float xtl = mfhornrad1 + xbase; float xtr = mfhornrad1 - xbase; float yt = mfhornrad1 + (mfhornrad1 * sin(mftheta)); // Distance to source mfdelayl = sqrtf((xtl*xtl) + (yt*yt)); mfdelayr = sqrtf((xtr*xtr) + (yt*yt)); // Compute amplitude modulation mfampll = mfamplmod*(mfhornrad1 - mfdelayl)/mfhornrad1; mfamplr = mfamplmod*(mfhornrad1 - mfdelayr)/mfhornrad1; float fcleft = 0.5 + (mfhornrad1 - mfdelayl)/mfhornrad1; // ~ +/-1

float fcright = 0.5 + (mfhornrad1 - mfdelayr)/mfhornrad1; // Convert amplitude modulation to gain factors mfgainl = powf(10.0, (mfampll/20.0)); mfgainr = powf(10.0, (mfamplr/20.0)); // Convert delay to samples mfdelayl *= (float)m_nsamplerate/mfspdsound; mfdelayr *= (float)m_nsamplerate/mfspdsound; // Update Fc values and filter coefficients fcleft = mftreblpffc * powf(2.0, mftreblpfmoddepth*fcleft); fcright = mftreblpffc * powf(2.0, mftreblpfmoddepth*fcright); calccoeffs(fcleft, fcright); The second half of the updatetheta function has to do with the automatic speed control. It increments the current speed if the horn is accelerating, and decrements the speed if it is braking. You may also notice a few commands in there that deal with the horn radius. This is because I found that a smaller horn radius sounds better at high speed, which a larger horn radius sounds better at low speed. The final step is to increment mftheta, which is the actual variable that keeps track of the horn position. // Auto Speed Control if (buseautospeed && bspeedchange) if (bspeedaccel) mfcurspeed += mfspeedinc; mfhornrad1 = mfslowhornrad - (mfhornrpmtoradconv * (mfcurspeed - mfslowspeed)); if (mfcurspeed >= mfspeedtarget) bspeedchange = FALSE; sendstatuswndtext("speed Accel Finished"); else // Decelerate mfcurspeed += mfspeeddec; mfhornrad1 = mfslowhornrad - (mfhornrpmtoradconv * (mfcurspeed - mfslowspeed)); if (mfcurspeed <= mfspeedtarget) bspeedchange = FALSE; sendstatuswndtext("speed Brake Finished"); // Convert from RPM to rad/sample mfthetainc = (2.0*pi*mfCurSpeed)/(60.0*(float)m_nSampleRate); // increment and wrap mftheta += mfthetainc; if (mftheta > (2.0*pi)) mftheta -= (2.0*pi);

return; It is worth noting that there is also a function to handle the rotation of the bass element, called updatebasstheta. This function is similar to updatetheta, but is much simpler, since the bass element only uses amplitude modulation. Another key part of the automatic speed control is how the logic is handled for selecting different speeds. This is part of the userinterfacechange function. The radio buttons in question are control number 42. case 42: if (buseautospeed) // ignore new data if speed is manual if (muautospeed == OFF) mfspeedtarget = mfoffspeed; mfspeedtargetb = mfoffspeedb; else if (muautospeed == SLOW) mfspeedtarget = mfslowspeed; mfspeedtargetb = mfslowspeedb; else if (muautospeed == FAST) mfspeedtarget = mffastspeed; mfspeedtargetb = mffastspeedb; // Determine if treble rotor is accelerating or decelerating if (mfcurspeed > mfspeedtarget) bspeedaccel = FALSE; bspeedchange = TRUE; else if (mfcurspeed < mfspeedtarget) bspeedaccel = TRUE; bspeedchange = TRUE; else bspeedchange = FALSE; // Determine if bass rotor is accelerating or decelerating if (mfcurspeedb > mfspeedtargetb) bspeedaccelb = FALSE; bspeedchangeb = TRUE;

else if (mfcurspeedb < mfspeedtargetb) bspeedaccelb = TRUE; bspeedchangeb = TRUE; else bspeedchangeb = FALSE; break; Final Thoughts The only way to really understand something is to spend some time working through the code, which is why I have not tried to explain every detail. The source code is provided so that you can understand the remaining details for yourself. The distortion produced by the wave shaper is an important part of the sound, but it can also be problematic. Since it is a non-linear process, it adds additional (higher) frequencies to the signal coming in. This has the potential to cause aliasing, which is a very unpleasant sound. Ideally, oversampling should be used to eliminate this possibility. Fortunately, in the intended usage of this plug-in, the problem is not readily noticeable as tone-wheel organ sounds often lack strong high frequency components and distortion levels are often kept to a moderate level. References: [1] C. Henricksen, Unearthing the Mysteries of the Leslie Cabinet Recording Engineer/Producer, April 1981. (also available on-line at: http://www.theatreorgans.com/hammond/faq/mystery/mystery.html) [2] W. Pirkle, Designing Audio Effect Plug-Ins in C++, Focal Press, 2013