Prev / Next buttons for each ComboBox



  • 2 ComboBoxes control value of 2 knobs individually. Just trying to add prev / next buttons for each ComboBox.

    Any ideas?

    HiseSnippet 1715.3oc0ZssaaaCFlJMpqVIYKcq.6VgdkCPWfjOmULTubpMXMoF0cA8tLZIZahHQYHQmTuh.zGgcauqOB6QnO.cuC6AXWr8DrQpCVxxGjkpbKlxEIj7m7+6+i+T5KjrkskFxwwxFHT3EiFf.BaJ1dDg1+f9PLAbxg.guV74PhtkobODAYCoLa2ez.niCRGHHbqGysSnv5.2m+9Q6CMfDMTXU.v4VXMzSwlXZXssZ9SXCiig5nWfMiXcklmnYQNvxvZHCS2RTAL.pcIrG5LH2r0DAB29HcLCEsoPJxAHr99V5iZ225Zhm8micvcLP7Bpf1rAxq5isLz4HlWK3f9XC8VAwtCfMJsBYha4wD2S7TrNdb8gLx1tMHG1in7gvZKBdpQgmxxCOgHvacO3cWw1Z13AzvV3XaCwSHTjcWHaJHJr7rEr1e7shGXwrfP20DdI5XaVgw8nXMEkGHWUQYmGtkzVRrIBGp7UPa4mh5RuvKM3hygFCQx+fbvvzCQOvxbfEgUn38mxx6yGqvQ543d8WxgZZSuebb40H9WQ1WL+gIzF+9ukDlXfIH4tCIZTrEQVyxzzhvw94PaLjM+zFYfzXSiG6aRwc1R507tJydbtFS05WrnavFXI2stnr3N6rSfku16WtOZPGjr52GolHOSwa65DLbpbTOq9zwFAu7gw8Poz6Akc2qQ0z4kxYxK6UNcdoRFXqcUTKkNuTMaL1doyK0xTrTJg4E4k7INZpmsXNkLairEyojY2KawR8zyrSsZVIaInobIspZ1VsUOktoT1ltxChLiuOoRJivL9BkFozMUylaJmCDYsrsXHsYj0+j7lY0FqjOlsTD4dYKBqkxuVqjsD+FoNBms4aIU3F1HUn.WwxM9xiB+Y1BkbUlkJkRdZ4liToTITZZUg4tRoE4hbTpTBtIuzJsPBK+DKkDokSpkRHZ9TKWJonNmzKkTTmSBlRJZVkJlRJMMujLkzpt7RyTRSYqRQSIEi4kpojly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ri.dt0PJlzi8O1Yi4eu5rglsYeZPCwPBgfL35EEViqryqrBuLmYZiH5tE9W1ieip7xB9MpFzHvDpYacglmPN9MU4Nt0vvDw8B6TP7TdYY0.YahhJ6p.Xe5.eglFmJ9NF1mceJkg9TNC8oRF5S0LzmZYnO0yPeZrv9vu6R+3Ppko2xDVEsNxU9rfvQD9+lkaFI3+.XcpR0C
    


  • That's some ugly code! Let me spend some time with it.



  • Why have you hardcoded "random" values instead of using the Math.random() function?



  • @d-healey These values should be constant and choosen. because of that I didn't use random function for values.

    This example can be used in analog modeling and while modeling, we will obtain constant values, but selecton between these values can be random.



  • HiseSnippet 1606.3oc0X0sbSaDEdUHhhWRZCs7.nIWvXODBR9u3LPabyePlR.OXHCyvvjpHs1dGjV4QdcHtLLCOB8VtiGg9HvC.OD8ldWuf9Dzt+XIs1R1IwDFlpKhyYOmytemuyYkN61HLvA0qWPHPK2SFzEAzVPu4.BsyVcrwDvdaCz9d8GaSbC7MZiHnPaJy1MGz0tWOjKPS6R2iamVt4AhmOswl1d1DGTxP.vAAXGzCv9XZxnMp+KXOucscQOA6qXc4564DP1JvKnOCSWR2Dz014k1sQOzla1b5.sKuiKlghlTaJpGPa9MCbGzrSvqHR6O.2CejGhKXAZxlH4v6F34xQLeTvVcvdtMhh8d.1rzHgItjjItt99XWb73ILxRBEFIdnxGZyMM3YoBOyyN7zTf27R3cM8lNg3tzDMbrcU88HTTXKaVJPEVRaAy8WP8sBXVPnq5a+RztgLgXOxW0zbEiJllEtyhvEgrDQOpQnH6efsWeTOiez34VqXXt550pH9Y8RqXXspoUQ4fqKjJJ0UqnTZcozZRKktutTp3ZRoxRc0j+TR5f0HScEoTUoCBKKVo7KT.5w1gFO.0hdnrd8PAjYHNJdainaE32MfvDxubJKWlGzIyziws6bFmpzltrj.u8sMjih+MT3HSd7nGN4YMwFwzoHuZOtkDZXf2V1ddGw1gjOfnXvPkRTfIdXBxnUehCEGPLxxx7NQK7JL.xhfBKBesA6YQH+u3VF4iF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VA+0m+FGe+wfohuKD9K8Mrsj99At883W4o5k+wuwygJ3auUukM9MoQXa6Gnt27KxMBdVg60zafoNcxFuykAd4sw7EFuCue0E02oUK1WTR.67569ru7WlJ3wA8oXR68sogX92qdXe+lrOM3fXHgPPd79E0li2YmT1jKyYllHhqP3eYOCUZwk0FpzJRIv21IL3PGYib7av8JhQXXhHtH6b56ykMrhZaSW2bUS.6SG3Ccb3TwsXXOaeJNC9TZF7o7L3SkYvmpyfOqMC9Tap9vuS+etOMvWtMgMPicDsOqosCgemghJRv+AbcED0A
    

    🙂

    Now go and read this - https://github.com/davidhealey/hise_documentation/blob/master/scripting/scripting-in-hise/hise-script-coding-standards.md



  • May I come with my solution? I just have a loop for pev/next so you can continue forever, forever, forever, for... 🙂



  • @d-healey Using arrays is a good option 🙂 Thank you! the only thing is when hitting the random button, console gives this Line 19, column 43: This expression is not a function!



  • @ustk said in Prev / Next buttons for each ComboBox:

    May I come with my solution? I just have a loop for pev/next so you can continue forever, forever, forever, for... 🙂

    Yes of course 🙂



  • @orange

    HiseSnippet 1617.3oc0X0saaaCElJMpqlIdKcqO.B4JazzTI+Wb1PQ7xesAqo0HtMn.EEYJRz1DUhxPhNMdEEnOB61dWeD1iPe.5Cwd.1EaOAajhVVTVRNotYqXAHH4PdNG9c9NGJdHa66YgBB77AJEdxnAHfxxpcFQn82ouIl.NXWfx2pdjIw1yUqGhf7MoLc2dz.yf.jMPQ4Z2mqmRgEAg+7massoiIwBEOD.brG1B8PrKlFOZ6V+D1wYeSazSvtRZWq0AVdjc7b7Fxvz0T0ACLsdoYOziL4psfJP456YiYnnC0jhB.JKtsm8nN88dEQn+w3.7oNHtfAnCyQhg22ywliX9nfc5icraGE6A.lWZGyDWSvD2R8PrMdx3wLxJgSnEagLenrvrfmgL7zyDd5YAOEI3sn.d2TsikOd.MdFN1VR8.BE420jkBjgkPWvBEVRcGOlFD55tluDsuOSXhEkZnqulVcc8x+PQXQHKQDP0NyzW6gntzS5fbPVrHSK7m6o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j8G93G+isBYqPw2+t28WaMEi8rTL1CZYi5ZNzQ7wCYGyiO1UpCgIHv7LzA7yeX6yitJ5kKQmpPKNHe6qjCRq7yzfGLMtA68+mL8sTSeQ.IV3WGJwBs9Blp+JANufbcgjw41CoTFJ4wYQUou2KEfrXJN.A1sRBzObbpba0V3fC8bYKmo+HwGNEH7FiWg4FhKoNoOeI.9gmIWGhmBfu8wo.ndd.75g9etg2xpwMNKgu22al3q8mB93KvmA9h6.UBeqPkqf+xyeSiueazLw2UB+k9U3VQ8PO6gN7mEU9AB4uJ53I3aukeIN9qsQXa6GIu27y9UCyrqiKIbuoZaL0pe13cgLvKuMl+kw632fsn5dc6xNQIFrKpt+ytZev0LgxQdCoXROVa19X94UOZnaG1QCVHFRHDjCueQkE3c1Ij04xbloChXGJ72reFOoAWVY7jFQSBbMs78NwRzHG+UduQ3HLLQBer6BpGxk0LhZaSUUecc.6nC7IVVbp3NLrmsMUlCapNG1TaNro9bXSi4vlMlCaZNSa3u6+ONj54J1lvFn8dgsOqnrGwjUkEVQB9Gv74zfi
    


  • @orange Yeah I didn't touch the random button stuff (although I may have deleted a function it was calling).



  • @ustk said in Prev / Next buttons for each ComboBox:

    @orange

    HiseSnippet 1617.3oc0X0saaaCElJMpqlIdKcqO.B4JazzTI+Wb1PQ7xesAqo0HtMn.EEYJRz1DUhxPhNMdEEnOB61dWeD1iPe.5Cwd.1EaOAajhVVTVRNotYqXAHH4PdNG9c9NGJdHa66YgBB77AJEdxnAHfxxpcFQn82ouIl.NXWfx2pdjIw1yUqGhf7MoLc2dz.yf.jMPQ4Z2mqmRgEAg+7massoiIwBEOD.brG1B8PrKlFOZ6V+D1wYeSazSvtRZWq0AVdjc7b7Fxvz0T0ACLsdoYOziL4psfJP456YiYnnC0jhB.JKtsm8nN88dEQn+w3.7oNHtfAnCyQhg22ywliX9nfc5icraGE6A.lWZGyDWSvD2R8PrMdx3wLxJgSnEagLenrvrfmgL7zyDd5YAOEI3sn.d2TsikOd.MdFN1V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5Mp1XC.k8cinwWVsRi55M0YsIuAOkNgBVVPAe8XJniC1F4GR.emZpdakHAvOKQBZjVtXaaGTau.LuBV9V0tStj8G93G+isBYqPw2+t28WaMEi8rTL1CZYi5ZNzQ7wCYGyiO1UpCgIHv7LzA7yeX6yitJ5kKQmpPKNHe6qjCRq7yzfGLMtA68+mL8sTSeQ.IV3WGJwBs9Blp+JANufbcgjw41CoTFJ4wYQUou2KEfrXJN.A1sRBzObbpba0V3fC8bYKmo+HwGNEH7FiWg4FhKoNoOeI.9gmIWGhmBfu8wo.ndd.75g9etg2xpwMNKgu22al3q8mB93KvmA9h6.UBeqPkqf+xyeSiueazLw2UB+k9U3VQ8PO6gN7mEU9AB4uJ53I3aukeIN9qsQXa6GIu27y9UCyrqiKIbuoZaL0pe13cgLvKuMl+kw632fsn5dc6xNQIFrKpt+ytZev0LgxQdCoXROVa19X94UOZnaG1QCVHFRHDjCueQkE3c1Ij04xbloChXGJ72reFOoAWVY7jFQSBbMs78NwRzHG+UduQ3HLLQBer6BpGxk0LhZaSUUecc.6nC7IVVbp3NLrmsMUlCapNG1TaNro9bXSi4vlMlCaZNSa3u6+ONj54J1lvFn8dgsOqnrGwjUkEVQB9Gv74zfi
    

    @d-healey @ustk Both of these approaches works like a charm guys. Thank you so much again!



  • @orange @ustk @d-healey great script guys, thank you! Have merged with my samplemaps combo box, meaning that if people like the processing on a preset, but wish to experiment with a different sound (sample bank), they now can 🙂

    Cheers!


Log in to reply
 

13
Online

1.2k
Users

3.8k
Topics

33.6k
Posts