HISE Logo Forum
    • Categories
    • Register
    • Login

    Drumkit Pads

    Scheduled Pinned Locked Moved General Questions
    6 Posts 2 Posters 224 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.
    • elemen8tE
      elemen8t
      last edited by

      Hey there,

      I want to build a drumkit sampler where you can trigger the samples with pads.

      I also want it otherway around so that when you play the the note with your keyboard the pad (button in this case) triggers visually. How can I do that?

      HiseSnippet 1085.3oc0W0saaaCElx1ZX1cIXcnXXWJTrKb.BBr8RSKPunNwwovX0IFQoc6hMTvPSaSDJRUJprYTzGn8VzGk8Hzq1saGRIGKkH643kTfIeEO+9cN77C8.kjPihjJjS0ylFRQNekq+TgdRmIXl.06Pjylt8wQZpxKgzASCwQQzgHGmxuzPvoZEj86Su3.LGKHz4jPn2HYD5qXAL8bpCZ+iLN+H7P5YrfLRua6dDonijKiA7T1sAJDSt.OldL1HVIWjyWzcHSKU9ZrlFgbpbfb3T+IxeSjH+aXQry4TyglHevPIjORxGZPrgJpyDFe3fYwcDB43NXdVnbRV3Qt8YCYWQed13qsL7lqQ17gSo7vqbN30LK7ZjAdE.ImLPpRBjdnqOQwB0y4XvyCb6IfKmQXHsmEJIxhJcQI2NRPBgdm.7EziTvgqzn9dMZrs2SZzXqmuQMyOlfyDTuQwBhlIEdRwAwZsTzzXCkjWmHCBkBvZa6cIlGS2ZiZueiZdvGajW8YjpZHXKi1IjimdrTab01d6sqwQUo7HZpPcEiAGtClyMBEcxnQ0Mh7AKdlA7wTcmY9s9iSQzi2ZmHCcKt5.F3bnVo90ArwXv2hhqVKLtp89qEUEGTsRBJfoInVRLUChoZKMhZs7Hp0UQTlnv3fSD0MnsZsOTy65rLtt.dolhSUEx1zUpVlh0EwAmSUYxUVAgR070+tKt9Oa6IIIqjQPonmfoOIjJVTSKJMUB8JkRQEHp11orYZmRRhCwfFhpto0EHKjyNgBcKTuUAp+5dGh0XSOaJj.XFRUZlIC3bH8RX.XRGbU2CoQWnkgVLmd8CYoU.0+9Ut7iuq8z4G9k1rn9x.vNXEP1oD5VY3VKxv+I4FF9lSjfYgxgwbrN+.RyVgTFPUStoRlIOhHldZ1sF2YSMWUH9P2ALMYRwXrTAXzTjcOfwzcMa31czHJQOGfUbO5mueVrj08al39G35CiqrC1rN+asm89I7kTuWRETkI40bQ68+3e8q+wpt2Obk26eBQCt+LEVDEJixYXeZ.6Ln.OJKwWGAa1nu6TysYV5cjXUgr9zKNBBxB0wGqiU1xh8CjwBctxfxK68GMWy2eT4958GUVsxjkCu+Gz3m64RUmgQeVPHm1UbIkCCjsX7afIvivwb8Lp4qq6KExvIRAij8R+TpVwFOlpxh8BCn80ZXk8bJOp8oTNEms.96a+JnvCqf7DcMyEMu0Ocrv6quyMAtdllQu+K2aeVKyV5v6xqzv66b7t9CxuafxoxXMSLtOFJTgE5tGGG3CyRIT.IBA7xTfFrA2np8bCy4jgohg1C+M7kxro4rSJylyX9YwGAXhR9VRx6wL0xeokBD2B6+.rJ7WQgydE7Jt.Xp3aIj7l5FJ1ZcU7GVWE2ccU7Iqqh6stJ9z0Uwm8uqnYo09wZYPRKKB0ePW6ylcb5JvPEus6.8O7DMBVO
      
      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

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

        elemen8tE 1 Reply Last reply Reply Quote 0
        • elemen8tE
          elemen8t @d.healey
          last edited by

          @d-healey great video, learned a lot. Tho you didn't cover the topic in the video on how to make the right button light up when you press the keyboard.

          In the comment section one asked the same question and you answered with "You'd need to add it within the on note callback to turn on the corresponding button based on the incoming note."

          I am not sure where and how you reference that correctly in the code.

          inline function onButton1Control(component, value)
          {
              if (value)
          	    Synth.playNote(60, 64);
          	else
          	    Engine.allNotesOff();
          };
          
          Content.getComponent("Button1").setControlCallback(onButton1Control);
          
          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @elemen8t
            last edited by

            @elemen8t A callback is the piece of code that is triggered when an event happens.

            The on note on callback is triggered when a MIDI note on message is received. So if you want something to happen when a MIDI note on message is received you need to put it in (or call it from) the on note on callback.

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

            elemen8tE 1 Reply Last reply Reply Quote 0
            • elemen8tE
              elemen8t @d.healey
              last edited by

              @d-healey Thank you very much, but since I am very new to writing own code and commands I don't really know how to integrate that into my existing code and referring and including the right events and actions in the right syntax etc.

              It would really really help me if someone could integrate the "on note on command" which presumably sets the event "if key is pressed then button is toggle on" into the snippte/code above.

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

                @elemen8t said in Drumkit Pads:

                since I am very new to writing own code and commands

                Have you gone through my scripting 101 video? If not, start there. A general knowledge of scripting will get you much further in the long term than narrow snippets.

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

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

                29

                Online

                1.8k

                Users

                12.1k

                Topics

                105.0k

                Posts