Here is an example of another OSC script I wrote to affect other useful variable parameters of a different particle spray script. Again, I can control these externally using OSC data, here I am using Touch Designer Sliders to do so.
Some of the spray scripts variables are work with differing ranges, besides normalised 0-1, which is what sends from Ableton, I can scale values in Touch. However, I actually made have been thinking about ways I can do this in the c# script so I can always send normalised but when the script receives it it scales to the right range. For now I am multiplying the in coming normalised value to the max range I want which works, However, I know there are other methods. I do want to explore smoothing values in the c# script to, for example if i send a kick, its a hard 0-1 but this dynamic doesn't work for all modulating. Smoothing the attack of the data, so it slopes to 1 and the back down to 0, is something I need to implemtn into my scripting capabilities soon.