• 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

    [SOLVED] Formating one text input into scroll

    Developers
    5
    9
    3843
    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.
    • Maxime
      Maxime last edited by

      Hi,

      For a project i'm using the twitter API to stream all the tweets of the 10 most trending topics worldwide into Isadora.
      I'm monitoring the twitter activity and sending each tweet through one OSC channel into Isadora with a node.js program, then I did the attached user actor to format the input into some scroll effect.
      Everything is working, but it's decreasing a lot the performances of Isadora (down to about 14 fps) and this is just a little part of the project, so I probably can't afford to be that much on the edge for that...
      The refreshment rate is pretty high (probably around 48Hz) and I know for sure that my method is not the best, it's just the only work around I've found so far...
      I've tried to find a way with javascript actor just to format the text input (unsuccessfully so far), but I'm sure there's better solution than OSC to get the text data: maybe a way to directly get the data into the javascript actor?
      I also remember seeing a text actor which was loading text from external file (but can't find it anymore), maybe this could work with my node.js writing data to text file?
      I'm opened to any suggestion, attached is my "inefficient" actor
      Thanks!
      Edit: looking at @DusX Tcp tutorial now (http://www.dusxproductions.com/blog/web-apis-in-isadora-part-1/) could be a solution if I run my node on a server instead of locally ?

      7dcdbd-twit-feed.iua

      MBP 15" end 2013 / i7 2,3Ghz /NVIDIA GT 750M 2048Mo / 16Go RAM / OS 10.10.3
      Razer Blade 15" 2018 /i7/ GTX1070/ 16Go RAM

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

        I think @DusX is your man to help here.

        I used to use twitter when it was the older XML method and then just import as text, etc But I have never found another good solution since it updated to JSON.
        Good luck - hope you solve it. 

        Graham Thorne | www.grahamthorne.co.uk
        RIG 1: Custom-built PC: Windows 11. Ryzen 7 7700X, RTX3080, 32G DDR5 RAM. 2 x m.2.
        RIG 2: Laptop Dell G15: Windows 11, Intel i9 12th Gen. RTX3070ti, 16G RAM (DDR5), 2 x NVME M.2 SSD.
        RIG 3: Apple Laptop: rMBP i7, 8gig RAM 256 SSD, HD, OS X 10.12.12

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

          @Maxime Is this the plugin you are looking for?

          best

          82e2fd-readtextfromfile.izzyplug.zip

          Running MBP2017 / Ventura Osx 13.6.7 / 16 GB 2133 MHz LPDDR3 / Intel HD Graphics 630 1536 MB / Latest Isadora Version / www.gapworks.at / located in Vienna Austria

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

            @gapworks yes thanks! maybe I can try to find a way with that

            MBP 15" end 2013 / i7 2,3Ghz /NVIDIA GT 750M 2048Mo / 16Go RAM / OS 10.10.3
            Razer Blade 15" 2018 /i7/ GTX1070/ 16Go RAM

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

              The plugin is great, but you will have a hard time writing to it, and reading from it simultaneous.

              Your performance issue is probably due to the Text Draw actor being combined so often. You could try combining all the text using the 'Text Formatter' actor.

              You can combine 6 inputs together with line breaks between with this formatting string:
              " P1 0D 0A P2 0D 0A P3 0D 0A P4 0D 0A P5 0D 0A P6"

              This actor allows a max of 9 inputs, so you would need to chain a few together to make your 24 lines.
              If this is still slow (I suggest you add a multi-blocker to the input.. 48hz is too much) Try the Classic Text Draw actor.. it uses more CPU but handles large strings better.

              I have had to use it to overlay large arrays of formatted data in my own work.

              Regarding the TCP option.. if you can get the data in JSON format from Twitter, this might be a good option... although at the high refresh rates you are using, I have not tested.
              You may want to read the tutorial on ungrouping JSON data:
              http://troikatronix.com/support/kb/grouping-ungrouping-and-passing-json-values/

              It will likely be of help if you try that option.

              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
              • mark
                mark last edited by

                Dear @Maxime,

                The first problem I see is that you the video mode of the Text Draw actors is vid-cpu. You should re-build this actor so that it is vid-gpu, so that – at least – the mixing of the images is performed on the GPU. Also, I would not "daisy chain" the actors. Instead, I would use a MultiMix actor to combine the video output of all the actors into one video stream.
                Please try the attached User Actor, which I modified to use the GPU and was created in v2.2.2\. See if that helps the frame rate.
                Best Wishes,
                Mark

                97eb46-twit-feed-gpu-version.iua

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

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

                  Thanks for your answers.

                  @mark I am going to check your actor with the multi mix instead of the daisy chain text draw.
                  I've tried a version with the GPU and somehow it was a bit less performant, but my laptop is a bit old, my graphic card only NVIDIA GeForce GT 330M 256 Mo, that might be part of the problem.
                  After my post I've tried a "one-liner" version with one text draw actor, and it's not running so great either, so I guess the high refreshment rate is a major part of the problem.
                  I'm going to try to write, as @DusX suggested, a new JSON file every 2 minutes and load it to see how it goes, it's not "real" live anymore but I guess it's the best bet for good performances.
                  Thanks everyone for your inputs, I'll get back to you with my results.

                  MBP 15" end 2013 / i7 2,3Ghz /NVIDIA GT 750M 2048Mo / 16Go RAM / OS 10.10.3
                  Razer Blade 15" 2018 /i7/ GTX1070/ 16Go RAM

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

                    Dear @Maxime,

                    What is the "Default Resolution" setting in the Video Tab of the preferences? Since you haven't specified a resolution explicitly in the Text Draw actor, this is the resolution that will be used when generating video. If it is very high, this will impair performance.
                    Remember, drawing text is not done on the GPU. Text is drawn into bitmaps on the CPU side. Rendering 24 of those can be costly if the resolution is high.That's why @DusX's idea to concatenate the text first and then use one Text Draw actor would help a lot in terms of performance. Attached please find a patch with a Javascript actor that will concatenate 24 lines of text, separating them with carriage returns into separate lines. That would be the best way to go if you can do so.
                    Best Wishes,
                    Mark

                    77df59-javascript-concat-24-text-inputs.izz

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

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

                      Thanks a lot!

                      @mark my default resolution was 640x360 
                      Your javascript actor helped me a lot to go through my system!
                      I made four of it to be able to have continuous scroll and be able to "fill the buffer" out of view.
                      It might still not be the most elegant way of doing it, but it's working at 30fps, so I consider it as a solved problem (even though I might try to make it better for fun)
                      I really need to work on this Javascript actor!

                      b453db-twit-format.izz

                      MBP 15" end 2013 / i7 2,3Ghz /NVIDIA GT 750M 2048Mo / 16Go RAM / OS 10.10.3
                      Razer Blade 15" 2018 /i7/ GTX1070/ 16Go RAM

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