Friday, March 19, 2010

More on sampling...

This week it seems I've been non-stop sampling with the S2000. I've made a few changes in the way I'm working which makes things faster. But it can also be a pain. Here I'll try to explain as briefly as possible what happened yesterday up until the early hours of this morning.

I started out by getting a high-powered breakfast, my ritual when I've got a big day ahead of me. That consists two pints of milk--one white, one chocolate because I don't like white milk and store-bought chocolate milk is too sweet--and a cinnamon twist from local donut shop Shipley's. Normally I'd prefer a chocolate iced donut, but my wife and I had stopped in too early. I made a pot of coffee when I got home. And let me tell you, there is NOTHING quite like working all day on a project on just a quick morning sugar rush and a steady stream of java. I made 8 cups and slowly sipped about half a cup at a time, roughly once an hour. Something else that helps is drinking LOTS of water.

First step is identify your source and record. For me this is easy: Absynth. I choose this one because it's the easiest way to draw waveforms, and I've built up a nice library of single waves. I use Absynth's record feature to get a 1/4 second snippet of 4 octaves: C0, C2, C4, and C6.

Next step is trim the samples. I've found this works best, even if the note is just slightly out of tune: C0=1348 samples, C2=337, C4=84, and C6=21.

Before I continue, let me say these samples will be out of tune and, for the moment, will have to be tuned manually. Why is that? Notice that the sample length (at 44.1k) of all 4 notes is a whole number. That's because samples are absolute; there are no fractions of samples. I forget the exact frequencies of those notes, but I do know that those frequencies do not fall neatly into any subdivision of the 44.1 kHz sample rate. What this means for us is that each new cycle is going to be a variation of the source sound until enough cycles have passed that it falls back right again. Don't ask me how many time it takes because I don't know, nor do I care. If you know how to use a calculator, you can figure it out. I'm perfectly comfortable tuning samples. Anyway, because those sample lengths are only approximations of the full wave cycle, each sample will tend to be slightly sharp.

Notice that the lengths of C4 and C6 don't fall in the same logical pattern as C0 and C2. Why is that? Notice that C2 is an odd number of samples but directly proportional to C0 4:1 based on a cycle of 1348 samples. Remember, there's no such thing as a fraction of a sample. For C4 and C6 to work, they have to be based on a slightly lower number that can be further divisible: 1344. That way, you can maintain the 4:1 ratio with C4 and C6. But what's the obvious problem here? The tuning will be pushed further sharp, a problem which will have to be corrected later.

So the samples are trimmed. A hard lesson I learned early on was that the S2000 only likes samples of a certain length. I haven't been adventurous enough to find out exactly what that is, but I did learn that 1348 samples seems to be long enough. The S2000 doesn't seem to like looping a full sample, either. So I do know that the sample length for a full wave cycle at C0 has to be at least twice that. I also figured out that the S2000 doesn't necessarily leave the loop points where I set them. Assuming that the points will be shifted somewhat, we need a third wave cycle as a safety. So that's 1348 3 times.

The next step, then, is to copy the wave onto itself to yield an appropriate length, 1348*3 for low notes and 1344*3 for high notes. This is where the samples part ways with the MBP. I load 'em up to a convenient floppy disk and transfer 'em to my almost 10-year-old PC, still running Win98SE perfectly stable! I have an audio editor that, though extremely dated at this point, works wonders with sample information. Now if only it had batch processing... The procedure goes like this: Select all, copy, move cursor to end of sample, hold down paste until the desired length is reached, tab to next window, repeat. This goes very quickly using only shortcut keys, no mouse.

After lengthening the samples, loop points have to be set. Since each sample is the same length and there is no variance in the waveform, the loops can also be all the same length. It's not a hard guess: 1348 for low notes, 1344 for high notes! The difficulty has been that this is a lengthy mouse operation, selecting an exact length and looping to selection. I'm wondering if manually typing in the info would be faster, since it should be the same for all samples.

The next step would not have made sense to me had I not learned a hard lesson last night: My particular sample editor works best in wav format and doesn't seem to output aif properly, at least not in a way that's compatible with the S2000. When I tested the samples, there were not looping. When I checked to see what the problem was, the loop length had been increased by one sample. It worked fine after I jiggled the alpha dial, but I'll leave it to the reader to guess what happens when the loop length gets jacked with! So for the way I work, the output has to be all wav from the Mac to the PC.

After the WAV files (NOT aif) have been trimmed, lengthened, looped, and root keys set, they have to be saved in a format friendly to the Akai, which IS aif. My earlier mistake had been trying to work all in aif in order to cut out a few steps which shouldn't be necessary (they are). I herd all my growed-up samples back onto floppies for the drive back to the MBP. The floppies are then erased (again, for the third time, by the way) after the wavs have been transferred to the Mac. I fire up Logic, load all samples into the bin, and then batch convert the whole lot of 'em to aif.

These go BACK to the floppies which are then loaded into the old PPC Power Mac and copied to a desktop folder. Mesa is already up and running, so it's a simple drag-and-drop into the sampler memory. Finish line!

For now, I'm fine tuning all samples from the face of the sampler. This works for now because all samples have a strong fundamental. The trouble will be when sidebands cause enough trouble to confuse the tuner or when additive waveforms emphasize an overtone which will be detected as being out-of-tune even if it isn't. In the future, fine-tuning information will have to be included in the wav file. It will certainly be less time-consuming.

Beyond that, there are a few nit-picky items to handle. For example, this process leaves the file extension in place. I like to rename all samples so that they don't have the extension. It takes a little time, but MESA makes that much easier.

Here's a wrap-up of the entire procedure:

1. Record samples with Absynth, save in wav format.
2. Trim waveforms in Logic.
*Cycle lengths are (in samples): C0=1348, C2=337, C4=84, C6=21
3. Transfer to PC
4. Copy/Paste samples to proper length
5. Set loop. Length is 1348 samples for low notes, 1344 for high notes.
6. Transfer back to MBP, load into Logic.
7. Batch-convert to aif.
8. Transfer to Mac PPC.
9. Use MESA to transfer to S2000.


No comments:

Post a Comment