Split GPIO intensity


#1

Hi,

I am trying to figure about how to split sensor values in order to create something similar to a morphing effect.

I am using a force resistor sensor and I want that it controles two oscillators' volume.

The whole range (0-64) for one oscillator and when it reaches 32 it should start to increase the volume of the other oscillator simultaneously scaling 32-64 into 0 to 64 starting to sound both together.

I have made some trials with math/>, scale... But I didn't find a satisfactory combination.

I really appreciate if someone could point me a nice solution in case it would be possible.

Thanks a lot in advance.


#2

Hi, Tiar's kfunction objects are good for doing this kind of thing.

This should do it: