SONAR NOTES

On-the-fly Time-stretching and Compression

Published in SOS March 2002
Printer-friendly version Printer-friendly version

Technique : Sonar Notes
 

Sonar is great at on-the-fly time-stretching and compression, allowing you to easily sync loops at different tempos, Acid-style. We show you how. Plus all the usual Cakewalk tips and techniques.


Craig Anderton

One of Sonar's strongest features is the ability to do on-the-fly time-stretching and compression. This lets your digital audio loops run at different tempos, or follow along with tempo changes. Yet there's virtually no information in the manual, or in the third-party books I've seen, about the significance of editing the markers that control this process... so, let's remedy that situation. Acid and Recycle users, take note: many of the tips mentioned here also apply in a general sense to editing slices in these programs.

Perfecting Groove Clips

Sonar uses the principle of cutting an audio loop into 'slices', each of which represents a discre
  Current Versions  
  Sonar v1.3.1 for PC.  
te sound, sound group (for example kick drum and snare hitting at the same time), or specific rhythmic interval, such as a 16th note. When you change a loop's tempo, each slice's start point shifts to accommodate the change. For example, if the original loop is at 130bpm and there are slices every 16th note, if you then change the tempo to 140bpm, the slice start points will move closer together to retain a 16th-note relationship.

Speeding up generally truncates or time-compresses the decay, because the ear is most interested in where the attacks fall. When slowing down, the decays are extended to lengthen the slice accordingly. The key to successful time-stretching with rhythmic loops is making sure the slices fall exactly at attack transients, and nowhere else. There must also be enough slices to define the beat, but not so many that the loop gets cut up excessively, thus creating sonic artifacts or other glitches during the stretching process.

