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 ]

Why a program crash can be good for you

OK that sounds like an oxymoron. A crash, good? Thats crazy talk!
Well maybe not quite that crazy – read on to find out why…

Why would anyone actually want their app to crash you may ask? To answer that question lets cover some background about why applications crash on Windows (or any OS).

An application crashes when it performs an unexpected operation or encounters what is called an “exception condition”. Exceptions include unwanted operations like writing to invalid memory locations, divide by zero errors, page faults, etc. Programs can end up with exceptions like this for a variety of reasons:

  •  bugs in the progam code 
  •  bugs in loaded DLL’s which share the same memory and address space as the host application. You frequently encounter dll’s via plug-in’s in applications (eg. loading a VST in an audio application or a imaging plug-in in Photoshop)
  • bugs in the operating system

Normally when an error like this occurs, Windows will display the familiar error message “This Program Has Performed an Illegal Operation and Will Be Shut Down” and the program will close. Some applications like SONAR handle such errors more gracefully and will even try and intercept these exception and attempt to allow the user to save their work before exiting the program. Additionally on Windows you can choose to save what is called a Minidump containing “post mortem” debugging info that is very useful to developers to find out why the program crashed.
Continue reading “Why a program crash can be good for you”

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:

PSU CORSAIR|CMPSU-620HX RT
CASE ANTEC|SONATA ELITE BK RT
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 % 
DVD BURNER LITE-ON | IHAS424-98 R
WIRELESS ADAPTER LINKSYS|WMP600N R
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. 

Performance:
 
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!

Summary:
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!

Windows 7 For Music Production

Here are some links to various articles on Windows 7 that I have contributed to.

Cakewalk Windows 7 Resources
Our official Windows 7 resources page

Obsessive Windows 7 Under-the-Hood Guide for Music; Can You Finally Dump XP? 
This is an interview I did for Peter Kirn from Create Digital Music

How Windows 7 Will Affect Your Music Production
Similar material to the Create Digital Music interview

Windows 7 Improvements to Help Audio Recording
CNET blogger Matt Rosoff, posted his thoughts on how Windows 7 will make the art of audio production on PC easier. Quotes my blog post.

 Windows 7: Should You Upgrade Your Music PC?
Music Radar’s Ben Rogerson takes a look at Windows 7 to determine whether or not it’s a sound investment for people using their PCs primarily for music creation. Also some quotes from my Win7 posts.

The most out of Windows 7 and optimizing Windows for music
Another article from Peter Kirn from Create Digital Music that I contributed to

How Windows 7 Will Effect Your Music Production?

borthwick2Cakewalk Chief Technical Officer Noel Borthwick, a noted expert on Windows platforms, covers crucial topics around the introduction of Windows 7, such as compatibility with Cakewalk products, issues in upgrading from Windows XP and related points of interest for PC users.

For an in-depth look at Windows 7 and how it might affect your use of Cakewalk products, check out Noel’s Q & A below. Also, see Peter Kirn’s article at Create Digital Music for more  insightful tips on Windows 7.

Continue reading “How Windows 7 Will Effect Your Music Production?”