HISE Logo Forum
    • Categories
    • Register
    • Login

    Hihat Full Choke Senario? Is That Possible in Hise??? Finaly Yes!

    Scheduled Pinned Locked Moved Scripting
    10 Posts 6 Posters 620 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.
    • DimitrisSPD
      DimitrisSP
      last edited by DimitrisSP

      Hi to all of you in this great Hise forum!
      A big thumps up to @Christoph-Hart for creating this powerful platform!

      My name is Dimitris and i have developed mostly Drumming Instruments using Kontakt
      Some of them are commercial [Stigmatized Drummer , Balkan Drummer(it will be releashed soon)]
      As i consider that Kontakt is outdated i am trying to redevelop my new instrument (Balkan Drummer) using Hise (i know that it's very difficult because it is a huge instrument with a ton of features...but i will give it a try!)

      At this moment i try to achieve a full Hihat choke senario where every Hihat articulation should be able to be choked by any other Hihat articulation (even by itself)...As it happens in the real world!

      Searching in the forum i found some posts and adapted to my situation the code that @Christoph-Hart used for this!

      Well...it makes the job but only for more simple situations (closed hihat, pedal hihat, open hihat).
      In my case i use 8 articulations for hihat (hihat pedal, hihat tight, hihat closed, hihat loose, hihat open1, hihat open2, hihat opening, hihat footsplash)...and till now i did not find any way to achieve this.

      Has anyone achieved this?(every Hihat articulation should be able to be choked by any Hihat articulation. Can it be achieved with Hise?

      If anyone wants to try/help here is a simple version of my test project Hihat Test

      I used one sample for every articulation just for simplicity and i managed to have it working for some of the articulations but not for all of them at the same time.

      I post also the snippet here :

      HiseSnippet 2853.3oc6b0saaibElxNLarR7lMs6k8hA4lUFHqCkr9wpAAwxVxwtwNRPRqaKJJBnIGIMHTbDHGYGsYCPQunnON8QHuC8EnOB6aP6YlgRbnrbLkqjWuITHvPy4L+7wy4Lm4LelwM7nVXeepmVp0ZOZ.VK0CzaMxk0audlDWsCqxEb.omIC0F6yz1cz.SeersVpTq9RdORs1czDe94WrqoioqENTjl1IThE9HReBKTZicdEwwYeSabaRekdmemCsnt6QcnCAzr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G5xA4795Bw+K8RB+PI7CkvOzWrutP7T.IzCkPOTB8PIzC8YzqKDOsVB6PIrCkvNTB6P+x85BwyBEkbn8pebiaKutPJnSRMzb.tk9qKjB3jDCMGfao+5BME3xMGfa4+5BME33jBMGvao+5Bo.OIkPyA3V5utPJfSRHT7A2x+0ERAbpzAcoP7lHG8MwZz2zxi9FK4e+rD+s0THALatB60Z5GyaixpI9KCF25ZrogVehM4MVVbev2CmgM6wj6ZLlstFiI+0XLEtFio30XLktFiY6O4X3zwTYHi1WVFJH.NfQbzcpZSN5dUs+GfSfQet
      

      Maybe it is not as complicated but for me that i am new to this Hise platform it is...
      Any help would be much appreciated!
      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        I've done this with my drum instrument. Lemme see if I can dig up some helpful code.

        Dan Korneff - Producer / Mixer / Audio Nerd

        DimitrisSPD 1 Reply Last reply Reply Quote 1
        • DimitrisSPD
          DimitrisSP @Dan Korneff
          last edited by

          @dustbro Thanks a lot!

          1 Reply Last reply Reply Quote 0
          • DimitrisSPD
            DimitrisSP
            last edited by

            Deadly Silence here...

            It should make me think that the guys of this forum are kind of snobs (but for sure it's not the case because i have read a lot of other posts where everyone was ready to help and to give directions in many normal and even in strange situations/questions).👏

            It looks like this forum is not a great place for Drumming Instruments.(Maybe great for Synths, Oscilators, Fx, Legato Stuff etc but definitely not for Acoustic Drums)
            I hope i am wrong!

            Anyway problem solved changing some parts of the script and now Hihat works as expected on a full choke senario...
            There is no need to have the samples in Sampler Settings to Playback(Normal)...The code works perfect with the ''One Shot'' setting and instead of

            Synth.noteOffByEventId(int eventId)
            

            i used

            Synth.addVolumeFade(eventId, 300, -100)
            

            which is what exactly happens in the real world (There is never an instant stop of any sound even if it's choked)...so i used a decay of 300ms...of course anyone can play around and find his sweet spot according to his ears/taste.

            I used a Container for the Samplers of the different Hihat mics and opened a Script Processor in the container to insert the code.

            In "onInit"

            // Use const var for constants for improved performance.
            const var HihatClose = 42;
            const var HihatPedal = 44;
            const var HihatOpen1 = 46;
            const var HihatOpen2 = 49;
            const var HihatOpening = 50;
            const var HihatLoose = 51;
            const var HihatTight = 52;
            const var HihatFootSplash = 74;
            
            const var HihatArt = [HihatPedal, HihatTight, HihatClose, HihatLoose, 
            HihatOpen1, HihatOpen2, HihatOpening, HihatFootSplash];
            
            //  An Array is also a constant, even if it will be populated later on
            const var evtList = [];
            
            // make sure it has enough storage to avoid allocation during the noteOn callback
            evtList.reserve(64);
            

            In "onNoteOn"

            function onNoteOn()
            {
                for (i = 0; i < 8; i++)
                    
                if(Message.getNoteNumber() == HihatArt[i])
                {
                    // Always use the for ... in loop if you don't need the index
                    for(eventId in evtList)
                    {
                        // Send the note off command for the given event id            
                        Synth.addVolumeFade(eventId, 300, -100);            
                    }
                    
                    // Clear all notes
                    evtList.clear();
                    
                    // This is necessary because you will kill the note artificially and HISE
                    // can only kill artifical notes for stability reasons
                    Message.makeArtificial();            
                        
                    // Add this ID to the list (it'll add the artificial event ID)
                    evtList.push(Message.getEventId());
                }
                
                    
                if(Message.getNoteNumber() != HihatPedal & Message.getNoteNumber() != HihatTight 
                & Message.getNoteNumber() != HihatClose & Message.getNoteNumber() != HihatLoose 
                & Message.getNoteNumber() != HihatOpen1 & Message.getNoteNumber() != HihatOpen2 
                & Message.getNoteNumber() != HihatOpening & Message.getNoteNumber() != HihatFootSplash)
                {
                  Message.ignoreEvent(true);
                }
             
            }
            

            And the snippet is here:

            HiseSnippet 2926.3oc6b0sbabaEdoj2XKZq331bYu.MWzPMggdIE+QptdrnDorTijIGRF01ISFOq1EjDiWtfytfRlwimoSupON4QvuC8EnOB4pda6A.K4BRQYsTkTVwd43wl.mC.9v4b1CN3SqUcOpE12m5okXsVC6i0R7.8lCcYc2qqIwU6vJ7NNfz0jgZg8YZ6NruouO1VKQhUeNWiDqcGMwme4Y6Z5X5ZgC6RS6DJwBeDoGgE1a8c9Nhiy9l13VjdJZmemCsnt6QcnC.zrptgVeSqWY1A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PyC7VXzBEU3kadf2hiXnRQDdblglG.tvnFJJ1OI2PyC7VXjCEE3IYGZNf2hidnmDA3oxOzkCx480Eh+qLmX9gh4GJlenOYecg3o.hoGJldnX5ghoG5inWWHdZsX1ghYGJlcnX1g9v85BwyBMI4P6U6352VdcgTPmjZn4.bK8WWHEvIIFZN.2R+0EZJvkaN.2x+0EZJvwIEZNf2R+0ERAdRJglCvszecgT.mjPnnCtk+qKjB3ToC5Rg3MQN5ah0nmokG8kVxekZI9kTpnGvr4JrWqoeLuMJql3WVXbqqQFCsdDaxKsr39fuENCa1iI20XLadMFS9qwXJbMFSwqwXJcMFyVu2wvoio7.FsmrLTnC3.FwQ2IpN9n6U09e5yvK9B
            

            I hope it will be helpfull to some of you!☺

            1 Reply Last reply Reply Quote 1
            • Y
              yall
              last edited by

              @DimitrisSP I avaia do something a bit like that by putting several sample on the same note and playing with the velocity. generally on this forum people answer only if they know ... personally I have always had the help I needed and if I can help I am delighted. :)

              DimitrisSPD 1 Reply Last reply Reply Quote 1
              • DimitrisSPD
                DimitrisSP @yall
                last edited by

                Hi my friend @yall ...
                I can understand exactly and it's fair enough!
                Everyone has his priorities and of course his knowledge base and sometimes it is not so easy to help!
                Anyway this problem is solved (For sure i will find a lot more in the near future developing my instrument)!!!
                Thanks a lot for your kind feedback!!!👍

                F clevername27C 2 Replies Last reply Reply Quote 1
                • F
                  Fergler @DimitrisSP
                  last edited by Fergler

                  Adding my code as well for anyone looking to do hihats from GM layout, but support e-kit that uses CC4 to open/close note 46 for tip and note 26 for edge:

                  onInit function and declarations:

                  // Create a midilist with 128 elements
                  const var midiData = Engine.createMidiList();
                  // This count will manage our position in the midilist
                  var count = 0;
                  
                  const TipTranslations = [70, 69, 68, 67, 66];
                  const ShoulderTranslations = [64, 63, 62, 61, 60];
                  
                  function getTranslatedNote(input, cc4Value) {
                      var translatedNote = input;  
                  
                      var translation = (input == 46) ? TipTranslations : (input == 26) ? ShoulderTranslations : null;
                  
                      if (translation != null) {
                          for (i = 0; i < cc4Ranges.length; i++) {
                              if (cc4Value >= cc4Ranges[i][0] && cc4Value <= cc4Ranges[i][1]) {
                                  translatedNote = translation[i];
                                  break;
                              }
                          }
                      }
                  
                      return translatedNote;
                  }
                  
                  function onNoteOn()
                  {
                      var input = Message.getNoteNumber();
                      var id = Message.getEventId();
                      var weight;
                      
                      // Get the translated note number
                      var newMsg = getTranslatedNote(input, cc4Value);
                      
                      // Send the modified note
                      Message.setNoteNumber(newMsg);
                      
                      // Check if the note number is within the specified range or matches specific values
                      if ((newMsg >= 60 && newMsg <= 70) || newMsg == 44 || newMsg == 73 || newMsg == 42)
                      {
                          // Assign weights based on note number
                          switch(newMsg) {
                              case 70:
                              case 64:
                                  weight = 5;
                                  break;
                              case 69:
                              case 63:
                                  weight = 4;
                                  break;
                              case 68:
                              case 62:
                                  weight = 3;
                                  break;
                              case 67:
                              case 61:
                                  weight = 2;
                                  break;
                              case 60:
                              case 66:
                                  weight = 1;
                                  break;
                              case 44:
                              case 73:
                                  weight = 1;
                                  break;
                              default:
                                  weight = 1;
                          }
                  
                          // Calculate the indices for the midilist
                          var index1 = count * 2;
                          var index2 = index1 + 1;
                  
                          // Store event ID and weight in the midilist
                          midiData.setValue(index1, id);
                          midiData.setValue(index2, weight);
                  
                          // Increment and reset count as necessary
                          count = (count + 1) % 64;
                  
                          // Loop through midilist weights
                          for (var i = 1; i < 128; i += 2)
                          {
                              var storedWeight = midiData.getValue(i);
                              if (storedWeight > weight)  // Checking weights at odd indices
                              {
                                  var storedId = midiData.getValue(i - 1);  // Retrieve the event ID from the previous index
                                  Synth.addVolumeFade(storedId, 150, -60);  // 150 ms fade to -60 dB
                                  //Console.print("Killed notes: " + storedId);
                  
                                  // Set weight to 0 to mark as "killed" and skip in future checks
                                  midiData.setValue(i, 0);
                              }
                          }
                      }
                  }
                  
                  
                  
                  function onController()
                  {
                      var number = Message.getControllerNumber();
                      var value = Message.getControllerValue();
                      
                      if (number == 4) 
                      {
                          cc4Value = value;
                      }
                  }
                  

                  This could be improved to change the fade time/amount depending on the weight difference (which I probably will to control open > less open vs open to full closed, and to generate new transition sounds (hihat rattling) when closing the pedal after a recent open hit.

                  1 Reply Last reply Reply Quote 2
                  • clevername27C
                    clevername27 @DimitrisSP
                    last edited by clevername27

                    @DimitrisSP I understand your frustration, but a question to ask yourself might be, "Why should anyone answer my question?" If you find your questions are not being answered, consider contributing in some way to the forum. When people see that, they'll be more likely to volunteer their time to help you. A good place to start is marking your question as "solved" when it has been been. 🌈

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

                      @clevername27 said in Hihat Full Choke Senario? Is That Possible in Hise??? Finaly Yes!:

                      When people see that, they'll be more likely to volunteer their time to help you

                      I don't think that's how it works. If we have an answer we'll give it, it doesn't matter if it's a new forum member (in fact they have the most questions and the last answers).

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

                      clevername27C 1 Reply Last reply Reply Quote 1
                      • clevername27C
                        clevername27 @d.healey
                        last edited by

                        @d-healey I have never met anyone on a forum who is more generous with their time than you.

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

                        50

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.0k

                        Posts