Durs¶
Pattern Class¶
- Pattern.__init__(values: Sequence[Real], t_sig: str = '4/4')¶
Define Rythm pattern.
- Parameters:
values (list) – a list of durations, 1 dimension or 3 dimensions.
t_sig (str) – time signature of the pattern, default is ‘4/4’
- Pattern.getdim¶
Returns the dimension of the input list of durations.
- Pattern._guard(list_in=None, allowed=None)¶
Checks if the input list of durations is valid based on the allowed values and dimensions.
- Pattern.gen(length=8, type: Literal[None, 'wrap', 'fold', 'clip', 'rand', 'randnd'] = 'rand', mask: list = None)¶
Generates a pattern of specified length and type based on the initial values.
Functions¶
- musicnpy.durs.grid(durs, pitches, t_sig='4/4')¶
Function for gridding pitches and durs in a specific time signature.