You are here

MIDI Timing Delays & Your Sampler

Tips & Techniques
Published April 1995

Timing delays, stolen notes, lack of sampler memory... having trouble playing back your sample files over MIDI? But all these problems can be things of the past. All it needs is a little care and planning — as Wilf Smarties explains.

A MIDI note takes time to happen. The theoretical limit is two‑thirds of a millisecond during running status. This means that a 10‑note chord played over a MIDI bus must have a spread of at least 6mS... Furthermore, any receiving instrument is not going to respond instantaneously to incoming MIDI fire. Some instruments process note events really quite slowly, especially when faced with a frontal assault on many MIDI channels. This can make the timing errors much worse. Vic Lennard, the UK MIDI supremo and Sound On Sound Atari Notes columnist, tells me that some older instruments, in the worst cases, can experience delays in excess of 100mS. What about those who claim that their sequencer resolution is inadequate at 384ppqn? Perhaps they are looking at the wrong end of their MIDI cable...

Using the single MIDI port of an Atari ST to drive an entire composition is not exactly unheard of, especially amongst the financially‑challenged. Unfortunately, this often causes timing problems when there are large numbers of events queueing up to be played at critical bar positions. The first beat of any bar is the obvious source of heavy MIDI congestion, with drums, drum loop triggers, bass and chords all occupying the same position. The most profound way to reduce note time‑smearing is simply to ensure that not too many notes are jostling to get out of/into the same MIDI output/input at once. There are a few ways of achieving this.

Hardware Solutions

The first (and most common) hardware solution is to use an MIDI output expander. Using one of these, you can dilute the flow of MIDI information by having four or five individually addressable parallel MIDI outputs, each boasting 16 MIDI channels. Nearly all pro users work this way, and in a multiple MIDI environment you'd be mad (or poverty‑stricken after buying all those instruments) not to get one.

If you have more than one MIDI sequencer to hand (including perhaps a drum machine or workstation), you can try spreading the sequencing load between them, sync'ing them together with MIDI song pointers or MTC. This is unwieldy, though, and storing sequence data for a song over more than one machine is a real drag.

Software Solutions

Being of a Northern persuasion, I am particularly fond of these, as they cost nowt. Also, to my mind, they can often deliver better results, with fewer restrictions, than the hardware solutions. Why is this? Well, firstly, a hardware solution is only relevant where more than one instrument is being used. If you've only got one sampler in the house, four MIDI ports will not be a lot of use to you. Secondly, as soon as you have different sequencer tracks mapped to different outputs, you have complicated the sequencing procedure. Obviously, this can detract from music creation, which in my opinion should take place in as unfettered an environment as you can muster.

  • Manipulate those loops...
    I, like many other people, like stacking drum loops high. Most people trim their loops so that they trigger from the bar start — but, as already explained, if you trigger a lot of stacked loops at the same point (the bar start), you will almost certainly introduce timing errors in some of the loops. However, in order to tighten up the rhythm, you could try altering some of the samples so that not all triggers lie exactly at the bar start, by adding silences of differing lengths to the start of your samples. In fact, you could re‑sample the loop with a precursor of silence, and use a MIDI trigger to initiate recording. This would enable you to insert a precise length of silence (1/16, or 1/8 of a bar, or whatever), making for easy time re‑alignment on the sequencer. The loop trigger would then need to be moved back by the length of the silence added, moving it away from the point of data congestion at the start of the bar.
  • In on an up beat...
    Another way to relieve MIDI data congestion is to move loop start points, so that some loops trigger from a point other than the first beat. For example, take a 1‑bar loop and record (or preferably re‑sample) two cycles. Now trim the copy so that its start point is maybe a quarter beat ahead of the start of the second cycle. Now, the loop trigger note will fall a quarter beat before the bar start, thus dismissing it from the area of maximum MIDI data congestion. Not only this, but when the loop is switched into play there will be an appealing quarter beat 'fill' leading in to the bar. Needless to say, there is no point in moving all your loops by the same amount, otherwise you'll just be back where you were, but in a different place — if you get my meaning!

Incidentally, another and more elegant way of shifting the loop start point is to loop the bar within the sampler, then just move the start point while the loop length is locked — you can do this with Roland S700‑series and Akai S3000 samplers.

  • Shifting the feel
    If you have never tried moving whole loops away from their original bar snap, now is a good time to try. Percussion loops often sound really funky when simply shifted by a beat or two (or even fraction thereof). Drum loops moved by two beats are likely as not going to give a usable result. Give it a try. Not only does feel‑shifting help to even up the MIDI data flow, the resultant groove is bound to be more original.
  • Boiling it down
    Where loops are layered to create a composite beat, but are not required to be mixed separately, you could re‑sample the group, thus reducing several MIDI triggers down to one. This also has the benefit of freeing up polyphony in your sampler (for more on sample polyphony, see the 'Note Stealing' box elsewhere in this article).

If you want independent control in the mix of the individual members of a group of loops, but the loop members are meant to fire together, there is no reason why two or more loops should not have the same note number and MIDI channel. This applies to any sample‑stacking situation — for example, when layering piano and strings together, or when you are octave doubling.

  • A word on stacking order
    Not all sequencer tracks are equal. Tracks are scanned in an order, usually from top to bottom — that is, track 1 is read first, then track 2, and so on. Tracks with co‑incident note events will send these to the MIDI port in the track stacking order. Therefore, you should place the most time‑critical note events at the top of this order — that is on track 1. The most time‑critical event is not the kick drum, as many might think — this is re‑triggered several times per bar — but the longest drumloop. If the latter is out by a few ticks when it is triggered, it will remain out for its entire length! Pecking order should really be loops first, followed by single hit drum and percussion voices. Vocals usually fit in somewhere near the end, while sluggish strings or anything ambient should definitely be on the bottom of the pile.
  • Thinning out non‑note events
    Of course, there's more to MIDI than notes, but in most instances, sequencers give non‑note information lower priority — so aftertouch or pitch‑bend information should not cause note delays. Still, it is a good idea to keep even this data as thin as possible, and in particular to ensure that any large packets of information, such as system exclusive equipment set‑ups, are inserted before the music starts. In the midst of a song, SysEx information can cause delays in succeeding, rather than coincident, notes. Some sequencers have a data‑thinning routine, which may be applied over a whole arrangement to keep your controller information down a minimum, but I nevertheless still find myself manually thinning out controller events.

Timing problems are not the only reason to avoid recording unnecessary controllers. They eat up sequencer memory (or host computer RAM), and this in turn slows down just about every sequencing operation. Sometimes, continuous controller information is recorded by accident (for example, you press too hard on your keyboard and record a whole string of polyphonic aftertouch information, a prime memory muncher). Such problems can be prevented by setting the MIDI filters on your sequencer's input to ignore incoming aftertouch data, or whatever. To take another example, when you are making MIDI volume alterations in real time, you can sometimes record 50 or more events, when all you really want to effect is an instantaneous level change. In a case like this, delete 49 of the recorded events, set the remaining one to the exact level required, and move it to just where you want the level change to occur.

Advance Warning...

One way to avoid areas of MIDI note event congestion is to advance or retard loop tracks by means of Track/Pattern Play parameters, but this is not always successful, since the small amounts usually employed can shift the feel of subsequent loop tracks. If you must do it, and you are a Cubase user, watch out when you are looping around a bar or two. Any note (such as a loop trigger) right at the start of a sequencer loop cannot be advanced in Cubase. This means that the chances are that the note won't play at all on the second repeat, because although the first note trigger will remain where it is, the trigger for the second repeat will be advanced. Assuming the loop trigger note runs from bar start to bar end (as is usual), the second key on command will occur before the first key off. It's often worth trimming loop trigger note lengths back a few ticks from the normal legato value in order to overcome this, and related, problems.

On the other hand, advancing tracks containing instruments with slow attack (like strings) by a considerable amount will not only improve the feel of your song, it will keep those string chord note events well away from any on‑the‑beat action.

RAM Raiding

One serious limiting factor for all but the most well‑heeled samplists is RAM capacity. It is usually very good value for money to cram in as much as your sampler can take, and if you run out of RAM in the middle of composing, there are various ways to claw some free space back. The first, most obvious one is to delete any samples that might be accidentally or carelessly loaded and which have no part in the composition (the Roland SP700 has an automatic routine for doing just this). Next, check that all samples have been truncated properly — this usually frees up a good 20% of your RAM! Some drum loops often comprise two identical bars, and in such cases, the first half can be deleted and the sample re‑looped. Converting your sample frequency to a lower, less high‑fidelity one is another possibility, though I tend to keep everything at 44.1KHz (except live vocals, which I feel benefit from a 48K sampling rate) for ease of digital transfer to and from DAT and CD.

Some multi‑sampled instrument sets, like pianos, strings and organ, can occupy up to 16Mb on their own! One way around this is to develop a 'Demo' copy of the full instrument, with fewer and/or shorter samples. In the case of a full semitone set, you could take every third sample. Standard mapping would be: 111222333 (and so on...) across the keyboard. However, it is always possible to hear where the sample changes in this configuration. You could try 121232343454565... as a mapping series. In this way, no two adjacent notes will have the same sample, and a reasonable illusion of a different sample for every note is possible.

Other ways to cut down on RAM would be to examine how much of the keyboard any one instrument utilises in a composition, and to delete any unused 'fringe' samples. Or you could make up a patch where the original sample density is retained where most of the playing is focussed, but where the samples are thinly spread in those areas where only a few notes are used.

Finally, stereo samples may be reduced to mono — especially if they are routed to a mono output of your sampler anyway! Do remember, though, when making up 'Economy' versions of your favourite sounds, to retain a copy of the original, so that you can call it up again if a mastering situation arises.

Note Stealing And Patch Priority

Akai S1000 and S1100 samplers have 16 simultaneously available voices, while the Roland S700 series has 24, and the Akai S3000 series 32. If you are using one sampler as a major sound source, there will be times when you simply run out of notes. What usually happens is that the 17th note that plays (in the case of the S1000/1100) will cut out the first, if this is still sounding. This is called note‑stealing. If the interrupted note is a sustained string sample, a noticeable pause will occur. If a long vocal line or drum loop is interrupted, the effect will be catastrophic. On the other hand, notes stolen from a fast‑moving, short sample set, such as a percussion part or blippy sequence, will hardly be noticeable. The effect might even produce interesting variations! Often, even interrupted bass and drum samples are hard to spot on first listen. If your sampler has a Priority function (as Akai and Roland ones do), you can decide which voices will be interrupted first. Always prioritise loops and vocals. Kicks and snares are a favourite, too.

Monophonic keyboard mapping can be another way of keeping polyphony down to digestable levels. This is particularly suitable for basses and other naturally solo instruments, where overlapping sample decays are undesirable musically, as well as being polyphonically profligate.