** 2 page regular features / 1400 words ** Hitting the right note Fumbling with frequencies? Puzzled by pitch? Tune in with Shiuming Lai... The last instalment of this series examined the technique of varying the playback speed of a recorded sound to make musical notes. This has some fundamental implications which are often overlooked, as demonstrated by many works found on the computer music scene - some of which are even composed by highly revered figures in their field. Irrespective of the base technology (analogue or digital, the principle is the same), the absolute pitch of the resultant sound is only relative to that of the original from which it was synthesised. More specifically, it's a function of three variables: a note **ITALIC** n **/ITALIC** , its base sampling frequency **ITALIC** b **/ITALIC** and output replay frequency **ITALIC** r **/ITALIC**. ** FUNCTION.GEM here ** One of the main flaws in the original Sound Tracker format was the omission of sample note information. Therefore, in order to make effective use of this system, we must establish a standard recording speed for a reference pitch. In digital terms this means a set sampling frequency. Although the word "frequency" is regularly used in relation to digital recording, it's important to differentiate between sampling frequency and signal frequency. To avoid confusion we'll say sampling "rate" henceforth. The most common tracker format on the ST (4-voice Pro/Noise/Sound Tracker) uses a base sampling rate of 16KHz for C-3, the C note in the third octave. The table on this page contains the exact sampling frequencies, to the nearest Hertz, for the three-octave range (see boxout) of this standard. Unfortunately, low-cost personal computer sampling systems tend to have a small number of preset rates. Even Soundlab (figure 1) with its fairly large range of sampling rates, can't quite match the ones we need. ProTracker tips This isn't as bad as it appears because the difference can be compensated for by software. One particularly powerful feature of ProTracker (supported by CyberSTrider and most popular tracker in the Maggie charts) is its resampling facility. It's also a cause of much head-scratching because ironically, the manual doesn't explain how to use it. Press [Control]+S to open the sampling menu, shown in figure 2. You can see in the screenshot the mouse pointer is over the button marked E-2, which we will call our current sample pitch. The button below, marked C-2, is the reference pitch. All this means is, E-2 sounds like a properly tuned C-2. These two buttons are for data input (click on them to clear the entry, then enter a new note by pressing the appropriate key on the keyboard) - so the program can compute the correct shift from the specified tuning error. From theory to practice On the Reader Disk are some samples for you to play with. REF.SPL is a correctly-tuned reference sample, so load this first. Then load SAX.SPL into another, empty slot. This is a typical sample from a PD disk allegedly for use in tracker programs, and is out of tune. For demonstration's sake we'll use C-2 as our reference pitch; play a few notes of SAX.SPL until you match or nearly match REF.SPL at C-2. It should be D#2. Now we've found the error we can enter the data. Going back to our previous explanation, this is "D#2 sounds like C-2" so make sure your current sample is the one you're going to modify, click the current sample pitch button and enter D#2. The reference is C-2 by default so you don't need to change that. Now just hit RESAMPLE. The last practical experiment concerns sounds which are out of tune by less than a note even after resampling. For this, load CORK.SPL (a sound generated by Electronic Cow's Snippit Synth using a popping bottle cork as the grain wave table) then repeat the process of finding a note to match reference C-2. It's roughly D#2 again, so resample it as before. Now adjust the fine tune controls - click on the VOLUME box in the sample parameter block to reveal the FINETUNE box. It's approximately -3. Once your sound is tuned, it's advisable to save it using ProTracker's extended IFF format, to preserve fine tune and loop values. If at this stage you're thinking resampling is a lot of hassle, how many times have you written a track then tried changing the instrument? If the one you composed with was not properly tuned, you're faced with worse problems, especially if you want to evaluate the piece with a number of other instrument sounds. In fact, there has been at least one case of a tracker module's score being translated into conventional musical notation for a pianist, and when it was played for real it sounded completely off. The piano was not to blame as it had been subject to regular tuning checks, so I hope that consolidates the point. It's worth every effort to knock samples into shape before commencing any real work. ** Boxout 1 ** Only three octaves? In isolation it seems musically inadequate - however, three octaves is a deliberately imposed limit of a tracker's pitch-shifting ability (some have four, maybe five), rather than the range the hardware can reproduce. A digital recording can only be pitch-shifted so far, before its finite resolution deviates from the original source to the extent it begins to sound terribly artificial in comparison. That's the engineering viewpoint. On the other hand, in an artistic sense, excessive resampling can create some very unusual sounds, so by all means try it and hear. Noise Tracker users try bumping a sample up or down a few octaves (figure 3) while ProTracker people can use the resampler to get the same effect; make the current sample pitch an octave more or less than the reference and resample. Repeat this several times, as the current sample pitch button changes to match the reference pitch after each resampling operation. Multi-sampling This is a technique used by synth manufacturers when sampling a real instrument, to overcome the aforementioned problem. It simply involves sampling a number of notes along the musical scale of the instrument. Upon playback from the synth, interpolation fills in the ones in between to recreate the whole range of notes, far more accurately than can be achieved with a single sample for the same range. You can apply the same method when recording instruments for trackers, with the advantage you only need sample for the range you will use. ** /boxout 1 ** ** Boxout 2 ** Resampling: pitfalls Bear in mind not all sounds are suited to this kind of treatment as it introduces digital artefacts (giving a tinny quality). Those with plenty of harmonics and distortion will mask it out to an extent. This is actually true of normal ST/Falcon tracker replay too, which is essentially real time non-destructive resampling, with the processed sample data routed to the audio output system rather than overwriting the source stored in memory. One Atari software developer with notable expertise in digital synthesis is Softjee in France. Its products use base note information as discussed earlier, to avoid having to make a second-generation resample. ** /boxout 2 ** ** Boxout 3 ** Alternative systems The ill-fated TCB Tracker from the Swedish demo masters broke new ground in ST tracker programming back in the early '90s. Its concept and design was more or less identical to the more established Sound Tracker format, differing in its file structure and use of 20KHz base speed. Some years down the line, when another Swedish group started work on an 8-voice tracker, Octalyser, it was decided to include both 16KHz and 20KHz, as well as a new, 25KHz base speed option. The latter enabled the use of samples recorded at 50KHz. ** /boxout 3 ** ** Images and captions ** ** SOUNDLAB.GIF Figure 1: Soundlab - fairly flexible sampling/resampling speeds. ** PT_RESAM.GIF Figure 2: Resampling to an accuracy of one note in ProTracker. ** NOISETRK.GIF Figure 3: Noise Tracker's octave shift, in the SAMPLER menu. ** Table in comma separated variables (CSV) format ** Sound Tracker standard sampling frequencies (KHz) Note,Octave 1,Octave 2,Octave 3 C,4.181,8.363,16.726 C#,4.430,8.860,17.720 D,4.697,9.395,18.839 D#,4.971,9.943,19.886 E,5.279,10.559,21.056 F,5.593,11.186,22.372 F#,5.926,11.852,23.705 G,6.279,12.559,25.031 G#,6.653,13.306,26.515 A,7.046,14.092,28.185 A#,7.457,14.914,29.829 B,7.901,15.838,31.677 ** /table ** ** Reader Disk files ** ** CORK.SPL ** REF.SPL ** SAX.SPL