help please :)
-
Hello,
i need a little helping hand.
after looking for a long time on the forum I almost got what I wanted.
my buttons 1 2 and 3 load samples in an audio loop player.
until then, it works.
I wanted to put a button using a combobox to be able to do a prev / next on these buttons so that they click one after the other. the script works but the samples are not loaded from the prev / next buttons nor from the combo box. only with their respective buttons. How do I get the samples to load directly with my prev and next button?HiseSnippet 2472.3oc6a07aabbEeonVGI5OhRpaQ5k1ABEATP1x7CIK25npUhTxQ0RVLhJ1ovvvY0tCEG3k6vr6PYQ6J.iBzds8PujaAn+KTzSEH5Vt1KEn8PSROmKBHsWa6a1OmkbE0RUIUoDRcPbl27l2u2adyaduYWVwhpgssoVRoFcy1MwRothb01lr5kpqRLkVorTpKIe+UJceoEa2T01FqKkJU56wokZzgkb9bv7KpZnZpgC6RR5gThFdURCBKr2JJ2mXXrrpNdSRCgQOsxJZTyRTCZK.GokyI0TU6YpaiefJeXCICfXIcBiZUkoxv1RoFdQpd6p0oO2zc7OjXS1x.yajWpJLQtcuL0PmiXduRkpSLzq3qu1RRodsJgZeZWs+5xqQzIA8GZEFyg.JjCQ6Qpg5E7xKBubIGdoDf2vtv6MjqpYQZxBovw1kkWwjgspoBKAhvxcrRC80iHWhBivjMUC0mgW1BZDvQ1amK2MPyjK2D28pY3+AKE1LzNpVnEZoSnqRoMqXn1FakGMGxw2XpswLGZUUazz.G.lri6zKhyBximwcm1vIsDswVzEo6xmMeTAyGzcSpIzH63Aivg2PNWrEiQMOb97nGKWENBtJDKWEOBtJNtuQS7OD5V2BQfgZwPpNFjacKWJP+ZzF.c+gZg2FQ5v.4N0ygd7SbHTiZgxR.fj+tHB5cPSC+axIm3pYdIWRHugOUyV10y1KrN9jjI3ncOWIGXjmxlOXSlE0njpgwVvNurADKsnqBRLMHlXTsVlZLB0DILfrZtLeC.7Fsvg.6PANmn2XBUfGStY9mvwxC4yRVm4BM2bHBG.wMTs5plai0yJP28K6Eni9FcS7tLQKLwTqLVycxrQcaoy4B3BcXoiv1iIO4PcN1hYthyXGGMYn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fLbvnteyAoU+MrzpKLHs5KloUO8obZ0gWi4I0shdv7QSqtxuNQoUO8fzpGjV8fzpG7roN27rol4T3YSo7E+8+1YRT3Ne1Tq7GFDEdPT3AQgG7ro9FzkEbVHiFpZVzm58iRkGCaDmd.81zoz6QkWi2FE7q2faaZ.0t9TMMtw9l4kjhmiB8MGE6aNltu4Xl9lia22bLaeywc5AG7KJXgVLZC2DJfNprjyuZlToBt1kTok9u.d+YAP
-
@yall nobody? :(
-
This post is deleted! -
You're triggering the callback for every button via
.changed()
so only the last audio file will ever be loaded.for (i = 1; i < 4; i++) { Button[i-1].setValue(value == i); Button[i-1].changed(); }
-
@d-healey Okay, that actually loads the last button. how do i now get this to load the buttons i want? I'm sure it's a stupid mistake but really I can't find it :(
-
@yall It loads all of them not just the last. If you only want it to load one then drop the loop.
-
@d-healey what is this loop? I do not understand. I have 3 samples that I want to integrate via buttons in the loop player. the buttons do import the samples but do not import them from the combobox nor from the next / prev buttons. however the next / prev buttons work well on the combobox
-
@yall said in help please :):
@d-healey what is this loop?
It's from the comboBox callback in the snippet that you posted.
-
@d-healey I'm completely lost . ^^ usually I can understand but now .... impossible ^^
-
You posted a snippet, this loop is from your snippet:
ComboBox1.setControlCallback(ComboBox1CB); inline function ComboBox1CB(control, value) { for (i = 1; i < 4; i++) { Button[i-1].setValue(value == i); Button[i-1].changed(); } }
In the loop you are triggering the callback of every button with this line:
Button[i-1].changed();
Therefore button3 will always be the last one triggered. -
@d-healey yes until it works. the buttons are active well. but the samples do not load. only the sample of button2 loads. except also, when I press button1 button2 and button3 manually. but I really want to go through the CB
-
@yall When you make any choice with your combo box it will load 1, then load 2, then load 3.
-
@d-healey precisely no, the CB simply activates the buttons but does not give the order to load. I'll throw everything out the window ^^
-
@d-healey said in help please :):
Button[i-1].changed();
This line
Button[i-1].changed();
triggers the button's callback and the button's callback loads the file. -
yes that I understand, but there is no loading of sample ... even if I delete it, nothing happens either.
-
@yall said in help please :):
yes that I understand, but there is no loading of sample
AudioLoopPlayer1.setFile("{PROJECT_FOLDER}BWB.wav");
Are you saying this isn't working?
-
@d-healey the 3 buttons load well the 3 samples without problem .. so this line works very well. it is the combobox and the prev) next buttons which do not load the samples. yet buttons 1 2 3 (the sample buttons) are activated. the reminder . changed does not act on the 1 2 3 buttons from the CB and the prev / next buttons. it's very weird
-
One thing at a time. Let's get the combobox working, then we can look at next/prev.
Can you confirm that when you change combo box it does trigger the button callbacks? You can test this with
Console.print();
-
@d-healey the combox box activates the buttons well in Visual .. in reality, even if the buttons go from 0 to 1, the samples do not load. i will try console print
-
I share the snippet again to be sure that we are on the same thing
HiseSnippet 2554.3oc6a07aabbEeojVaSZKakT2hzKsCDJBnfrk3GxVtMwkqjnjsZzGzhJ1sv0vdztCEGnk6vr6rxh1U.9ROmdnWxs.z+E5wBDcqWxgbo.sGZiSuUjdv.s8ZamY1c4NK4RJJBKYoDRAHo4i2L+du4Mu42a1kkrI5HGGhsRhja1nNRIwkTK2vhVcgpPrkxxEURbA0cv56.xoLei5PGGjgRhDCeGdqIRNhh3yqJLOzDZoiBqRQ49DrNZEbMLMr1RZe.1zbInAZSbModOi1x5DqEHlDWFRFVMiRcn9NvsQqA4caHUkDmaQCLkXWlBoHGkDiLOwnQ4pjmZ40+6icvaYh3ExpTlMPdUuDwzfiXdsJKTEaZTJPicTTRb9Rg5+vd5+UUWEafaVencXLQCfPIjsGIFpavKqL7xz6vKgD7FwCdukZYcabcZXKbrcQ0ksnH6JP1RfLr75qxPmKo5BDVOrnSUCtCZIaVglRj9lYxbMvMxjYh2azTilZ5oAr0BGJXWnMX5o4UEVdNWCLYEBodISXCjcVvsAB2ko1FQEsUFVqtIpI5ROtnV.WDfuLi6MOgC5BjZaQlmrGezBfIa7XUWmXwJjd7l8PHanjy6RoDqNKme6wJUtCQpbwJU9CQp79ZWq+..LaoIAAM.NBSjuocQqswVnoLIPCgkZIrIxgszPJQHlo8FKrkIqOfJtV5TLwBPr70KNPrYcSO.EWigTSWzDil54ilJYqKVS4f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