AMD Bulldozer Review, AVX Performance using SONAR benchmark

Its pretty cool that Cakewalks AVX optimization work was featured in this review of AMD’s bulldozer from Tom’s Hardware. For those unfamiliar with Tom’s Hardware, the site is the holy grail of hardware reviews and benchmarks. Their depth of knowledge and coverage of the state of the art in computer hardware is unparalleled.

A few months ago I was contacted by Chris Angelini, the Editor in chief at Tom’s Hardware. He had come across a white paper that I co authored with Intel, featuring the AVX optimization’s in SONAR X1, and was very interested in knowing more about our experiences with AVX in relation to Bulldozer vs Intel’s SandyBrige.
Continue reading “AMD Bulldozer Review, AVX Performance using SONAR benchmark”

Utilizing Intel® AVX with Cakewalk SONAR X1

This is a whitepaper (Utilizing Intel® AVX with Cakewalk SONAR X1) which I co-authored with Intel engineer Rajshree Chabukswar, highlighting the advantages of optimizing for the Intel AVX chipset, with a focus on digital audio processing in a modern DAW like SONAR X1.

We’re excited with our synergetic relationship with Intel, which allows us to take  advantage of their bleeding edge technology in ways that directly beneft our users, allowing them to squeeze the most power out of their systems. While the paper is technical and requires an understanding of some low level programming, it also offers insight into the nuts and bolts of whats involved in optimizations for Intel CPU architectures in a modern DAW.

The paper features a real world case study of SONAR X1 code that was optimized in to take advantage of the benefits of the 256 bit AVX instruction set. If you have an Intel CPU from the Sandy Bridge processor family, it supports AVX and SONAR X1 will take advantage of it.
(While AVX is an Intel instruction set, it has also been adopted by AMD will be available in their upcoming Bulldozer processors. )

Code which is optimized for AVX  vectorization capabilities can work with 256-bit vectors, allowing working on 8 32-bit floating point values per iteration. In other words, this is twice the data throughput of earlier SSE instruction set! While this doesn’t necessarily translate to twice as fast, it is a huge step up in performance in many cases as the white paper illustrates.

The first step in any optimization task is what is referred to as “hotspot analysis”. In this phase you identify the bottlenecks in the code or that would benefit most from AVX optimization. We did analysis running through stress test projects and workflows that showed some classic hotspots. Once these were identified, the code was AVX optimized using the new AVX intrinsics available in Visual Studio 2010.

Click below to read the paper or download the PDF from Intel’s site:
Utilizing Intel® AVX with Cakewalk SONAR X1

[ Additional credits to Keith Albright and Bob Currie from Cakewalk, for hotspot analysis, development, and troubleshooting ]

SONAR 8.5 / Intel Core I7 / Windows 7 X64 – a heavenly trilogy for DAW users

I tend to upgrade hardware infrequently but when I do I typically go for the best of breed so that I can get the maximum life out of my system. Having recently finished a project and suffered the pain of an underpowered system it was finally time for a big upgrade…

My new DAW for my studio which runs SONAR 8.5 was built using an Intel Core I7 950 with Windows 7 Professional X64. The system was build completely from off the shelf components all available at Newegg and was relatively inexpensive. (It helped that I bought most of the components the day after thanksgiving <g>)

For a CPU, I chose an Intel Core i7-950 Bloomfield, 3.06GHz processor. The Core I7 is truly a breakthrough in processing power and a great choice for a DAW because of its blistering speed. I passed on the Extreme Edition since I didn’t think it was a good value for the price differential. At Cakewalk, we worked closely with Intel on evaluation versions of the Core I7, optimizing and streamlining SONAR to  work better with this chip, so this made it an obvious choice for me. During testing this processor broke all our benchmarks 🙂 I will post some results once I run our internal benchmark on my rig.

