It appears that you would like to do the equivalent of the Capytalk expression:
!Value roundTo: !Steps inverse
but where !Value is a signal (a Sound). You can use an InputOutputCharacteristic with Smoothing set to 0 in order to create a mapping from continuous input signal values to output signal values that are quantized to the nearest 1/!Steps. Here's an example.
The basic idea is that the collection of InValues should be the same as the collection of OutValues, but shifted left (on the number line) by half the desired step size. So if the OutValues are:
i - !Steps / !Steps
then the InValues will be:
(i - !Steps / !Steps) - (0.5 / !Steps)
That way, when an incoming value is less than halfway to the next quantized step, the output will be the next lower quantized step, and when it is more than halfway to the next quantized step, the output will jump to the next quantized step.
But, you may ask, how can you change the size of the arrays in the InValues and OutValues fields? The answer is you do not. Instead, just ensure that you have more InValues and OutValues than you need (basically, that you have maxSteps * 2 in your arrays, since the input signal could be either negative or positive). Notice that each element of the InValues has the form:
(i - !Steps / !Steps) - (0.5 / !Steps)
so for i > !Steps, the value at the array entry will be greater than 1. Thus, the input signal (whose range is -1,1) will never index those extra array entries so you are safe.