Sunday, October 19, 2014

Fetishizing the Moog modulars

Lately I'm noticing a big surge of interest in the vintage modular Moogs. Now, this in itself is not a bad thing. It's a good thing, and not only from the historical preservation sense.  It's always good to have a perspective of history, and to see how Bob Moog and his compatriots made their decisions and went about doing things without access to all of the technology we have today. Remember, in 1963 when Moog and Buchla built their first modules, the integrated circuit was still largely confined to Fairchild Semiconductor's labs. The commercially package operational amplifier was a big ugly box that plugged into a tube socket and contained a pair of 12AX7 tubes inside it. There were no OTAs, no 4000 CMOS logic; Doug Curtis was in elementary school, and Ron Dow had not yet gone to Dave Rossum and Scott Wedge to beg for money (which was a good thing, since Rossum and Wedge were themselves high school students and didn't have any money).

Yes, things were different back then. Moog (and, independently, Buchla) had just thought of the idea of “voltage control”, in which he imagined that a generated signal might be able to remotely control the functioning of another circuit, thereby increasing the possibilities for more animation in electronic music, e.g., that the output of one oscillator could control the frequency of another in order to introduce vibrato, without a person having to constantly turn the frequency knob up and down. This was new territory; at first Moog had no idea how to do it with components that were available to him. As he attacked the problem, he made it work, but there were a lot of compromises: many components being made to do things that they weren't designed to; use of some expensive components which forced cost cutting in some other areas, and the necessity to keep the circuits confined to a reasonable sized package. There were also things to consider like what we now call the “user interface” was to function. (We all know the story of how the synthesizer came to be primarily a keyboard instrument: the switches of an organ keyboard, wired to a resistor grid, worked a lot better than primitive pitch-to-voltage converters and provided an interface that looked familiar to musicians.)

Consider Moog's first voltage controlled oscillator, the model 901A/B duo. At a list price of several hundred dollars in 1964, what you got for a 901B VCO was a basic oscillator with four waveform outputs. If you wanted volts/octave response (which was essential for any kind of tonal music), you had to also buy the separate 901A driver module which contained the exponential converter. And oh by the way, the VCO contained absolutely no temperature compensation, which meant you had to constantly re-tune as the circuits warmed up and/or the room temperature varied.

As another example, consider the Moog 904B VCF. Here's a photo of one:

Moog 904B.  Photo courtesy of David Brown at modularsynthesis.com

Note that it's a 2U wide module and how big it is and how much empty space there is on the panel. Why is it so big? Because the circuit board behind the panel needed to be that big in order to cram all of the circuitry in.  Here's another, more drastic example of that sort of thing:

Moog 905.  Photo courtesy of David Brown at modularsynthesis.com
This is the 905 reverb.  Lots of wasted panel real estate?  You bet.  It's that large because it uses a spring reverb tank, which is mounted in the module itself, right behind the panel.  Modern modulars that offer spring reverb modules mount the tank remotely, somewhere in the rear of the case.  Although, oddly, the Club of the Knobs reproduction of the 905 retains the same 2U wide panel design, even though it uses remote mounted tanks:

Club of the Knobs C905 reverb.  Photo from COTK's Web site.
This is taking authenticity to a bit of an extreme.  Clearly, a 1U panel would have been sufficient.  The Eurorack users always say that all of the large format modulars take up too much space, and this sort of thing doesn't help.

There were a lot of things about the Moog modulars that were different from today's modulars and made them not so easy to interface to or work with. Most Moog VCOs and other signal generators output a signal that is only 1.5V peak to peak. This I assume was a choice made based on typical use of signals as modulation sources, but, for example, it means that the output of a VCO or an envelope generator can't be made to drive a VCF though its full frequency range without being amplified.  For reasons totally unclear to me, MOS-LAB recently decided to go back to Moog's 1.5V standard for its reproduction of the 901B and 921B VCOs. 

MOS-LAB 921B VCO.  Photo courtesy of MOS-LAB.com
And there's the infamous S-trigger signals. On a Moog modular (and other vintage Moog synths such as the early Minimoogs), something that generates a trigger or gate signal does not output a voltage pulse. Rather, the output is a simple transistor that is saturated in the “low” or “off” state, shorting the output to ground, or cut off in the “on” or “high” state, which leaves the output “floating” electrically. The output expects that whatever trigger/gate input it is patched to will “pull up” the output by applying a voltage through a resistor. When the output is in the high state, its voltage rises to the pull-up voltage; when it is in the low state, it shorts the output to ground, and the pull-up resistor limits the current that flows to ground. We've all seen that the modular Moogs use the infamous “Cinch-Jones” two-bladed connector for trigger outputs and inputs, requiring a separate type of patch cord to connect them (and thus the modular Moogs do not have fully unified patching). This is why; if a trigger/gate input, with its pull-up, were inadvertently connected to a signal output, it could potentially damage the output circuit.  But it's a pain because of the special cable needed, and because you need an adapter to interface any external trigger or gate source.  Mercifully, neither MOS-LAB nor COTK has chosen to use the S-trigger on their Moog reproductions, even though the connector itself is still available

Moog 911 envelope generator; note Cinch-Jones gate input connector at bottom left.  Photo courtesy of David Brown at modularsynthesis.com
And last but not least, there's the cost of construction using those "authentic Moog" methods and circuits.  As I wrote above, there were a lot of places where the Moog designs had to use methods and techniques that were a lot more expensive (such as building op-amps out of discrete circuitry) because more capable components weren't available at the time.  Consider: Synthesizers.com offers two step sequencers -- the Q119 and the Q960.  The Q960 is a fairly faithful recreation of the Moog 960 sequencer design, up to and including the incandescent lamps which indicate the active stage (which most users replace with LEDs because the lamps burn out frequently).  The Q119, on the other hand, has most of the same capabilities and controls but is microprocessor controlled, and all of the indicator lamp are LEDs.  The two share many capabilities -- but the Q119 is about $300 less expensive, plus in order to duplicate the Q119's 24-step mode with the Q960, you need to add a Q962 sequential switch, at an additional $160. 


Moog 960 (top) and Synthesizers.com Q119 (bottom).  Top photo courtesy of David Brown at modularsynthesis.com; bottom photo courtesy of Synthesizers.com

So given all of the above, I'm starting to wonder if the current market isn't fetishizing the modular Moogs a bit much. Of course, the Dotcom/MU format was based on the physical dimensions of the original Moog modulars, and Roger Arrick's designs continue to take certain design cues from the Moogs, such as the black panel background and the knob style. But Arrick started out with fresh circuit designs using contemporary electronics technology. And he's no slave to the Moog look and feel; he has never hesitated to make a module smaller than the functionally equivalent Moog module when the circuit design allowed for it. The other notable thing was that Arrick avoided both the weird mix of power supply voltages and the edge connectors that Moog modules used; Synthesizers.com set the standard power for the MU format at +/- 15V and +5 volts, and the flexible power supply harness doesn't limit the modules' board mounting geometry the way the Moog edge connectors did. (The Dotcom MTA-100 power connectors are also a lot less prone to corrosion problems than the Moog edge connectors are.)  As for Club of the Knobs, they started out copying the Moog modules, but soon realized that simply duplicating the Moog lineup would be too limiting.  And although they continue to stick to the general Moog format, they have long since blown past the limitations of the original Moogs with module designs that Moog could never have thought of or implemented with the technology available at the time, such as the C950A MIDI interface / arpeggiator. 

That's why, to be honest, I really don't want to see a big comeback of slavish Moog-modular clones. Even putting aside the difficulties of obtaining exact replacements for the vintage Moog parts, the 1960s Moog modulars were just all-around limited compared to what is available today. Yes, it's great that Moog has been able to sell several of the $1.5M copies of the Keith Emerson modular; the units will instantly be valuable collector's items as well as being highly educational, and more power to Moog for being able to build them and sell them at that price. What bothers me is the people might get the idea that the 5U formats are all about duplicating what has been done in the past, with the implication being that you have to turn to the Euro format to find any modern or fresh ideas. That would be a self-limiting move for 5U.  And as someone who wants modern capabilities but prefers to work with 5U formats, I don't want to see that happen. 

Thursday, October 9, 2014

Review: Izotope Iris

Iris is a plug-in from Izotope, a company that's better known for products like Trash, Stutter Edit, and "make my track the loudest thing on the dial" mastering tools.  Despite what that might suggest, Izotope has a lot of background in Fourier analysis and spectral processing tools, and they put most of it into Iris.  The difference is, with Iris, you get to control it yourself. 

Iris employs a method of synthesis whose availability to the masses is relatively recent, and that I had no previous experience with -- spectral editing.  So when I first installed it and fired it up, I wasn't at all sure what to expect.  But I have been pleased, if at times a bit baffled, at the results I've gotten so far.  With that said, let's dig in.

Spectral Editing

What exactly is spectral editing?  Well, it involves taking a sample of a sound, and picking out bits of its spectrum over time that you want to reproduce, excluding the rest.  Iris presents a sample that you choose in a two-dimensional window, with time on the horizontal axis and frequency on the vertical axis.  Energy at a given time/frequency coordinate is represented by a pixel on the screen, with the brightness of the pixel indicating how much energy is present.  You use various methods of selecting regions of the time-frequency space that you want to reproduce.  Then, when you play the note, it reproduces the regions you select.

The User Interface

Here is a shot of the screen you are presented with when you first start the plug-in:

Iris initial view

The big window with the Izotope logo is where you will load a sample to edit.  The toolbar over to the left consists of drawing tools that you use to select regions to be reproduced.  The controls on the right allow you to select a layer, tune an edited sample, set up an amplitude envelope for the layer, and route modulations.  For each patch, Iris allows up to three layers, plus a "sublayer" which uses fixed waveforms but still allows for spectral editing.

The buttons at the top right switch between different views, or presentations of the user interface.  Any of the three layers or the sublayer may be selected for editing by clicking on the "1", "2", "3", or "Sub" buttons.  There are two other views available by clicking their buttons at the upper right of the window: the All view and the Mix view.  We'll discuss these views later.  For now, we'll concentrate on the single-layer view, which is where you will probably do most of your work.


Sample Loading and Manipulation

When you load a sample, either by dragging and dropping one into the window, or by selecting one from Iris' library via the browser, you are presented with a window that looks like this (click on the image to see a full size version):



(If you have a copy of Iris, the above sample is "SK8 Circuit Singer".)  What you're looking at here is a spectral energy (or power, if you want to think of it that way) display. 

Note the frequency scale along the left edge; it indicates that this sample has its highest-energy bands in the 1.5/2.0 KHz range.  If you look at the right side of the on-screen keyboard, you'll see a little tag at F#6; this indicates what the sample's "natural" note is, i.e., at what note the sample will play back with no pitch shifting.  You can click and drag this tag to change the setting.



Immediately above the sample window you can see a gray bar (shown above this text) with an arrow at each end.  You use this to set start, stop and loop points (although Iris will do it automatically, as will be explained later).  This is all fairly conventional and similar to other types of sample editors; it allows for one-shot, forward looping, and alternate forward-and-back looping.  The bar above this graphically portrays the sample's amplitude envelope, and the gray region indicates the bounds of the currently selected loop, which may be different from where the arrows are set if Iris has chosen the loop points automatically.  Below and to the left of the screen are rulers; the one on the left (see to the left of this text) displays frequency, and the lower one (below the next paragraph) displays sample word counts.  You can scroll the view horizontally and vertically by grabbing one of these rulers and dragging it.

(If the rulers don't appear, click on the wrench icon at the upper left to bring up the preferences dialog, and click on "Show Time Ruler" and/or "Show Freqeuncy Ruler", as you prefer.  You can also choose time or number-of-samples scales for the time ruler, and there are several choices of units for the frequency ruler.)  




Other tools for view manipulation are at the top left corner.  When you click on the top one (the one that looks like a screen with a magnifying glass over it), it zooms in or out enough to show you all of the drawing that you have done in the layer.  The second one (the magnifying glass with an X) does a full zoom out and shows you the entire sample.  The third one is an arbitrary zoom tool; when you click on it, you can draw the diagonal of a rectangle that you want to zoom in on.  The hand tool at the bottom is a scroll tool; click on it, and then you can grab and drag the content of the window.

Editing

(A note here: Izotope refers to edited/painted regions of spectral content as "selections".  To avoid confusion with the conventional use of the word "selection" in computer UI phraseology, I'm avoiding the term here; I'll refer to such areas as drawn/painted regions.)

You actually choose spectral content to be played by drawing in the window using the tools from the center left margin (shown to the right of this text).  A better analogy for most of the tools is actually painting; you move the tool and as you do so, it paints a certain area which is to be played.  The three tools at the top select rectangular areas.  The top tool paints a region of time; you choose the tool and then drag horizontally across the time band you want, and it paints all frequencies within the time band.  The third tool does the same for frequency bands; you drag up or down and it paints all content across time within that frequency band.  The middle tool selects as rectangular area.

(When you first load a sample, before you paint anything, if you play a note you will hear the unedited sample.  This is turned off when you do your first painting operation on the sample.  If you paint an area and then erase it, so that nothing is painted, you will hear nothing.)

The fourth tool, the brush tool, allows areas to be painted freehand.  Click and hold and move the mouse around to paint.  Painting is additive, so if you paint over any areas that are already painted, nothing happens.  You will notice when you select the brush tool that a slider control appears above the on-screen keyboard, just to the left of the word "KEYBOARD".  This allows you to set the brush diameter.

The bottom tool in the tool selection is the eraser.  It works similarly to the paintbrush, except that instead of painting, it un-paints already painted areas.  The size slider also works with the eraser.

The lasso tool allows you to cause an arbitrary-shaped area to be painted by drawing a boundary around it.  Click and hold and freehand the boundary.  If you don't complete the loop, it will be completed for you with a straight line connecting the start and end of your draw when you let the mouse button up.

The remaining tool is the "magic wand" tool.  This is a bit hard to explain and I don't quite have a handle on exactly what it does.  When you use it to click on a painted region, it will select content that is harmonically related and coincides in time with the region you selected.  So far, for me it's a "try it and see what it does" thing.

The next set of tools allow you to make bulk changes to the areas you have painted.  Iris maintains an idea of the bounds, with respect to frequency and time, of the areas you have painted.  When you click on the first one (with the horizontal areas) it inverts all of the painted and un-painted areas within the frequency bounds of where you have drawn.  Similarly, the tool with the vertical arrows inverts within the time bounds.  The one with the diagonal arrows inverts across the entire sample.  The last two tools, with the four arrows and the box with an X, paint or un-paint the entire sample, respectively.

The two tools below that are the undo and redo buttons for painting and drawing.  The bottom tool is a preview button; it plays the spectral-edited sample without any pitch shifting.

An example of an edited sample:


Note the four painted regions, including the narrow one at the bottom, and the two vertical dashed lines that indicate the loop start and end points.  These illustrate the results with various drawing tools: The area at the left was freehanded; the area at the lower right was drawn with the lasso tool, and the area at the upper right was drawn as a rectangle and then attacked by the eraser. 

Brushes and Erasers Don't Scale with Zoom

Note that when you zoom in or out in the view, the size selection for the brush and eraser tools doesn't scale; it remains the same on-screen width at all zoom levels.  This means that if you paint a line, zoom in, and then paint another line, the second one will be narrower than the first one.  

Auto Loop Points Adjustment

Whenever you do any drawing or add or alter painted regions, the sample loop points automatically move so as to move the leftmost and rightmost edges of all the painted regions.  This is done to eliminate periods of silence that would result if the entire sample were played.  Refer back to the above figure and notice how Iris has automatically set the loop points in this example, as indicated by the vertical dashed lines, and gray area in the waveform display above the editing window.  You can override this and set the loop points manually if you wish, and you can also set the sample start point independently of the left loop point.

Dragging Painted Regions

When any of the above drawing tools is selected, except for the eraser or magic wand, moving the cursor over an existing painted region causes the cursor to change to a hand icon.  When this occurs, you can grab and drag the region that the cursor is positioned over.  Note that Iris keeps track of contiguous painted regions, as indicated by the crawling dashed lines surrounding them, and it updates these each time you make a change; touching or overlapping painted regions will be combined for dragging purposes.  Also note that dragging moves the region, not the sample content underneath.

The Undo Trap

You might notice that there are two sets of undo buttons on the user interface: one down near the bottom of the left margin, above the preview button, and another set at the top margin to the right of the patch selection controls.  The ones on the left, you can use to undo and redo drawing operations.  Beware of those ones at the top.  They undo operations like sample selection and parameter changes.  If you select a sample, do a bunch of spectral editing on it, and then hit the undo button at the top of the window… it will de-select the sample and you'll lose all the drawing you've done.

Layer Controls 

 There's a small set of layer controls for each layer, corresponding to other layer-specific features.  The four knobs above the amp envelope allow you to set tuning for the layer, control its overall volume, and pan it in the stereo image (the samples are all mono).  Each layer has its own amplitude shaper; the amplitude envelope is an entirely conventional ADSR envelope, which you set up graphically by dragging on the little squares.  Each layer has an LFO which can be routed to pitch or amplitude (you make it active by clicking on the little power-button symbol next to the word "LFO").  You can set the effects sends for this layer or for the whole mix, depending on the effects mode; I'll say more about this further down.  
Several significant controls are in the text box under the word "CONTROL".  Clicking next to the word "Loop" allows you to choose the loop mode for this layer.  Forward, reverse, alternating, and one-shot in either direction are available.  

The "Pitch" item is a pop-up menu with three choices.  Iris' normal mode for sample playback is to pitch the sample by speeding up or slowing down playback, the way that early hardware samplers did (this is misleadingly labeled "Resample" in the menu).  This of course means that the sounding of a higher-pitched note will be compressed in time compared to a lower note.  Choosing "Radius RT" engages a pitch-shifting algorithm that makes all notes play back in the same amount of time.  On my i7-based Mac Mini, I found the Radius RT default settings, and the user manual, to be excessively cautious about CPU usage; the manual warns that the pitch shifting algorithm is CPU intensive and accordingly the factory default is to only allow 4 voices at a time to use the algorithm.  However, with four notes playing on a layer set to Radius RT, I didn't observe CPU usage to increase much, and I was able to boost the max voices up to 10, and the octave range to +/- 3 octaves, without any problems.  I would not hesitate to use Radius RT for any patch where I wanted the playback or loop time to be constant.  (On the other hand, allowing loop times to vary with pitch can add thickness to sustained chords and help cover up naff loop points.)

Retrigger mode prevents new notes from starting at the beginning of the sample when playing legato.  In mono mode, you can use it to play legato and the new or retriggered note will pick up the playback at the point where the first one was.  In poly mode, it's a bit strange: If you set up the amp envelope with a long release time and turn retrigger mode off, and then play and hold one note while playing a second note, the second note will began playing at whatever point the first note is at in its playback when you struck the second note.  Of course, if you are in resample pitch mode, they won't stay together because one will play back faster than the other.  

To the right of the word "CONTROL" are mute and solo buttons.  These work similarly to on a mixer. If you hit "Mute", the current layer is muted.  If you hit "Solo", every layer other than the current layer is muted.  A muted layer is indicated by its layer button turning red.  

The modulation routing controls at the bottom right are not specific to the layer; they are global.  We'll talk about modulation later.

Views

There are three basic views available in Iris.  The layer view we've already reviewed above; it allows you to see a single layer at a time and perform spectral editing.  There are two other views available by clicking their buttons at the upper right of the window: the All view and the Mix view.

The "All" view 
The All view is similar to the individual layer view, but it displays small versions of all four layer samples in four panes in the sample editing area.  You can scroll these up and down using the small buttons to the right of the panes, or grab and drag the frequency rulers.  You can actually do spectral editing in these panes, although it's awkward due to the small size.  (Recall what we said a while ago about the painting tools not scaling with the zoom level.)  This view contains the same patch parameter settings on the right side as the individual layer views.  You choose which layer they effect by clicking in its pane in the sample viewing area.

The Mix view
The Mix view shows all of the patch parameters for all four layers, plus the global patch parameters and effects settings.  The sample view area shows only an overview of the sample with none of the spectral editing, and you cannot edit here.  However, you can change all of the patch parameters.  The area on the right contains the filter controls and the global LFO settings, plus the effects mode setting and the MIDI Learn button, which are only accessible from this view.

The filter effects the overall mix, including the outputs of the effects.  There are 11 algorithms; three each of low pass, bandpass, and high pass, plus a peak booster (a sort of very narrow bandpass).  Most of them sound like they are intended to emulate familiar analog filter circuits.  Cutoff and resonance are adjustable on all, plus there is a dedicated ADSR envelope that can modulate cutoff.

Modulations

Each layer has an LFO that can be routed to pitch, amplitude, or pan for that layer.  These are the only parameters that are modulatable on a per-layer basis.  Seven waveforms are available, and the onset of the LFO can be delayed using the "attack" parameter.  The rate can be synchronized to tempo.  When "Restart" is on, the waveform starts at zero for each note played; when it is off, the LFO is free running and all voices will have their LFOs synchronized in phase.  There is also a global LFO which can be assigned to global amplitude, global pan, or the filter cutoff frequency.  The global LFO's controls are in the Mix view.  

The "Mod Routing" controls at the bottom right control global routing of velocity and aftertouch (they cannot be routed on an individual layer basis).  Clicking on the arrow symbol next to "Mod Routing" brings up a pop-up window that allows velocity and aftertouch to be routed in varying positive or negative amounts to amplitude, depth of the global LFO, filter cutoff, and filter resonance.  Note that all of these are global parameters that apply to the whole patch.

If this all seems a bit limited, it is.  The saving grace is that almost every parameter that is visible in the Mix window can be assigned to a MIDI continuous controller.  In the Mix window, click on the "MIDI Learn" button at the upper right, and all of the assignable parameters turn blue.  Click on the parameter that you want to assign.  Then, send a controller message by moving the controller of your choice (or programming it into your DAW), and Iris will associate that controller # with that parameter.  

Mix view in MIDI Learn mode

Effects

There are four effects: distortion, chorus, delay, and reverb.  Only one instance of each is available.  The effects can be configured in either of two modes: send effects, in which each layer can be routed to one or more effects, and master effects, in which the combined mix is routed through the four effects in series.  In order to change the mode, you must select the Mix view.  Then at the top right, to the right of  the word "MASTER", there is a box labeled "Effects Mode" with icons for the two modes.  Click on the one you want.

In Send mode, the Send Effects knobs on each layer allow you to send some amount of that layer to the effects; they work like effects sends on a mixing console.  A mix of one or more layers can be sent to each effect.  The effects outputs are mixed with the dry outputs of the layers to form the sum output.  A slight annoyance is that before you can use an effect, you must click on the power-button icon to activate the effect.  A convenience is that, from the layer views, you can click on the arrow icon to the upper right of the knob to bring up a pop-up window that allows you to adjust the effects parameters without having to go to the Mix view.  

In Master mode, the four effects are in series: the distortion effect receives the summed dry mix of the four layers, and then the signal flow proceeds from left to right as shown in the mix view.  In this mode, the Master Effects knobs, as shown in both the layer views and the mix view, control the dry/wet balance for each effect; if the knob is at zero, the signal will effectively bypass the effect.  There is no way to control the balance of individual layers in the effects send when using Master mode.

The quality of the effects is decent.  I actually found the distortion effect to be the most versatile.  It allows the choice of five different distortions, ranging from the fairly mellow "Tube" to the absolutely brutal "Asymmetrical", plus an aliasing effect that did particularly interesting things to higher frequencies.  The chorus is basic but functional and pretty effective for adding some depth to some of the flatter-sounding patches.  The delay is also basic but it does what it is supposed to do, and it has a max delay time of 1.5 seconds on each stereo channel.  The reverb was the only effect I didn't care for; I found it cloying and limited, and it tended to obscure the more subtle aspects of patches.  (As you are going through the factory patches, try listening to some of them with the reverb off.)  

Macro Knobs

At the lower right of the screen, in every view except the Mix view, next to the modulation routing knobs is a mechanism called the macro knobs.  This allows you to assign a number of parameters which can all be changed by turning a single knob.  Minimum and maximum ranges can be assigned on a per-parameter basis, and the range can be inverted so that a given parameter can be made to decrease as the knob is turned up, or vice versa.  To access the knobs, you click on the pop-up icon next to the word "Macro".

The macro facility comes with some templates, called "styles", with pre-assigned parameters, or you can create your own using the parameter's pop-up menu.  The way you do this is: locate the parameter you want to assign, then bring up the parameter's pop-up menu (right-click on Windows, control-click on OSX), and using the "Assign" menu.  There are eight macro knobs available (which you can name, on a per-patch basis).  Right-clicking or control-clicking on a macro knob brings up a pop-up menu, in which you can change the knob's name, look at the parameters assigned to it, or clear the existing assignments.  (If you want to remove just one assignment, or update the range on an existing assignment, you need to go back to that parameter and access its pop-up menu.

The X-Y pad doesn't seem to work quite the way that the instructions describe.  It seems to describe the  two dimensions of the pad cursor movement being two additional macro knobs, but what I'm seeing is that they are hard coded to the #1 and #2 knobs -- moving the pad cursor horizontally causes the macro knob #1 to increase and decrease, and the vertical does the same to knob #2.  The only thing about the pad that I see you can change is the four legends; right-click or control-click on the pad to bring up a pop-up that will let you rename them.

Izotope describes the macro knobs as being a way to quickly achieve a certain style of sound, by choosing the appropriate template, once you have chosen a patch.  I'm not actually sure that's the best use for them.  Yes, it may be handy sometimes for that purpose, but I see a lot more potential in using them for on-the-fly patch morphing and automation / MIDI control weirdness.  The key to this: You can assign a macro knob to a MIDI controller using the MIDI learn mode.  To do that, go to the Mix view, and then find the cleverly concealed pop-up icon for the macro knobs -- it's in a different place in this view, to the lower right of the Master knob.  After you've done that, you can click on the "MIDI Learn" button, and then you can assign a MIDI controller to a macro knob the same way as for the other parameters.

Conclusions

Iris is a pretty cool piece of software.  This is the sort of thing for which soft synths really stand out: a synthesis method that would be all but impractical to implement in dedicated hardware, because of the cost of designing it and the need for a screen to do the editing.  I've done a lot of playing with it and I feel like I've only scratched the surface; it's a totally new method of synthesis to me, and I have a lot to learn yet.  The edit rendering seems to work well, without any aliasing or Fourier analysis artifacts that I've noticed.  The effects, as noted above, are good with the exception of the reverb which I'm not a big fan of.  I do wish there was more flexibility in the effects routing.

I only have a couple of criticisms of my own.  My main one is that I don't understand why, in this day and age and in this context, the envelopes are restricted to ADSR; the standard for advanced soft synths these days is multi-segment envelopes, and Iris is one synth that could particularly benefit from them.  The envelopes would also benefit from both a start delay and a time limit on the sustain phase, which would allow samples to be layered in and out on sustained chords and drones.

I would like to see more drawing tools offered for the spectral editing.  Circular and elliptical shapes could be useful, as well as the ability to draw arbitrary polygons by point-to-point clicking.  Similarly, the ability to erase by some means other than just freehand is desirable; I'd like to see an "anti-paint" function which works like region painting, but has the effecting of erasing any painted areas that are anti-painted over, and is capable of performing any draw operation that painting can.

A lot of the commenters at KVR would like to see a time stretch function that can be applied to samples, so that loops can be set up to exact lengths.  I haven't found a pressing need for that, though; if I need a sample time stretched, I can export it to some other software to do that job.  However, the ability to set loop start and end points to exact times would be helpful.  I'd also like to see the ability to set up a separate release loop, like some samplers have.

Another common request at KVR is to be able to set a volume level on a painted region, so that some choice in between full off (not painted) and full on (painted) is available for a region.  Not sure what I think about that... I think that if there were multi-segment envelopes, it would go a long way towards fulfilling the same purpose.

I will say that, running Iris as an AU plug-in under Metro [version] on OSX [version], I have found the software to be completely stable.  I have encountered no crashes, no functions that ceased working after a while, and no audio or visual glitches.  Iris integrates well with this uncommon DAW software, so the software engineers must have done their homework regarding the AU specification.  I have also run the stand-alone version and encountered no problems.  I have not tried the VST installation -- although Metro accepts both, when I have a choice, I go with the AU version unless it doesn't work for some reason. 

Sound Samples

All of the below are uncompressed WAV files, so they may take a few seconds to load.
  • Factory patch:  Black Galaxy.  Demonstrates Iris' capability for creating slowly evolving sounds.
  • Factory patch: Toddler Squarepusher.  Chosen mainly because I liked the name, and it does fit.
  • My patch: Zombie Alarm.  Shows the ability to do rhythmic repeating sounds.
  • My patch: Coffee Jackhammer.  Just plain screwy. 

Saturday, October 4, 2014

The OTA, and why it's important

Many (in fact, most) analog synthesizers rely heavily on an integrated circuit called the operational transconductance amplifier, or OTA for short. The OTA is a variation on the common operational amplifier, or op-amp. From an electrical engineer's point of view, the main difference between an op-amp and an OTA is that, while an op-amp outputs a voltage that is proportional to the difference in voltage between its two inputs, the OTA outputs a current that is proportional to the difference in voltage between its two inputs.

This, however, is not what makes an OTA valuable from a synth designer's perspective. Analog synths rely on two behaviors in which the OTA differs from the op-amp:

1. The OTA has a third input, called the amplifier bias current or Iabc for short. (The letter I is the standard electrical engineering symbol for current.) With the conventional op-amp, the gain is determined by an external feedback resistor. The OTA's gain is set by the amount of current that is allowed to flow into the Iabc input.

2. The OTA's input impedence is proportional to the current flowed into the Iabc input.

What does this mean, in practical terms? Consider the first: It's a simple matter to convert a voltage to a current, or vice versa. So if you take an external voltage input, convert it to a current, and feed that to the Iabc input to control the OTA's gain -- well, that's what a VCA is. Another way of looking at it is that the OTA is an analog multiplier; the difference between the two input signals is multiplied by the Iabc input. That opens up all kinds of possibilities, such as ring modulators and wave shaping circuits.

As for the second characteristic, if a voltage is converted to make the Iabc input, then the OTA becomes, in effect, a voltage-controlled resistor. As it happens, a voltage-controlled resistor is a very handy thing to have when designing VCF circuits.

Now the problem: Other than analog synth circuits, there are few uses for OTAs these days. There was a time when OTAs were widely used in radio and microwave systems, but digital signal processing has taken over in these applications. Consequently, OTA integrated circuits are disappearing from the market. A survey of the casualties:

  • Intersil CA3080: Originally designed by RCA and introduced in 1969. A good, basic OTA cicruit widely used in both commericial and DIY designs over the years. Because it was produced in huge numbers, there's some stock still around and it's still possible to find them. But of course, that stock is a finite number and it will run out eventually. (Rochester Electronics still has some, although they aren't cheap.) 

  • Intersil CA3280: Long regarded as the Cadillac of OTA designs (and often priced accordingly), this was also widely used particularly in top-end VCA designs. Blogger Don Tillman made a heroic effort to rescue the 3280, but was unsuccessful. Because of the higher price, it was probably not produced in as large a quantity as the 3080, and existing stocks have nearly dried up.

  • Intersil CA3060 and 3094: These were variants of the 3080. I believe the 3094 was a dual OTA with buffered outputs, and the 3060 was a triple OTA. They are both long out of production and there are no sources that I know of.

  • National LM13600: I think this part was used mainly in DIY designs. It can still be found, but except for repair of existing circuits, it isn't as widely sought out because it's not the easiest part to incorporate in a circuit, and it's specs aren't as good. The still-in-production LM13700 is better in both respects.  (Internet rumor has it that the original design was undertaken by an intern, as an exercise.) 

  • Rohm BA662: Heavily used in '70s and early '80s Roland gear. Long out of production. There is no source that I know of.

  • Rohm BA6110: Widely promoted as an "almost pin compatible" substitute for the BA662 after the latter was discontinued. However, the 6110 is also now discontinued, and existing stocks have nearly dried up.

There are only two OTA ICs in production at this point, the above-mentioned National LM13700 and the On Semiconductor NE5517. The LM13700 is regarded as a decent design, but not as well spec'ed as the 3280 and not quite as versatile as the 3080. But by default, it is the part of choice for new designs. The NE5517 is a bit of a story; it was formerly manufactured by Phillips, but the fab in France that manufactured it burned down in 2003. On Semiconductor then purchased rights to the design and picked up manufacturing. I've seen some Web references that say that the On Semi parts aren't spec'ed as tightly as the former Phillips parts.

So where does all this leave us? We have no indication as to what National's future plans are, regarding how long the LM13700 will be in production. Probably for a while, since there is little competition now, but one never knows. There are people in the synth design world who know how to design OTA circuits from discrete components, and to name one example, the Synth Tech MOTM-440 uses just such a circuit. But it's not as DIY-friendly an approach; there are a lot of subtleties to designing a good OTA circuit, and it's more expensive and more trouble then using an IC. But as far as technological progress goes, it's definitely a step backwards.

Sunday, August 24, 2014

Miscellaneous thoughts for August

Some things I've taken note of recently:

Buchla Music Easel back in production

After about 40 years, the Buchla Music Easel is back in production.  The original Music Easel was produced in the mid-1970s; it basically consisted of a semi-modular, two-VCO analog monosynth coupled to a 2-1/2 octave, capacitive touch sense keyboard with variable tuning and scaling. 

Both the new Easel, and most copies of the original, took nearly all of the internal circuits out to a big edge connector called the "program card" connector.  Back in the day, Buchla sold cards that plugged into these connectors that the (soldering-iron-equipped) user could use to program patches.  This was done by soldering resistors onto the cards to make certain connections.  Unknown to most people, though, the program card connector contained additional interconnects that made it possible to actually play the Easel remotely.  Buchla at the time was doing some experiments with computer control, e.g., the Model 700 that connected to a DEC PDP-11 minicomputer.  However, no interface for the Easel ever reached production.

Now, 40 years later, it has.  Buchla has introduced the iProgram interface card, which connects via wireless Ethernet to an iPad.  Using software supplied by Buchla, the iProgram can function as both a patch editor/librarian, and a MIDI interface.  That's not a bad trick, and it says something about the Easel's original design that it can be interfaced to something that would not be developed for another 40 years. 

The Return of Richard D. James

The first album of all-new Aphex Twin material since 2001 is nigh.  Syro, announced by means of this bizarre press release (via Synthtopia), will be available in September.  Oddly enough, I didn't realize it had been that long.

Modulation Wheels

I've been doing a lot of patching with the Solaris recently.  Now, I "grew up" as a synth performer using mostly Roland keyboards (that is, I've owned lots of synth, but the ones of other makes have been mostly rackmount units.  Of the ones I've had with actual keyboards, most have been Rolands.)  So I've long since grown accustomed to the Roland "T-handle" control for pitch bend and modulation, including the fact that it's spring loaded in both the pitch and modulation axes. 

The Solaris, on the other hand, has traditional pitch and modulation wheels, and the mod wheel is not sprung.  I've often found this vaguely disconcerting.  However, last week, I was working with a three-oscillator bass patch I had built, and I wanted to assign a performance control to detune one of the oscillators.  Assigning it to aftertouch did not do what I wanted.  I was going to use a soft knob, and then it occurred to me -- assign it to the mod wheel.  By doing this, I was able to put it in various positions to achieve the amount of detne that I wanted at different times.  This really led me to appreciate the virtues of a mod wheel that stays where you put it.

Stuff I Want

I've got my eye on Madrona Labs' Kaivo plug-in.  I've long wanted a physical modeling synth that provides the performer with access to the parameters inside the guts of the modeling algorithms.  Kaivo appears to be all that and a lot more.  I'm also looking for something that will give me a much larger variety of tuned and semi-tuned percussion sounds that one will get from the typical drum machine, and it looks like AAS' Chromaphone is just the thing. 

I've also gotten interested in some of the effects boxes from Strymon, particularly the Timeline delay, which has MIDI control.  I can think of all kinds of possibilities for that.  I've read that Strymon includes a lot of ex-Alesis employees, from the time when Alesis was doing good stuff (before Keith Barr lost control of it), so that's a good sign.

Next Week

I have a review of Izotope's Iris spectral editor, which I'll try to have up by this weekend.

Friday, July 11, 2014

Reviving M1000X

I've finally found the time to get Xcode going on my Mac Mini and rebuild M1000X, the program I published some years ago for doing patch editing on the Oberheim Matrix-6/6R and Matrix-1000.  It now runs on Intel Macs under OSX 10.8 (it should also work under 10.9, but I have not tried it).  There were some challenges involved in getting it going again.  (OSX coding geekdom ahead...)  I originally wrote M1000X in 2005 in pure C, using the Carbon libraries.  Apple in its infinite wisdom has since deprecated Carbon, and is pressing hard to get all remaining Carbon apps converted to use the Cocoa libraries.  Unfortunately, making a Carbon app written in C work with Cocoa involves a significant re-write, object-izing the code and reworking it into Objective-C.  Additionally, the current version of the interface builder built into Xcode refuses to open the Carbon nib files, although the runtime still works with them.  Fortunately, I still have my old PowerPC Mac up and running, so I was able to do the interface resource editing that I needed to do there and copy the nib file over to the Intel-based machine.  Additionally, due to a problem with the way that bit fields in structures are specified in C (a problem that the language has had since the original K&R specification in the early '80s), I had to re-write some large structures that handle patches in memory.  While I was at it, I took the opportunity to fix a couple of bugs, and to put code in to work around two bugs in the Matrix-1000 OS that I didn't become aware of until after I had released version 1.0.

Anyway, version 1.1 of M1000X is available here.  Just open the disk image file and drag the application to your Applications folder.  There is a help file in there and a set of release notes also.

So while we're here, this is a good place to talk about the Oberheim Matrix series of synths.  These consist of two groups -- the Matrix-12 series, and the Matrix-6 series.  The Matrix-12 series consists of two synths, the Matrix-12 and the Xpander, which basically is a "tabletop" Matrix-12 with no keyboard and half as many voices.  Both of these synths are now very expensive collectors' items, and they also don't have a lot in common with the Matrix-6 series, so I won't dwell on them further here.

The Matrix-6 series consists of the Matrix-6 itself, a 6-voice keyboard; the Matrix-6R, a rack-mount (2U) packaging of the Matrix-6, and the Matrix-1000, with the same voice architecture but more patch memory and some improvements, and packaged in a smaller (1U) rack-mount box.  All of these synths are based on the CEM 3396 "synth on a chip", which provides an all-analog signal path consisting of two DCOs, one low-pass VCF, one noise generator, and two VCAs.  The VCF can be FM'ed by one of the DCOs.  The synth adds to this a bevy of modulation and signal sources: two LFOs, three DADSR (delay-attack-decay-sustain-release) envelope generators, two ramp generators, and a tracking generator. The patch memory consists of 100 patches on the 6/6R.  The 1000 has 800 patches in ROM and 200 in RAM (hence the name).

The "matrix modulation" capability is what gives the synths their name.  A radically different idea at the time it was introduced, the modulation matrix is basically a virtual version of the old EMS pin matrix (which is displayed graphically by M1000X).  There are ten "pegs" that you can insert at any intersection in the matrix, and you can set the level (inverted or non-inverted) of signal to be routed from the selected input to the selected output.  All of the internal modulation generators are available as sources, as are external expression input jacks and MIDI continuous controllers.  Almost any parameter of the DCOs and VCF can be a matrix destination, as well as most of the envelope segments, the LFO rates and amplitudes, and the portamento rate.  It really did at the time help break out of some of the limitations of its contemporaries, which at the time usually had very limited signal routing -- for instance, on many synths there was one LFO that could only be routed to oscillator frequency, and maybe one other one that could only be routed to VCF cutoff or VCA level.

While the voice architecture is quite capable, the user interfaces for patch editing are limited.  The Matrix-6 and 6R both use the same mechanism, a membrane panel with three mode select buttons, a numeric keypad, and some forward and back buttons.  Visual output is by way of a one-line vacuum fluorescent display with 16-segment characters; it's bright and easy to read (except for some punctuation characters that come out looking funky in the 16-segment format), but it can only display 20 characters.  The display basically switches from display of patch numbers and names to displaying names and values of patch parameters, and patch editing is quite tedious.  As for the Matrix-1000... well, it has no patch editing controls at all.  Clearly there was a cost and packaging decision at some point (apparently Oberheim really wanted to get the Matrix-1000 crammed down to a 1U package).  The only thing you can do from the panel is select patches, set up MIDI, and change a few system parameters.  Output is limited to a 3-digit numeric LED display and a few status lights.  This is why you need an external editor. 

Yes, these are analog synths.  They do use DCOs, and some (most?) of the modulation signal generating is digital, but the audio signal path is all analog.  Oberheim produced many of these synths, and because of the limited user interface they are regarded as less desirable than many other analog synths, so they can be had at reasonable prices.  If you're looking to get into vintage analog inexpensively, this is a good way to do it -- get one of these synths, and then use M1000X to overcome the UI limitations.

Sunday, August 25, 2013

How the Korg Poly-800 DCO works

Back when I wrote an article here about how the digitally controlled oscillator (DCO) in the Roland Juno synths (the old analog ones, not the Juno-D series) works.  At the time, I had intended to also write something about how the DCO in the Korg Poly-800 (and its rack-mount sibling, the EX-800) works.  I had heard from several sources that it was quite a different design from the Juno DCO, but at the time I wasn't able to find any solid technical information.  And I don't actually own a Poly-800, so I didn't have a guinea pig to experiment on.  (Years and years ago, I tried one out in a music store, and to be honest I was not that impressed.  But back to the topic.)

Recently, I got interested in the topic again, and after a few days, I managed to finally uncover some documentation.  And yes, as it turns out, the Poly-800 DCO is quite different from the Juno.  It actually flirts with the line between "analog" and "digital" a lot more than the Juno DCO (which has a completely analog audio path) does.  And in some ways, it's more capable than the Juno DCO, but in other ways it's quite limited and just plain screwy.

Schematic Archaeology

A few months ago I went to the excellent FDISKC web site and downloaded a copy of the Poly-800 schematics.  I recall looking at this before and not being able to make much sense of it, and it doesn't help that it's a scanned copy of an original that was already in rather poor condition.  But this time, having read up a bit more on the synth's features and its patch programming options, I had a better idea of what to look for.  For those who have not encountered one: The Poly-800 is an eight-voice synth.  Its DCOs generate outputs in four octaves for each voice.  There are 16', 8', 4', and 2' octaves that can be turned on and off individually.  There are two choices of waveform (or so the synth likes to pretend; we'll talk about this later): square and sawtooth.  No pulse width modulation on the squares, and no triangle or sine.  The normal operating mode is a single DCO per voice, but the 800 can be put in a "double" mode wherein two DCOs are allocated to each voice, the penalty being that the synth is reduced to four voices.

When I looked over the schematics, I noticed an IC with the part number MSM5232.  It had two groups of outputs marked as being the four footages mentioned above.  Aha, I thought, that must be the IC that generates a voice, or possibly two voices.  I got to looking for some notation on the schematic that would explain that that part of the circuit was replicated some number of times (4 or 8 was what I expected), but I couldn't find any such.  Also, the IC looked like it was maybe some sort of processor; it had incoming address and data lines.  And then there were eight lines marked as "C1" through "C8".  I couldn't figure out what those were.  A bit of Web searching quickly uncovered that this part was once upon a time made by Oki Electric.  However, Oki Electric spun off its semiconductor business into a separate company some years ago; I think it may have been through several changes of hands since then, and in any event, Oki Semiconductor, if it still exists, doesn't seem to have a Web site.  So no going to the manufacturer for a data sheet.

I saw several mentions of the Poly-800 service manual having the data sheet, but I only turned up a couple of online sources for the manual, and they looked sketchy (they demanded that you disable your firewall and virus protection in order to download).  So no luck there.  After hours of searching, I finally found a several-years-old posting that had a pointer to an Italian site.  I crossed my fingers and clicked.  It was there!  And it explains a lot.  And now I know...

The Original Chiptunes Synth

The reason I couldn't find any block-replication notation on the schematics was that a single MSM5232 handles all eight DCOs.  As it turns out, the MSM5232 wasn't intended to be used in music synthesizers -- it was a tune chip for arcade video games.  It contains eight counters that divide down a pair of master clock inputs, and bit shifters that act like octave dividers and produce all of the different footages.  It also has a sort-of VCA for each voice, and a pair of onboard attack-sustain-release envelope generators.  What it does not have is filters, a problem that we'll get to later.

So here's how it works: Each DCO is, as stated above, has a counter-divider that is loaded with a value and then counts down every time the clock signal at the external clock input cycles.  When it reaches zero, it sends a reset pulse, and then its value gets reloaded again..  This much is similar to the Juno DCO.  On the Juno, each time the counter reaches zero, the pulse resets a fairly conventional sawtooth VCO core.  However, the 5232 has no VCO core.  Instead, it has a flip-flop that toggles its state on every counter reset -- which means that it is generating a square wave.  That's the only waveform it can produce. 

 Each DCO has a register into which the CPU places a note number when the DCO is to play a note, and a gate flag that turns the voice on and off.  The note number is used to look up a counter value from an internal ROM, which will be used to divide down the incoming clock frequency.  The flip-flop controlled by the counter drives a chain of octave dividers which generate the four footage outputs.  Basically, there is only one octave's worth of counter values, and it taps into the octave divider chain in different places for higher or lower octaves. 

So far so good.  Now here's where it begins to get screwy.  One would think that the logical way to output the voices from the chip would be to have each voice output on its own output pin.  That's not what it does.  The voices are divided into two groups, and for each group, all of the outputs of a given footage are mixed onto one output pin; for example, all of the 16' footages for voices 1 through 4 come out mixed on pin 28.  This answers a big question that is often asked about this synth: why does it use a paraphonic VCF?  Answer: because the 5232 doesn't make the individual voice outputs available.  The IC provides amplitude control over each voice, but not over the individual footages -- they can only be turned on or off, and the choice applies for all voices in a group.  There are two ASR envelope generators onboard, one for each group, but the Poly-800 does not use them.  Rather, it applies envelopes generated externally by the synth's CPU. These are input to the chip through eight input pins, one for each voice.  I don't think the chip really has VCAs -- I think that all it does is toggle back and forth between the current envelope level and ground, which produces the square wave of the desired amplitude. 

Each group of four voices is driven by its own external clock source.  The chip itself has no mechanism for any kind of pitch modulation, so pitch bend and envelope/LFO control over pitch have to be implemented external to the chip, by modulating the master clock frequencies.  Each group of four voices has its own master clock input. This is reflected in the Poly-800's architecture; if you put it in the "double" mode, it divides the two groups and drives them with clocks of different frequencies when detune is selected.

The drawing below shows the basic signal flows.  (To reduce drawing clutter, only 4 of the 8 voices are shown.)  Each voice consists of a note number register, a counter/divider, and four octave dividers.  To play a note, the synth chooses a voice, writes the desired note number into its note number register, and then sets a flag telling the voice to play.   The note number is used to look up the divide-down count in the ROM, which then goes to the counter/divider.  This divides down the master clock (not show) for the group that the voice is in (purple or green) and produces the top octave.  The four octave dividers then produce the four footages. 

 The Mysterious Sawtooth Wave and Alleged Walsh Functions

This leaves a big question: we've established in the MSM5232 is only capable of generating square waves.  But the Poly-800 provides a choice of square or sawtooth waveforms.  How does it do that?  You may have read something about the Poly-800 using a mathematical technique called "Walsh functions" to generate the sawtooth.  What's a Walsh function?  Well, you might know that the process called the "Fourier transform" breaks up a waveform into a set of sine waves that are mixed at different amplitudes.  Walsh functions are like the sine waves used in Fourier analysis: by adding together a set of Walsh functions at different frequencies and amplitudes, you can re-create an arbitrary waveform, within a certain bandwidth.  And that's what the Poly-800 does to approximate a sawtooth wave: it uses the four footages of square wave that the DCO produces to do the inverse Walsh transform equivalent.  When you have the "square" waveform selected for the DCOs, the four square-wave footages are mixed together in equal amounts before the composite signal goes to the filter.  However, when "sawtooth" is selected, the four footages get routed into an analog adder circuit that adds them in a proportion such that the output roughly resembles a sawtooth.  We say "roughly" because trying to do Walsh transforms with only four functions is about like trying to do additive synthesis with only four harmonics.  (Further, it's not true that all of the Walsh functions are square waves; only some of them are, and it takes a more complete set to do a good Walsh transform.)  Nonetheless, it does sort of produce a sawtooth wave.

