HISE Logo Forum
    • Categories
    • Register
    • Login

    CC filter

    Scheduled Pinned Locked Moved General Questions
    17 Posts 2 Posters 820 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.
    • gorangroovesG
      gorangrooves
      last edited by

      @d-healey So, I am trying to get the last piece of the hi-hat puzzle sorted. I want to have a note (that I specify) set the controller value to 0 when played. I thought I had the right code, but I am getting "Ilegal operation in audio thread: String creation" error.

      This is the code:

      function onNoteOn()
      {
          local number = Message.getNoteNumber() + 1;
          
          if(number == trigger.getValue() || number == trigger2.getValue())
          {
              setControllerValue(0);
          }
      }
      
       setControllerValue(0);
      

      is the line of code causing the error. Am I not using it correctly? Should I use something else or am I missing something?

      Goran Rista
      https://gorangrooves.com

      Handy Drums and Handy Grooves
      https://library.gorangrooves.com

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

        @gorangrooves said in CC filter:

        setControllerValue(0);

        Is that a function you defined?

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

        gorangroovesG 1 Reply Last reply Reply Quote 0
        • gorangroovesG
          gorangrooves
          last edited by

          @d-healey No. I was looking up Api commands.

          Goran Rista
          https://gorangrooves.com

          Handy Drums and Handy Grooves
          https://library.gorangrooves.com

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

            @d-healey In your script you defined ccValue to be Message.getControllerValue();
            Should I be referring to ccValue instead of setControllerValue and if so, how do I force the ccValue to be 0?

            Goran Rista
            https://gorangrooves.com

            Handy Drums and Handy Grooves
            https://library.gorangrooves.com

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

              @gorangrooves Ah I see.

              e4a75e4f-d891-493b-8cbb-7ee69883d0c4-image.png

              When you look up a function in the API browser you will see it listed under the class name. In this case Message or MessageHolder. That means the function can only be used on instances of those classes.

              To put it another way, you need to write it like this

              Message.setControllerValue(0)

              However this won't work in on note callback because in on note Message refers to a MIDI note message. This function will only work in the on controller callback.

              This is why I created a variable ccvalue and set its value in the on controller callback. You should be able to use Synth.sendController() in the on note callback, I think.

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

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

                how do I force the ccValue to be 0?

                ccValue = 0;

                The value is only set in on controller when CC64 changes, so as long is it hasn't changed you can set it to whatever value you like.

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

                gorangroovesG 1 Reply Last reply Reply Quote 0
                • gorangroovesG
                  gorangrooves @d.healey
                  last edited by

                  @d-healey Thank you. I am running in circles here, no closer to solving it :)

                  How do I get it to set the controller to 0 as soon as a particular note is pressed?

                  I used

                  Synth.sendController(64,0);
                  

                  And it sets the controller to 0, but only after I press a note twice. It doesn't do it right away. What am I missing here?...

                  Goran Rista
                  https://gorangrooves.com

                  Handy Drums and Handy Grooves
                  https://library.gorangrooves.com

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

                    @gorangrooves I'd need to see the rest of the code. Make a minimal example that demonstrates the issue

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

                    gorangroovesG 1 Reply Last reply Reply Quote 0
                    • gorangroovesG
                      gorangrooves @d.healey
                      last edited by

                      @d-healey I am trying to do that by opening 2 HISE samplers VST's and copying from to the other, but it is not working. How do you do it?

                      Goran Rista
                      https://gorangrooves.com

                      Handy Drums and Handy Grooves
                      https://library.gorangrooves.com

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

                        @gorangrooves I always work in the standalone version unless I'm testing something in a DAW.

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

                        gorangroovesG 1 Reply Last reply Reply Quote 0
                        • gorangroovesG
                          gorangrooves @d.healey
                          last edited by

                          @d-healey Managed to get it copied and simplified. Here is the link to the 13MB project (includes basic samples):

                          Error 404 (Not Found)!!1

                          favicon

                          (drive.google.com)

                          There are only samples on A0, 2 types: tight close and 100% open. Use the CC64 to switch between them. The first one sounds on the bottom 20 cc values and the second one is at the top 27 cc values.

                          When the cc64 is somewhere between 100-127 and open hat is sounding, it should be able to be muted by pressing either F#1 or G#1. Currently, either needs to be pressed twice for the choke to take effect. We want to achieve that with a single press.

                          I hope I managed to explain it clearly enough. Thank you so much for taking a look at it!

                          Goran Rista
                          https://gorangrooves.com

                          Handy Drums and Handy Grooves
                          https://library.gorangrooves.com

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

                          44

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          102.1k

                          Posts