Here’s my suggestion for a flexible new meta device, inspired by the ideas discussed in this thread.
Johann, I know you’ll be reading this, hehe, so let me start by saying that I really like your basic idea, but I firmly believe that it would be incorrect to have the weight/bias amount placed on the originating device itself.
We currently have the Key-Tracking Device, LFO Device, Signal Follower and Velocity Device. Adding the weighting function to each device may involve redundant/duplicate code to be maintained, not to mention any future meta devices that might appear. This would in turn add extra cpu/memory overhead to each device, just to support a function that many people may never even use. Finally, the design is not self-contained since there would be weights scattered over many different devices, and this would needlessly complicate the calculation of the final weighted value.
I believe a dedicated new meta device would be the most sensible option here. This would be more in keeping with Renoise’s proven and successful design, where we have smaller, specialised devices that perform basic tasks as efficiently as possible, and only when they are absolutely needed. Overall this provides the user with a more flexible and modular approach, while keeping unwanted clutter and overhead to a minimum.
Here is a device mockup that I have created in Flash: (give it a try!)
http://illformed.org/temp/weighted_value.swf
( In the real device it would not be possible to set the input values, since these would actually be determined by whatever modulation source is connected to that input. The input sliders are here just for your convenience while experimenting. )
We can see that it is almost like a reverse Hydra device. It has multiple inputs to receive the values generated by modulation devices such as the LFO Device, Signal Follower, etc., and these inputs are mixed together based on their respective weights, to finally produce a single weighted output value that is then connected to a device/parameter positioned further down the chain.
Since everything is self-contained in this design, calculating the weighted value is quite trivial:
// Input values in range [0.0 to 1.0]
// Each input represents the current value/state of a
// modulation device such as an LFO, Signal Follower, etc.
inputs = [1.0, 1.0, 0.0, 0.0];
// The weight of each input in range [0.0 to 1.0]
weights = [1.0, 0.5, 0.5, 0.0];
// To calculate the combined weighted output in range [0.0 to 1.0]
sumOfWeights = weights[0] + weights[1] + weights[2] + weights[3];
if (sumOfWeights > 0) {
scale = 1.0 / sumOfWeights;
output = ((inputs[0] * weights[0]) + (inputs[1] * weights[1]) + (inputs[2] * weights[2]) + (inputs[3] * weights[3])) * scale;
} else {
output = 0.0;
}
.