HISE Logo Forum
    • Categories
    • Register
    • Login

    About midi channel in Keyboard floatingTile, again...

    Scheduled Pinned Locked Moved Feature Requests
    18 Posts 3 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by d.healey

      You need to put the property within the Data object of the floating tile, like this

        {
          "type": "ScriptFloatingTile",
          "id": "fltKeyboard",
          "x": 0,
          "y": 0,
          "width": 676,
          "height": 72,
          "itemColour": "4294951115",
          "itemColour2": "4294951115",
          "bgColour": "0",
          "parentComponent": "pnlKeyboard",
          "textColour": "4294951115",
          "ContentType": "Keyboard",
          "Data": "{\r\n  \"KeyWidth\": 14,\r\n  \"DisplayOctaveNumber\": false,\r\n  \"LowKey\": 24,\r\n  \"HiKey\": 127,\r\n  \"CustomGraphics\": false,\r\n  \"DefaultAppearance\": true,\r\n  \"BlackKeyRatio\": 0.69999998807907104492,\r\n  \"MidiChannel\": 2,\r\n  \"ToggleMode\": false\r\n}"
        }
      

      It's easier to edit it in the interface designer rather than do it in code.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      jadgJ 1 Reply Last reply Reply Quote 0
      • jadgJ
        jadg @d.healey
        last edited by

        @d-healey
        Ok, I`ll try , thanks

        1 Reply Last reply Reply Quote 0
        • jadgJ
          jadg
          last edited by jadg

          I tried this and, really, doesn´t work:

          // [JSON Keyboard]
          Content.setPropertiesFromJSON("Keyboard", {
          "width": 455,
          "height": 70
          });
          // [/JSON Keyboard]

          Keyboard.setContentData({
          "Type": "Keyboard",
          "LowKey": 45,
          "HiKey":96,
          "DefaultAppearance": false,
          "DisplayOctaveNumber": true,
          "KeyWidth": 13.6,
          "ToggleMode": false,
          "CustomGraphics": false,
          "BlackKeyRatio": 0.72,
          "MidiChannel": 3
          });
          I tried this some hours ago, and did not work....

          jadgJ 1 Reply Last reply Reply Quote 0
          • jadgJ
            jadg @jadg
            last edited by jadg

            @jadg
            Keyboard only sounds when you select channel 1 ,
            Really, nothing changes when you use "MidiChannel" at ContentData

            1 Reply Last reply Reply Quote 0
            • jadgJ
              jadg
              last edited by jadg

              It´s something new in the latest version of Hise?
              I have version 1.5.1 , 6 March 2018, build version 650

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @jadg
                last edited by

                @jadg You shouldn't have the //[JSON ] tags they haven't been used for a long time.

                Edit your properties in the interface designer - https://www.youtube.com/watch?v=V4wHbkz5HVc

                To set it in script you need to do something like this

                reg keyboard = Content.getComponent("fltKeyboard");
                reg kdata = {"KeyWidth":14, "DisplayOctaveNumber":false, "LowKey": 24, "HiKey": 127, "CustomGraphics":false, "DefaultAppearance":true, "BlackKeyRatio": 0.7, "ToggleMode": false};
                keyboard.setContentData(kdata);
                

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                jadgJ 1 Reply Last reply Reply Quote 0
                • jadgJ
                  jadg @d.healey
                  last edited by jadg

                  @d-healey
                  Ok, but I need to change the keyboard channel in runtime, so it´s must be in script, not in interface designer...., I saw this video some time ago and it´s fine...
                  I´ll try the second option then...

                  Thanks d-healey, and sorry for my ignorance

                  Anyway, why the other properties work prefectly in the code I used and not MidiChannel property?

                  1 Reply Last reply Reply Quote 0
                  • jadgJ
                    jadg
                    last edited by jadg

                    this is my new code:

                    const var Keyboard = Content.addFloatingTile("Keyboard", 6,22);

                    reg rkeyboard = Content.getComponent("Keyboard");

                    reg kdata = {
                    "Type": "Keyboard",
                    "LowKey": 45,
                    "HiKey":96,
                    "DefaultAppearance": false,
                    "DisplayOctaveNumber": true,
                    "KeyWidth": 13.6,
                    "ToggleMode": false,
                    "CustomGraphics": false,
                    "BlackKeyRatio": 0.72,
                    "MidiChannel":3};

                    rkeyboard.setContentData(kdata);

                    And Keyboard still sounds only on midi channel 1

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @jadg
                      last edited by

                      @jadg I'm not sure, @Christoph-Hart any ideas?

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      jadgJ 1 Reply Last reply Reply Quote 0
                      • jadgJ
                        jadg @d.healey
                        last edited by

                        @d-healey
                        It´´s really a problem..., and I´m absolutely incapable of resolve it

                        1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart
                          last edited by

                          Check the latest version, I‘ve added this just a few weeks ago.

                          1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart
                            last edited by

                            Here's your example as code snippet with a sine generator that reacts only to MIDI channel 3. It works on the latest build like it's supposed to.

                            HiseSnippet 1133.3oc4Ws0aaaCEVxNpnVcIcEncXOJXrGR.xBryst1fglD63LiFmDD4d4sBFoisIBEoFIU5LJ5+w8So+C1NTRNVtUvKNXq.aSOoyMpOd347cnNWJB.kRHsrq0ebLXY+MN9i45QsFQnbqtssrWwoGQoAoWlpCGGSTJHzx1t5wFE10VxJ84Su3PBivCfoprrdsfF.mPin5oZi2+kTFqCID5SiJ38162MPvaIXhDDOUcZXESBthLDNkXbqhiksyQgTsP5qIZPYYuzghvw9iDumm4+qoJ5kLvHzzxGWnL0cDrPChMua0ZDkEd9j8sxBWzymlEplkEdrSOZH8F8SyFeapAuoQTLeXWYdvq4cDd1Ef2RYv6QN9ARZrdpEC1dfSWNdPMffGAEgUluVU1rhSKA5AWuQD4JniDEtIhU2sQi081oQi01aY2kcwCBk16Zhz6kv3KEDYn2O6MIZRXXGlfno7g8oLX05S7o95d6t9lat1dttRXnm7puL1gftkHJVvQgBANIjqBIZB59Gbqa1p0etWgE2s9Ih2ihn1s2Ak9EZpvy1EeuMLfjvzGDGCDooJDcZ.go.iMpJlQFeVflbMbZRzkfDspkIFi3R7FZndDpo4VaXVp9hgCYPOQXw0nUhRKhNVRhGQCTELbHCKRwE4BLeHP8M13oahpMkIXYCmCr5OeqOZ1dSxFanL4fzzQab2tZ5dds8FjvCvkf6I3mJzvY7UWy8Ct0b+n6maYvfxLYVRofw.YYVMsZx4D1p7z7x53YNKAl3GVwMaI88tckzAYauBNJ3c4T8YwPt7zh9lkTzakmev2dUWSRxzGjqC8KFjZpAN1sgqQBlrthZNsA0UZQbpu40X3NPm2Rm0GTrx0hhHv0YREl0ugjA12C+niMu7cFRour4Co.DgILhdVdACYXtALwNSCnoIiqn5wEIKW.xhFkRVTZd6VB2G4bNUGLpb7VoD7h4++owaN06xNGMX.DnmB1kb5716JO6cCJqjAkG33S4P57vTf7jTYu2frHdGCbPZRpyYh3u+2+DwLNr9HCmJVnlYg8gHZerlWUT4qTHOO7qojSE02Bq2K0zmdQGbOVZL9DchLsZ4fHQBWOS0Q06znuYaZJ3eIyAW5eOioyg2Ccxm.zgxvwr40P851tqWtAubKy.uOKUV81Au4Qhlwchr7nqYrgqjyF5yng322vC9PmfLPkMgzJcPvzy36u+WOtvp2tF5+hSgZSvnOMJlAGwuFX3nibBv7KLbi1hfrmfKhGI3zfh03W.ZIc3PPVD5kteNPqwKELUyi2+BfAjh8q+v9mf8YDo4ZF2wTQyaepXdGWeuSFb8LbOd+2XDV0+eNB6BQh4pM8HXgp4tLXmrON5H.xoaTlq0TwvLjI2vHmM6fGlJ7G3StwlFY6biMmX7qx2HhDHEuKHiyxTKe+TM39lm9qf0v+IEk8ZNgjxjahPF+2EDXR1+HlcJOhMW3H1ZgiX6ENhcV3H1cgi3oKbD+zbhvLd8fD7OhxZ8rr9ST2TkkJ
                            
                            jadgJ 1 Reply Last reply Reply Quote 0
                            • jadgJ
                              jadg
                              last edited by jadg

                              Thanks, I´ll try it with the lastest version

                              1 Reply Last reply Reply Quote 0
                              • jadgJ
                                jadg @Christoph Hart
                                last edited by jadg

                                @christoph-hart
                                Thanks, It works perfectly in lastest Hise.

                                alt text

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post

                                26

                                Online

                                1.7k

                                Users

                                11.8k

                                Topics

                                102.7k

                                Posts