HISE Logo Forum
    • Categories
    • Register
    • Login

    Force recompiling of a Midi processor script

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 243 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

      I have a script that makes the sampler ignore incoming notes not present in the sampler.

      However, if the sampler is empty and I load a sample map, the Ignore Notes script does not recognize the change and, therefore, blocks all incoming notes.

      I added MidiProcessor.exportState() to run onInit and MidiProcessor.restoreState() on sample map loading, and that has mixed results. Sometimes it works, sometimes it doesn't.

      Is this the only way to do this or is there another way to recompile those MIDI scripts when a button is pressed?

      Goran Rista
      https://gorangrooves.com

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

      ulrikU d.healeyD 3 Replies Last reply Reply Quote 0
      • ulrikU
        ulrik @gorangrooves
        last edited by

        @gorangrooves so your script check what keys in the sampler have a loaded sample?
        is it not possible to run the script again as soon as you have loaded a new sample map?

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

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

          @gorangrooves Add a panel and use the preloading callback.

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

          1 Reply Last reply Reply Quote 0
          • ulrikU
            ulrik @gorangrooves
            last edited by ulrik

            @gorangrooves this seems work, however I had to create a timer and set it to 500ms, it seems the function to load a sample map needs to finish before I iterated over the mapped samples with

            Sampler1.isNoteNumberMapped(i)
            

            I tried with lower timer values but it made Hise unstable, I guess the iteration disturbed the loading of the sample map.

            I tried it with 3 different maps, where one was empty, and it seems to work

            HiseSnippet 1599.3oc6Xs0aaaCElJNpqRqqqsqOrWFffeRAMH0t2A5FlqcRJBZbhQbZwF1kBFIZa1HQJPQkFug9eZuuW1em819GrcHkj0E6jkDzKCayOoygmCOemCIO7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KqpmfGGOBRG8bEWN8GjHFqpUEZ1ibDQDWU2NIgvZOiQBTc+LL.UOOlnVqod8wvMHGW1ZcTZsOVudCbqzxsqIemZx2sl78pIe+ZxOnl7CKjm0QRsyvT0AYtN3ezYqCNLGCvPVWxxtzwyl+TMk2COqRqQSI9iKfI1k9.PNr0aIxgmN68bJh8aXlR.adtDkXfg886lHkb1br9.6.dV.Qx1stf7+DjwNU3a9c+vLVgRPbC1XfY1ZdPKEo9vtX2CdEzoycwz1lGemJ2M5HG2LIKPzpD6Ju.BVnhhkkbsXIVHSYmjRY1xBl2Xd.YsHAE3UkNIf92jx8ZNXrXhVmHbUYmMvRTphosT4sN7y7MOmSYKMhKbboP4p0icnNeoS667H3iacqrzRklynoRiULz1QSjJMztzU.Cqj8QIwS.05DB3qVMYapQkZ4yRNgBrTABIYT2.pmZneBTEU6MXpsV8gcpvq6T6KJPiaJ4XEZKuP.UD3TVrKisRV9TENf9zB++SCMkG3Uy5HjdnUyB7llyuU6cASzkOeHPylTE6opOrQn2ibGe6zD1JGiCopyWavNB3a.ZTX7FPMZDNIPlqsJ2m9bFOZBmQ8pd6Nba83wDQYruvDBdYHzInPyM6rGAZZEWrjt8u1YanAIVTkzx4pVb9+2JV350malBWG0gKm+cv4uw+447eZktqlw32Yn5xy+guNeESMGUG0SJ9PA083IR3oB4z0MgKEGBuiwiTlY+RpV+oxsxadNjv70B+I7Kav14OCPMX67AQd4SEjaYeq63azfvTDh0OkM.dfQP4szwvqkTPBnt+dAkgXOA+kdoWqov5k0Z.Txz+cvVl8UxNsqeEFBEBrveomW0oZNGuyE0w6dQc7dWTGu+E0wGbQc7gWTGezeuipGI8jDIOLsYJB0evFoa.M1X1FvFn+BYv1N+
            

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

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

              @ulrik @d-healey Thank you. I'll be testing it out tomorrow and report back.

              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

              31

              Online

              1.8k

              Users

              12.1k

              Topics

              105.7k

              Posts