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



  • 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


  • Tech Staff

    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.



  • 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).

  • Tech Staff

    @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.


  • 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)



Log in to reply
 

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.