Custom FLAT Piano Keyboard 2 Method [ Panel Script By @d.healey & Project File ]
-
Okey, I Found The Solution!
The Width Of The Png Files For White Keys:
- ( up_0, up_2, up_4, up_5, up_7, up_9, up_11 )
- ( down_0, down_2, down_4, down_5, down_7, down_9, down_11 )
Needs To Be The Exact Size We Used In Floating Tile Data Panel:
Mine Is : "KeyWidth": 14.0,
And Then, To Get That Separation Line Between The White Keys.
You Just Need To Draw A Tiny ( 1 pixel )
Line In The Right & Left Handside Of Your PNG Files, And Make It Black.Here Is How It Looks
Attached Is The Zip Folder Of the keyboard.zip Png Files, Place It On Your Image Folder, And Open The Below Snippet:
HiseSnippet 1130.3oc4W0saaaCElJNbX1IYXcnXXWJTrKRAxBrbbbR1tnNw+jEz7iWra5tYniQh1lHTjZTTI0nnOb6MXOJ8MX6PQYa4V2LOCjhgMekOmCOje77yGOpiR5SiikJjSwdihnHm0wcGIzCaLjvDnSZhb9RbiDsLz84zQWKIp.zQihHwwz.jiSgiMqxo3pnzeu6YGQ3DgOcpJD5JIymdJKjompsS8my371j.ZOVXtUWs9I9RQCIWl.Hp.tLJh3eCY.8bhYYqfQNeVq.lVp5pIZZLxY0ijAi5NTdmvt9qXwrq4TifGpKrQV0sk7.ChMZQMFx3AcFeyiQHGbmowgB13viwmwBXSzmOdXL3N0i7wCmUtO34kGdkWb34jCdqZg2ivc8UrH8TKFrsF9Dglp5SfTPdXYWKx42wMjvBD5sCI2Paq.gINrY0x01xcucd5OrQo9IBeMSJbkhykZ5EhMeZo2TpXo2Vx88M0u+bsYNGkjyop4Z1j1U2miaJRBulp1x8VBOgNYgv8e1.L9iGfym+8sW6bKTJNQvzWDQEervNJKVA+6EmzjnIlLQlNXcQTklYffSS5sPItMuTD2jFeiVFkt1vHovrCNqqyJprYh1bIQyDC5w.nxfTTI7j1qWmu4YTNg5Yms8fx4w0CF2wrNtZk8qtWsC1Y+xHllFN1vZ3p6TqR48p4saN8UrdbP0CpsWkC1EoouVmeq.C654Atjd6W4WbvuYiRttOAN4WxBzCex265Uc6xakprIKNhSFcgulbK87zrGXWqRnV6mJuC7CTsSMqhejYk2upUtQRLvybrhDMj4GOiuMo8IIb8gQQThxPvLi0i3.IArWWBwTIXo71010Zombv.N8LYfwg9DdblGlNXniVHnbycvp7Ewzqn9Ps0bg.XsMmn6pGwe+MqSqwohOv.TlpzSOoJSLzRDjC.01nzaQ2YBoSx2+5n5CorACmxZV+mpi9Ph.fNRFj.HaVNJCwblAnuZFx.SGuHloGkm39Ag3ZQg6ivcXZ+gyGuqLG7BchOz3M6YfMvs52GpJlB1Uws+4GdN+7P4KrPYMbWlfl95bJP95TY2WBsatGSETkIn5cOOO+GK5yyQK7yy1t8dPOYbjLdlMtKMj0Cn+hyqzzEon+VZmZd8Mftm4Z5cOqMbImqOcI5DUZ4xggxDgdlxiBKbN4evXBq9u5wD9zQNTXwf6eyjLEGiwtrvHNsk3VJGdUMEieENixer1YqqOSJjQCkBle9j9kTshMX.UkG6y8BcnVCOYLUyiqeIkSI4Kf+15mBEdDk4wikLV3s3wh6Ke8MXKbcMMit+2fTuv+OI0uTlXF66LBTnBy4ggwj5Bbo9zrYALCz5rhgOzJW1HaISEAoB+I7KynmQ1Iyn2XieRNiPhuR9Je6n5lZ4OOUCbuEoenVQ7YFYWOT536fe3xaWFEBLhux22Dt+NH9LeeprD9ryR3S0kvmcWBepsD9r2R3y92qOlGiNz7c71VQPQmVoS063zRPfJ4zpdzekXG9j.
Or Download And Use The Below Custom Keyboard Project :
Custom Keyboard.zipThanks To @d-healey <3
-
And here's a simple example with a panel
HiseSnippet 1456.3oc4X8taaTDDeujbklTRKEUg3iKUP04FWicHMkRHpNwwtDQSiUbZKhRU0l61ydUNu6wcqSpUUkP7Idr30f2h9F.ytqOe24bM0XJfDreH814O67amY1YF21QBWZbrHBYs3gCCoHq22tyPtrWidDFGs6NHqKaeLc3QBRjmGsu.s8vPRbL0CYYM+8UxXs3BH8502aaR.g6RSIgPOVvboOf0mISo1t92xBBZQ7nGx5mQ50puq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5EYmrY33M+zOT+TUsfwD90etdOcIoTJGTGp6HNcbuTj0UrgdM3TBny1lGF1P3MHfHyOAhZrqQLfXStV8p147XlbX1wx9SLVR0BGKoPO+TB2qZ2lIc6ULdmq.7BQv+tw6ng7V1touOz6IErKX256l0I5lMnbYCTtjcGXNFcIVMP9H8d7SHmPw2mxoQJmZs23v2+1U9koc36vod368ckf4OLhviCEw4N3Nz9rCgmMwYI9nXXjR5OdfJJmkdCgpGZArd88ZAWxB0oCQNHRmtrEz8hKykdL+LMkc9WMYjufQtW3egeQv69md+0qTL+zA22xOZYwDL1g0OLf1jeBM.JMqw3GB0h8ICBjITymjumfKB6I3L2rY.GPkQrtcoQYwdgWnsjRn3ZJkqU+.Z.kjMa9Sq+.HKjDA9I5L5KpM89hyKd8w1F3hUuLw+2nB+7++rBu4Gl1cOBjnBSMXCCw0AJr5RAjvgYI.CYaMmp3nYeU0dSkUtmdyuCqQLqo1aMhYsDl+iXi9D2HwycMy9oxkunlBbu45+OYVzdO0dbMjddPPO6pUph5CUDetqqxceKv+TrNqNC57EyfNqMC5b6YPm0mActyLnyWdt5nZFs0.onu4oHPncS8fwVVM4DHSVm0i9CWXWVdB
-
@d-healey said in Custom Keyboard / Easier Script:
Oh! Thanks DavidYou Rock <3
Thanks For Help -
@d-healey Sir How To Make The Piano Keyboard From 0 To 127?
I Changed The Looks To CircleHiseSnippet 1561.3oc4X01aaaCDVJNpqIsouLTLrOxUrUHu35Jkkl1trf7pcWvZZLhSeYnqnfQh1lHxjZRzIwnn.C6S6m09ar+E8Gv.1NRJYI43j451sArw.jHd2Qxm63wiOLMh3dj3Xdjg4L62OjXXdYql8YhNa1ASYFaukg4UrNjz+.NNx2mzkarQ+PbbLw2vzrzCk1XNyzFp1aWcCb.l4QxDYX7TN0i7HZWpHSZi09NZPPcrOYeZ2bVu3Za6wYaxC38.7TxxwHD6cHtM4wXoYSYYXdgZ9TAOpo.KHwFlSuA2ueyN7iYZ6eJMldP.Q1w0nILQZw04A9RD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UBAysHGA7F02oOi0Vj3CE7PksI29YX9QZhCykdiuL5o3MbQKcjz3j7LN5OnyO8Cqcr77+.A+5OuVGUEpL6+90fZM7iGbAujMBbAHJSvHHe.bC498BvhhDFkrjST.6GEHfHIYvhoh94o07NvhzYrI4Ntv85VMnBuNiFuSMB7JID92LdSH8NmUsVsHdhLvNsU8mOoDvmLnbkT92MAxUpxpJf7Ip9nmgOhfdHgQhjAU2y7sR+1U+kw8sRgi8ak10S.K+9QXVbHOtvD2jzktObrINuvmDCDcI+3dxc47x2jKu2bDpd6p0AmbjioIVzKRktrNbiESTH8nz64ihF4a1l9eg2r8g+z16ewgRiGbGQDzrwod6+0fz3tgAjZriHAP0XEF+Xn7aKbu.Qpzh406vY7vNbF0K+l9dDQDscaRTdrORGZcg.pmlI4FqsGIffym.+4q8HHwCGAwIxDFKbG+Xw4se8oVZ3hjGFQ+2nndo+eVTW+.416fgDUfnfEvUqITK0i.HgAzGjDgLmRVOT22Q1WWLk4q57GPKQoqruYhR2Tk+irFcwdQ7W4oo3IykunRB32L0+0rYr1Q1G4l9+OwxxopiQWnh3q77jg6aCwmQOlElfw7USvXVbBFycmfwrzDLl6MAi49m6XjWFsdOAuq9nHHnQMEWXSyZLLjIqx5M9SjpAwlB
-
Also By Clicking And Moving The mouse Over The Keys, Notes Gets Stucked :/
-
@Natan Looks like you're doing quite well! I'm not getting any stuck notes with your snippet.
-
@d-healey Ah Thank You Sir :)
Click On The Circles, Not Your midi Keyboard.
The Graphics Make The Notes Getting StuckedHiseSnippet 1556.3oc4X01aaaCDVJNpqIsouLTLrOxUrUHu35Jkkl1trf7pcWvZZLhSeYnqnfQh1lHxjZRzIwnn.C6S6m09ar+E8i6aaGIkrjbbxbc61.1X.RDu6H4yc73wGlFQbORbLOxvbl86GRLLurUy9LQmM6foLis2xv7JVGR5e.GG46S5xM1neHNNl3aXZV5gRaLmYZCU6sqtAN.y7HYhLLdJm5QdDsKUjIswZeGMHnN1mrOsaNqWbss83rM4A7d.dJ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QMZMICzlofSEj5RzAFB2aVjef03wOvSeeTNC4rsYTwtgD1YQyJiAgwS1dKHH.TILSjA1ERhDTIDL2hbDvYTee9LVaQhOTvCU1lbymg4GoIMLW5s8xnmhyvEszQRiSxy1n+fN+zOr1wxy+CD7q+7ZcT0mxr+6WCp0vOdvk6RlHvkenLAif3AvKj62K.KJRVTxPNQAreTf7gjfAKlJ5mmRy6.CRmwlf63B2qa0fJ75LZ7N0HvqjL3ey3Mgv6bV0Z0h3Ix.6zV0e9jR9dxfxUR4d2DHVoJqp.xmn5idF9HB5gDFIRFTcOy2I8aW8WF22IEN1uSZWOAr76GgYwg73BSbSRW59vwl37BeRLPxk7i6I2kyKeSt7dyQn5sqVGbxQNllXQuHU5x5vMVLQgziRumOHZjuWa5+Edu1G9Sau+EGJMdvcDQPyFm5c+WCRi6FFPpwNhD.UiUX7igxusv8BDoRKlWuCmwC6vYTu7a56QDQz1sIQ4w9Hcn0EBndZljar1dj.BNeB7mu1ifDObDDmHSXrvc7iEm290mZogKRdXD8eih5k9+YQc8iiauCFRTAhBV.WslPsTOBfDFPePRDxbJY8PceGYecwTlupye.sDktx9lIJcSU9OxZzE6EwekmlhmLW9hJIfeyT+GylwZGYeja5+6DKKmpNFcgJhuxySFtuMDeF8XVXBFyWMAiYwIXL2cBFyRSvXt2DLl6etiQdYz58D7t5ihffF0TbgMMqwvPlrJq23OozUCSM
-
Notes only get stuck when you click and drag the mouse off the note. If you just click there is no stuck note. So you need to keep track of the last pressed key and turn that off whenever the mouse up event triggers.
-
@d-healey That's Too Complex For Me :/
-
@Natan How are you turning off the note currently?
-
@d-healey
Sir
Let Me Finish With The Keys, Then Go For The Stucking Script :folded_hands:I Managed To Make 36 Keys, Thanks To Your Loop Script, Everything Works Just Fine, But How To Go A 2 Octave Down, Like Start From C0 To C5?
Panel1.setPaintRoutine(function(g) { var white = [ 0, 2, 4, 5, 7, 9,11, 12,14,16,17,19,21,23, 24,26,28,29,31,33,35, ]; g.fillAll(0xFF000000); for (i = 0; i < 36; i++) { if (white.contains(i)) { this.data.down && this.getValue() == i ? g.setColour(0xFFAAAAAA) : g.setColour(0xFFFFFFFF); } else { this.data.down && this.getValue() == i ? g.setColour(0xFF222222) : g.setColour(0xFF000000); } g.fillRect([i * this.getWidth() / 36, 0, this.getWidth() / 36, this.getHeight()]); } });
HiseSnippet 1493.3oc4X0saaaCEVJIpqIcoccnXXWxUrUH2n5YYm51rrf5DGmtf0zXDm1NfthBFIJahHSpIQmTihBLrq1i0tZuC6snuAaGRZYI63j4YzVLrwKbLO+P9c9gmywoYL2ijjviMLW7v9QDCyO1pUelnS8NXJyX2sMLup0wj9Gwww99jtbis5GgSRH9Flly+PoLlKtfgZ81GrENDy7HYjLLdJm5QdDsKUjQsYsumFFtC1mbHsaNoWs1tdbVcdHuGfm4sJYDg8NF2l7XrTr4rLLuTCepfG2RfEjDCyE1h62uUG9oLs7OklPOJjH23ZzBNHM4c3g9RDKoZTuCMzuYpcmXXXZ0LyKLu1KbCq8n9zgzy7FehhAJSi79Cy4tH34lGdkld3YlCdKng20sZ4ESiDYbjX6JV6xDj3.LDBxCKsrFy86WxpNGjfIJ1EeLYmXXyPMrqVpjC5tkJUX8kWZ4kTIAE8IAj353vvif.QhsHtGQyFhSIBD4D3r10OAsApAqMkQJ5ES.SW5hdDMQXKENUnhAPP29NqsV9S3DbLpIlQBcgyHEbsIh57tQbFrw9lZ12TqkdSwDhnIDQDGv6Ifq0NnGySP4L61EPuVJGBVxy9zNTAAN5mqIo+L+Br4xNnUAK2AcOGzZNttNmUJ2xNtq53V0w8dNtq4T10obkIHV4UcJW0o78cJulSEWmJUbpb2Ah8h0yif1Jmwlf+nzq1YmRpUgQjHfGiro.xKsNhh9VTkpveWYEk4kdcYeiFfrUlZQvsJ.OShMsvHxJWhNzjh9XAtnOjRht0szT.28Swg8H1EParAbYO.fWhLDHeGp.3lpUAz2bFN5UJzkq2j8URXB4cFFJqVSBCi59FCCYeS6yOf3IreNEc6g26yn9hNv890fO1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c0OEABManlE1zrACCYxprdi+BL+pgML
-
Your white keys array doesn't need to contain every single white key. It just needs to contain one octave. Actually I'd do it with black keys instead of white keys because I already have the function on github.
inline function isBlackKey(n) { return [1, 3, 6, 8, 10].indexOf(parseInt(n) % 12) != -1; }
Then you can just increase your loop from 36 to whatever upper value you like.
-
@d-healey said in Custom FLAT Piano Keyboard 2 Method [ Panel Script By @d.healey & Project File ]:
inline function isBlackKey(n)
{
return [1, 3, 6, 8, 10].indexOf(parseInt(n) % 12) != -1;
}Thank You Sir, Now I'm Confused Again :/
So Where is Supposed To Add this Up? -
Call the function, pass a note number, and it will tell you if it's a black key or not.
isBlackKey(60); // false isBlackKey(61); // true
-
@d-healey no Idea, This Is Pretty Easy For You Sir, But I've Go No Clue On What Notes And Functions Can Do
-
Instead of
if (white.contains(i))
which only works if you put every singe white note in the array, you can useif (isBlackKey(i))
The only difference is this will trigger true on black keys not white keys. -
@d-healey Sir Could you please help to finish The Full range keyboard.
What i reported On Other forum, Forces Us To Use A Painted version :/ -
@Natan said in Custom FLAT Piano Keyboard 2 Method [ Panel Script By @d.healey & Project File ]:
Forces Us To Use A Painted version
Isn't the problem only when a user clicks on the keyboard? Or is when they use a MIDI keyboard too?
-
@d-healey
Play with your Computer keyboard Instead of A Midi Controller, You Will Get Shocked.
Computer players Something, While the Ui Send Another Notes,
If You Don't Use any Hise Midi Keyboard On Your GUI, It Solves,
And I believe the Issue is Because of Hise Midi Keyboard, So Having A Painting One Will Help To Get Rid of the issue.Check The Video:
https://youtu.be/ir3cx4OqSjg -
You may Ask why using Computer Keyboard, Well not All Kids Out there have access to Midi Controllers, Also On The Go Producers, Do Not Carry A Midi Keyboard, And They use The Computer Midi Keyboard Instead,
I Didn't Touch My Midi Controller For Around 2 Years, And What Ever I Made, I Used My Computer Keyboard.