Module pippi.rhythm

Some helpers for building and transforming onset lists

Variables

BELL
CLAVE
MIN_BEAT
REST_SYMBOLS
RUMBA
SON
TRESILLO

Functions

eu

def eu(
    length,
    numbeats,
    offset=0,
    reps=None,
    reverse=False
)

A euclidian pattern generator

Length 6, numbeats 3

rhythm.eu(6, 3) [1, 0, 1, 0, 1, 0]

Length 6, numbeats 3, offset 1

rhythm.eu(6, 3, 1) [0, 1, 0, 1, 0, 1]

makesection

def makesection(
    k,
    instrument,
    length,
    onsets,
    stems,
    stemsdir,
    sectionname,
    sectionindex
)

onsets

def onsets(
    pattern,
    beat=0.2,
    length=30.0,
    smear=1
)

Patterns to onset lists

pgen

def pgen(
    numbeats,
    div=1,
    offset=0,
    reps=None,
    reverse=False
)

Pattern creation helper

repeat

def repeat(
    onsets,
    reps
)

Repeat a sequence of onsets a given number of times

Classes

Seq

class Seq(
    /,
    *args,
    **kwargs
)

Class variables

instruments

Methods

add
def add(
    self,
    name,
    pattern,
    callback,
    div,
    numbeats,
    swing,
    barcallback,
    sounds,
    smear
)
play
def play(
    self,
    numbeats,
    patseq,
    stems,
    stemsdir,
    pool
)
score
def score(
    self,
    score,
    barlength,
    stems,
    stemsdir,
    pool
)
update
def update(
    self,
    name,
    **kwargs
)