How to Mute/Unmute specific notes in a Sampler



  • Hi,

    I've just started working with Hise a couple of days ago.
    I wanna be able to control the NoteOn callbacks and only allow certain notes depending on which button in the UI has been activated.

    I've seen a couple of posts with Christoph saying that "you can't kill real events happening", but is there a workaround on blocking NoteOn from playing a note?

    Is there a way to use the IgnoreEvent(true); ?

    Thanks for the help,



  • Use an if statement in the on note callback to check the value of the button(s) and the played note number. If they match you can use ignoreEvent to prevent it from playing.



  • @d-healey said in How to Mute/Unmute specific notes in a Sampler:

    ignoreEvent

    Here's my code:

    function onNoteOn()
    {
        local noteOn = Message.getEventId();
        local testButton = Content.getComponent("PanelButton0");
        
        Console.print("noteOn : "+noteOn);
        Console.print("testButton down value : "+testButton.data.downValue);
        
        if(testButton.data.downValue == 0){
            Message.ignoreEvent(true);
        }
    }
    
    

    But on the Console it gives me that error:

    Main Script:! onNoteOn() - Line 12, column 28: Call of ignoreEvent() outside of midi event callback {TWFpbiBTY3JpcHR8b25Ob3RlT24oKXwzMzN8MTJ8Mjg=}
    

    Is there something wrong in my code?



  • @Alex-Paradis Post a snippet. Export >> HISE Snippet



  • local testButton = Content.getComponent("PanelButton0");

    I'm not sure it's wise to do this in the on note callback unless you are deferring MIDI callbacks.



  • HiseSnippet 9535.3oc68sFabikclrjDksksb690L8znmY3H6tcIaYo5ojb6taWuXIWi0qopxp6dbbjXUEKIFWEYEVrjsZOtivfL.6iAICPRvBjYvFu+XCR.lEcCjEAAA4GpABBB1sAxtK1W4GIvSRvtKR1j0H+XARB1z68RdI4kOJ4pHKRK5RBy3tJRdN766bO2y4bu7xastnPU11sEDIBcpx60hkHzYHKsGuzNY2ggimnPNhPuHYN112URnEU5VsnhNaDhL60hoca1ZDgBM5RvKKzoFiP9umb8LLMX3qxpeHBhMD3pxtLWSNI8itdpax0nQdlZrk4Zhc0IRUnp.eVgFBc.PZTxHDsXpdWlsYWkAdYiPRDZb5ZbRBhkjXjXaSDZrLB01qzNB2iW452fqMWkFrvuDknDPQJGNuPiZPDCOJQ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tew+zWxanNo+QcGN26+jW4E8FpOt+QcG9ZrIMscs5WFm5WFm5W9nQMrK49ZX+at5a3MLeDei4wNhw7Q8Ml6vIe+69C+JdCyGy2XtCm78I90Nq2vbRei4NbtYt6m7ZdCyG22XtCWafi9KbBug4mv2XtylYlG+NK75ov2kq9pG5VZ5o01RSi4u6koQh.9+IdlsWl9jqe7dY5w6ko84dYp11OJZeNKzX9wdaZziF6soArcU6mA6lmw7zcyyWwxt4IwENd2773cyyi2MOOd27bvsad5fBGi62ENFsd85GW33wENdbgiGW33yEENF+3BGOtvwiKb73BGGtJbLg++qmTs3GW33wENdbgiGW33yEENl33BGOtvwiKb73BGGtJbLoOW33hrKjXwiKb73BGOtvwiKb74hBGSdbgiGW33wENdbgiA3BG8CT5G2ilLUEE1rpxuUxP6wIkOBvRvKuFSOE4JvuSEU8GGYXKXSP1vMqVE1U6Jf1P6kHVeKQ79VhD8sDI6aIluukXg9VhEODIfkdjtijPSk.ufCrNshyZHZMm0QI9+C9CMsNC
    

    I am using HISE 1.6 sadly because I couldn't use the 2.1 without IPP, and Mac Os X El Capitan cannot install Intel IPP (even the 2018 version).



  • @Alex-Paradis IPP won't even install? What error do you get? I'll check your snippet now.



  • @d-healey

    IPP 2018.0.104 :

    "Unsupported OS
    Detected operating system is not supported. Supported operating systems for this release are:
    macOS* 10.12 (Intel(R) 64), 10.13 (Intel(R) 64)"

    I'm on OS X 10.11.6

    If there's a way also to easily disable the IPP for HISE 2.1 that'd be great too since I will not use Convolution Reverb anytime soon.



  • Oh sweet Jesus that's a lot of panels. You know you can replace all of them with a single panel 😉 I'll be doing a video about this soon.

    The problem with your code is you have Synth.deferCallbacks(true); This makes the MIDI callbacks none-realtime, so you can't ignoreEvents since by the time you ignore them they might no longer exist.

    You need to separate GUI logic from realtime logic.



  • @Alex-Paradis said in How to Mute/Unmute specific notes in a Sampler:

    IPP 2018.0.104 :

    "Unsupported OS
    Detected operating system is not supported. Supported operating systems for this release are:
    macOS* 10.12 (Intel(R) 64), 10.13 (Intel(R) 64)"

    I get this message when installing on GNU/Linux but I can still install it. Does this actually prevent you from attempting the install entirely?

    You can disable the IPP easily, this is covered in my tutorial video - http://hise.audio/manual/VideoTutorials.php



  • @Alex-Paradis Have you tried the IPP 2017? I've seen someone working with it on macOS 10.11...



  • @d-healey

    Ok thanks for the Synth.deferCallbacks(true);. I've set it on False and it's working.
    Can you explain a bit further what this line changes in the whole process?

    What is your trick on creating a single panel for all the buttons?

    Thanks again for the help



  • @ustk
    I've search on their website but didn't find a link.
    Do you know where I could get it?



  • Can you explain a bit further what this line changes in the whole process?

    HISE uses two processing threads. The audio thread is super fast and handles all the real-time MIDI stuff. The other is called the message thread and this is for none-realtime critical things like updating the GUI. When you use deferCallbacks it means your script will no-longer use the audio thread and everything will be handled by the message thread.

    This is great for things like updating the GUI when a keyswitch is triggered as it prevents the GUI stuff clogging up the real-time thread and causing audio dropouts or other unwanted artifacts. But it's not good if you are doing things that rely on precise timings like legato scripting or filtering events.

    What is your trick on creating a single panel for all the buttons?

    Not my trick. Christoph showed it to me. It's not simple to explain but it was discussed briefly in one of my livestreams (I think it was the second livestream) check my YouTube channel if you're interested. The basic principle is using the panel events you can detect where the mouse was clicked on a panel. If you know the width and height of a panel you can divide it into a number of imaginary zones, if the user clicks in one of those zones you count that as an individual button.

    Here is an example from one of my projects, this was for creating a vertical menu. You'd also need to create a suitable paintRoutine for the panel.

    pnlMenu.setMouseCallback(function(event)
    {
        if (event.clicked)
        {
            var voffset = this.data.verticalOffset;
            var height = voffset+((this.data.itemHeight * this.data.numRows) * 2);
            var value = parseInt(event.y / height * this.data.numRows);
            
            pnlMenu.setValue(value);
            pnlMenu.repaint();
            changePage(value);
        }
    });
    


  • @d-healey

    Thanks for the explanation for the Defer Callbacks. I get the idea behind it.

    Thanks also for the code. It'll be surely useful.


Log in to reply
 

8
Online

502
Users

1.8k
Topics

13.6k
Posts