Storing int or float value


#1

Hi - new to Axoloti - worked through the tutorials - can´t figure out how to temporary store single values.
Easiest for me is to explain in max/msp: I would use the int or float object. First send the number to the right input which initializes the value - only a bang in the left input sends the number out (at choosen time).

This seems so basic, I´m sorry if I´m overlooking the obvious, but how do I approach this with axolotl - what object(s) do I use?


#2

Sounds like you need sample & hold, i.e. one of the "samplehold" factory objects.


#3

As @th555 says, you can use sample and hold for that.

Or there is also the "latch" object. It only sends a value to the output when triggered.


#4

Thank you both - generally the hint for the logic objects is very very helpful. The "latch" object is completely dead on. I can´t quite get my head around "samplehold" - is your idea to use it as logic-gate?


#5

Latch is probably more correct.

Sample and hold is kind of used for many things for example to detect zero crossings. So values wil only be send on zero crossings, which prevents clicks in sampling and so on.

If latch is dead on, just use that :slight_smile:


#6

Samplehold: I missed the part where it sends out the sampled value by sending a 0 - now I get it and see how it could work as "latch". Thanks for explaining - also for pointing towards it´s zero crossing usage.

For my purplose now it´s the latch. great.