For the operating system Windows 7 X64 was a no brainer choice. During the SONAR 8.5 cycle we tested SONAR with beta and RC versions of Windows 7 and addressed all known compatibility issues.  We also found that the kernel enhancements in Win7 to be complimentary to a lot of the optimizations we did in SONAR itself. I chose the Professional SKU because I wanted some of the extra’s like the XP compatibility mode and remote desktop host. More Windows 7 resources and some articles I contributed to can be found here and in this Create Digital Music article.
Installing the 64 bit version was also an easy choice since I wanted 6GB of RAM. There are also other benefits to a 64 bit OS even if you are primarily running 32 bit applications as outlined in this blog post.

Anyway here are the parts from my original newegg order:

MB MSI X58M 1366 RT
VGA EVGA 01G-P3-N945-LR 9400GT 1G R
CPU INTEL|CORE I7 950 3.06G 45N R
MEM 2Gx3|CRUC BL3KIT25664TB1337 R
HD 1.5T|WD 32M SATA2 WD15EADS % 
I’m running this with two dual 22″ monitors – Acer’s that I had from my last setup. 

Disk: The Western Digital hard disks is not especially a great choice for disk streaming performance, but I couldn’t resist the price of less than 90 bucks for 1.5 terabyte! So far the disk throughput has been fine for my needs though it has a Win7 performance rank of 4.5.

OS: Windows 7 Professional X64

Audio interface: MOTU 828 MK2
I was a bit apprehensive after reading some install problems from users on the SONAR forums. However I loaded the latest MOTU 828 64-bit drivers without too much trouble at all. I found that I had to explicitly run the setup program as administrator or it wouldn’t install properly :-/ Once installed, the driver itself works great and I can dial down the buffer size all the way down to the minimum size and it plays back flawlessly. And my motherboard has a Via chipset for Firewire too which MOTU doesn’t recommend – go figure!

OS Installation:
The OS install went without a single hitch and picked up all the devices – but I went and installed native drivers for all the devices later since some were more recent than Windows update. 

WIFI Warning:
Do NOT buy the WMP600N WIFI adapter until Linksys fix their X64 drivers. They suck big time and. I returned the unit since the drivers performance were unusable with WIFI. This after the product is listed as being Win7 logo compliant! Instead I went with a wired solution which rocks. I’m using an old WRT54G converted into a wireless bridge using the opensource DD-WRT firmware. It takes some tweaking and requires you to be a bit brave with your router but its pretty well supported on that site. I now connected via standard ethernet to the machine which works great and I get 10MBPS internet speeds with it which is all I need. In general be wary of 64 bit WIFI drivers – they are notoriously bad. 

I can categorically say that the SONAR/Core I7/Windows 7 combination is a match made in heaven for DAW users! I easily have way more bandwidth than I would ever need for the next several years on this rig. On my largest projects which would previously max out the CPU or drop out (an older dual CPU Windows 2003 based machine), I am now able to run at 128 sample buffers with a MOTU 828 MK2, at 24bit/96KHz with under 20% CPU utilization in SONAR!

We finally have reached a time when 64-bit computing, low latency performance and low cost components are a reality. It’s a great time for DAW users!

One Of Us: SONAR

Getting into some details about how I used SONAR during the course of this project. If you wish to read the full thread about the project lifecycle start here – One Of Us: Conception

I started out with Cakewalk software way back in 1992 when I bought my first Windows 3.1 box. A screaming 386 with 2 MB of RAM, woo hoo :-). Cakewalk was already well known for its DOS sequencer written by Greg Hendershott, so when I read a review in Keyboard magazine talking about CAL (the scripting language built into Cakewalk Profeessional) I was convinced to buy Cakewalk Professional For Windows 1.0.  At the time I’d only written some rudimentary DOS software for MIDI, so being able to write my own scripts to generate MIDI in a real sequencer was exciting.  My interest in the product led me to become a beta tester for Cakewalk from ’94 through ’96. The bugs I logged wore them down and they finally broke down and hired me in 1997 :-).  Its been a long journey – yet it seems not so long ago when the days of getting 8 tracks of digital audio to stream stably on a PC was a challenge. Its easy to forget just how far we have come from what was once considered standard. Fun times!

