• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [Q] truncating or rounding time numbers

    How To... ?
    5
    6
    1715
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fubbi
      fubbi last edited by

      Anyone got a method for using time numbers for anything else than visual feedback?

      When connected to anything else an actor with a _time_ output gives you time in seconds with many decimals rolled into one. so 12.3456 becomes 123456.
      I need to either truncate the decimals or round them up or down. I have had no luck with the text formatter so far.
      An example of this being a limitation is the "timer" actor who's output can not be connected to a comparator. A rounded second will probably do for making a timed cue trigger.
      any ideas?
      thank you
      fubbi

      Mac M2 Ultra, 64gb — Berlin

      1 Reply Last reply Reply Quote 0
      • DusX
        DusX Tech Staff last edited by

        The timer actor can be connected to a comparator. It will however convert from seconds to milliseconds for numerical output (as you mentioned, see note below).
        If all you want is the ability to enter time as Hours Minutes Seconds, I would suggest making user actors for this conversion on both ends (as input and as output for reading/display).
        As far as using the timer as a method of creating a cues system. It will work very well (I just finished a project that had many scenes that all simply used a millisecond timer to send a secondary 'engine' commands synced to audio backing tracks)
        You just need to be aware of time lost between cycles.. if your system is running slowly due to video processing or what ever, a few milliseconds will pass between code cycles, therefore you need to check for your cue plus any lost period of time (a buffer).
        You can even try to calculate the per cycle time and use this as a unit for creating your time buffer (use more than one unit).

        PS: your time example shows 4 decimal values, I can only find example of time actors giving three (millisecond units). If any are giving more decimal values, this will need to be dealt with differently.

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
        • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

        Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

        1 Reply Last reply Reply Quote 0
        • C
          CraigAlfredson last edited by

          I have attached a simple user actor that takes a time in milliseconds and outputs as hours, minutes, seconds.  Perhaps this could be a useful start for you.

          Craig

          387444-timer.iua

          1 Reply Last reply Reply Quote 0
          • mark
            mark last edited by

            Just a quick comment: if you want seconds, just divide the number by 1000.

            Best,
            M

            Media Artist & Creator of Isadora
            Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

            1 Reply Last reply Reply Quote 0
            • Michel
              Michel Izzy Guru last edited by

              Hi Fubbi

              Maybe my TimerTool is helpful, you find it in the first post:
              http://troikatronix.com/troikatronixforum/discussion/123/timertool-v1.2.6-update#Item_5

              Best
              Michel

              Michel Weber | www.filmprojekt.ch | rMBP (2019) i9, 16gig, AMD 5500M 8 GB, OS X 10.15 | located in Winterthur Switzerland.

              1 Reply Last reply Reply Quote 0
              • fubbi
                fubbi last edited by

                Thank you everybody!!

                Mac M2 Ultra, 64gb — Berlin

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post