Sonar Workflow
From Sonar
m (→Listening to FLAC) |
m (→Lossy Formats) |
||
Line 316: | Line 316: | ||
====Lossy Formats==== | ====Lossy Formats==== | ||
- | You can convert a (RIFF) WAV file exported from SONAR using any number of lossy converters. | + | You can convert a (RIFF) WAV file exported from SONAR using any number of [http://wiki.hydrogenaudio.org/index.php?title=Lossy lossy] converters. |
These include [http://wiki.hydrogenaudio.org/index.php?title=Ogg_Vorbis OGG/Vorbis], [http://wiki.hydrogenaudio.org/index.php?title=AAC AAC], [http://wiki.hydrogenaudio.org/index.php?title=AC3 Dolby AC3] and [http://wiki.hydrogenaudio.org/index.php?title=Musepack Musepack]. | These include [http://wiki.hydrogenaudio.org/index.php?title=Ogg_Vorbis OGG/Vorbis], [http://wiki.hydrogenaudio.org/index.php?title=AAC AAC], [http://wiki.hydrogenaudio.org/index.php?title=AC3 Dolby AC3] and [http://wiki.hydrogenaudio.org/index.php?title=Musepack Musepack]. |
Revision as of 00:04, 20 September 2006
Contents |
Recording Audio
Recording audio in SONAR is quite easy. You simply need to make sure your signal chain is up and working, your sound card control panel is set right, and your track in SONAR is selected as the source and armed.
Signal Chain
This is where it's happening outside the box (e.g. your computer). Simply connect your mic to your mic preamp or mixer, your preamp or mixer to your sound card / audio interface, and connect that to your computer. If you're recording an electric instrument through a direct box of some sort, the process is even simpler: connect your instrument to the direct box IN and your direct box OUT to you sound card / audio interface.
Sound Card Control Panel
Every sound card / audio interface maker has a different control panel applet, but some general rules do apply.
You want to make sure whatever physical IN jack you've connect your mixer or direct box to on your sound card has its volume/input fader all the way up in the control panel, and that it's not muted. Same with the master volume on multi-input sound cards.
Also, if you're using a stereo channel as two discrete mono channels, make sure IN 1 is panned hard left and IN 2 is panned hard right, in both your mixer and your sound card control panel.
Finally, configure your sound card's latency, sample rate, signal levels and other settings in its control panel. Start with a very generous latency, such as 512 or 1024 samples, just to make sure you're not getting instant drop outs in SONAR that keep you from recording.
SONAR track
Select or create a new audio track in SONAR. Go to its input "slot" and select the soundcard and input port your have your equipment plugged into and your sound card control panel configured to use.
Arm the track in SONAR by clicking on the small R on the track's top bar (this is the R that follows M and S). Now hit the record button in SONAR's transport control or the R key on your computer keyboard.
You should now be making music.
SMS 14:02, 15 September 2006 (EDT)
Troubleshooting
Sometimes things just don't work. After all, there are enough cables, boxes, assorted electronic gear and configuration involved in recording audio that anyone can have a mishap. The good news is that once you get your setup working, you shouldn't have to touch it again!
Below is an exhaustive troubleshooting procedure for recording audio, written for users at the "desperate" level. It's based on the Delta44 and Delta1010 audio interfaces, but the suggestions are good for any equipment, though a few specific names of parts may change.
Signal Chain Troubleshooting
Set your signal chain up as follows:
- Mic →
- Your mixer's Mic IN 1 (make sure mixer is turned on, gain is very high, faders are very high too [just to eliminate low levels as a potential source of problems], and pan is hard left) →
- Your mixer's Main Mix 1, Main Out 1, or whatever it may be named →
- The Hardware IN 1 on your sound card / audio interface.
Later, you'll also want to connect your mixer's Main Out 2 / Main Mix 2 to the sound card's Hardware IN 2, but that's for later.
TO TEST: Plug your mixer's Main Mix 1 / Main Out 1 directly into a guitar amp or equivalent. If you get sound, you know your mic is working, your cables are good and your mixer is both functional and properly configured. And you can forget about this whole part of your signal chain as a potential source of problems. (You may have to temporarily pan to center to get sound this way).
Sound Card Control Panel Troubleshooting
(The following was written with the M-Audio Delta series in mind, but is easily adapted to other sound cards).
- Monitor Mixer Page
- Make sure that:
- All levels are at their absolute highest
- Nothing is muted (e.g. everythings is "Solo'd".)
- Hardware IN 1 is panned hard left, Hardware IN 2 is panned hard right, and so on, alternating hard left (odd-numbered inputs) with hard right (even-numbered inputs) on both your mixer and the sound card control panel. You can do this any way you please, actually, as long as the mixer and control panel settings are identical.
- Patchbay / Router Page
- Set Hardware OUT 1/2 to "Monitor Mixer" here.
- Go to the control panel's "Monitor Mixer" page, stare intently at the colored bars, and sing like a banshee.
- Do any of the meter bars move?
- If so, your signal chain is working (your cables are good, your mixer is set up right, your sound card is properly installed, you've chosen the right inputs) and your sound card's driver and control panel are properly configured. These, too, can be eliminated as possible problems.
If not, the problem is almost certainly in the control panel configuration. The other alternative is a gear problem -- a loose cable, an short circuit somewhere, etc.
If you've made it this far, go to the next section.
Output Troubleshooting
This is where SONAR comes in. Set it up to use your soundcard as its inputs and outputs:
- Go to SONAR's OPTIONS → AUDIO → DRIVERS and select everything that has the name of your soundcard, for both inputs and outputs. Then restart Sonar just to be completely sure the changes have been made.
- Go to SONAR's OPTIONS → AUDIO → ADVANCED and make sure the Playback and Recording section's "Driver" item is set to ASIO.
- Go to SONAR's OPTIONS → AUDIO → GENERAL and pick the first item listed for your soundcard in both "Playback timing" and "Record Timing". Any will probably do fine, you just don't your onboard sound card or whatever being selected here.
- At the very bottom of this page, you will see a button labeled ASIO Panel.... Click it. The M-Audio control panel should appear, and it would be a smart move to double-check all the settings here.
SONAR Troubleshooting
- Create a mono audio track.
- Set the input to "(Your Sound Card) ASIO" > "LEFT ASIO Analog In 1 (Your Soundcard) [1]" or something very similar to it.
- Arm your track: toggle the little R button in the top bar of the track, to the right of the name and the M (Mute) and S (Solo) buttons. It shoudl be red now.
- Hit the R key on your computer keyboard or the record button in the SONAR transport controls to start recording. Sing away.
- Stop, go back to the beginning, and SEE if anything was recorded -- look at the wave form in the track and if it's not flat, you (or your audio, to be more precise) are getting in! (Make sure OPTIONS → GLOBAL OPTIONS → GENERAL → "Display Waveform Preview While Recording" is checked to see things in real time).
If you see your sound here, everything from your mic on through your sound card and Sonar's INs are properly configured. Breathe a sigh of relief. But don't break out the six-pack yet.
Now, if you can also HEAR your audio upon playback, your problems are solved. But assuming you can't:
- Go to your audio track in SONAR.
- Go to the "Output" section (the horizontal bar with a stylized O at the far left).
- Click it and select Master.
You could go out directly here, instead of throught the Master, but that will probably only cause you problems later. So we're going to do it right, though it takes another step or two. So, you've selected Master. Now...
- Go to the bottom of the SONAR screen and you should see a buss (looks just like a track really) that says Master.
- On ITS output select "ASIO Analog OUT 1/2 (Your Sound Card) [1]" or similar.
- Plug your left studio monitor's audio cable into it at one end and into HW OUT 1 of your sound card at the other.
- Plug your right studio monitor's audio cable into it at one end and HW OUT 2 of your sound card at the other.
- Plug your monitors in and turn them on, if you have active (powered) monitors. Do the same with your monitor amplifier if you have passive (unpowered) monitors.
- Play your recording, cranking the volume as needed.
You should hear something here. If you've followed all the above steps, AND you don't happen to have faulty hardware, it's inevitable.
Assuming you are getting sound, now you'll want to use different outs -- at least one direct to your monitors (you've just done that) and one to your mixer for the headphones used in tracking.
That's easy! Just...
- Go to SONAR's Master buss.
- Right click on some grey part of it.
- On the pop-up menu, select Insert Send.
- Follow that menu to "(Your Sound Card) ASIO Analog Out 3/4 [1]" and select it.
- Now connect your sound card's Hardware OUT 3 and Hardware OUT 4 to the appropriate input on your mixer.
Wasn't that a great cop-out -- "appropriate input"!
- On smaller mixers the TAPE/CD IN L & R inputs are commonly used. This often requires a custom cable using two 1/4" TRS cables at the soundcard OUTs end and two RCA jacks soldered on to the other end and plugged into the TAPE/CD IN L & R.
- On many mixers this also requires the Main / CD-Tape button be be down in order to work.
- You may have another IN on your mixer that works for this. If so, no soldering or RCA jacks will be needed -- just plug the TRS cable into the mixer.
- Plug headphones into mixer's Phone Out plug (or something similarly named).
If you follow these directions to the letter you SHOULD be good to go. Otherwise, you may have a problem with your gear.
Gear Troubleshooting
In the first case, you will have to test every single physical component of your system. That means either swapping each component out for an identical one, or testing each component on another system:
- Mic / instrument
- Every single bloody cable you have
- Mixer / direct box
- Sound card breakout box (if applicable)
- Sound-card-to-computer cable
- The sound card itself
When you do this:
- Test one component at a time
- Make very sure that everything is plugged in completely and solidly.
- Move, jiggle and shake each one to make sure there's no short anywhere (who knows -- maybe your out jacks' soldering is coming loose or something along those lines).
- Use whatever type of cables your manufacturer suggests. Using 1/4" unbalanced (TS or guitar) cables when 1/4" TRS (balanced) cables are specified might work, but it also might not. Don't take the chance -- use what the manufacturer suggests. Using balanced cables will also drastically reduce the noise in your recordings, so it's double plus good!
TIP: When troubleshooting anything, you must be extremely disciplined and systematic. Change one thing at a time (no more!) and then test your entire rig out. Then change another and test again. And so on. It's tempting to change a bunch of things at once, in hopes of saving time, but though you may get lucky this way, chances are you won't, and you also won't have any more of an idea of what's wrong than when you started.
SMS 13:58, 15 September 2006 (EDT)
Recording MIDI
From Softsynths, Samplers, Etc.
From External Controllers / Synths
Mixing Procedures
Exporting Procedures
Exporting From Sonar
Once you've finished composing, tracking, mixing and exporting your music, you'll end up with one of four file types with SONAR's File | Export | Audio function: RIFF WAV, Broadcast WAV, Windows Media Advanced Streaming or MP3 (if you have paid separately to use the MP3 codec that comes with SONAR).
RIFF WAV and Broadcast WAV files are the file types of choice for mastering, as they are lossless formats.
MP3, on the other hand, is a lossy format, meaning that you not only lose information (read: quality) by encoding a file as MP3, but you also lose additional quality every time you modify the file's content (though not, of course, its metadata). This makes MP3s suitable for casual listening, but not for mastering or even demanding listening.
If you choose not to buy the shareware codec that comes with Sonar, you can still produce MP3s with an external codec. By far the most highly recommended of these is LAME, which is open source. It is also widely considered to be the best MP3 encoder around, making it preferable to the codec bundled with SONAR even without condidering monetary factors.
SMS 14:02, 15 September 2006 (EDT)
Exporting MP3s from SONAR using LAME
Step-By-Step Instructions For Encoding With LAME in SONAR
If you don't want to unlock (buy) the Cakewalk MP3 encoder, you can use the LAME MP3 encoder directly in SONAR. This way you don't need to first export to .wav and then encode to .MP3. The LAME MP3 encoder is high quality, open source and free.
Here are step-by-step instructions for setting up the LAME MP3 encoder (from the Cakewalk Forum Thread by Jesse G):
- Download and install the LAME encoder.
- Open SONAR 3/4/5 and go to Tools → Cakewalk Ext. Encoder Config.
- In the Friendly Name field write LAME MP3 Encoder.
- In the Extension field write .MP3.
- In the Description field write whatever you want.
- In the Path field put the path where you installed the LAME encoder. That is where lame.exe and lame_enc.dll are located. I keep my LAME encoder in my "C:\\Program Files\\Cakewalk\\Shared Utilities\\LAME" folder. You can also copy and paste the extracted contents of the LAME .zip file to your Sonar shared utilities folder and then, when you have to perform this step, click the browse button to find the location.
- (Note that you may have to enclose paths containing spaces in quotation marks).
- In the Command Line field write (for example): lame -b 192 -m j %I %O (See below for more encoding options).
- Uncheck Keep Wave File.
- Press Save button.
This will export a constant bitrate 192Kbps joint stereo MP3 file. If you want 128Kbps, replace 192 with 128 in the Command Line field. The next time you click on File → Export → Audio in SONAR 3, 4, 5 you'll find "LAME MP3 encoder" as a type of audio.
If you want to be able to export to both 192Kpbs and 128Kbps, click New and then repeat the above steps, but this time use 128 instead of 192 in the Command Line, and also give them different Friendly Names, such as "LAME 192k MP3" for the 192 version and "LAME 128k MP3" for the 128 version. Now you will have both choices the next time you export audio.
Dcastle 12:42, 15 September 2006 (EDT)
Fine-Tuning LAME Encoding
LAME permits a huge number of options in the command line. It's well worth your while to check out the main ones, as they can greatly affect the quality and file size of the MP3s you produce. These options are specified in the Command Line field of SONAR, as mentioned above. The syntax is:
- lame <options> <infile> <outfile>
In practice, you will only be interested in changing the options, so the syntax can be simplified to:
- lame <options> %I %O
LAME offers three types of encoding: Variable Bitrate (VBR), Average Bitrate (ABR) and Constant Bitrate (CBR). The rule of thumb, following Hydrogen Audio's testing, is as follows: at a given bitrate, VBR is higher quality than ABR, which is higher quality than CBR (VBR > ABR > CBR in terms of quality). The exception to this is when you choose the highest possible CBR bitrate, which is 320 kbps (-b 320 = --alt-preset insane), but this produces very large file sizes for very little audible benefit.
The following are the recommended LAME encoding settings from Hydrogen Audio. They all go in the <options> field of the Command Line entry in SONAR:
Variable Bitrate (VBR)
Use VBR when the goal is to achieve a fixed level of quality using the lowest possible bitrate.
- VBR is best used to target a specific quality level, instead of a specific bitrate. The final file size of a VBR encode is less predictable than with ABR, but the quality is usually better.
- Usage: -V(number) where the number is 0-9, 0 being highest quality, 9 being the lowest.
Example: lame -V2 %I %O
Average Bitrate (ABR)
ABR is a compromise between VBR and CBR modes. ABR encoding varies bits around a specified target bitrate.
- Use ABR when you need to know the final size of the file but still want to allow the encoder some flexibility to decide which passages need more bits.
- Usage: --preset <bitrate> where <bitrate> (desired averaged bitrate in kbit/s) can be any value between 8 and 320 (e.g. 9, 17, 80, 128, 133, 200, etc).
Example: lame --preset 200 %I %O
Constant Bitrate (CBR)
CBR encoding is not efficient. Whereas VBR and ABR modes can supply more bits to complex music passages and save bits on simpler ones, CBR encodes every frame at the same bitrate.
- CBR is only recommended for usage in streaming situations where the upper bitrate must be strictly enforced.
- Usage: -b <bitrate> where <bitrate> (in kbit/s) must be chosen from the following values: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320.
Example: lame -b 192 %I %O
Fine-Tuning Other LAME Options
When exporting MP3s from SONAR using the LAME encoder, you can have a series of convenient operations performed automatically. These include:
- -c: Setting the Copyright bit.
- --clipdetect: Detecting clipping in the encoded MP3 file (you will only see this information if you keep the LAME command-line interface open).
Example: lame -V2 --clipdetect -c %I %O
This will produce a very high quality VBR (-V2) MP3, with the copyright bit set and clip detection activated.
The LAME help files detail many more options.
Getting LAME
The main LAME site, on SourceForge, offers only the uncompiled LAME source code, which is of no use to the average end user. What you need is a compiled binary of the LAME encoder.
You can download the LAME encoder from several sites, including:
Avoid using alpha (a) versions of LAME. More often than not these are exclusively for testing purposes -- use them only if you want to help developers with feedback.
To manually encode MP3 files using LAME, several graphical front-ends are available, including RazorLame. Note that RazorLame and most other front-ends require that you install the actual LAME binary encoder separately.
Exporting Lossless FLAC files from SONAR
Step-By-Step Instructions For Encoding With FLAC in SONAR
To export compressed archival-quality files from SONAR, the FLAC encoder is recommended. Lossless files retain all the information contained in the source .WAV --the FLAC file can be converted back into a .WAV file with 100% bit-for-bit accuracy-- but are highly compressed, though not nearly as much as MP3 files.
Here are step-by-step instructions for setting up the FLAC encoder.
- Download and install the FLAC encoder.
- Open SONAR 3/4/5 and go to Tools → Cakewalk Ext. Encoder Config.
- In the Friendly Name field write FLAC Lossless Encoder.
- In the Extension field write .fla.
- In the Description field write FLAC Lossless Compression Level 5.
- In the Path field put the path where you installed the FLAC encoder. This is where flac.exe and related files are located.
- A path without spaces is recommended.
- In the Command Line field write: flac.exe --compression-level-5 %I -o %O.
- Uncheck Keep Wave File.
- Press Save button.
This will export an optimally-compressed (compression level 5) FLAC file.
Fine-Tuning FLAC Encoding
FLAC permits a huge number of options in the command line, but the truth is you won't really need them. However, in case you decide to experiment, read the FLAC documentation for more details.
Although FLAC offers 10 levels of compression, all lossless, the optimal level is 5. Higher than that and you gain only a small increase in compression, at a large processing cost. Lower than that and the level of compression quickly becomes less than ideal. But at the same time, since FLAC is an asymmetric encoder, encoding a FLAC file at higher compression rates takes up more CPU time, but decoding one (e.g. listening to it) does not take appreciably more CPU resources.
Getting FLAC
The main FLAC site, on SourceForge, has everything you need to use FLAC -- the encoder binaries, documentation, a FAQ, and so on.
Listening to FLAC
FLAC is admittedly not the world's most common format for listening, but it's quite easy to do so.
- Foobar2000 is a free audio player that supports FLAC and a ton of other formats you probably haven't heard of, right out of the box.
- VLC is a GPU video and audio player that supports FLAC out of the box.
- Winamp can play FLAC files by installing a simple plug-in.
- Windows Media Player can play FLAC files by installing either the CoreFlac of Illuminable DirectShow filters.
- J.River Media Center can play FLAC files using the In_FLAC plug-in.
There are also FLAC plug-ins for many other media players. See here or here (at the bottom of the page) for lists of programs and plug-in links.
Transcoding Into Other Formats
You may want to transcode a file exported from SONAR into another format for any number of reasons -- getting better sound per byte than MP3, getting the same quality as MP3s in a smaller size, archiving mixdowns, and so on. To do this, you need an external codec, either lossy or lossless. These may have built-in graphic interfaces for easy transcoding (drag-and-drop, for example), or they may be command line utilities, with or without a graphical front-end.
Lossy Formats
You can convert a (RIFF) WAV file exported from SONAR using any number of lossy converters.
These include OGG/Vorbis, AAC, Dolby AC3 and Musepack.
WMA gives you the choice between lossy or lossless compression; the lossy compression is roughly comparable to that of MP3 files at equivalent bitrates, and the same caveats for the MP3 format apply to WMA lossy compression.
Comparisons of lossy codecs are available here, here and here.
Lossless Formats
Assuming you wish to keep archival (lossless) copies of your mixdowns, but want to use a minimum of space, you have the option of converting RIFF WAV files to a compressed lossless format (as well as exporting directly), which can provide a considerably smaller file than the source WAV, while retaining 100% of the audio information in the recording, unlike MP3 or WAV lossless files.
One of the most popular lossless encoders is the open source FLAC. FLAC is available for most every operating system around, and in addition to providing substantial lossless compression, it is also directly playable on a growing number of home and car stereos, portable music players, and software music players. Some find it to be the ideal compromise solution for digitizing their CD collection, providing perfect playback while taking up less space than WAVs (though quite a bit more than MP3s).
FLAC allows an practically unlimited amount of metadata (including arbitrary, user-made tags) to be included in files, which can be quite useful when preparing files for long-term storage. FLAC files can be converted back into WAV files that are bit-for-bit identical to the source WAV using the command line encoder (which is also a decoder, tester and analyzer), various front ends, or the built-in file converter functions of some software players, such as Foobar2000.
The FLAC command-line encoder can be downloaded from the FLAC homepage. A large number of graphical front-ends for making FLAC easier to use are available here.
A filter that allows FLAC files to be edited directly in Cool Edit or Adobe Audition can be had here. See above for more details on playing FLAC files (not necessary for archival purposes, but it's pleasing indeed to hear true CD quality sound in a compressed format).
Other lossless codecs are Monkey's Audio, WavPack and WMA Lossless.
Comparisons of FLAC and other lossless codecs can be found here, here, here and here.
SMS 14:02, 15 September 2006 (EDT)
Long-Term Archiving and Storage of Projects
Formats
- CWP + Audio Files Folder
- CWB/BUN Bundle Files
- Mixdowns
Physical Media
- Hard Drives
- DVDs / CDs
- Tape
- Online Services
Archiving Security Software
Whatever format and physical media you choose, there are additional steps you can take to protect your valuable (or invaluable) recordings.
- QuickPar
- QuickPar is a free utility that scans your files, divides them up into virtual blocks, and creates a series of PAR (parity) files that allow you to recover corrupted files from any type of media. It works on the same principles as RAID.
- For example, if you choose to use virtual blocks 1MB in size, create 500MB of QuickPar files, and burn them along with 3.8GB of SONAR projects onto a DVD, you can recover up to 500 corrupted file chunks of up to 1 MB in size (it doesn't matter if the chunk has 1 byte or 1 MB of corruption). In other words, you can save up to 500MB of audio files that have been utterly corrupted by a dying DVD -- files you would never be able to access again otherwise.
- This is very, very good insurance. And it works for any type of physical media.
- SFV
- SFV, or Simple File Verification, scans your files and creates a checksum for them. This allows you to determine if any of them have been corrupted. But unfortunately, it doesn't have the capability to recover corrupt files. For that, use QuickPar.
- MD5
- MD5 does the same thing as SFV, and has the same limitations -- it can tell you your files are corrupt, but it can't do anything about it. Again, for that use QuickPar.
- A free MD5 utility is available here.
SMS 14:02, 15 September 2006 (EDT)