I've still got a lot more digging to do into the schematic.  For one thing, I'd like to be able to identify how the source oscillator that produces the two clock signals for the 5232 works.  It's obviously not a crystal oscillator since it has to be variable in frequency to an extent.  It appears to be based on an LC-type resonant circuit, but that part of the schematic is in particularly bad shape and it's hard to read.  


Saturday, August 24, 2013

Statescape Wisconsin

So as I wrote in my last post, I've been looking for a while for a way to build a delay line that would allow the recirculating sound to interact with the sound being input in a way other than just being mixed together.  I have wanted to explore other ways in which the input sound could modify the sound looping through the line.  One thing I thought of was to build a delay line in which the input amplitude modulates the recirculating signal.  As you might know, for any pair of sine waves that are input to a form of amplitude modulation, the output will contain sine waves at two new frequencies which are the sum and difference of the frequencies of the two inputs.  If you use more complex waveforms, then each pair of component sines contained within the two input signals will produce sum and differences frequencies, which can produce a whole lot of partials in the output .  Here is a block diagram of what I had in mind:



The first question was how to actually build such a delay line, and for me the answer was obvious: my favorite softsynth-building environment, Csound.  I've coded up a number of delay lines in Csound previously, and the only big change here was to incorporate the amplitude modulation function into the feedback loop.  However, getting that to work the way I wanted proved to be more difficult than I though at first.  To illustrate why, I'll repeat the basic amplitude modulation calculation from my last post:

