When mapping data to musical parameters (e.g., Pitch, Velocity, Duration, etc.), we will often need to map a large range of data values to a more limited range of musical parameter values. In this patcher, we generate random numbers (0-11, inclusive) and map them to chromatic pitches in the middle C (C4) octave using an offset of 60. That is, by adding 60 to each random number (0-11) we obtain a range of numbers appropriate to for use as pitch numbers in the C4 octave (60-71). A range of 12 velocity values is not expressive enough, so we scale the random numbers (0-11) to a much wider range (90-127) using the scale object.

New Object


Updated: 9/30/23