FoxDot.lib.TimeVar¶
Time-Dependent Variables (TimeVar)
TODO: using __call__ -> go through getattribute and check instead of already having a __call__
- class FoxDot.lib.TimeVar.ChildTimeVar(values, dur=None, start=0, **kwargs)[source]¶
Bases:
TimeVarWhen a new TimeVar is created using a function such as addition, e.g. var([0,2]) + 2, then a ChildTimeVar is created that contains a single value but also creates a new ChildTimeVar when operated upon and behaves just as a TimeVar does.
- class FoxDot.lib.TimeVar.Pvar(values, dur=None, **kwargs)[source]¶
Bases:
TimeVarA TimeVar that represents Patterns that change over time e.g.
>>> a = Pvar([ [0,1,2,3], [4,5] ], 4) >>> print a # time is 0 P[0, 1, 2, 3] >>> print a # time is 4 P[4, 5]
- getitem(index, *args, **kwargs)[source]¶
Returns a TimeVar based on getting the index of this Pattern
- stream¶
alias of
PatternContainer
- class FoxDot.lib.TimeVar.PvarGenerator(func, *args, **kwargs)[source]¶
Bases:
PvarIf a TimeVar is used in a Pattern function e.g. PDur(var([3,5]), 8) then a PvarGenerator is returned. Each argument is stored as a TimeVar and the function is called whenever the arguments are changed
- class FoxDot.lib.TimeVar.PvarGeneratorEx(func, *args)[source]¶
Bases:
PvarGeneratorUn-Documented
- class FoxDot.lib.TimeVar.TimeVar(values, dur=None, start=0, **kwargs)[source]¶
Bases:
objectVar(values [,durs=[4]])
- depth = 128¶
- math_op(other, op)[source]¶
Performs the mathematical operation between self and other. “op” should be the string name of a dunder method e.g. __mul__
- metro = <FoxDot.lib.TempoClock.TempoClock object>¶
- class FoxDot.lib.TimeVar.mapvar(key, mapping, default=0)[source]¶
Bases:
PvarLike a Pvar, the mapvar returns a whole Pattern as opposed to a single value, but instead of using the global clock to find the current value it uses the value in an instance of the PlayerKey class or another TimeVar.
- FoxDot.lib.TimeVar.PATTERN_METHODS = ['__abs__', '__add__', '__and__', '__bool__', '__class__', '__delattr__', '__dir__', '__eq__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__init__', '__init_subclass__', '__invert__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__nonzero__', '__or__', '__pow__', '__radd__', '__rand__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rmod__', '__rmul__', '__ror__', '__rpow__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__setitem__', '__setslice__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__xor__', 'abs', 'accum', 'add', 'all', 'alt', 'amen', 'append', 'arp', 'asGroup', 'bubble', 'choose', 'compress', 'concat', 'convert_data', 'copy', 'count', 'deep_shuffle', 'deeprzip', 'deepzip', 'duplicate', 'eq', 'every', 'extend', 'float', 'fromString', 'get_behaviour', 'get_data', 'get_methods', 'getitem', 'getslice', 'group', 'help', 'i_reverse', 'i_rotate', 'i_shuf', 'i_sort', 'int', 'invert', 'items', 'iter', 'layer', 'limit', 'loop', 'ltrim', 'make', 'map', 'mirror', 'ne', 'new', 'norm', 'offadd', 'offlayer', 'offmul', 'palindrome', 'pivot', 'replace', 'reverse', 'rotate', 'sample', 'select', 'set', 'setitem', 'shuffle', 'shufflets', 'sort', 'splice', 'startswith', 'str', 'stretch', 'string', 'stutter', 'submap', 'swap', 'transform', 'trim', 'true_copy', 'true_shuffle', 'undup', 'zip', 'zipx']¶
Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.