Forum

    • Register
    • Login
    • Search
    • Categories

    Set combobox value from played midi note

    General Questions
    2
    5
    28
    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.
    • gorangrooves
      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.healey 1 Reply Last reply Reply Quote 0
      • d.healey
        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

        gorangrooves 1 Reply Last reply Reply Quote 0
        • gorangrooves
          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.healey 1 Reply Last reply Reply Quote 0
          • d.healey
            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

            gorangrooves 1 Reply Last reply Reply Quote 0
            • gorangrooves
              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

              4
              Online

              977
              Users

              6.6k
              Topics

              60.6k
              Posts