Hi-hat accents

Eight hi-hats at the same volume sound like a machine. A second pattern — how hard each one is struck — brings them to life.

  • Intermediate
  • 100 BPM
  • 1 bar

You will learn

  • Control a sound with a pattern of values, and see how its grid lines up with the strikes

No accents

Start from eight identical strikes. Listen for how even, and how flat, it sounds.

// Eight identical strikes: correct, but mechanical.
export const flatHats = chain(
  fn('sample', repeat(NOISE, 8)),
  ...hiHatSound(HI_HAT_DEFAULTS),
)

Flat hi-hats

Ready

Accent the beats

velocity takes a pattern of numbers instead of one value. This one has eight slots, the same as the strikes, so each strike gets its own value: full on the beat, about half in between.

// velocity scales each strike (1 = as loud as the sound allows).
// This velocity pattern also has eight slots, one per strike:
// loud on each beat, softer in between.
export const accentedHats = chain(
  flatHats,
  fn('velocity', repeat(sequence(number(1), number(0.45)), 4)),
)

Accented

Ready

A control pattern with its own grid

The control pattern does not have to match. With four values over eight strikes, each value lasts a beat and covers two strikes, so the hi-hats grow louder through the bar. The strikes decide when; the control pattern decides how, on its own grid.

// Only four velocity slots for eight strikes. Each strike takes the value
// current when it starts, so every value covers two strikes: a crescendo.
export const swellingHats = chain(
  flatHats,
  fn('velocity', sequence(number(0.3), number(0.55), number(0.8), number(1))),
)

Swell

Ready