Scales Combobox
-
@d-healey I Guess In The Menu Makes More Sense, On The Top Of C And I Can Grey Out The cmbScale Combo Box To Make It More Eye Catchy :)
-
I took the lazy option and added all notes as just another type of scale.
HiseSnippet 1645.3ocwW01SabDD9Lgqs9ZPMQpeoeaEnpZKLFa2DHoTZrwuPQIjfvDZkPnn02s1daNuq0cqArpPJp+wZ9d+R+oj+AzY18NemMuDJUQ8jUH6LyNyy7r6N6r6EHcYggx.qLYOX7PlUl6a2drP0udeJWXsSCTPnK0mo5yE8r1Z7PZXHyyJSl6sMZQlryao+9vy1h5SEtrDQVVGJ4trWvGvUIR2q5y499sndrC3CRY8iptiqTTW5KGAn4d1krFRceKsG6kTzr4rsx7YM83JYPaEUwBsxL+VRuws6KOUXr+PdHuiOCGT1pM3Hi3VReODwnTq5849d6Em0gVfW1KgCtmgC9Z6c4d7IxS3hGnUPRlQZ9Hyb2D7JmFdkt8vKSJ3MuAdOztsa.enJQChsuzdGghEzkBKAogkwVq49yO2ttDrPnJNf9VVq.XvjYjasRkJPdboR42XAmEbBX8HTee4oLuWJgjYCiHNZ9IT+PsQvpUnhbBMfn2frSrRxljiVvg.eGUt.4i+63BjUWsFFMLlQyrRAREs5Jw+L1sK82jAI1Lwfn+ywnIbgLv4XDhqt59RohHfbf3JGzQ1QdVZf6Nni1fMIwTSOlptbvPo.FjawH8KZXEtvmKXjtiDtJtTPjhH83jCj94bimYAv69iX4Wv42MXk2kjSKhr4ljx4SXRHzSydGU5XHXYSy9fM.rpkRhwWq.Y7DGgPL6ngdvdumyFaNFElCkdtY0x.0hgrX3VGhQG3HVtYyCS1t5psQfY3Mhl3tRBPa0My.YugzUa1wa.qasY9LWEY.tBSfeCv0wTLE78wIl3zDjeH54b4+WwRW61.cVtX9qk9RyBw72AvwLR.fFDZDpvyj6oRIkDS.BMHfNlH6FelSug8xz8r4ZrqSmeS1w4KgXQBXgi7w82Gg6pRj6JGITQRL+aWfqywAKKsAgS9wDWVzmI5o5CRWd47vxTSpa+YRDiGh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3PpKKZaSXbQnnwkvwHyzlI7zCvS3QJKiiyDorbrRqAT2.4abMWMfuy8KzR.LIzO2OKTXCFSJGecfscohkrF.mddiqKREq.X+pmSk6vb996vbdzcXNO9NLm0tCyY86vbdxMNGrvUsQPQSywDPvdM00pyjooPeSHtiz5e..cEHIB
-
@d-healey David. Just A Small Problem. By Compiling The Code, It Jumps To B Major.
Edit: I Mean, I Disabled The Code, Then Pressed Rebuild Button, And It Goes To B Major.
Demo'ed This With Compile Button Aswell , And Same Result Happpens -
It's because saveInPreset was disabled for the rootNote. I'll update the snippet.
-
@d-healey I Enabled SaveInPreset, Same Result :(
-
@Natanr Did you change the rootNote combobox value after enabling saveInPreset?
-
Oh I see a problem. It's because I was lazy :) I'll fix it.
-
@d-healey Have No Idea David, Both SaveInPreset Are Enabled.
For Example I Select A And Major , Then Click On Rebuild, All Works Fine.
But On Disabled It Won't Stay On Disabled -
Oh I see a problem. It's because I was lazy 🙂 I'll fix it.
@d-healey Much Appreciated
-
@Natanr See if this version is any better.
HiseSnippet 1651.3ocwX80SabDD+NBWa80fZhTeousBTUsEFyY2DHoTZsw+ghRHfvDZkPnn02s121bd2S2sFvJBon9IKu2W5Gk9AnRzY28NemMNTDRQ8DJjc96uY1clcVNLh6Rhi4QFlENdbHwv7gVcGyD9M8wTlwdsjDhcwADgOkMvXmwg33Xhmgo4C1UJgYgEMTe+8OuCN.ybIYjLLNgScIujNjJxndX8WPCB5f8HGSGlS5mTeOWNqIOfOBPyCrbLBwtuEOf7JrTrErLL+r1dTAOpq.KHwFlKtC2abWe9ELs7mPio8BHxEUM5BFRStCOvShXIUil9z.uCSi5XCvJGlkCdfNG70V6S8nSnmkKdjhAJSi74CyEtM3UMO7bt6vyLG7VTCuGa00MhFJx3Hw1WZsGSPh5igsf7vRKqwB+yma0jCRvDUFheKoSDrXhFE2vwoL5oNNk1ZI6kriHCP3f.9EDuWwgfYKMIpT7ywAwJgfcqXA5bbDRc.YuTlnsQmtjMB9NsZYz+8OmUF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ofGjN7qrxSpZNuBeYd8uhqmjy0IXaKnaRONNxyn2fzI8K7YdddWaj.qLpWe80eyzTqkPVIrfboHS3+7CZpps5EBLsTcYVFb2uR8D9K+CnpOohSYEQH2GFfGefq.edRcMvuOz+mnE3k7K.EAZIJ7KT8Rn8slPyQwB9vcivg9T23oUtEoOFtrnQXHAGIeODvVVoq4tS.LrBXsifjGW5gJa7b02ydlylO2YypZwNlOXP.YetGYZiKe8A7ZDFiDHwil3qiImPbgZ6b.Jyi.2NAXQWw3fYM1gsS2NtACnMQjHyS0lvnMyKG.1.FMyvmPG3m8.u2eT8Kj47rCh+Qcia9HF3oTbuQ.xl98UxGUlv.5qM0CYjCNwhohw4Ku+j7nq6Jber0gTgq+7w6ByAuxVhehwaxSXWxpc+9vohLvtnUme6S+6UMNhOR1WXerHhJa3.EXcghTWRxwl3zlPIqcjqkYltDlmZgrBOgYU4ZyDlUSYZLD6Fweiq9pA4ij+BEE.SL0eqfBPiMXMpZ50AVVNUbLFBUOuw0UlJVCv970o18Pmu+dnyStG57z6gNabOzYy6gNO6V0Q13pwHnootLAHbXaUuZSy1L0MgxSjF+KYq0KP.
-
Thank You Yeah Works Like A Charm
-
@d-healey said in Scales Combobox:
Here you go. Should be pretty self explanatory but let me know if you need any info about what it's doing. You can add more scales just by adding more interval sub-arrays to the scaleIntervals array and adding a corresponding combo box item.
Update: Just fixed a little bug. btw I'm using the natural minor here, if you want the harmonic or melodic you'll need to update the minor intervals array or add additional arrays.
David, I Searched The Google, And Seems There Is NOt Much Information About Interval Or Any Charts.
Can You Help With More Scales? -
-
The intervals are 2 for a whole step and 1 for a half step.
https://hellomusictheory.com/learn/music-scales-beginners-guide/
-
With A Custom Piano Keyboard, How We Can Show The Scales?
inline function updateKeyColours() { for (i = 0; i < 127; i++) { if (allowedNotes.contains(i % 12)) Engine.setKeyColour(i, Colours.withAlpha(Colours.red, 0.2)); else Engine.setKeyColour(i, Colours.withAlpha(Colours.yellow, 0.2)); } }
Edit: Found A Better Solution :)