Merry Christmas!
Best posts made by ten7kur
-
RE: Nothing happens when building latest Scriptnode
@alepan said in Nothing happens when building latest Scriptnode:
Update: I tried opening Projucer from the Tools->Projucer directory, and it says "Projucer is damaged and cannot be opened"... I re-downloaded the latest scriptnode and I still get this error...
I had the same problem.
I replaced the .Jucer app with one from the previous release. -
RE: Engine.getUserPresetList() path, check/exclude duplicate entries in list?
@d-healey
Ha. Im a dumb ass.Ok i see how the presetBrowser is theme-able.
I have 2 questions.- Is it possible to change the Favourite Icon? I really dont like that star!
- Is it possible to Hide a specific folder from display?
Thanks!!
-
RE: Slimming down a script(for best efficiency)
@d-healey said in Slimming down a script(for best efficiency):
@ten7kur Did you see my HISE Scripting 101 video?
I did, though its been some time. Will view it again.
-
RE: Populate samplemaps based on folder choice(almost working)
@ustk You're a beast! for goin nitty gritty!
Wish i could be more code efficient!..not yet! -
RE: Print Object Value for Object Key; not working
@d-healey said in Print Object Value for Object Key; not working:
Here's a quick guide
//Objects store data in key/value pairs var obj = {}; //The key is like an array index var keyValuePair = {"key":"value"}; //Objects can store multiple key/value pairs var multipleKeyValuePairs = {"key1":"value1", "key2":"value2"}; //Arrays don't have keys, they have indexes var array = []; //The first array index is always 0 var arrayWithValues = ["value1", "value2", "value3"]; //You can put an array inside an object. var arrayInsideObject = {"key":["value1", "value2", "value3"]}; //To access the array inside the object you need to use the key var arr = arrayInsideObject.key; //You can also write it like this arr = arrayInsideObject["key"]; //To access the contents of the array that's inside the object you need the key and the array index var index = 0; //This is the index of the first item in the array, "value1" var value = arrayInsideObject["key"][index];
Helped Alot!
Big thanks!
Even though i pretty much knew it all, your example really put it in perspective! -
RE: get Index from 2 arrays simultaneously?
@Lindon said in get Index from 2 arrays simultaneously?:
@ten7kur OK look this code:
inline function onViewport2Control(component, value) { SelectedItemName.set("text",Maps[Viewport1.getValue()][value]); //print selection Index Console.print("selected:" + value); // if both Indexs are correct, then print "OK-selected" if (Maps[value] == 0 && value == 0) { local Selection = "OK-selected"; Console.print("selecton:" + Selection); } }; Content.getComponent("Viewport2").setControlCallback(onViewport2Control);
Just put this line in there:
Console.print(Maps[value]);
and you will see you are getting an array back.... not a value.
So this:if (Maps[value] == 0)
will NEVER be true...
What are you trying to do?
Yes that works, but i need 2 variables to = True
-
RE: Dynamic keyboard colouring
So i watched the video tutorial @d-healey suggested.
It has helped A Lot!
I've managed to associate/index buttons to Panels and Labels to change their colour, but....
I can't manage to get the keyboard keys to colour correctly.Instead of colouring a single key(associated/indexed) to a button which is pointing to Sampler1, it colours all Samplers from the Sampler array(SMP).
I can't figure out where its going wrong...
Please help!Also the Panels and Labels don't save their colour. Is there any easy way to save their state? I'm guessing i have to code this manually?
Thanks!
HiseSnippet 3810.3oc6as0baabEFTRvVjIJW7jNsclzYPUZ6PEKSQRcw1Q1MjRhzV0TRbHkkcFOdTVArhDiAAv..JIFOdper8mPequzGZdp+D768kNS+CjeB4WPcOmcwkEfWDkhrqSiXRPvd1yt641d1ucwp5NVpTWWKGoTo2smMUJ06K2rmoW60aSzMk1bCoTSKu9N014gMjVqmMw0kpIkJ0j2CqMU5ojX+99ubMhAwTkFQRRZOKcUZM8N5dQT+5ROP2vnJQitqdGAtWpzlpVlqaYX0EjjIkyKYSTeFoEcaBx1DxRotREMcOKmldDOpqTpoVyRqWy1VGax4eOcW8CLnXgBRMgNhStpkgFJwHUo0aqanUOPickjRc05Q5+jb8+Sj2RWSOjdjc3iXUnD0BQ6QpIFk3UPT7xO9hWJAwaJt38wxMUczs8hpAksOTdKPL2zzi5bHAbChhFmeoI9Yer75V.Gld45PdFspCTHrEYu0x4mWY474ma0Lyjwg1RQeU++eQ+WTcCdg4lTtqxSd5pBDZ54na1Z0LY.OoqmxQDGEhgcaBvXv3Rzzdfo0AYmsLVwryq.iINhJvOFu4bodMHlsnYgZJt7xyqTHY0Ym00qmAEZ7r6Qc7zUIFy1OO5dzN7vIbTNoZ0xre8y3AshwVd1OfsHkvgpMHUnAUCZyxEhz.fwgK+9UNBoOji9jctXkjsSWxa4P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A0nG9IIQoCuePVlF87mYGW6tJ+hzMBkKQCRKuEVVYwydSV5r2jkO6MYkydSt4YuI2ZTMAQkVtqmUG9Zx.g5U34wRENaAht+uvjIl1N
-
RE: Dynamic keyboard colouring
@d-healey said in Dynamic keyboard colouring:
parseInt(cs); should work
It does work! Thanks so much!
-
Dynamic keyboard colouring
Hello,
Im trying to colour the keys with a user chosen colour from a colour picker (created by @d-healey) but the colour does not want to appear on the keyboard.
I can colour a key I want if I directly specify the colour, e.g.[Engine.setKeyColour(i, 0xFF1C00FF);]
but, it does not work with the colour Picker value.
Why could this be?
Is there a way to REPAINT the key[s]?Thanks very much!
const var samplers = []; samplers[0] = Synth.getChildSynth("Sampler1"); reg i; reg colour = []; reg colourString; const var alpha = Content.addKnob("Alpha", 0, 0); alpha.setRange(0, 255, 1); alpha.set("style", "Vertical"); alpha.set("itemColour", 0xFFAAAAAA); alpha.set("bgColour", 0xFF000000); const var red = Content.addKnob("Red", 150, 0); red.setRange(0, 255, 1); red.set("style", "Vertical"); red.set("itemColour", 0xFFFF0000); red.set("bgColour", 0xFF000000); const var green = Content.addKnob("Green", 300, 0); green.setRange(0, 255, 1); green.set("itemColour", 0xFF64FF4E); green.set("bgColour", 0xFF000000); green.set("style", "Vertical"); const var blue = Content.addKnob("Blue", 450, 0); blue.setRange(0, 255, 1); blue.set("style", "Vertical"); blue.set("itemColour", 0xFF1C00FF); blue.set("bgColour", 0xFF000000); const var code = Content.addLabel("code", 160, 70); code.set("bgColour", 0xFF000000); const var pnlColour = Content.addPanel("pnlColour", 0, 50); pnlColour.set("width", 150); pnlColour.set("height", 50); pnlColour.setPaintRoutine(function(g){g.fillAll(parseInt(colourString));}); inline function convertToHex(v) { reg hexTable = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]; reg d1 = hexTable[Math.floor(v/16)]; reg d2 = hexTable[Math.floor(v % 16)]; return d1 + d2; } reg cs; inline function updateCode() { code.set("text", "0x" + colour[0] + colour[1] + colour[2] + colour[3]); colourString = "0x" + colour[0] + colour[1] + colour[2] + colour[3]; } cs = code.get("text"); //Engine.setKeyColour(27, cs); Console.print(cs); for (s in samplers) { for (i = 0; i < 127; i++) { //Sampler1 if (samplers[0].asSampler().isNoteNumberMapped(i)) Engine.setKeyColour(i, code.get("text")); //Engine.setKeyColour(i, cs); //Engine.setKeyColour(i, 0xFF1C00FF); } }