Wait for 1 seconds then set the value
-
I need to assign the below process in the correct order to a Knob's callback. What is the best way to do it?
1 Enable the Simple Gain 2 Wait for 1 seconds 3 After waiting 1 seconds, set the Gain value 4 Wait for 0.5 seconds 5 Bypass the Simple Gain
(Yes I know timers can do it, but I'm not sure that how to implement this the stable way)
HiseSnippet 1015.3oc0W0saaaCElxwLq1aqnsnO.D4J2hTW6t1sALzM2XmLXzkTsoz1sqJXjnhILEofHUZ8FJPej6av1gTxVxItNYFaCK5BCe9imuyQmen7yTgLsVkg7Zc7rTFx6KvAyjlICmP4Rz3QHuahOjpMrLRAq8lkR0ZVDxyaqezxvqUSj64i+vdTAUFxpXgPuRwCY+DOgap35O34bg3.ZD6XdRMse7fwgJ4PkPkC3YKbOTJMbJ8T1QTqZMvHus2OhaTYAFpgoAc1SEMKXh5sxB8eEWyOQvrD8QAvAUvFMbBWD4OOV0HjWS+pHeqhH+t3C4Q7E7qx.2xIfTYQ8bfWi0Ao9+MfjWMH0r.R2FGDlwSMURr34ywikvKjXJjpqCkBcQMNpAdnBzPZ5lPmxNHCHVXQmG0q2tD3m68csa2Fx2ZC4LZFIfmjJX12njmRbk.cOkY1ONlEZ5rSkzcb1UyvmKUmzGrYtKAqFpRRURfnyNNoNa3RAWxHw4xPCWIIJoSl0rLknS3ba1ENUQN6ds+iVsa8v62F98Aj8kTHIRLSXk.kXwhUxqobCIVkQ5SzL.UQZhk8yhskruEDxkmVIaW3OF2w3hTmmHKcL859j4Ja4Wjeunia259OrU62Cw0Zi6tZKWWDNjJDm.0ycVNvKRmvSsDyQJC6ExNPJ.bz6aSNun33UJq7DErrUJ11rksNC6HySNgkU8BnPQnZb4R7suZk3gEIlZJpjikbyKRYkzGnDQ1RW6+uXCApLyZaMJQHnpw0XbyxFi.AOhkg3vg7YXWZE4.e8QPnWNdD0PmeLvIBdIkkY31fwaD6LXDUQ+VK7HldpQk5zs7kILS7Rc56pb32OX1BhO7yCzlY1Ty1NEQI7nHAyWo41Te8YmvH1z.9uCphw861CzTVOHRn0bAZfNONl+N2LwXtHQa.bMNAFUh7tC9kZFIhESyEFhdJbNPi2TVzwJm9nKNlAFvohxETyxS8rU5kBrfs9nF63DIDDypGBmeTXyOccRuZ0IWRUvUDt2F6yMgSVMdarB7B0C+ai2xEKeItXLZEXahO3WW6VjlWsVrJnboaTtwh06KFk6fxRL9zK2QnQLAcoz2q4QlIUL9sAqX8+X4YPiluRPyNexeq+o1a17JWg3l4esoh9NXWJ+5DfckDWe.7sv9z+OTP7Kpb60TNjBiwgg53ixSBf6.Gx.nJkLA3HrWC6FwB5dVZKfBXxHGweBOkB6ao8JE1etv+S7QBMLS8lvhc01Vya33.wszcC9VvmR.zjEKow3dtUcQ72DFZGK9f9Hzps4QafMe0FXyi2.adxFXyWuA17MafMe6Zsw9gMOK2nRJp+AF966trjmWwUtcsBn+BrquyvB
-
@orange
I haven't worked with timers yet, so I'm not sure if that would work, but I found "callWithDelay" in the API browser, maybe this will do the job...
Haven't had time to try it out yet. -
@orange Try this, however you'll need to set "reg" variables, then it will be visible everywhere so maybe use a namespace?
HiseSnippet 1131.3ocyW01aaaCDlJNZqRaqncX+.HxmT.xbs6Z1FPw5bhyKvnKIdUcsqepfVhNlKTjBTToyKH.62290r+AaGIksjScxBL15hCPP38Fetm6xczCUxDZQgTg7Bd4zbJx6S8imJzS5OgvDnA6g7tu+QjBMUgch1cZNonflh77ZcnQfWv5H6m+762kvIhDZsHD5URVB8GXYLcszg8dNiyOfjReIKqg0Oo2fDonujKKA7zxuCJmjbF4T5wDiYq4i79n8SYZoJVSzzBj256JSmFOQ9Ngy9WwJXi3TygtnXHPNwGH4oFDajh5OgwSGNKuKPPTFVyBsbrvW3eDKkMWdMa7.qBbsGM4Cu0VDdsV.dcaBuNMf2RfjWCHstCROzONQwx00ZL34S7GHfhyXBP6MghyVzZ+QK+9RvBgtcF4L5AJ3vbOhdbmNagges4SCCCAtuPiOmnvwrrbN0TcweG11Nz9Tpd+wioI5nMp0twU764B4ntfKytQvo9xrbo.NDsgUq0ElfyDT73RQhlIEXovpy3lRxiRl4yVPT4kzMCuHHLPQOEeNDbqnm5NGenAfywCHMLH9v1ET8LtHZLgWP2zpw3gFbXewov02NQQgxjoETcxnewjZNyzF+sh6S37QPKXzLjFsYXvEgAAljUUJzfQP7rI5QPKMKlBjQZQLC9uf9xRCO+BJDMajgPGvFiil43yvc6.TOHsBy6n0J1nRMMBNaxGH+uFG2143E0NOOg0pRa9FXRDsL2lIN.boKV.OWH4z14JFTWphpwfKmS.ZhxQAQaa6NBL+7nGsuf.8uX8DZEqiMvLznB+ZBSiGKU3t3BGMfsx2YrY3w6.sLwo0J2B9CsMR19LaUEuXf5zd6YVaU3Rw261gb5Rno5Fa5LLTU607h5hcc1VYymFckGK0zSLEcfmCuLDeUUiGuTcUQjan8kntpfb8NFIJyFQU0c+NCgIAKNdw+5Guzb5WhiXZXnTLPvzmjSEW2LQTEaZFEUgJvTscPz8qFDEyYoTEhAya9XeKUhr.t4FAzOMXOhlLKLPDgaImpzLSB3sG8bX8fa9Vf+dzhyfFVqsUEPHz+iW5uVegOq2z4G98erWFKMkSGJKXFBtItfEZ4wreaArlQZDITOz6OBFF9KSK4D8haDLcgUJLWSywvlQsB35m17h9WaMwsEhOzeHSmLY4XbskfQnd8eAFqVt9Y9tUI0.bc+C94O.aRu27m3Lekg85WPPSp4pOvYOJmr.M8ZVpdRsf2zaIOAZf3bngenjSTWkjacqyxt2bVt9stSvNs8Nc25m6ao465fzV5uaCxG3Oj7+Uw9ExRyB+iHvaZf4p9GWlECuqGdWzDhPP4l8WdqY1z3N2wb1.hXpH0d3ufOUJ6ZN6Uor6LkePtiLRhR91D2NPy+pcOqDHuE1uUR.70ify34K+786ztCBV8vdaRhYz1WBKXWtOOdE74qVAedxJ3y1qfOe8J3y2rB97s2nOluf1NkZYlqmGDLbe6iP77bue019i9afWkswG
-
@VorosMusic
callWithDelay
is a Broadcaster function, but can be used for this purpose too, I'll try it thanks. -
@ulrik said in Wait for 1 seconds then set the value:
@orange Try this, however you'll need to set "reg" variables, then it will be visible everywhere so maybe use a namespace?
HiseSnippet 1131.3ocyW01aaaCDlJNZqRaqncX+.HxmT.xbs6Z1FPw5bhyKvnKIdUcsqepfVhNlKTjBTToyKH.62290r+AaGIksjScxBL15hCPP38Fetm6xczCUxDZQgTg7Bd4zbJx6S8imJzS5OgvDnA6g7tu+QjBMUgch1cZNonflh77ZcnQfWv5H6m+762kvIhDZsHD5URVB8GXYLcszg8dNiyOfjReIKqg0Oo2fDonujKKA7zxuCJmjbF4T5wDiYq4i79n8SYZoJVSzzBj256JSmFOQ9Ngy9WwJXi3TygtnXHPNwGH4oFDajh5OgwSGNKuKPPTFVyBsbrvW3eDKkMWdMa7.qBbsGM4Cu0VDdsV.dcaBuNMf2RfjWCHstCROzONQwx00ZL34S7GHfhyXBP6MghyVzZ+QK+9RvBgtcF4L5AJ3vbOhdbmNagges4SCCCAtuPiOmnvwrrbN0TcweG11Nz9Tpd+wioI5nMp0twU764B4ntfKytQvo9xrbo.NDsgUq0ElfyDT73RQhlIEXovpy3lRxiRl4yVPT4kzMCuHHLPQOEeNDbqnm5NGenAfywCHMLH9v1ET8LtHZLgWP2zpw3gFbXewov02NQQgxjoETcxnewjZNyzF+sh6S37QPKXzLjFsYXvEgAAljUUJzfQP7rI5QPKMKlBjQZQLC9uf9xRCO+BJDMajgPGvFiil43yvc6.TOHsBy6n0J1nRMMBNaxGH+uFG2143E0NOOg0pRa9FXRDsL2lIN.boKV.OWH4z14JFTWphpwfKmS.ZhxQAQaa6NBL+7nGsuf.8uX8DZEqiMvLznB+ZBSiGKU3t3BGMfsx2YrY3w6.sLwo0J2B9CsMR19LaUEuXf5zd6YVaU3Rw261gb5Rno5Fa5LLTU607h5hcc1VYymFckGK0zSLEcfmCuLDeUUiGuTcUQjan8kntpfb8NFIJyFQU0c+NCgIAKNdw+5Guzb5WhiXZXnTLPvzmjSEW2LQTEaZFEUgJvTscPz8qFDEyYoTEhAya9XeKUhr.t4FAzOMXOhlLKLPDgaImpzLSB3sG8bX8fa9Vf+dzhyfFVqsUEPHz+iW5uVegOq2z4G98erWFKMkSGJKXFBtItfEZ4wreaArlQZDITOz6OBFF9KSK4D8haDLcgUJLWSywvlQsB35m17h9WaMwsEhOzeHSmLY4XbskfQnd8eAFqVt9Y9tUI0.bc+C94O.aRu27m3Lekg85WPPSp4pOvYOJmr.M8ZVpdRsf2zaIOAZf3bngenjSTWkjacqyxt2bVt9stSvNs8Nc25m6ao465fzV5uaCxG3Oj7+Uw9ExRyB+iHvaZf4p9GWlECuqGdWzDhPP4l8WdqY1z3N2wb1.hXpH0d3ufOUJ6ZN6Uor6LkePtiLRhR91D2NPy+pcOqDHuE1uUR.70ify34K+786ztCBV8vdaRhYz1WBKXWtOOdE74qVAedxJ3y1qfOe8J3y2rB97s2nOluf1NkZYlqmGDLbe6iP77bue019i9afWkswG
That was the cure, thank you !
-
Does anyone know an example with the
callWithDelay
Broadcaster for this situation? -
@orange I have not tried that function with Broadcaster but I found this, "callAfterDelay" function, here there are 2 functions after each other, first 1 sec, then 0.5 sec
HiseSnippet 1045.3oc0W80aaTDDeOGuQ8LPUKpe.N0mbjBQ1kzBRnp5D6DjUIoVbkB4EJquaO6UYucOc2do0fhDeB3c3aBukOR7M.lYuy9Nm5lDr.DwOX44++lYmY10iR0A7rLcJww8kyR3DmOj5OSYl1eJSnHCGPbtK8HVlgm5UvZ+YIrrLdHwwYiuDY331jX+7GOaeljoB3UrHjWoEA7uRDKLUbG064Bo7PVH+kh3ZZuaugAZUesTmC3YCZGRBK3T1D9wLTsFThylGDJL5TeCyvy.c1WGNyep9MpB8ekHSLVxQhtDevQErI8mJjgilmqYDhSyQUY9FEY9CnGIBEK3WUAtmUfWkE0qANMtJH08uAjbpAolEP59T+fTQhoRBhmOfNTAGHQLnTWGJE5RZ7KMn80fFJyNwrS4GlBDKrn8S5zYaO3qs9hVsfxclw6LVp2yU5wdO0atcS3l953DsBHZ+PT3CA8qT2WDmH434eWvJaGCZyAQQ7.vfBwdV4ngsZITRgh6EkqBLBsxSqPmhgKUKaGLOVaCdWly2p0O0xsVL1IialmosiXxLN3T2Vto7IdmA.vZDvYN7CXR4dQPFOfKYyZ2sClyyic6sZ4Bt20LUjgNdOiIULN2vaa4fADfAF.HBuOW93K6QqKW3yEf0jlawp64a6gBwhA96ZIGv5bf6UU5QWVVq5C3XLLVzdoJH3iZk1i0F9KPTAXp04s7trnnnUJqzWRd5JEiCqoWkgsU4wi4o0OCQEgt4kGQ17lMhDTTPponVMTILuHgWRenVFhs93ue2AJRYEEGsJQHnpwNXc2xAKeoHjmRDfS1jh0ShE6k6j9gnncuf7MCGvLr4dAbHDjDdpQf4hy.9YvFthwUW5.d1oFchU2xyPXk50Ey2VsC7jdyVP7yrduQDZlVI866MkKlLs1tzg8h0gkgNPLlKIw02IexEwr2VeeLrIOwW7i1L729U7yu+rr7nHAnEk5EtOXeXnjORmIvS2JaezEj2cAErZTGlKYlk2Wh80kBPeTeIEtHRA9dV8KNt7Rzlu+NjN05Ptly+aHbuOcjvDLc03swJvKzJ7uMdKuR5inEaTq.aS5ge2Ud+Sya1vUETt16htyhGFrXmU4CCpuleohVsGFXmgr6LqW.+1k6qOo2Jd5vP0YvT1Hsjkd4x+F+ScmayabOBlRd2Z5o+XpsjeaBv1VhaO.9dzQr+OzP705biPM4HF7HFbG9w4w9v6mC3.TUJtDBD0oAdaXAcGjFAjOWEZI9S3SovtHsSovtyE9eRLhYAo5WGTbOMNZdGKGHuU1W+6B+MDf1q67anozN6zAusR75f.bw3m.0mUayiVCa9z0vlcWCad7ZXySVCa9r0vlO+JsA+SQ6kazwE8+.iQGXeojiyAJFzIaGEH+E6rZ5VA
-
@ulrik Thank you mate I'm not in front of computer now, I'll it ASAP when I'll.
-
@ulrik
Oh yes I saw that as well. Looks like a really clean solution!