Scales
By default, Player Objects use the C Major scale. These can be changed by using the keyword arguments ‘scale’ and ‘root’. Scales can be defined as an array of semitones, such that the Major scale is [0,2,4,5,7,9,11] or one of the predefined scales from the Scale module, e.g. Scale.minor. Root refers to the tonic of the scale; 0 being C, 1 is C#, 2 is D and so on.
The default scale can be changed such that any Player not using a specific scale will be updated. This is done using the syntax below (each line is technically equivalent):
Or the same thing, but minor:
To save some time you can also do
This is the same for the root:
Or:
To see a list of all scales, use:
You can change the scale used by a player using the ‘scale’ keyword
Similarly, you can change the root note players using the root keyword and the Root.default object