tomara-x / quartz

visual programming and dsp playground
https://codeberg.org/tomara-x/quartz
Apache License 2.0
77 stars 3 forks source link

shift register #88

Closed tomara-x closed 6 months ago

tomara-x commented 7 months ago

you never use it, but still nice to have

tomara-x commented 7 months ago

for the sample and hold, there's a really smart method to do it, but i'm not fully there, still foggy in my head. i'm thinking Instant::now() and then measure duration on the next trig and use update (still need to figure out how update works)

if that works it can also fix the dead processing thing. so if a network's output isn't needed but you want it to process (like for monitor) it can be fed to a consuming node that does this same thing, constantly updates on a steady clock

tomara-x commented 6 months ago

for the sample and hold, there's a really smart method to do it, but i'm not fully there, still foggy in my head. i'm thinking Instant::now() and then measure duration on the next trig and use update (still need to figure out how update works)

that's not how update works, and i.. have no clue what you were thinking about.. it's a shift register! (trigger? -> hold value at index 0, push everything to the left, discard last, done!)