Skip to content

Fix Timing Problems

Find the message or the symptom, then work through the fix. Every timing amount here is a fraction of one step, as in Add Swing and Human Feel.

A pattern you send to a playing track starts at the next cycle boundary, not when you run the line. That keeps it on the downbeat; there is no way to apply it mid-cycle.

  1. Run the line shortly before the boundary.
  2. To land a change at a chosen cycle further ahead, write it to a position in an arrangement — see Add Fills to a Song.

Pattern query deadline exceeded: 3 scheduling pass(es) truncated since the previous warning (latest: MIDI, cycle 812, budget … ms). Scheduled output may be incomplete. Simplify expensive patterns or generators, or reduce scheduling load.

A cycle took too long to compute, and some of its events were not scheduled.

  1. Look for a generator that grows with time. A stream, a Markov chain or a script pattern replays every cycle from cycle 0 to answer for the current one, so a costly step function gets slower as the cycle count rises.
  2. Make the step function cheaper, or move work that doesn’t change out of it and into a let.
  3. Look for an on_cycle callback that does heavy work, and do that work once outside it.

.nudge(), .swing() and .humanize() never move an event into the next cycle. An event pushed past the end of the cycle lands on the end, so large offsets can stack several events there.

  1. Keep the offsets small: 0.1 is a tenth of a step.
  2. Make the offset of the last events of the cycle smaller, or negative.
[bd sd bd sd].nudge(#[0, 0.1, 0, -0.1]);

That is what swing does: the even slots of its grid stay, and the odd ones play late. To move each event by its own amount, use .nudge() with one offset per event:

[hh hh hh hh].nudge(#[0, 0.2, 0.05, 0.15]);

Swing moves only what plays on the odd slots of its grid. A part with nothing there stays straight: the quarter notes of [bd sd bd sd] all sit on even 16ths, so .swing(0.25, 16) leaves them alone. Match the grid to the part you want to swing: 16 for 16th hats, 8 for 8ths, 4 to swing the sd in [bd sd bd sd].

MIDI gear is early or late against the mix

Section titled “MIDI gear is early or late against the mix”

The pattern is in time, but a synth or drum machine is heard ahead of or behind the audio tracks. Set the port’s trim_ms — see Align Hardware with the Mix.