mapScaleList()
Convert a list of numbers from one range to their matching places in another range.
mapScaleList(valueList, minValue, maxValue, minResult, maxResult)
Like mapScale(), but for a whole list. A new list is returned; the original list is left unchanged.
Parameters
mapScaleList(valueList, minValue, maxValue, minResult, maxResult, scale=None, key=None)
| Parameter | Type | Default | Description |
|---|---|---|---|
valueList |
list[int or float] |
required | The numbers to convert. |
minValue |
int or float |
required | The low end of the source range (inclusive). |
maxValue |
int or float |
required | The high end of the source range (inclusive). |
minResult |
int or float |
required | The low end of the destination range (inclusive). |
maxResult |
int or float |
required | The high end of the destination range (inclusive). |
scale |
list[int] |
None |
The scale to snap to, a list of pitch classes between 0 and 11. If omitted, every pitch is allowed (the chromatic scale). |
key |
int |
None |
The scale's root pitch class, from 0 to 11. If omitted, it is taken from minResult. |
Returns
return mappedList
| Value | Type | Description |
|---|---|---|
| mappedList | list[int or float] |
Each number's matching place in the destination range, snapped to the scale as a MIDI pitch. |