Random / Linear Slider
-
@d-healey should I be able to use an array in this too? Only the first value in the array is moving...
HiseSnippet 1366.3ocwXEzaaaCElJMrK1oYXEX21EgbRFHM01KsqCCCUINNqtM1wKNMnEcEcLRzwbQhzkhpqtEEXG2scY.6Ow9Qji63.F189SXX+.1FojrDsqTriA1ltXQ9deO98d583izc4LGbP.iCLJczngXfw0f8FQECZL.QnfV6BLVAd31c18f1fcFMDEDfcAFFW4KTRMJsLH54Ot6NHOD0AmME.bLi3f2m3SDYy109ADOu8Pt3iH9ZZukcKGFsAyiEJYxUfUACQNmgNE2AoTaIHv3pMcIBFum.IvARc1g4Np2.12Ri0+XR.4DOrZPMPOoghmFzX.wys6XuL..LVtalOekXe9CgsItjz4y78OHRfYFB8XfwRSRokmfR0JhR6w7bUFn.5YnQukio20g8b3jghLIJtsJrEUf48QxvtNsh0ErzFPXClTCpXSezY383xAoHrtc0paXdqpUq7YqUVF5CDlu.wM2uUmlaen4maNF4oXQCl+PFUNvZ8XwqOIl8Nr4W9vlcZ73BgkpQQHqMan0JBa8Yis9TXOpY6tGz6wcZTHzTMlFYq1MKFjT3T52s0QMtWg.hjFgPGSeN94HNGMRh6Io9vFZQKs2q+zHzDpGghM6GRcDDF0jQiqYUqKm4Y4LdQ2PtDdg3JqU90qUtjoIouo03YjCMM6y3lVuzjPy3gTjRxqi+Q8DmGrY.VbrBqUajXvlbD0k4aUQ4OSony.D8TrqktnadyTmHyPYVRloZUWlhVup7oRkhPlmkSI9Sd4SujldBn4Y6zDihLrzt0tyjFMCStVTl0bAFKGRFgHOSEkOUjstQs5RpUeRSEiP2VYxhe6MqU9MQSmeJbbZ15UTqZRxVCjm2IxcuslJITYcsDzNLA9.pUkxutboxuor4zh52OWYIFyCyyUrpsB+h.ZQC8OAyGWGLVQ4dsStY9py2l4NwQEMEYzVTh3fg3jwYa2qjE60ikVEj5r5Sk4i5yF4Z4nV1Tua2DPxWMYekURTWppHpqx6mzUomGwEyADWUq93BVPTvIt874k9zO52uKXNPuJLstbrAfF+48SXwL.eUnJsNCGa+4C2pvzxqLvk.W.3cBEBFMweSNZil+l7LGK86AiJexVV3bB7ZYApZSsz1b6KoEpOkE94ezF7vV6hDH0gIR99KyIFh4BhJy1XW7KjmLK9nEkf6hCNSvFFkfjTVK8kYmh7xzU76tu8nrA119DWWObWV.QU5kEUeqJKJcIJOW4QErJmebNqhgRxvexNPfG1i7Jr94S80Ot5V19nLC+8+lcPX+9D4LPn48dEvm4hiXgrYPHl5LBny6RyJENyxfGnQ429M4P4+5ukO28GxmxExQ+fDNJWQ0wn0o2JyUkhVXsiFGsOovOdqOSNBpaONxcDVxG40HblfZWc10gYV67GpwqeMzFSQxseUmFeeLhSUGzkDzl4KsLhK0zXo46iz3hVsHPWsU5qedgQ..H2HPjKWFtKIvgiEXvDgDK6IR7rNe9p.lXCB02bieQhdj5kmJe4+qT+xy29QQD9QFID9q9ulvu68mj2hi4F5gDSd0N0cXSDnXk9cnT2ShJY6HcdcItuW0buuWs75POmz85vtDgyf746R4vW4t++ay2jaOuFrY+9XGQFYWFt2iVzqJeInxgrPAgdp7Xt7nLhNg98XgbGrjITJ1KPk+sjpmb73ppwpHSOL0MZfZ62Dg0TiMRDVarPY4rCm8Lm3Vxp6muRzLRNQi9qIJAaqFal1HGBqtYUUFO4YNNpPwMjbOeL0W.Le7BfYqE.ysV.L2dAv7IK.l6bgXT8H1NTv7iKSjSzsYzwgLLZF0DIJiD7OM8k9LC -
Try
Console.print(x);and you'll get you're answer ;) -
@d-healey It prints out three object numbers.... I don't get it

-
On each iteration
xwill contain the value of the array at each index. So the first time through it will contain the value at array[0], the second time through the value at array[1], third time through the value at array[2], etc.If you want the index number then you need to use a regular for loop instead.
-
@d-healey Silly me! Thanks David :)
-
@d-healey So what do I need to do in order to generate random numbers between 0.00 and (for example) 0.50?
-
@DanH said in Random / Linear Slider:
@d-healey So what do I need to do in order to generate random numbers between 0.00 and (for example) 0.50?
read the Javascript manual (anywhere on line) for the random command:
thy this:
-
-
start here:
https://www.w3schools.com/js/default.asp
read thru every page of the manual - compare the javascript versions against the HISE API documentation - some things available in Javascript are NOT available in HISE, and the reverse is also true....but 90% of it will be useful to you.
-
@Lindon found it

