• 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

    converting timecode to seconds

    How To... ?
    timecode convert
    4
    6
    1857
    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.
    • bonemap
      bonemap Izzy Guru last edited by bonemap

      Hi,

      I am curious to know if the patch represented in this screengrab is the best approach for converting timecode to seconds? 

      best wishes

      Russell

      http://bonemap.com | Australia
      Izzy STD 4.2 | USB 3.6 | + Beta
      MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
      Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
      A range of deployable older Macs

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

        I found this javascript somewhere on the internetz and it can be modified to work with isdaora

        // set the frame rate or Frame Rat as we like to call him
        var frameRat = 30 // fps
        var numOfFrames = 60 // animation frame count
        var animTime = "00:01:00:00" // time code
        var a = convertTimeToFrames(animTime, frameRat);
        var result = animTime + " at " + frameRat + " fps\n = " + a + " frames.";
        alert(result);
        function convertTimeCodeToSeconds(timeString, framerate)
        {
          var timeArray = timeString.split(":");  var hours   = parseInt(timeArray[0]) * 60 * 60;  var minutes = parseInt(timeArray[1]) * 60;  var seconds = parseInt(timeArray[2]);  var frames  = parseInt(timeArray[3])*(1/framerate);  var str = "h:" + hours + "\nm:" + minutes + "\ns:" + seconds + "\nf:" + frames;  alert(str)  var totalTime = hours + minutes + seconds + frames;
          //alert(timeString + " = " + totalTime)  return totalTime;
        }
        function convertTimeToFrames(timeString, framerate)
        {  var secs = convertTimeCodeToSeconds(timeString, framerate);  return secs * framerate;
        }

        Mac M2 Ultra, 64gb — Berlin

        bonemap 1 Reply Last reply Reply Quote 2
        • bonemap
          bonemap Izzy Guru @fubbi last edited by bonemap

          @fubbi said:

          found this

           👍 Thank you. The solution looks like it was much simpler than that. I assume there are built in converters at work here?

          function main()
          {
          var input1 = arguments[0]; //timecode input1
          var output1 = Math.trunc(input1);
          return output1;
          }

          http://bonemap.com | Australia
          Izzy STD 4.2 | USB 3.6 | + Beta
          MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
          Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
          A range of deployable older Macs

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

            To make things even easier, it should be possible to use Isadoras internal conversion for this.
            Since isadora tracks timecode internally in milliseconds, you can treat timecode as an interger (seconds).
            So this should provide the same conversion :)

            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.

            D bonemap 2 Replies Last reply Reply Quote 2
            • D
              deflost @DusX last edited by

              @dusx

              Thank' s a lot.

              It is relative rare to find solutions here,

                which are able to do without beeing a programmer.

              R.h.

              xmg schenker laptop,clevo board, rtx 3080ti, i9, 32gb.
              windows 11

              1 Reply Last reply Reply Quote 0
              • bonemap
                bonemap Izzy Guru @DusX last edited by bonemap

                @dusx said:

                even easier

                 That couldn’t be easier. So timecode can be patched to both text and numeric inputs? Our job Is done here.

                http://bonemap.com | Australia
                Izzy STD 4.2 | USB 3.6 | + Beta
                MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
                Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
                A range of deployable older Macs

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