Sonar can read 'acidised' files (ie. ones that have pitch and tempo information embedded in them according to Acid's file format). These are already optimally sliced, and will follow tempo (and pitch) changes without requiring any type of preparation. However, a non-acidised file will not have these time-stretching properties until you convert it into what Sonar calls a Groove Clip. This automatically adds slicing markers, which you can edit later to optimise the stretching process.

After importing the audio into the Clips Pane (either via the 'Import Audio' option in the File menu, or by simply dragging the file into the pane), hold down the right mouse button and click on the clip, and select Groove-Clip Loop or use the keyboard equivalent (hold down the Ctrl key and hit the 'L' key). In the Clips pane, a Groove Clip acquires rounded corners instead of the square ones usually associated with audio clips.

If you're working with standard, percussive-oriented material without swing, odds are Sonar will make a decent guess about where the slices need to go, and you'll be able to change its tempo when you play back the clip without having to tweak anything. But not all clips are accommodating, especially when slowing down tempo. For example, suppose the clip has a lot of swing applied to a 16th-note hi-hat pattern. Sonar can place slices every 16th note, but the 'swung' notes don't fall on that particular rhythmic grid (see the screenshots above).

Slowing down a loop where slices don't line up with attacks produces flamming due to the difference between when the program thinks the hi-hat should hit, as opposed to when it actually does hit. Speeding up the loop may not sound as bad, because the flamming gets closer together -- but tweaking will almost always make it sound better.

The place to edit slices is the Loop Construction view, which you reach by double-clicking on a Groove Clip. It has two main slice editing sliders, a Basic Slices slider that determines the rhythmic interval between slices, and a Transient Detect slider. The higher the Transient Detect percentage, the smaller transients have to be for Sonar to consider them a percussive attack. In general, you should use the longest rhythmic values and lowest transient detection possible. For most dance-oriented drum loops, eighth- or 16th-note slices with a transient setting of between 0 and 20 percent works well.

If you end up with loops that don't stretch properly, you'll have to edit the slice markers. Each marker has a small, triangular handle, and editing involves lining these up with attacks. Optimally, you want the marker to line up at the precise beginning of the transient; it's advisable to zoom in to get this as close as possible.

Once you move a marker, its triangle turns blue to show that it has been edited. You can also insert markers anywhere by double-clicking on the same horizontal line as the other triangles. Because inserted markers are not generated automatically, they too will have blue handles (see left).

High Basic Slice and Transient Detection values may add unneeded slices where no attacks exist. Th
  Solving The HALion Preset Problem  
  Last month, I mentioned that HALion works just fine with Sonar when using it under FXpansion's VST-DX Adaptor. However, a couple of people emailed me to say they couldn't get HALion to load any presets. You can, but you have to know where to look in HALion to do the loading.

Note that even when running HALion under VST, you're cautioned against using the standard VST 'Open' program options, and instead advised to use the small File box located within HALion. Unfortunately, that doesn't show up under VST-DX Adaptor, but there is a way forward (see screenshot, right).

Go to HALion's Options page;
Under Import Options, select Import Audio Files;
Specify the desired type of HALion file (FXP, FXB, or all);
Choose the file from the dialogue box, and click open.

 
ese degrade the sound by splitting sustained sounds, and should be removed. Click on the eraser tool, then click on a marker's handle to delete the slice (see below left).

All this editing may sound like a lot of work, but it's more complex to explain than it is to actually jump in and move markers around to match up with attacks. Your reward for doing so will be clips without flamming or artifacts, assuming a reasonable amount of stretching.

Sonar Anti-Freeze

I started having a weird problem with Sonar. It would work perfectly, but when I exited, it would freeze up. If I hit Ctrl-Alt-Del, a box would come up saying that Sonar was not responding. Selecting Sonar, then clicking on End Task would return the computer to normal operation. It had me baffled, so I contacted Sonar tech support, who had the answer.

When Sonar exits, it releases control over any drivers it's using, so the main reason for a freeze would be a lack of communication with a device's drivers. Normally, you can just deselect all the MIDI I/O via 'MIDI Devices' under the Options menu, then deselect all audio devices from 'Au
  Quick Tips  
  All programs that use slicing to do time-stretching work most efficiently when speeding up rather than slowing down. Therefore, if you want to create a loop that works well from, for example, 100bpm to 120bpm, you’re better off creating it at 100bpm and speeding it up than starting at 120bpm and slowing it down.

Editing markers is usually mandatory for drum loops played by human drummers instead of machines, as editing can compensate for any timing variations that interfere with the stretching process.

Use the lowest Slice Rhythmic Value possible (say eighth-note instead of 16th-note), consistent with good sound. Extraneous slices can cut off drum decays. This is particularly annoying with kicks, as you lose some of the fullness and ‘ring‘.
When you save a Sonar song or bundle, it retains all the Groove Clip parameters. However, as of version 1.3.1, there is no way to save a Groove Clip in ‘acidised’ format for use in other programs. You will need to call up the file in Sound Forge or Acid, use their acidising tools, then save as an acidised file.

Before getting too much into editing, try adjusting the Basic Slices and Transient Detection sliders first. Often choosing different values will solve flamming and other problems without the need for editing.

Sonar will endeavour to keep any markers that you’ve moved manually in their assigned positions, so you can experiment at any time with the Slicing and Transient Detect controls without losing the positions of your carefully placed markers.
 
dio Drivers' in the Options menu, and restart Sonar. You enable each driver one at a time, and exit after each enable -- if the computer freezes, you've found out which driver is causing the problem.

However, merely deselecting a MIDI driver from MIDI Devices still caused my computer to freeze, so stronger measures were required. At least it now seemed very likely that a MIDI driver was the problem. Support suggested the following, which worked for me:

With Sonar closed, delete the TTSSEQ.INI file from your system (normally found in the Sonar folder).

Open Sonar; it will prompt you to select MIDI devices. Don't choose any and continue.

Close Sonar and see if it freezes. If it doesn't, then the problem is indeed MIDI driver-related.

Open Sonar, and select drivers one by one until you find the one that breaks the system.

In my case, it was one labelled 'Generator Synthesizer', which was a hangover from a product I had reviewed on the same computer. I disabled it, and all was well. The same kind of fix applies to rogue audio drivers. The moral of the story: don't always trust Uninstall routines!

Published in SOS March 2002

Tuesday 9th February 2010
Login or Register here
Sub PIN or Email
Password
Remember me
Stay logged in
Lost password?
Request a reminder
Not registered?
Register Now for FREE
No https access?
Login here
February 2010
On sale now at main newsagents and bookstores (or buy direct from the SOS Web Shop)
SOS current Print Magazine: click here for FULL Contents list
Click image for Contents

Photos too small? Click on photos, screenshots and diagrams in articles to open a Larger View gallery.