First time here? Check out the FAQ!
x

extreme resolution reduction

0 votes
427 views
Hi,

I am looking for a solution to perform extreme resolution reduction of a signal. The idea is to use such a module as a signal 'round' function. Any suggestions?
asked Feb 18, 2016 in Sound Design by malcolm-braff (Practitioner) (770 points)
How far do you want to reduce it?  Until it is just ON or OFF?
If you use the Threshold Sound and set the threshold value to 0.5, that would "round" the incoming signal to 0 or 1.  Is that what you meant?

Here is how i am doing it so far. maybe there is a better way?

i am sending an example

1 Answer

+1 vote

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.

 

answered Feb 19, 2016 by ssc (Savant) (128,080 points)
thank you very much
...