Silence

Event-based silence

  • You can use a dot (.) inside any pattern to denote a silence.
@swim
def silence_demo(p=0.5, i=0):
    D('bd ...', i=i, d=1)
    D('hh . hh ..', i=i, d=1)
    again(silence_demo, p=1/8, i=i+1)

Be careful, the concept of silence in Sardine can be pretty confusing. Silence is a very important and complex topic. Adding silences is a great way to generate interesting patterns. Silences are different for each sender because silence doesn’t have the same meaning for a sampler, a MIDI output or an OSC output (D(), N(), etc.).

  • D(): a silence is the absence of a sample. The event will be skipped.
  • N(): a silence is the absence of a note. The event will be skipped.
  • any OSC based Sender: a silence is the absence of an address. The event will be skipped.

Parametric silence

Perfect, but what about other patterns that live alongside the main pattern? A silence in an auxilliary pattern will cause a ’parametric silence’ to happen. Take a look at the following example:

@swim
def silence_demo(p=0.5, i=0):
    D('sitar', legato='0.5', speed='[1:4] .!8', i=i, d=1)
    again(silence_demo, p=1/8, i=i+1)

We always have a sample here. There is no real silence, only a parametric one (in speed). Denoting the absence of something the silence will cause the pattern to search its last value and hold it. Sardine will backtrack and search the last value that could have been generated by the pattern. The result of the speed parameter will then be [1 2 3 4 8 8 8 8 8 8 8 8]. For people familiar with modular synthesizers and analog circuits, this is pretty much a sample & hold mechanism. Note that it is impossible to write a parametric silence composed only of silences. A pattern of nothing is not a pattern.