FoxDot.lib.Key¶
- class FoxDot.lib.Key.Accompany(rel=[0, 2, 4])[source]¶
Bases:
objectLike PlayerKey except it returns
- keys_last_value = None¶
- this_last_value = 0¶
- class FoxDot.lib.Key.NumberKey(value=0, function=None)[source]¶
Bases:
objectAn object that acts like a number but may have dependencies when returing its value. These are used when returing Player object attribute values accessed via getattr e.g. p1.dur or getattr(p1, “dur”). The parent attribute is the Player that contains the key or the referenced key in the case that the value has been maniupulated. e.g. if p1 is using p2.degree then p1.degree.parent == p1 and p1.degree.value.parent == p2.
- index(sequence)[source]¶
Returns a Player Key that returns the element from sequence indexed using int(self)
- simple_map(mapping)[source]¶
Creates a new Player key that maps the values in the dictionary (mapping) to new values. Example use case:
` d1 >> play("x-o-", sample=d1.degree.simple_map( { "-" : -1, "o" : var([0,2]) })) `