Does this object/concept exist? What's the name for it?


    Aug 30 2018 | 2:26 pm
    Hi, I'm looking for an object that does something simple, but not sure if it already exists (or what it's called):
    I'd like an object that's has at least 1 signal rate input, and 1 signal rate output. The output is just some stored value (let's say it starts at zero), and the input "steers" the stored valued of the output... if the input is positive, the output increases. Negative input -> decrease. Zero input -> no change. And the absolute value of the input is essentially the rate of change of the output.
    At control rate, this is simple to make of course. At signal rate, I could think of ways to make this with basically a +~ feeding back into itself (with some small delay), and the other input of the +~ being the "steering" input.
    But, I wondered if this is already an object that exists, and also what the name of this concept is. It almost seems like a kind of filter. I need it for an idea!

    • Aug 30 2018 | 2:47 pm
      You can DIY super-quick in gen~.
      History history_1(0); div_2 = in1 / SAMPLERATE; add_3 = div_2 + history_1; out1 = add_3; history_1_next_4 = fixdenorm(add_3); history_1 = history_1_next_4;
    • Aug 30 2018 | 3:18 pm
      Thank you! This looks like just the thing. So, you're dividing by the sample rate so that the rate of change is <input> per second? I'm very novice with gen~ (but I am a programmer, so I think I get what's going on here).
      Is there a name for this kind of thing? I'd like to learn more about it, and having some conceptual term would help in me finding more reading. I want to use this idea to create signals that interact with each other (e.g. one signal that "chases" the value of another, etc) and would love to find examples of this.
    • Aug 30 2018 | 5:31 pm
      So, you're dividing by the sample rate so that the rate of change is <input> per second?
      Yes.
      Is there a name for this kind of thing?
      This specific algorithm would be called an "accumulator". (There's an accum object in Max, a plusequals~ object in MSP, and an accum object in gen~.)
      I want to use this idea to create signals that interact with each other (e.g. one signal that "chases" the value of another, etc) and would love to find examples of this.
      See slide~ and rampsmooth~. Or any of a variety of lowpass filters. Or DIY in gen~, etc.
    • Aug 31 2018 | 11:26 am
      - measure delta (delay the input for 1 sample and substract input from last input) - check if delta is positive or negative (or 0?) using comparison operators - if 0 then -1 - accumulate finding a good name is the hardest part.
      my control rate version is called -> parsons encoder, but that is of course only one of many possible applications for the same algo.
      but "deltahistorymeter" wouldnt sound very interesting and is difficult to remember. -110