Solved Updating FloatingTile Content Data
-
Hey, I am using a Peak Meter FloatingTile and want to update the processor id to show the peak meter of a different Synth via scripting.
What I've tried so far:
- use
setContentData(data)
This clears the floating tile content type and the content data. I might be using it wrong but I copied the current existing data from the floating tile, created a object, changed the "ProcessorId" and used that method to set the data. - use
updateContentPropertyInternal(propertyId value)
I am getting a function not found. I read another forum post that this is unused and should not be used Forum post here
How can I update the FloatingTile PeakMeter to use a different "ProcessorId' and display its values?
- use
-
Here's an example that sets the lowest key of the keyboard floating tile.
First we get the Data property, which is a string. We convert this to an object using
parseAsJSON
. Then we can change any property we want but we must add theType
property.Then we assign our data object back to the floating tile's Data property, converting it back to a string in the process using the
trace
function.HiseSnippet 1225.3ocsV00aaaCEkxIpaVasacXOsmD7SN.YtxYoIoKXaNwwtyKMIF0ooaOUPKRaSDJRAQpj3UDf8Sd+CxtjR1RN0Hs0.yODj62Gd44do5mHCoJkLA4T87owTjyW6NXpPOo8DLSf5cDx4ItmfUZZhelpCmFiUJJA43r1KMJbptNx96e+sCwbrHjVnBgtPxBouhEwzEZ625XFm2ESnmyhJ481s5EJEskbYJfm0bCPw3vKwiomhMtUwE47nNDlVlLPi0TE3ygRxzASjWKx7+BlhMjSMBMQCfDkoF0dBiS5O6rpPHm06WbxWK6j+8tmvHr45K5.eq0feQDk6ANUdHH07y.RNkfz5YP5otCBSXw5BKF77Ut8DvExHLzpKCkLeQUjUbaKAOD5FQ3KocS.g4QTemffM8g+rw9ddP6Vo8uBm32kKwZlX74LNso+u3OKAio51xnXo.DpWaAupYx.SvYBp+nTQnlIE9RwwB4vllvSj75gyhcSnJ7T5Fdu2qphpek75ioSqmoaeuagLs7JZyVsMZnLZs4rMlyGB7h5KVpkAl6WHSw4xPL2mf0X3Ttv4wT450NBr.0KFmnnGn9iAmcZcH0Uq5U0DSCy8BDXMHoCk3DRs88e1y7+KYpeTJzJgJ5qmP8CyNL9Zi6SnIz7vyfCj.Kff75UcQLnligM80Il6KSbaX5Qk5wmJ0zyD0sGHua87uuoQiVps7VEmlrTylowjGJv5hzngzjx2kFGA55hy.O5SaFHuIUxQonmfoOKllK2UxIFts4++vIFTNkwL6jiPvUscx4I4SNC3LBMAwfj7EtV9BxB9hsN8ZgdSOSGeVZfLBUIllnYlCiyQzqfcXYCjUcOhptTKig0QyYovRSc9FjrhV9J0V5uwcgaYzMkWQNsrPN.xplm6LZFZ33Y6Eq9HBgbmwWllFUn8t6t6GVT6V4psNqo2nKbdV4rm6JW439dOeKo9sLhdRse1u41MB1zn6HlJlimdVnFeE8T68OXdDlqnV6YLZP0yCxi32YYJZt0tV41vfgL5kI33IrP0BAeDcDNkqOHNlhSLOc.V0IoYFOjCS4PpdMz3jfgfF67B6u81KX2WDraSqWmKGOlSOQRnKjYyFaXCtPP4FnX08FE8BZHvSKgk4UCL1ki0CzS42KS86LeX+d5A9dhtnJaMSeGAoTs2ICmvMJHUr3v6Vz0llMxw0gWAglPYimnMRjLhvb10i+nT5R7oesUI9DokxbdfIRqinHFgvo8kJlYvdte+SWvOZ7.1eCt551rQ.3onbNivkJwosToiFwtw9j7HFORoAb0KBdoF47ctPmzmjcw5qtDxCrT9RJ4bo0eCOzLGA7FenW.eMvG7pG7dqjjBWFK9Hr4qMxMX.e4W9LutIfC0zxeMxmwKyAO3KyepP7ot8Y5vIKGiUVBFgMN+efw7um4wtcFMB36E.bc2t+4p9wKejx+ZYpY81IXfJ.DCWXSw.XWSHMePPYH1UL75L4.iroCLfJHVAyhpbiMMxN4FaNyHJBGlHeWX1ldyWL8kVM.lD1OPrJ7kpfr+7U7ttAVpLg8tvPyw+GgmQVdLasBw7SqPLauBw77UHlcVgX1cEhYuGLFyV3CRgs+YiCfh9crO433zQfAlkkEh9O.Xjnc8A
-
@d-healey Thanks for sharing!
I went wrong by manually copying the
ContentData
which does not include the type. Also the fact that you need to stringify/ trace the data to be able to set it flew over my head! I'll save that one for my personal documentation :) Thanks! -
-
-
@oskarsh It is possible to do it also by editing the string but I think the object way is much cleaner and easier to understand.
-
You can also call obj.clone()…
-