You are here

Pushing The Envelope

Sonar Tips & Techniques By Craig Anderton
Published February 2015

Turn audio into automation data in Sonar.

Synchronising the sound of instruments to themselves, other instruments and external clocks has always fascinated me — so much so that, in 1981, I gave a paper at the AES convention on ‘Synchro-Sonic Recording’. It basically forecast the rise of highly rhythmic, dance-oriented music, but at the time it required esoteric hardware kludges to pull off inter-instrument and beat-related synchronisation. Fast forward 34 years, and we have a variety of tools to create all kinds of cool synchronisation effects. We’ve already covered using gates in previous articles, so let’s turn our attention to envelopes.

Analyse This

Sonar stopped including the Analyst AN-879 spectrum equaliser after Sonar X2, presumably because the QuadCurve EQ’s built-in spectrum analyser in X3 Producer made the Analyst look crude by comparison. However, the Analyst had the unusual talent of being able to generate five automation envelopes — one for each band in the track in which it was inserted: below 500Hz, between 500Hz and 1kHz, 1kHz to 5kHz, above 5kHz, and one for all frequencies (average level). This is particularly useful with Automation Lanes, as you can (for example) derive the various envelopes from a drum track, then paste them into another track to control some other instrument’s parameter.

If your Sonar experience started with X3, you won’t have the AN-879 available to install — but we’ll cover an alternative way to generate envelopes. And if you have an older version of Sonar around, you can do a custom install (which doesn’t overwrite or modify your existing installation) if the AN-879 is missing.

To do a custom install, start the installation process for the older version, click through the various options, enter your serial number, then choose Advanced at the Choose Type screen. After clicking Next, de-select everything except for the Analyst. Click through more screens, then if the VST Folder screen appears, specify where you want the Analyst plug-in to reside. After that, keep clicking Next and de-select anything that’s selected. When you reach the ‘Ready to Install’ screen, verify that the Analyst is the only selected component, then click Install and, eventually, Finish. If the Analyst doesn’t seem to be available next time you boot Sonar, make sure the folder where it’s installed is being scanned, and that the Analyst is in the Plug-In Manager’s current layout. If necessary, re-scan.

As an example of applying the AN-879, we’ll use a drum track’s amplitude envelope to change the frequency of a ProChannel EQ stage:

1. Insert the AN-879 in the drum track’s FX Bin.

2. Click the AN-879’s Auto button, below the Lo, Med and Hi resolution buttons. Also, choose Med, especially if you have a slow computer or a lot going on in a project.

3. Write-enable automation for the track, and begin playback.

4. After the track has played, unfold the automation lanes and you’ll see the five different bands of automation.Here you can see the envelopes generated by the Analyst AN-879. Hovering over an automation lane’s label displays the frequency band.Here you can see the envelopes generated by the Analyst AN-879. Hovering over an automation lane’s label displays the frequency band.

Note that the Analyst envelopes will start late owing to a slight delay. There are several ways to fix this; my favourite is to Select All, control-click the Automation Lane headers to select only the envelopes, then slide them to the left. You can also move them with the Nudge option.

To apply the envelope to a parameter, select the desired envelope and copy it. If any Automation Lanes are showing in the target track, turn off Automation Lanes to hide them. Select the track and position the Now time where you want to paste the envelope, then choose Edit / Paste Special and make sure the Advanced options are shown. Choose ‘Blend Old and New’, and under ‘What to Paste’, tick only the Track/Bus Automation box. Click OK.

There’s now an envelope, but it’s ‘orphaned’ because it’s not assigned to anything. Right-click on the envelope and assign it to a parameter, such as the track’s ProChannel HMF Freq. Click Play to verify that it’s working (the HMF Freq knob will move). Now you can turn on Automation Lanes, and the envelope will appear in a lane.

MIDI Envelope Control

This next technique requires downloading and installing the free midiAudioToCC VST plug-in from Even if you have the AN-879, this plug-in opens up multiple MIDI applications. Note that this is not a MIDI plug-in; it inserts like a VST plug-in, and lives in your VST plug-ins folder. You can use it to send MIDI data from an audio track to any effect or synthesizer that can accept MIDI input and assign incoming MIDI data internally — like the Z3TA+ synth, which can also process audio. However, you’re going to need at least one, and possibly two, additional MIDI tracks for setup.

