Floating Tile and "You must specify the unique component name, not the object itself"
-
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 errormain:! 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-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.
-
@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 pressj
on the component you'll see the string. -
@d-healey Ah okay, the answer was right there .
Can we rotate the Floating Tile Peak meter so that it's vertical?
-
-
@d-healey Ah, great, thanks. And the value accounts for the DownDecayTime property?
-
@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.
-
@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.V01hX97lm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J8kQ3z3iSBK9PA8D5J5lcoqapWm1oj6aV7V7SlvV50VYBasT3+JmQH0SJdoW5ah04oefAAu2bye7oF93ObsSKh4cx4ikgXWtW54UbqtlgObSM7a1TCezlZ32toF93M0vuaSM76+qMTOD5fDkHLszjPFLrq4c2VVc4TLK2TQP9SiOTLnA
-
@d-healey HISE discriminates against short and fat vertical meters!
Good find, sensible implementation. Thanks!