HISE Logo Forum
    • Categories
    • Register
    • Login

    Floating Tile and "You must specify the unique component name, not the object itself"

    Scheduled Pinned Locked Moved Scripting
    10 Posts 2 Posters 354 Views
    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.
    • A
      aaronventure
      last edited by

      I'm trying to set the data for the floating tile from the script. I'm adding a peak meter.

      	const var meter2 = Content.addFloatingTile("headerMasterMeter", UI.WIDTH - 470, 7);
      	const var meter2data = 
      	{
      		"ProcessorId": "MasterGain",
      		"Index": -1,
      		"FollowWorkspace": false,
      		"SegmentLedSize": 0,
      		"UpDecayTime": 0.0,
      		"DownDecayTime": 200,
      		"UseSourceChannels": false,
      		"SkewFactor": 0.3,
      		"PaddingSize": 1,
      		"ShowMaxPeak": 1.0,
      		"ChannelIndexes": [0, 1],
      	};
      	Content.setPropertiesFromJSON("headerMasterMeter",
      	{
      		"width": 170,
      		"height": 13,
      		"bgColour": 0x00000000,
      		"itemColour": ColorPalette.base
      		"itemColour2": ColorPalette.dark,
      		"textColour": 0x9AFFFFFF, // max peak value
      		"ContentType": "MatrixPeakMeter",
      	});
      	meter2.set("Data", meter2data);
      

      but the line meter2.set("Data", meter2data);˛ results in an error main:! You must specify the unique component name, not the object itself.

      I can't figure this one out. How do I set the data property from the script?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @aaronventure
        last edited by

        @aaronventure

        https://forum.hise.audio/topic/7466/updating-floatingtile-content-data?_=1708387263799

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        A 1 Reply Last reply Reply Quote 0
        • A
          aaronventure @d.healey
          last edited by

          @d-healey So I just had to do trace(meter2data).

          Huh. Weird. Does the component expect a string that it then parses as JSON?

          Thanks, David.

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @aaronventure
            last edited by

            @aaronventure said in Floating Tile and "You must specify the unique component name, not the object itself":

            Does the component expect a string that it then parses as JSON?

            If I remember correctly the Data property is a json string. You can actually just edit the string directly but I find it easier to convert it to an object. If you press j on the component you'll see the string.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            A 1 Reply Last reply Reply Quote 0
            • A
              aaronventure @d.healey
              last edited by

              @d-healey Ah okay, the answer was right there .

              Can we rotate the Floating Tile Peak meter so that it's vertical?

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @aaronventure
                last edited by

                @aaronventure Yes - https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/LookAndFeel.js#L946

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                A 1 Reply Last reply Reply Quote 0
                • A
                  aaronventure @d.healey
                  last edited by

                  @d-healey Ah, great, thanks. And the value accounts for the DownDecayTime property?

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @aaronventure
                    last edited by

                    @aaronventure value is the current level. In my case I am just displaying both channels merged together so that's why I'm looping over the peaks and then dividing to get an average. You probably don't want to do this.

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey
                      last edited by

                      @aaronventure Actually I just checked and you don't even need to do anything custom to get a vertical peak meter. Just change the dimensions of the floating tile and it's vertical.

                      HiseSnippet 1087.3oc2W0saaTDEdV6rQXGnPQUHtBsxBgRkBU1kRAAWzj3eprHNwJqcakPnpI6dr8Hu6LKyNaRLU8ciGAdT5aP4LytNd2lUAGKfJvWX446bNy7MmeGOTJ7f3XgjXUazhHfX8g1tK3pYsmQYbR+NDq6XOfFq.oSJzgKhnwwfOwxp5S0.V01hX97lmbHMfx8fUPDxyDLO3HVHSsBc39+DKHnG0GFwByo8i1uumf2VDHRP9T0tIIh5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doW5ah04oefAAu2bye7oF93ObsSKh4cx4ikgXWtW54UbqtlgObSM7a1TCezlZ32toF93M0vuaSM76+qMTOD5fDkHLszjPFLrq4c2VVc4TLK2TQP9SiOTLnA
                      

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aaronventure @d.healey
                        last edited by

                        @d-healey HISE discriminates against short and fat vertical meters!

                        Good find, sensible implementation. Thanks!

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

                        16

                        Online

                        2.0k

                        Users

                        12.7k

                        Topics

                        110.5k

                        Posts