Insert the Z3TA+ into the FX Bin for the track you want to process, by choosing Synths as FX / Z3TA+ fx2. It’s important to choose the one with the ‘fx2’ suffix, as the ‘fx’ version simply acts like an effects processor.

1. Begin by ‘prepping’ Z3TA+. Click on the Program button and choose Initialize, then click on the Options button, and for Real-time Quality choose at least 1.0x or, better yet, 2x. Also, click the VST2 drop-down menu in the VST header and make sure Enable MIDI Input is selected.

2. Insert the midiAudioToCC plug-in into the FX Bin of the track that will be providing the envelope, eg. drums.

3. In that track’s VST2 drop menu, ensure that Enable MIDI Output is ticked.If the midiAudioToCC’s ‘Enable MIDI Output’ option isn’t ticked, none of this will work properly!If the midiAudioToCC’s ‘Enable MIDI Output’ option isn’t ticked, none of this will work properly!

4. Create a new MIDI track. Set its input to midiAudioToCC and choose MIDI Omni. Then, set the MIDI track’s output to Z3TA+. It’s vital to set this track’s Input Echo to On.

So, to recap, midiAudioToCC is listening to an audio track, and is set to output MIDI. This goes to a MIDI track set to receive the data at its input, which echoes the input through its output to the Z3TA+, which is set to accept MIDI input signals.The complete setup for processing a bass with the effects section of the Z3TA+ and controlling its filter (and pan) with the envelope from a drum track that’s been converted to MIDI data via the midiAudioToCC VST plug-in.The complete setup for processing a bass with the effects section of the Z3TA+ and controlling its filter (and pan) with the envelope from a drum track that’s been converted to MIDI data via the midiAudioToCC VST plug-in.

The Z3TA+ is a synth, so it has an amp and filter that respond to envelopes. You can ‘play’ the amp’s envelope from a keyboard to gate the audio, but if you want to use the Z3TA+ for an effect like varying the filter cut-off, you’ll probably want the amp envelope to stay on all the time. So, create another MIDI track to feed the Z3TA+, enter a note sufficiently long to keep the gate open for the desired amount of time, then set the Z3TA+ amp envelope’s Sustain parameter to maximum. (You won’t hear any notes play because with an initialised patch, all oscillators are turned off.)

Now make the various midiAudioToCC assignments, and tell Z3TA+ how you want it to respond. In midiAudioToCC you can send different controllers on the left and right channels, specify a MIDI output channel, adjust gain (the two envelope ‘meters’ along the bottom help in this adjustment), change the ‘slew rate’ (ie. ‘smooth out’ the envelope) using the Inertia slider, and set the rate of MIDI data updates with the Rate control. Note that you need to edit these while the transport is running.

Suppose you want the drums to vary the filter. The easiest way is to start the transport, then right-click on the filter’s cutoff control and select MIDI Learn. The filter will learn whatever midiAudioToCC is sending out, and react accordingly. Of course you can also specify the controller to which you want a parameter to respond; you don’t have to use MIDI Learn. But make sure the transport is playing and midiAudioToCC is transmitting data before selecting learn — Sonar may send out a bunch of initial controllers upon startup.

Note that because the FX Bin is pre-fader, you don’t have to monitor the track in which midiAudioToCC is inserted; you can turn the track’s fader all the way down if you like.

Also note that the Z3TA+’s learning abilities are very flexible. If you want to restrict or scale the range being covered do the following: with the transport stopped, set the parameter being controlled to the lowest desired setting, right-click on the control, and choose ‘Set Min’. You can set a maximum level similarly, as well as reverse the response of the parameter or the MIDI controller, and set minimum or maximum MIDI controller values using the same procedure (set what you want with the control, right-click, and choose minimum or maximum in the field for the controller). To learn more about MIDI Learn and what can be controlled, click the Z3TA+ GUI so that it has the focus, then type F1.

Before signing off, I’d like to thank Cakewalk forum host and Sonar-user extraordinaire Steve Cook (user name ‘scook’) for turning me on to midiAudioToCC. He also adds the following if you’re not using the 64-bit version of midiAudioToCC, but which applies to other 32-bit plug-ins as well: “The standard VST header is not normally displayed on 32-bit plug-ins in 64-bit Sonar. To see the standard VST header, hold the Shift key when opening the plug-in UI. The VST header opens in a separate window behind the plug-in UI.”

Buy Related Tutorial Videos

  • Introducing Sonar
  • Working with Sonar 7