FoxDot.lib.Patterns.PGroups

class FoxDot.lib.Patterns.PGroups.PGroupDiv(*args, **kwargs)[source]

Bases: PGroupPrime

Stutter every other request

bracket_style = '/()'
calculate_time(dur)[source]

Returns a PGroup of durations to use as the delay argument when this is a sub-class of PGroupPrime

change_state()[source]

To be overridden by any PGroupPrime that changes state after access by a Player

counter = 0
class FoxDot.lib.Patterns.PGroups.PGroupMod(seq=[], *args)[source]

Bases: PGroupPlus

OBSOLETE

Useful for when you want many nested groups. This PGroup flattens the original but the delay times are calculated in the same way as if the values were neseted

bracket_style = '%()'
calculate_time(dur)[source]

Returns a PGroup of durations to use as the delay argument when this is a sub-class of PGroupPrime

static get_iter(group)[source]

Recursively unpacks nested PGroup into an un-nested group

getitem(index)[source]

Called by __getitem__()

class FoxDot.lib.Patterns.PGroups.PGroupOr(seq=[])[source]

Bases: metaPGroupPrime

Used to specify sample values, usually from within a play string using values between “bar” signs e.g. “|x2|

bracket_style = '|()'
calculate_sample()[source]
calculate_time(*args, **kwargs)[source]

Return a single value, as its always “length” 1

ignore = -1
class FoxDot.lib.Patterns.PGroups.PGroupPlus(seq=[], *args)[source]

Bases: PGroupPrime

Stutters the values over the length of and event’s ‘sus’

bracket_style = '+()'
get_behaviour()[source]

Returns a function that modulates a player event dictionary

class FoxDot.lib.Patterns.PGroups.PGroupPow(seq=[], *args)[source]

Bases: PGroupPrime

Stutters a shuffled version the values over the length of and event’s ‘dur’

bracket_style = '**()'
calculate_time(dur)[source]

Returns a PGroup of durations to use as the delay argument when this is a sub-class of PGroupPrime

class FoxDot.lib.Patterns.PGroups.PGroupPrime(seq=[], *args)[source]

Bases: PGroup

WEIGHT = 1

Base class for PGroups with “behavior” that affect a Player’s event dictionary

change_state()[source]

To be overridden by any PGroupPrime that changes state after access by a Player

convert_data(*args, **kwargs)[source]

Makes a true copy and converts the data to a given data type

has_behaviour()[source]

Returns True if this is a PGroupPrime or any elements are instances of PGroupPrime or its sub-classes

class FoxDot.lib.Patterns.PGroups.PGroupStar(seq=[], *args)[source]

Bases: PGroupPrime

Stutters the values over the length of and event’s ‘dur’

bracket_style = '*()'
class FoxDot.lib.Patterns.PGroups.PGroupXor(seq=[])[source]

Bases: metaPGroupPrime

The delay of this PGroup is specified by the last value (not included in the data)

bracket_style = '^()'
ignore = -1
class FoxDot.lib.Patterns.PGroups.metaPGroupPrime(*args, **kwargs)[source]

Bases: PGroupPrime

Base class for PGroups that take any extra arguments to be stored

WEIGHT = 3

Base class for PGroups with “behavior” that affect a Player’s event dictionary