A = (IG + M) * C

where: M is the modulation signal, C is the carrier signal, IG is the initial gain for the carrier (or, to put it another way, the magnitude of the output when no modulation is present), and A is the amplitude-modulated output.  The problem here is the fact that when you first start up a delay line, it contains no signal.  As you can see in the equation, if the carrier C term is zero, there is no output. So obviously if the AM process is implemented with the delay line feedback as the C term, the sound building process can never get started because no AM output is ever generated. 

So I tried coding it the other way, treating the input signal as the carrier and the delay line feedback as the oscillation.  That solves the problem with the delay initially not containing anything; it gets filled with unmodified input signal until something starts wrapping back out of the line and amplitude-modulating with the input.  However, it creates another problem: there has to be an input signal present all the time.  Whenever there isn't, the AM output, and the signal getting fed back into the delay line, gets "blanked".  And that's bad because I've found that, when doing these long-period delay things, it pays to be sparse with the input; if you are playing notes into it all the time, it quickly gets too busy for the listener to make any sense of it.

I thought about going back to the first way, with the delay line feedback as the carrier, but with a software switch that would route unmodified input signal into the line whenever there was no output from the AM processing.  But what I wound up doing was simpler: I computed the modulation both ways and added the results.  This doesn't effect which frequencies are present in the output, only the relative levels.  For the purpose, I decided it was good enough.  And this had the advantage of not going silent whenever one signal or the other wasn't present.