I’ve always enjoyed mixing in SONAR. It suits my workflow, and the flexible mixing options allow me to change gears easily at any point in the mixing process, without needing to start over. Also the high resolution 64 bit resolution makes it ideal DAW to use when you want to mix as transparently as possible. Over the years, I have done many smaller projects in SONAR, but never a full blown CD production from start to finish. Producing this album provided me with the opportunity to do just that. Its can be a good thing to eat your own dog food once in a while – you might want to try it sometime, it’s not quite that bad I promise. 🙂 

For the initial phase of the project I started out running SONAR 8.3.1, where I set up the bussing setup and did some initial editing. I soon moved SONAR 8.5 (which was in beta at the time) for the main editing and mixing. I upgraded Dan Abreu’s production rig as well (not without some kicking and screaming), so that we could share the same  environment. I would take my external hard drive back and forth, doing part of the work at his studio and some at mine. This scheme worked very well for us.  Dan had a pretty fast quad core Intel box, and some nice mic’s so we decided to track the vocals and do the initial mixes at his place. My system was an aged dual processor Opteron rig, with a MOTU 828 MK2 for an audio interface. I regret not upgrading the system before I started this project, but it served me well throughout, with no problems other than the lack of horsepower when the projects got bigger. It was actually a great stress test for the software since SONAR performed flawlessly on this rig despite this.

Almost all the work done on this project was “in the box”. With the exception of a couple of virtual instruments (Garritan Steinway, Kontakt and Ozone 4) for some isolated tracks, all the plugins used are from SONAR 8.5. Below are some SONAR features of interest and misc tips and tricks I used on this project:

1. Fast bounce

For those who might not know this – a slower or faster computer makes no difference whatsoever on the quality of the mixes. For that matter, once you are in the mixing and editing phase, the audio interface also has no bearing on the final sound (as long as you are not recording the analog inputs of course). SONAR’s ability to “fast bounce” independently from your audio hardware is really invaluable in an environment like this (and in general too).  In other words, you can take a complex project that won’t even play on your system and render the mix to a wave file. I was typically working with around 24-32 tracks of 24/96 audio on this project. Whenever my system would bog down, I would bounce a submix, and archive/mute the source tracks to reclaim CPU. This would let me keep working with other areas of the project.

2. Global effects bypass

This feature got a lot of use to preview my mixes without effects. Also there were times when my old machine just couldn’t cope with the load of all the effects going while mixing. I would use this all the time to bypass all effects and then selectively turn on just the bins I wanted. This can also be an interesting way to mix since it helps you to focus on certain elements at one time – drums, vox, bass etc.

3. Offset Mode

SONAR has this somewhat hidden gem of a feature that I rely on a lot while mixing. I am always surprised how few users take full advantage of it. I suspect its because its not that visible in the user interface. You basically switch to offset mode by pressing the O key. In offset mode you get access to an additional gainstage for each mix parameter on a track or bus. This gain stage acts as an offset to any parameter that is being automated on the track/bus. Why is this so useful? Lets say you are mixing your project and you have added track/clip envelopes to get the balance just right on one of the drum tracks for example. Now you find that you need an overall gain boost or cut on that track. You could go and painstakingly edit every envelope on that track (potentially screwing up the relative levels you have so carefully set up) or you can tweak the offset value and be done! The offset is applied after all the envelopes so it acts like a master fader per parameter. In offset mode this way I can make very quick relative changes to the track while mixing without affecting the rest of the envelopes.

4. Using clip envelopes as an alternative to dynamics compression

I’m generally not a huge fan of compressors especially in the sort of music I do, unless they are used to add to the sound itself. While they are great for stuff like drums the automatic nature of a compressor takes away a lot of dynamics from the music. Instead often I will use clip and track gain envelopes to address unwanted peaks in the music while mixing. While this approach it can be somewhat labor intensive, I find the results a lot more musical sounding than just slapping a compressor on every track.
Used in tandem with bus waveform preview it can be an effective way to mix while retaining the natural dynamics of the music.

5.  Bus Waveform preview

Another extremely favourite feature of mine. As described above I use it a lot while mixing with clip envelopes. I turn on bus preview on my submix buses while tweaking the clip envelopes at mix time. The waveform preview gives me a good idea of where the mix is getting too hot allowing me to make changes to my envelopes in response to what I see.

