• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    [Solved] Store parameters by ID and find them? Program loop though all ellements in data Array?

    How To... ?
    2
    6
    1.5k
    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.
    • MikhailM
      Mikhail
      last edited by

      I want to do simple task: i want to store and retrieve "loop" property(later additional properties, such as Volume and etc) for some Video-clips. So, when I will select corresponding clip, "loop" property automatically restored for this clip(if exist).
      To do that, i've try to use data Array As storage. I suppose, that data Array will store data in below format:
      , ,,... ,... ,... 
      At the moment I try to read my sample-file, which stores fake IDs. My Actor should find if VideoBinId stored in data Array. If stored, it will return Line number(as Index output), otherwise, it will return 0 As line number.
      I've attached my user Actor, but it is doesn't worked correctly. In some moment it' stop to operate(Counter Actor output only "1" and don't pass through other values). Also I've attached my sample data file I've used.
      Could anyone help me what problem is? 
      Maybe there are other ways to store info by ID? Maybe somewhere i could find working user Actor for this purpose?
      Thanks in advance!

      6e17a3-save_bin.iua 6424a4-isadorasetings.txt

      Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

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

        The data array actor can be a hard one to work with.

        If you don't need to write to disk with new values before closing.. I would suggest using the Global value actors.. Its perhaps the easiest way. Javascript would allow you to read externally configurable initial values, and work with JSON formatted data within Isadora (you would need to use global values to pass the JSON between scenes)
        If you really need to write the values to disk, Data Array is your only option.

        I find that I have an easier time controlling the Data Array, using a Javascript actor to interface it.. it just makes looping thru values easier.

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • Isadora Add-ons: https://troikatronix.com/add-ons/
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

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

          DusX,

          What do you think about INI-files? Is it possible to store some info in such format? Maybe it will be good alternative for data array actor?
          INIs able to store strings and numbers (data array able to store only  numbers).

          Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

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

            @Mikhail

            I would like to see Izzy supporting the writing of JSON (really just text). Since Javascript can parse this info very easily, it would integrate more quickly with the current workflow and provide a powerful data tool.

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • Isadora Add-ons: https://troikatronix.com/add-ons/
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

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

              Here is User Actor for Isadora which able to store 6 Integer Or Float values for each Index in file. It can retrieve/store/update data in file. Based on DataArray. 

              All data stored in text file. Format of file:
              Inputs:
              **Filename**(optional with path), which store data(leave empty for default "C:\Isadora.sav")
              **Index** - integer index, which associated with stored parameters. For example, it can be Video_Id or Picture_Id or any integer value which will be associated with stored P1...P6 parameters. 
              **P1...P6** - parameters which need to store. Uses only for updating and adding new data. Each group P1...P6 associated with unique Index(defining by **Index** Param). P1...P6 could store info such as Volume, Looping, Start/End position for curtain video clip.
              **Save** trigger - adds(if selected Index not exists) or updates(if selected Index already exists) data for selected Index in DataArray.

              Outputs:

              **LineNo** - return Line number in text file which stores information or -1 if selected index doesnt exists.
              **P1...P6** - return stored parameters for selected Index(if Index doesnt exists, these parameters doesnt updates)

              Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

              1 Reply Last reply Reply Quote 0
              • MikhailM
                Mikhail
                last edited by

                Updated f802fc-storagemod.iua

                Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

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