Differentiator module controls

aaaaaa
edited October 29 in How to's

In another thread @gravitas suggested that one community-driven way to begin addressing the lack of module documentation would be to "create a thread for each module that needs more detailed documentation." So that is what I am doing here.


In my experiments it appears that tweaking the "Amp" control affects the scale of the signal, with lower values attenuating the signal and higher values increasing the output signal level. When set to the 0 position, the output signal is zero, and at the maximum value, the signal ran too hot for me too experimentally determine its value. At a value of 0.2, it appears to pass through "true" integration values without any additional attenuation or amplification. I believe that the adjusting the Amp scales the output signal exponentially, not linearly.

Through more careful experimentation, I believe I have determined that when the "Amp" control is set to the maximum position, the output value will be 25 (twenty five !!) times the "true" value. So for example, at maximum amplification, a gate signal that jumps from 0 => 1 will result in an output voltage of 25.

If this is correct then the integrator module's Amp control could be precisely described in this way: The Amp control exponentially scales the output signal. At 0.2 the Amp control is neutral. Turning it below 0.2 attenuates the output; turning it above 0.2 boosts the signal up to 25x.

Comments

  • aaaaaa
    edited October 29

    I made a huge mistake … I used the word "integrator" in the above post, but I really meant DIFFERENTIATOR! In fact the INTEGRATOR module has an entirely different control interface than the DIFFERENTIATOR. I am unable to make edits to the title afaik. So maybe a mod can correct this mistake. If possible, this title should be changed to reflect the fact that this thread will be about all of the math modules in drambo, since I really don't see a reason to create a new thread for every module. So now I'm going to describe two more math right here in this thread: the EXP and LOG modules.

    The EXP module takes input from one signal. The value of the output signal is calculated by the function e^x, where e represents the constant ~2.71828, and x represents the input signal.

    The LOG module accepts one input signal. The value of the output is calculated by taking the natural log of the input signal.

    I recruited assistance from my friend who works professionally as a computational neuroscience to help me decipher these opaque modules. It was an extremely frustrating experience for her because these two modules were not behaving as she expected. It would seem that in the current implementation, there is no easy way to create a function such as x^y, where x and y are variable signals. (I think we're getting close to discovering a way to compute x^y by using the DIFFERENTIATOR module followed by the INTEGRATOR module, and using a MORPH module assigned to the Amp control of the DIFFERENTIATOR to modulate the Amp level by the input signal. But we haven't finished fine-tuning the exact values and routing to be able to confidently determine whether or not this produces the desired effect. It is particularly tricky to test this because the DIFFERENTIATOR module only outputs a true undistorted differentiation when its Amp control is set to the value 0.2 - and since 0.2 sits off-center on the control knob, it's difficult to module its value is a symmetrical way. ... All this to say, it is much to complicated to represent this very simple function (x^y) in drambo, and it would benefit us all to have an updated version of the EXP module that gives us two inputs instead of one: one input to set the base, and one to set the exponent. Same goes for the LOG module: it could be improved by redesigning it to take two inputs, one for the log base and one for the power.)

  • @aaa I've changed the thread title.

    Wow, you've done some incredible in-depth analysis here. Maybe you're expecting more from it than it actually is: The idea is to give you the difference between successive signal samples, positive and negative, to aid in building more complex patches.

    For example, you might want to have a switch that sends a trigger signal with every change, no matter if you switch it on or off.

    Exponential behavior in the amp knob makes sense when working with low frequency signals, where differences from sample to sample can be minimal.

    ... All this to say, it is much to complicated to represent this very simple function (x^y) in drambo, and it would benefit us all to have an updated version of the EXP module that gives us two inputs instead of one: one input to set the base, and one to set the exponent. Same goes for the LOG module: it could be improved by redesigning it to take two inputs, one for the log base and one for the power.)

    @giku

  • Thanks for that @rs2000. Yes, running experiments to determine this info has been anything but straightforward. Part of the difficulty lies in finding creative ways to work around the limitations of the signal analysis tools built into drambo.

    Here's an example: It would be great if there was a way to freeze the display of the OSCILLOSCOPE module (or freeze the display of the oscilloscope pop-up window viewed by long-pressing on any module input). And in fact we can simulate this effect by using sending a carefully-timed trigger to a S&H module. This doesn't actually freeze the display, but instead it freezes the signal so that the display appears frozen even though it is actually "moving in place" or moving without changing values. Ideally we would want to freeze the oscilloscope display with sample-accurate timing, perhaps by using the DELAY module to send a pulse at the specified time. But in my testing I discovered that the DELAY module isn't really accurate down to the exact sample. My guess is that the DELAY module doesn't automatically compensate for the small (but not negligible!) delays that are introduced when using computationally-intensive modules. See the attached image for an example scenario. In the experiment depicted there, we create a pulse to trigger an envelope that rises linearly from 0 to 1 over 1000ms, and we delay that pulse for 500ms, and we use that delayed pulse to trigger a S&H. We would expect the S&H to hold the sample that occurs exactly at the midpoint (time=500ms) between the start (time=0ms) and end (time=1000ms) of the envelope. In this simple experiment, we expect the midpoint of a linear envelope ascending from 0 to 1 to have a value of 0.5. And indeed our experiment demonstrates that this hypothesis is correct. However, in a more complicated scenario where we apply additional processing to the envelope signal before it reaches the S&H module, we would still expect the S&H module to hold the sample that occurs at 500ms, and we would expect 500ms to occur exactly half way between the start and end of the envelope. However in practice I found that a 500ms delay can be too much time in some cases, and in order to actually sample the midpoint of the envelope, I need to reduce the time set on the DELAY module to trigger the S&H earlier. In one case I found that it was necessary to reduce the DELAY time from 500ms to 486.4ms in order to actually sample the midpoint of the envelope.


    Another difficulty related to the OSCILLOSCOPE module is that it seems to stop providing reliably, accurate, usable information once the amplitude of its input signal surpasses something on the order of +/-1000. In some cases it seems to provide information even beyond +/-10000, but it does not work consistently/reliably in that range---and frankly it's impressive that it works, even inconsistently, at such high values! These are extreme values that shouldn't come up in most musical contexts. Nevertheless, these limitation occasionally interfere with some of the experiments I've been running as I've attempted to better understand how certain modules function. However, compared to the OSCILLOSCOPE module, the pop-up oscilloscope window has a significantly reduced scope---the viewable range maxes out around +/-5, which is within the range that might be encountered in typical musical contexts!

    I wish there were better tools for analyzing signals in Drambo. Perhaps alternate version of the MAXIMUM / MINIMUM modules could be included in a future update. I would like these new test modules to operate like a hybrid between the DIFFERENTIATOR and S&H modules, in the sense that it would 1) compare the current signal to the previous signal (like the DIFFERENTIATOR) and 2) hold on to the highest/lowest value of the input signal (like S&H). This module could have a Reset trigger that resets it to zero. This would be very useful for analyzing the effect that other modules have on envelope-like signals. So for instance, if an envelope is processed in a way that amplifies or attenuates its gain in non-obvious ways, this new MAXIMUM / MINIMUM module could be used to measure the change in gain and, in conjunction with other modules, compensate for the change in gain. This has applicability to musical contexts, not just test experiments.

  • @aaa

    There are various ways to do calculations in Drambo, some of them might look surprising from the purely arithmetic point of view.

    Like, for example, I would build a 2^n or 3^n calculator rather like this:


    And pre- and post-scale the input and output values accordingly. The Bezier curve in Graphic Shaper only needs one single adjustment to satisfy what you need in x^y calculations for a given x value.

    I'm not saying that a x^y function wouldn't make sense in the Math => Function module, I'm just hinting at alternatives.

  • @rs2000 I'm aware of the fact that curves can be drawn in the GRAPHIC SHAPER module via touch controls in a manner that approximates 2^n or 3^n, etc, but my ability to control of my fingers/apple pencil is not precise enough to get the curves to EXACTLY match the expression 2^n (as opposed to 1.99^n). Additionally, those curves cannot be modulated by CV --- as in, there's no straightforward way to use CV to smoothly change the base of the exponential curve from 2 .. 3. If course, with creative techniques, it could be possible to use the SWITCH N-1 modules in X-Fade mode to mix between the outputs of more than one GRAPHIC SHAPER. But at that point, it becomes opaque to me. I have not been able to figure out whether the X-Fade mode in the SWITCH N-1 results in linear/exponential/logarithmic etc. transitions between the different inputs.

Sign In or Register to comment.