When changing the Button name do not work anymore
-
@d-healey you are right , in this project I realized that I will name buttons, etc according to their task so I dont end up in this situation again , so what is happening if you open this snippet by itself as soon you change the name "Button 1" in the button and in the code it does not work anymore, as soon you change all back to the name "Button1" it start working again, its a simple code just 3 lines for each buttons but I cant see the problem, thanx
-
@WepaAudio said in When changing the Button name do not work anymore:
so what is happening if you open this snippet by itself as soon you change the name "Button 1" in the button and in the code it does not work anymore, as soon you change all back to the name "Button1" it start working again, its a simple code just 3 lines for each buttons but I cant see the problem, thanx
In what way does it not work? Do you see an error? Post a snippet of it not working if you can.
-
@d-healey when you open this snippet you can press the keyboard key I believe is #48 you will see button 1 turning on ,also the next 2
my problem is when I change the name of the button1 ( on the button itself and in the code it stop working) so I cant use this code because I already have a button 1 assigned in my plug in, and I cant rename this other button1.HiseSnippet 1750.3oc4Y81aSbCF+RaOTSfhFS7h8BdgEZSKUTJ4Os.ipIRaZKJZDHpoTMIDBbuyWhWuXGY6zRXBI9RruG6iv9Hw2fsGe9tDeooo8.Ff1NIPwO1+7yO+6w2ie70VBtGQJ4BmbWd+g8IN4tha6gLU25cwTlSiscxk2cawfdGxesyVC6ikRhuStby+Hc24xufSzy6e3V3PLyiL1jiyAbpG4wzdT0Xqup1uPCC2E6S1m1yZzqUqgGmUmGxG.TYd2RN8wdGg6PdBVOr4bcNlRNQ5jqja0JqJNp7guYyUm34Vg0Wc0ffz1c7FHDDl5..tSN2b+M7jycGephKZqvJBLmKrE2eX6t7SXFWe.UROLjnaT1oMvIi4c4g95Eu1pS8tzP+VIpmzAl6Vi0x4MZ40caR8oirOVS+lnNPiQXKs4laVzq74SuRSid4rn2BF5cM21dBZe03dzb6xtMXJhH.CQSaZYFqyb+wht04vHXpU6gOhrq.ZLBQw6VpzJn0KUZ4MVpvREtycPsgUBAo5RPjiALHpOhGD0tCgQDvRzGw3JBJfKhLG0fyVcoBvNBoBcLVXf1vWh9Yzyuc4UPl+8hDe7LIAgQAzvdREPRjhijGQYvzQknCGnTbl8rsUj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hI9dj9DrBh9iw7pips2dORvGzeRTu+gQ6U1W.2JGTB6NdJi.xtxdMVWvkx.X4DMWR6tZMPzQqUisrGjmWHSaCJhCB8LFbFQxKlQSUo8wQwzevsxZSb6+ieJ7eA2R+yepdTaCjxYGRkrCoZ1grV1grd1gb2rC4dYBhY2TSb+nuRyjeZkEuXmBCvaggns0H2h1wZp0VRmb0Zni1tEQbqOjy47IQtzWfuXym9z3e7m5L+EitmyGUJeBGaS0gscXGCop.KliZ1lDfGDpFY0ljM4Ld+tbF0KcdAkf1oCQXS8otd1TofzRisb8Z6Ypperouu1ioLBVjJcW1jhxWboXVgquy0PWjNUO5+FEKL++6KVXVR2UiKU.AdWn9JONeE2ny.P5hQ9RQ083CTPQFMwPB.ntdWnZf1PEPdD6ZBlSWmgocojB0aSX9kR9J+wcVNo.BcmkS5zwKYpf0V7uit8Vt4IL8oHQ0.GBklDZukVB0YooDbRGbSAcPsm9zoEzJGXqMb4ASFFCeNyhoZR8ZwAwDdORmzwciOOK5dXOA+kdlOXjdouXjEfArn+LK4capaiJ6DcudSvpGbt2K87zuUcaHbMcDUxLhpYFwZYFw5YFwcyLh6kYD2eFHzEYr4.EumIGqiy+.7xebm.
-
try to rename in this snippet the buttons and you will see
-
@WepaAudio Did you change the button name in every place in the script?
-
@d-healey yes , that's the strangest thing
-
@WepaAudio Post a snippet of the version that doesn't work - after you've changed the names.
-
HiseSnippet 1693.3oc0X01aTbCDd2jrTtqDTohOzuTIKTk5EoP3dIAPPq3HugNUN3Tt.pRHD3rq26byd1qV6KgqUH0eR868K8mD+CZGau6sd2bIjDf.8jhTlwyX+3mYrmwauDtOQH3INtU1cRLww8Jd8mvjC2XHlxb5rIn2ayjwi1i+Fm0mDiEBRfiq67ORMrakEbz+d2CVGGgY9jbUNNOmS8IOlNhJy0951+BMJZab.YW5HKqWscGeNaCdDeL.k48p6Di82GOf7Drxr47bbuzVATIOouDKIBG2EVmGLo+P9gLi8OmJn6EQTBMb5CSjQ817n.EhUZc1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rW6ISEZSZeHMPNzte4gD5fgVcP+SsspsA7hqKnztPlRm1xyJrZZAKzuYAKzmUX0xBVsOvBVNeTg0Q65F52mGLNBKK9H.0KeRG.twtPm2ptqYBpbh8Ki9n8xfSKDulWOUUhYiw4lAFg78OEXL88TK5sUXHwWlCvE719W+z73I6k+6MK+250WBWuLhxFzGOJFJHm9p1LoKzW0BIcQbbPe5uaY1+zd8w.EkTT6e0VuTODdhBqvZkB7cHwDrDhx49758auyNOJgONtrWu6A5bhcSfWUCLg8.OkQ.pVZuG2HgKDgv1QOWB6g5MNYfhqx0rCbwdhnnNnuMHbyXPQgrCcPQbU3k52ECOG4M1VqWk56h0gX3o9Z4FkjaVRtUI4UKIuVI4aWR9N4xFBsKNVkXn9TCkp87UmtZOvDzCCaYKKWmNX5jazX+8HlRyZnX8sLlwWE3Rep9PEKb5NqcxeGk+Gb6YguqRkLL1mphNawN.NVBZLWetIIDONRNUqMH6xY73gbF0u3Y.Hmdv.RhMzm494gRIbDLWy0auiok0bU+P6GSYDbRgi1mMpnwY9SLMyv024YfKRcsF5CIrcglkchE.m+TU.7iNdO+ECuPotqlVVDAqdh7K737U7z2jiTEd+bA0c3ikPA0rhZdPku9P0dehc8u4T0TMx0yZ3rOgEnE9W3W5fMxJVpFrQ1fN9YSEr2R+e8yTbmmvTUNz80EAkgirSoEPOEJHAEztPP4HreB+U9lOegBqWVqAPIS+M7q30UIiZ3nekI3mW8Up6LBJU8Jee0AgaBL7r8o44vmVmCeV8b3yZmCet84vm6bN74tmnOptDd3XIej4RRPQusLIVtaMMwZdm+CD8AF0A
-
@WepaAudio You haven't changed the name in all places of the script.
Think about how the script does what it does.
-
it could be here?, ![alt text]( image url)
-
@WepaAudio That's not it.
Describe to me in words what the script does.
-
@d-healey that script simulate drum pads, when I click on the button it reacts like a drum pad and play the sound on that key and when I press my midi controller it also play the sound and turn on and off that button so it looks like a drum pad pressed, now, when I change the name on the pad and in the code if I press my midi controller it sound but the button does not turn on or off
-
@WepaAudio said in When changing the Button name do not work anymore:
when I press my midi controller it... turn on and off that button
If you were writing a script how would you do this?
-
@d-healey I believe I make a callback for that slider, what I dont know how to do is the logic that goes inside
but when you got a little time try to open the working snippet and change the button names, it won't work, then put back the original button names and it will work, is the strangest thing I've encounter using Hise, I've re done larger scripts snippets and changed perfectly the names and more and got them working properly, this one got something I cant see the problem
-
@WepaAudio Don't overthink it, how would you trigger an action when HISE receives a MIDI note?
-
@d-healey answering your question I believe is creating a reference for that button and also creating a call back, but I dont know how to fill the logic area,i got an idea, let see, I will do my best , you right ,I need to do it my self if I want to learn more, that way is the way to really learn, thank you
-
@WepaAudio Right I'm going to put you out of your misery.
If you want something to happen when a note on is received then you need to put it in the on note on callback.
You can also search the entire script for text by right-clicking in the script editor and selecting Find all occurrences.
Now try and find where you didn't change the ids of the buttons.
-
This post is deleted! -
You need to wrap everything in code tags, it's difficult to follow the code when it's unformatted.
In general I would say don't try and merge different snippets or bits of code you find on the forum, it tends to lead to a Frankencode mess.
You need to understand what each bit of code does, and how it works, then rewrite it into your own project in a way that makes sense. If you don't know what the code does and how it does it then you don't have control over your own project and you'll keep running into these issues.