
06_OffsetsAndScaling.zip
Description
When mapping data to musical parameters (e.g., pitch, velocity, and duration), we will often need to map a large range of data values onto a more limited range of musical parameter values, or vice versa. In this tutorial patcher, we generate random numbers (0-11) and map them onto chromatic pitches in the middle C octave using an offset of 60. That is, we add 60 to each random number (0-11) to obtain a new range of numbers (60-71) – giving us pitch numbers in the octave above middle C (C4 = 60).We initially tried mapping the same stream of random numbers the makenote's velocity inlet, but we found the changes in velocity (60-71) too small to hear. So we added a scale object which linearly maps the range 0-11 to the more expressive velocity range 90-127. This range was discovered through a process of trial-and-error; i.e., we ran the patcher numerous times, changing the arguments of the scale object until we achieved the desired results. This interactive process of "tweaking musical parameters" until we achieve a desired musical result is an important component the algorithmic composition process.
New Object
Objects
Further Study
- Max Basic Tutorial 11: Procedural Drawing
Updated: 9/23/25