vector knob with steps
-
I am currently looking for a solution that gives "steps" to a vector knob
I'd like the knob not to rotate between the integers, so for instance 7 steps from -3 to 3
I cannot find a way to do it...HiseSnippet 1348.3ocsW0saaaCElJIJn1aFnEXXWrqH7ECxatNxIooEKaXMwNY0qMIFwsYcnXnfQh1lHRjFRzIwqHOG60YuC6EXOB6EXX6PRQKYGmfBCTGf.yye76b3G443tIh.ZZpHA4T50SFQQNetauIb4vVCILNpSajyW5dFMPJRXjH7K4hywoR5nTz9SFQRSogHGmU+IksNkVCo+7O+39jHBOflKBgNSvBnuhEyj4R697WxhhNjDReMKtf0a+7NABdKQjXLfqUc8QiHAWPFPOlnLaEWjy5GDx.L0SRjzTjyZ6KBmzan3Jtw9yXoryinpEMQ8f.YDenHJTgXkTTqgrnvt17OEAQoad0XUS03KbOhExlJOup7PsBbtGEqGNqbevqYQ34+wCOmBvaMC7djaufD1HYtFE19L2NbIMoOANBJBKisnU9i0caI.K3xFwjKnGl.Kl5g2N990wOw2u1tUJClkJhnMBhnjDOkD0evgSpDeIIA3Cm2kvoQ3e.aiHILTKxqpUY053cfP1zDRcP0VlRU3dDMQxno.Hh+4dmb7Lt8gJkwvmpojKoc3cSnfKU+NrLYLsdlpqXgxgfLH5VQCorACkyJKlwAAOdqoqIWCqwSWShhDW0B9+4.SKETUsUDC9Vc7KDWRSveMtcBYv.FeP0JkuwVH1XCb285b7qqT1BZcRAbD4ohwRFm50eLOPxDbuA0pTNKeTUN..mJjPc6HhbXCo3TRHivS817o5pjxrJkKosjwAyjCYoMFPkd5To1tECzrpgLqfZtHIlDw9cZ3YjnwTvTOqsZAd0vOVsE0vaf8TwxrJGBCZjHTzXu4iz2jkC0wuyFweQcX3oB0l0mBoWnONLR+MUfKoiJTnL2v87u9.+1a0zuoNyAU8gWENEdyw6cM8quse8m4WeSesqEq7Gcxa5cvrU9iDiSo1Sw7RO8RftkW9Y8wFQ.sFNiog0xTXxX62fsHEtCSSgLghiHZJOj34VnyvPhjzPo0Vemq7ZNJtwVOmE.g.oZw6t5r6B301dTN7VAKhIm.wdKee04zbm1vY1bzC6427QLjkJUuLCgJG.uE7Oe0ut6cAmbBP67vLMhaLObKDmaGOMdSsEI8cfDBe.0aQ0zucAac84S45yeGnPQ3V6bvP0lEN8zYFhUq8d0q1euVurRYFOBtCisDIrfaYap2vRDQdAh3QBNT6paHGFVVoohajPGodNvyR7sunNJQI03iQ0M6l+z3.0kirPT3EwZlaM5sdJM+VfxlJ20eERmiER5IbuZk+P4RkuoLddU86uPcYaTDMYgpUcyStOG83iiOmlXqYVCg1Zy12z8t6aVrsdfopUvPAuCmIOYDkeWcSQYkZUe0LTAlJ0cUqX6ppJpHFz6rrqsFizPNeVkG7mn2zoMvWsABhYdWMPVa5kvjOl10kbaSSuPJFosM67E5W+QrsWCUCmuG1vIpuDBeQ24Ch45gYiXY56UTRw9lJ2b.YLIM1NZUo0e3C+q+VY4r8+PNek6c0+CEqm0a8+8+Lef6ZpkqZGz61Co.iJIBGGQjyN+jZnwLE.4XlAUTCi.uiHmTbnxOICU8wB2G41kICFtX7txBvKPG9Ti2rQTq3dP+9P2xbvtl6gu8S+7nHyHNCfGuSXJ54wii6Azp.JfDNvYUWfcVQcUyr1WsVUYflDg5EJ9SlxlV9oRYSqRTLIHQ79.yET0PvOPKAvDW+aAJ4djZMto8doqqeCefiFxdePfpT7X.6K1mMWBe1ZI7Y6kvmmrD9ryR3ySWBed185i5mEs2XoH1bMADz8.86iNNGvI.KSyHQ+O9o+7ZB
-
var v = Math.range(this.data.lastValue + normalizedDistance, this.get("min"), this.get("max")); this.setValue(Math.round(v));
-
@d-healey sometimes the solution is right in front of you... 3am here... need to sleep
-
In this vector knob example I couldn't managed to make
- Double click to default value
- Set middle point.
- Set the knob value with Label value entering
Any help would be much appreciated!
HiseSnippet 2566.3oc0Y0sbaabEFT1L0TsJiSRuo8pMblzAzlhBjRJoxdzDIqehUikMGKWmjwiljk.KI2Zvc4.rPRLdzqQupuCsOBc5STeCZOmcAHV.BonpYR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SuaAMqeKnYiaAMadKn4yuEz7E2BZ9iWKM3uD8tIJ4Di+OLP+CzmBqVsCL8jGCEb9u.VDD1LA
-
- list itemreset on double click is rather easy:
if (event.doubleClick){ this.setValue(resetValue); this.changed(); }
-
The middle point (or skew factor), I'm working on this myself, shouldn't be too hard...
-
For entering a value in a label, you'll need a callback for this label, send the value, and call your knob callback so it's updating.
-
For default value, I used that but it doesn't work :(
if (event.doubleClick){ var default_value = this.get("defaultValue"); this.setValue(default_value); this.changed(); }
HiseSnippet 2600.3oc0Y8+aaabEmxIpKxatHsn+x1OcU.cfJQVlR1NcIFF0N9KsdMNQHNKsEAFYmHOIcKT7DNdz1pA9ei8uw1eBC6un8ev16cGo3QJZWWCzhEkDEw6d269799cO1WJ7YwwBoSsFuZ1TlSseW8SlEoFu2XJOx4n8cpcm5TmmNaJMNlE3Tq1c9ZbhZMtqi9y+4qdJMjF4yxGxw40BtO6Y7IbU9n+0c9VdX3gz.1q3SrndicNxWDsmHTjHwMyyYJ0+czQrmSQxVptSsO5f.tRHOQQUrXmZ28ohfYmLVbdjg9Wyi4CBY3CccNAXjY3CEgAHhwQc1aLOLnelvF6.boetneGin+Y0OlGvmOdtJ395IH4qvVeTaoqCdcsgm2MGd0rf2cMv6SpehujOUkOChsOMczq.clIcVZvmUeOQjhEo5Lg9N1gR3gifmkCo9L2dddsIvWs1ZkkM+ArIwJxYTI4D9jogLzp2krMQ6bzYDScvvgLekaSyzD87MyV+ZqQ1Sx.8A4aiDCHOj7L5.VHgGQDQLx47.fAqrLOJjCONLIxWwEQj2Az1mFwBci.aeaxEsIyZSDC9asVY42uxxMBE9zPBfLkTDB6TizeBvJS1nAAk4.hIB7AnOipXFpDmxjJNKFTES9ym7hm6RLq48FxwOMAjpF27IHF5n+caqIGy3iFqRm07f8zzvPw46AeO.7miAxZtWHG9Uax2HNiII+Qx9R5nQ7nQMsWVL8L1QQ8kL.jvhTxDl8zS3Qo6H7qBSPuHaB5EfrdIJ2MxURcBnJZm.1P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CseLr5O5um1xbi2r8HfyL9XP5i18ED4Bh+hsXzo1en9U0hQTgMGy+lhXV2UNMl+3bL+rAgHrS6R+NuXmYHX9GofIC9lY+WubGrRhSs6U+Qc6rI4KbfrPJ57ld6rXurue8iEAXA4hsYGiYRm.73JzHarY0XI9Y1u6geQ589MEteR89bk+3pw6RUfWvM6WZ7l9lLVoto874f8t0O76+U90Vbu4uPo4YE0P4iqa+NCtl2sjiy9rPZAE32Uvwy4G1oh29zQQfuupuHjJKq9uSQY9N2rDT+Du8nq2GAEIxGL9zeZcsJ+CI.a5S1GL.990gZD+e.bMulhQv0Xjbr9zySlbhHQ5yviZCEwv520VBqzZd1KqlIbSq.8C+W3S5jcypHgS1MaxeU1iITeo3soGtDCMumdDPtizu.4F0OFelzcdk+5dc7blvC3u02GSLtZWGmpWSuawZV+VrlMtEqYyawZdzsXMe4sXM+oqcM36Re2DkXhw+GFn+A5SgUq1Al2p.FJ37+.nDsHzA
-
@Fortune you can set the defaultValue here:
Content.setPropertiesFromJSON( name, { "width": obj.width, "height": obj.height, "allowCallbacks": "Clicks, Hover & Dragging", "saveInPreset": true, "min": obj.min, "max": obj.max, "defaultValue": 50
-
Thank you so much guys!!