"additive" / "relative" Dsp Parameters

Currently DSP parameters can only be controlled by one source. It would be nice if they could be controlled by more than one. Example: Make a DSP chain with a Keytracking device and an LFO, both controlling, say, an EQ. Like this:

<?xml version="1.0" encoding="UTF-8"?>  
<FilterDeviceChainClipboard doc_version="0">  
 <DeviceContainerSlot type="SequencerTrackDeviceChain">  
 <Devices>  
 <SequencerTrackDevice type="SequencerTrackDevice">  
 <IsActive>true</IsActive>  
 <IsSelected>false</IsSelected>  
 <SelectedPresetName>Init</SelectedPresetName>  
 <SelectedPresetIsModified>false</SelectedPresetIsModified>  
 <Panning>  
 <Value>0.5</Value>  
 <Visualization>Device only</Visualization>  
 </Panning>  
 <Volume>  
 <Value>1.0</Value>  
 <Visualization>Device only</Visualization>  
 </Volume>  
 <Surround>  
 <Value>0.0</Value>  
 <Visualization>Device only</Visualization>  
 </Surround>  
 <PostPanning>  
 <Value>0.5</Value>  
 <Visualization>Device only</Visualization>  
 </PostPanning>  
 <PostVolume>  
 <Value>1.0</Value>  
 <Visualization>Device only</Visualization>  
 </PostVolume>  
 </SequencerTrackDevice>  
 <KeyTrackingDevice type="KeyTrackingDevice">  
 <IsActive>true</IsActive>  
 <IsSelected>false</IsSelected>  
 <SelectedPresetName>Init</SelectedPresetName>  
 <SelectedPresetIsModified>true</SelectedPresetIsModified>  
 <SrcInstrument>-1</SrcInstrument>  
 <KeyTrackingScaling>Linear</KeyTrackingScaling>  
 <KeyTrackingMode>Clamp</KeyTrackingMode>  
 <KeyTrackingMin>36</KeyTrackingMin>  
 <KeyTrackingMax>72</KeyTrackingMax>  
 <DestEffect>  
 <Value>3</Value>  
 <Visualization>Device only</Visualization>  
 </DestEffect>  
 <DestParameter>  
 <Value>2</Value>  
 <Visualization>Device only</Visualization>  
 </DestParameter>  
 <DestMin>  
 <Value>0.0</Value>  
 <Visualization>Device only</Visualization>  
 </DestMin>  
 <DestMax>  
 <Value>1.0</Value>  
 <Visualization>Device only</Visualization>  
 </DestMax>  
 </KeyTrackingDevice>  
 <LfoDevice type="LfoDevice">  
 <IsActive>true</IsActive>  
 <IsSelected>true</IsSelected>  
 <SelectedPresetName>Init</SelectedPresetName>  
 <SelectedPresetIsModified>true</SelectedPresetIsModified>  
 <DestEffect>  
 <Value>3</Value>  
 <Visualization>Device only</Visualization>  
 </DestEffect>  
 <DestParameter>  
 <Value>2</Value>  
 <Visualization>Device only</Visualization>  
 </DestParameter>  
 <Amplitude>  
 <Value>0.5</Value>  
 <Visualization>Device only</Visualization>  
 </Amplitude>  
 <Offset>  
 <Value>0.0</Value>  
 <Visualization>Device only</Visualization>  
 </Offset>  
 <Frequency>  
 <Value>0.9375</Value>  
 <Visualization>Device only</Visualization>  
 </Frequency>  
 <Type>  
 <Value>0.0</Value>  
 <Visualization>Device only</Visualization>  
 </Type>  
 <CustomEnvelope>  
 <PlayMode>Linear</PlayMode>  
 <Length>64</Length>  
 <ValueQuantum>0.0</ValueQuantum>  
 <Points>  
 <Point>0,0.0</Point>  
 <Point>63,1.0</Point>  
 </Points>  
 </CustomEnvelope>  
 <CustomEnvelopeOneShot>false</CustomEnvelopeOneShot>  
 </LfoDevice>  
 <MixerEqDevice type="MixerEqDevice">  
 <IsActive>true</IsActive>  
 <IsSelected>false</IsSelected>  
 <SelectedPresetName>Init</SelectedPresetName>  
 <SelectedPresetIsModified>true</SelectedPresetIsModified>  
 <InputMode>L+R</InputMode>  
 <MaxVisualizedGain>20</MaxVisualizedGain>  
 <LowGain>  
 <Value>0.0</Value>  
 <Visualization>Mixer and Device</Visualization>  
 </LowGain>  
 <MidGain>  
 <Value>0.0</Value>  
 <Visualization>Mixer and Device</Visualization>  
 </MidGain>  
 <MidFreq>  
 <Value>0.394338428974151611328125</Value>  
 <Visualization>Device only</Visualization>  
 </MidFreq>  
 <MidQ>  
 <Value>0.5</Value>  
 <Visualization>Device only</Visualization>  
 </MidQ>  
 <HiGain>  
 <Value>0.0</Value>  
 <Visualization>Mixer and Device</Visualization>  
 </HiGain>  
 </MixerEqDevice>  
 </Devices>  
 </DeviceContainerSlot>  
</FilterDeviceChainClipboard>  

Currently, the EQ Frequency is only controlled by the last modulation device in the chain. So the suggestion is: Make everything that modulates a slider “add up”.

Anybody understands what I mean??

In pseudo code, it currently seems to work somewhat like this:

calculate_slider_value() // recalculate new slider value for this frame  
{  
 for each (stuff that modifies this slider)  
 {  
 slider_value = modifier_value;  
 }  
}  
  

…so every modifier overwrites the previous value. Where a “modifier” is an LFO, or whatever.

The new code would work somewhat like this:

calculate_slider_value()  
{  
 slider_value = 0; // reset slider value  
  
 for each (stuff that modifies this slider)  
 {  
 slider_value += modifier_value; // add everything together  
 }  
  
 slider_value = slider_value / number_of_modifiers; // calculate mean  
}  
  

One obvious application for this would be some kind of Tremolo effects with the LFO. But there are lots more possibilities. And it would be a relatively easy change, I guess.

The new behaviour could be optional because it might modify existing DSP chains (if someone relied on the values not adding up).

What do you think?

You can pull this off with the hydra. In fact, I posted an example of it in my “Cheap hydra tricks” thread… http://www.renoise.com/board/index.php?s=&…st&p=154316

Have fun :)

Nice trick… A little cumbersome to use, but pretty cool ;)

Well, an actual averaging device would be better… but this trick works well for many applications… and yah, I agree it’s kinda sloppy ;)

Averaging device would be the best option… or root mean squared or modulo…
in-fact how about a signal path math meta-device?

=>Input A---------------------------------------\
[sum/subtract/multiply/average etc]====>Output
=>Input B---------------------------------------/

Sounds very cool. And it wouldn’t break any existing DSP chains.

Yet another reason we need a metadevice scripting language. :D

This is going to be my default response to these types of threads from now on.