6. VX64

This plugin was a surprise to me. I’d originally started processing the vocals with VC64 and some other plugins but wasn’t very happy with the results I was getting. One evening I put this on my vocal bus and in 10 minutes had something that sounded really great. It has this really smooth sound even when the vocals are compressed. TIP: Use the automated bypass to turn off the compressor module when you don’t need it. Every vocal bus on this project uses this plugin!

7. VC64

VC 64 is my goto compressor and EQ in SONAR. I don’t use compressors a lot but when I do I like the sound of this one and even its EQ so I tend to use it a lot.

8. LP64

I found this to be great to EQ for use on overheads. Its very transparent sounding.

9. Using a NAS and networked audio player for auditioning mixes.

This is my favourite “trick” to do fast consumer audio tests. My studio is in the basement and my stereo system is upstairs in the living room. So normally to test a mix on my stereo I would need to burn a CD and lug it upstairs and test. Some years ago I bought a Logitech SqueezeBox – a network music player. Its a super device that will connect to a share on your network via a SqueezeServer running on your home network. In SONAR I would simply export the mix to my NAS shared music folder and instantly be able to listen to the mix on my stereo. This was invaluable and a HUGE time saver since it allowed me to quickly teste my mixes on a reference consumer audio system all the time. I don’t think I burned more than 2 or 3 CD’s during the entire course of the project just because of this! A much greener solution than burning CD’s for sure.

 10. Phase Invert

Most people use the humble phase invert button on a track to fix phase issues or for testing mainly. I found (by accident) a good use for this seemingly mundane button. One night while working on a mix I noticed that one of the trumpet tracks had the phase invert button on and the other didn’t. (We had two close mics on the trumpet while recording) I didn’t recall doing that intentionally so I assumed Dan had done it for some reason some days ago. So I tried turning it off and the trumpet kind of sounded different but not as rich. So I turned it back on… Later I asked Dan about this and he said it must have been accidental.  Well, so much for happy accidents <g>
I ended up flipping the phase – on a couple of tracks to create that sound since it worked really well.

11. Audiosnap Slip Stretching

Audiosnap might not look like a feature that would get used in a jazz project but it can be useful in some instances. I had a section in one of the tunes where I needed to switch between two takes mid song. The second take was really close but the tempo was off by about 5% making a crossfade impossible. I lined up the two takes one below each other and measured the difference in samples. I then computed the stretch amount based on this and then slip stretched all the clips by the exact amount. Once I did that I cross faded the clips with a very quick fade. It worked beautifully – nobody I have played it for has been able to spot the edit despite the fact that there are some 16 tracks slip stretched! Additionally the new “phase coherence” parameter in the SONAR 8.5 radius stretching options made a huge difference here especially on the piano track. Without that I could hear some slight flanging in the sound when I did the operation in SONAR 8.3 initially.

12. MME mode

MME is typically only used to play back audio on consumer PC’s that don’t have professional audio devices. It has some other uses as well however. In this project I often wanted to play back the mixes on a vanilla PC sound system as a consumer audio test. I couldn’t play back my mixes in WDM mode with my soundcard since it doesn’t support 24×96 audio. However in MME mode thanks to KMIXER we have dynamoc sample rate conversion capabilities. Switching to MME provided me with a handy way to preview the mixes on my PC.

Windows Vista is here to stay

As part of my job at Cakewalk, I’ve been working on making our applications support this new operating system from Microsoft. Some things have been easy and some not. Interestingly the stuff that ended up being the hardest to do were features that looked relatively simple on the surface. I’ll elaborate on some of this in future threads.

Here are several published interviews, where I discuss some of the work we’ve done with SONAR for Windows Vista.

Vista for Music + Pro Audio: Exclusive Under the Hood with Cakewalk’s CTO [Create Digital Music]

Interview with Noel Borthwick, Cakewalk CTO [CakewalkNet]

SoundOnSound: Vista For Musicians: Part 2: What The Developers Think

The Guardian: Why Vista sounds worse

Why Vista Matters To Developers [EWeek]