- Player attribute aliases added. Using `pitch` and `char` will return a player's `degree` attribute.
- Player Key behaviour improved. Using multiple conditions e.g. `4 < p1.pitch < 7` will hold the value 1 while `p1.pitch` is between 4 and 7, and a 0 otherwise. These conditions can be "mapped" to values other than 1 by using the `map` method to map values, or results of functions, to other values/functions (which are applied to the values):
python
b1 >> bass(var([0,4,5,3]))
Takes a dictionary of values / functions
p1 >> pads(b1.pitch.map(
{ 0: 2,
4: lambda x: x + P(0,2),
lambda x: x in (5,3): lambda y: y + PRand([0,2,4,7])
}))
- Known issue: mapping to a pattern of values for a Player's duration does not work as expected so be careful.
- The `Player.every` method can now take `Pattern` methods, which affect the degree of the `Player` (specifying attributes will be added later). Instead of applying the function every time it is called, it has a switch that applies the function then "un-applies" the function.
python
p1 >> play("x-i-").every(6, "amen").every(8, "palindrome")