Once that problem was solved, the next problem was to figure out what kind of input signals would produce interesting results.  I tried some standard synth things like PWM leads and pad sounds, and I found out right away that with those harmonically complex sounds, the results degenerated into a particularly nasty-sounding form of noise very quickly.  So I had to have something harmonically simpler.  For this purpose I chose the Kawai K5m additive synth.  This was sort of overkill, but it worked for the purpose.  I built one basic sound with only a few harmonics, and capable of having its harmonic content varied by use of the mod wheel

I ran into a few problems, including one that I never manged to solve.  The big one was a puzzling popping noise that appears at random times.  I still haven't figured this one out.  Also, I had some problem with subsonics appearing in the output.  To address both of these problems, I added a pair of two-pole Butterworth filters to the algorithm, a low pass and a high pass.  These didn't totally solve the popping problem, which you can still hear in places in the completed track.

As for the results: they were surprisingly musical.  The AM often added notes that I didn't play, and I was pleasantly surprised at how often the added overtones actually worked well with the notes that were played.  Keeping everything harmonically simple helps a lot.  There is a distorted sound that builds up when things get busy; it seems to be characteristic.  All in all, I was fairly pleased.  Now I have to think of what to do for the next delay line.

Listen to Wisconsin here.

And here is the Csound source code for the delay line:


; Basic stereophonic delay line

itimel      = 3.1       ; left channel delay time
itimer      = 4.2       ; right channel delay time
ifbl        = 1.7      ; left channel feedback (keep < 1)
ifbr        = 1.7      ; right channel feedback
kcutlo      init 20.0   ; hi-pass for damping subsonics
kcuthi      init 2500.0 ; low-pass for suppressing pops
imodindex   init 10
kleftch     init 3      ; channel # of left channel (right is assumed +1)

afbl        init 0
afbr        init 0

; Get input audio
ainl, ainr  inch kleftch, kleftch+1

; Scale values to -1..+1 range needed by formula
ainlscaled = ainl / 0dbfs
ainrscaled = ainr / 0dbfs
afblscaled = afbl / 0dbfs
afbrscaled = afbr / 0dbfs

; Compute with feedback as carrier and input as modulation, and rescale
amodinl = (1 + imodindex * ainlscaled) * afblscaled * 0dbfs / 2
amodinl butterhp amodinl, kcutlo
amodinl butterlp amodinl, kcuthi
amodinr = (1 + imodindex * ainrscaled) * afbrscaled * 0dbfs / 2
amodinr butterhp amodinr, kcutlo
amodinr butterlp amodinr, kcuthi

; Compute with input as carrier and feedback as modulation, and rescale
amodfbl = (1 + imodindex * afblscaled) * ainlscaled * 0dbfs / 2
amodfbl butterhp amodfbl, kcutlo
amodfbl butterlp amodfbl, kcuthi
amodfbr = (1 + imodindex * afbrscaled) * ainlscaled * 0dbfs / 2
amodfbr butterhp amodfbr, kcutlo
amodfbr butterlp amodfbr, kcuthi

; Push samples through the left and right delay lines
aoutl       delay amodinl+amodfbl, itimel
aoutr       delay amodinr+amodfbr, itimer

; Output direct + delayed audio
            outch kleftch, (ainl+aoutl)*2
            outch kleftch+1, (ainr+aoutr)*2

; Compute feedback for next cycle
afbl        = aoutl * ifbl
afbr        = aoutr * ifbr

endin