Creating a Stopwatch within an Object

Hi,

I like to procrastinate both productively and ironically , so I’m making a Pomodoro tool.

LFO’s didn’t seem to work outside the main class so i tried other clocks, to no avail.
In VL how does one sample and hold time?

can you elaborate on that? what exactly did you try?

there is an S+H [Control] node and also a Stopwatch [Animation].
also please define: pomodoro tool

pomodoro timer: https://en.wikipedia.org/wiki/Pomodoro_Technique

are you in a ‘stateful’ context (patch, record, class)?
is the ‘outside that main class’ operation called from any node that is instantiated in vvvv? if there is no one calling you, nothing will run.

Thanks Sunep!

Hi guys,

After making the original vvvv/vl node called ‘Pomodoro’ I made a separate class to define a type called ‘Pomotask.’ This Class defines the type and has its functionality in it.

I made ‘Create’ Pomotask and ‘Update’ Pomotask nodes sucessfully. but the LFOs were not updating, so I tried S+H ‘NowUTC’ time to subtract it form the actual current time.

Okay I figured out the problem with my LFOs, though it doesn’t follow the logic I anticipated: I can’t set the LFO’s period with a Create operation.

But back to the original question; if I want to tell the difference between now and a period of time before I can’t, for instance, sample and hold the time or use a pad/field in an if loop.

pomodoro.zip (17.9 KB)

seems this slipped under our radar.
still i’m afraid i don’t get your question. please provide a simple patch that demonstrate how you “can’t set the LFO’s period with a Create operation.”

and please try to rephrase that…

do you know that VL has a Stopwatch node? maybe use this and check whether the output is greater than a given value…

1 Like

Thanks @tonfilm, I think that was the trick I needed. I actually went on to make it form LFOs but timedifference + an acccumaled property was a neater solution. I may hae to have a further think about how to use time in other ways, such as for dates or timestamping.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.