designcoding
About Table of Contents Keywords Monthly Archive
Support designcoding!

Timer Component

July 16, 2012 | Algorithms
#grasshopper #timer #vbnet

This is probably the most simple definition on this site but I think it’s very useful. The timer is a special component of Grasshopper that is significant in terms of the real-time sketching paradigm. This basic use of a timer includes a 1-second update to a Vb script. Inside the script, the system date’s seconds are returned, so we see a real-time increasing number at output A. Beyond this point, It’s up to your imagination, how you can use that number.

Timer Component Grasshopper definition

When I was a kid, we used to write programs in Basic language using a similar method. For next loops seem to be useful in creating time gaps, telling the computer to “wait” for a couple of seconds. But later we discovered that the time computer waits in an empty for the next loop depends on the speed of the CPU, and decreased dramatically in the new Pentium 300s! So it was then a better idea to tell the computer exactly to wait for x seconds using system date and time parameters. This definition reminded me of those old days.

Below is the file containing the VB script and a working timer that counts and outputs seconds in real time. I’ve found the “Second” and “Now” statements here if you want to improve them further for your purposes. In fact, my real motivation for getting into Timer lies in creating a metronome. This is for my future project of musical integration.

Note: If you want to have a faster chronometer, try setting the timer component to a lower value. Replace the line at the VB component with this: A = System.DateTime.Now.Millisecond

Grasshopper definition (GHX)Download

Cite this post

Yazar, T. (2012, July 16). Timer Component. designcoding. Retrieved August 24, 2026, from https://www.designcoding.net/basic-use-of-timer-component/

Related Posts

Regenerating Random Numbers

January 2, 2013

Just a quick tip as I thought might be useful in some cases. Generating random numbers in architectural scripting is not a too catchy thing for designers. It is for sure, we want every parameter to be under our control (as if it were possible!). I was thinking about that in Grasshopper. A dataflow graph such as in Grasshopper regenerates whenever necessary (a change on an input value “fires” every connected component), therefore random number component requires your action (for…

Metronome Continued

July 19, 2012

Here is today’s improvement on my metronome with the timer component, which started here. It’s straightforward to tell Grasshopper about seconds and organize it according to it. Using an interval smaller than 1 second, this small script catches every second and returns a different value. However, it’s much harder to implement smaller values than seconds. It seemed easy at first sight but getting accurate results smaller than seconds requires working with milliseconds. You can output the current millisecond’s value, but…

Headbanging Points

December 20, 2013

In this fun experiment, points rock and roll! It should be based on a sound input of course but this is only a test to see if I can handle a timer and graph input at the same time. I’ll modify this definition to actuate with sound.  The use of the timer component gives a certain degree of randomness to the overall formation. To run this definition we need a VB script to update a certain value. The code inside of…

Karyokinesis

November 2, 2013

While searching for a way to work with random points and growing populations, this idea appeared accidentally. I wasn’t trying to mimic the behavior of Karyokinesis of biological cells (in fact I’m in serious doubt about biomimicry in general). The trick is to use a timer + data recorder + a knob for the arbitrary user input. It starts to breed when you start the timer, but to change the evolution speed, just roll the knob!  Of course, the knob…

Animate Sketching of a Parametric Truss

July 25, 2012

Previous studies on the timer component were based on understanding its use. This time, I tried to implement it in a geometric design task. Moreover, manipulating the timer component to change the regular animation of parameters. Time does not have to be equally divided into sequences. Rather, new possibilities may emerge with different time flows. A simple triangulation system is developed with a potential manipulation, based on a timer. This definition is exciting and new for me because I’m not…

  • Chapters

    • Algorithms
    • Discourses
    • Fabrications
    • Studios
  • Explore

    • All Keywords
    • Table of Contents
    • Monthly Archive
    • #rhino-python
    • #polyhedra
    • #parametric-surface
    • #robot
    • #tessellation
    • #boolean
    • #kuka-prc
    • #dome
    • #design-object
    • #image-sampler
    • #terrain
    • #sandblasting
    • #stone
    • #parametric-curve
    • #animation
    • #cycloid
    • #art
    • #simulation
    • #aperiodic
    • #tiling
  • Search

  • Support designcoding!

  • Enjoying designcoding? Support me on Patreon to keep it growing. Thank you!

  • copyright 2026 designcoding.net | about | privacy policy | end user license agreement