HISE Logo Forum
    • Categories
    • Register
    • Login

    Set combobox value from played midi note

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

      Hey guys,
      I am trying to set up "learn note" system for my drum mapping.
      The idea is that when a button is pressed and a note played, a relevant combobox is then set to this note (value). Combobox consenquately should change the mapping, as if I was doing it manually with a mouse.

      This is what I have onNoteOn

      if (ButtonLearnNote1.getValue() == 1)
          {
      	   noteTriggers[2] = Message.getNoteNumber(); // currently this changes the mapping backend, but doesn't update combobox
      	   ButtonLearnNote1.setValue(0); // turns off the learn button
      	   ComboBoxKickMidi.setValue(Message.getNoteNumber()); // supposed to set the combobox, but it doesn't work
          }
      

      I get an error on the combobox line.

      Unknown function 'setValue'
      

      How is it an "unknown function" if it works in the preceding line? The function exists in the API. What is going on here and how do I get it to change the value of the combobox?

      Thank you.

      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 d.healey

        @gorangrooves You have two calls to setValue(), which is giving the error?

        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 The one that sets the value for the combobox, the last line.

          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 Are you sure the variable name is correct?

            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 Yes. Ok. I got it.

              It has the correct name, but while it had a callback on the main interface onInit, it didn't have the variable definition. So, it worked manually selecting notes, but not with this script.

              Thank you, Dave. I crossed this bridge :)

              Goran Rista
              https://gorangrooves.com

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

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

              50

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts