Creating an Off/On button which receives value 0/127

Home Forums General Using Ctrlr Creating an Off/On button which receives value 0/127

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #282
    minimalist
    Participant
      • Topics: 10
      • Replies: 141
      • Total: 151
      • ★★

      Since a long time this issue really drives me a bit crazy – I’ve tried out a lot but can’t help myself… Some facts: The synth I’m using is sending for an Off/On message the values 0 (=Off) and 127 (=On). Now I like to create a button in Ctrlr for this Off/On message. I took an uiImageButton with 2 frames (1=Off, 2=On) and the "Max modulator value" is set to value "2". Now when I’m using this button in Ctrlr everything is working nicely (the synth is controlled as I wish). But if I use the button directly on the synth to send the message to Ctrlr… the confusion begins:

      – if max value is "2": I notice that Ctrlr receives the "on message" but it’s send directly to Ctrlr’s MIDI out again. The result: The synth’s button is set to off again (though I wanted to send an ON message)
      – if max value is "127": there is no "MIDI loop" anymore and it works… except that frame 2 (the "on frame") isn’t displayed in Ctrlr (seems logical, because Ctrlr expects a picture for value 127)
      – if max value is 127 and midiValue is "-126": both frames of Ctrlr’s button are displayed correctly, but there is this MIDI loop appearing again

      I really tried everything I can imagine, but never got an acceptable result. My other synth sends value 0/1 for an Off/On message and there are completely no problems. Does anyone has a suggestion which settings I have to use (I assume that It’s a weird idea to take a filmstrip with 127 frames <img decoding=” title=”Wink” /> )?

      #2268
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        have you tried the toggle button and setting the true and false values for it ?

        #2269
        minimalist
        Participant
          • Topics: 10
          • Replies: 141
          • Total: 151
          • ★★

          What do you mean with "true & false values"? If you mean max value, midiValue, ect..: Yes I did. The ImageButton was just an example. The same thing happens with ToggleButton (then the check mark isn’t displayed when receiving an on message with value 127), same with uiCombo (then an on message causes "(no selection)"), uiButton (then an on message causes an empty (no name) button. I think the problem I have is generally, because Ctrlr expects for an on state just value "1" to display it correctly(?) That’s why I asked myself if there is a paticular setting for the case when the synth sends an on message with value 127, instead of 1.

          #2270
          atom
          Keymaster
            • Topics: 159
            • Replies: 2945
            • Total: 3104
            • ★★★★★

            no i mean, when you ad a uiToggleButton there are to options for it "Value for ON state" and "Value for OFF state"

            #2271
            minimalist
            Participant
              • Topics: 10
              • Replies: 141
              • Total: 151
              • ★★

              Oh, I never saw this option (actually I never used a ToggleButton)… YES, it works perfectly. <img decoding=” title=”Smile” /> I’ve set Max value to: 127, value for OFF state: 0 and value for ON state to: 127. This works really great! Is it possible to have this true and false values for an ImageButton, too?

              #2272
              atom
              Keymaster
                • Topics: 159
                • Replies: 2945
                • Total: 3104
                • ★★★★★

                i’ll try to merge that to the other buttons.

                #2273
                minimalist
                Participant
                  • Topics: 10
                  • Replies: 141
                  • Total: 151
                  • ★★

                  I recognised that you implemented this "true & false values" for an ImageButton – thanks for this! But it seems to be very buggy, though a normal ToggleButton works great.
                  I can see in the MIDI monitor that if I set "Value for ON state" to "127" – then I control the synth with Ctrlr… Ctrlr always send the same value (1). It doesn’t toggle at all. I recognise that the MIDI message is sent 2-3 times by Ctrlr, though I only pressed the button once.

                  #2274
                  atom
                  Keymaster
                    • Topics: 159
                    • Replies: 2945
                    • Total: 3104
                    • ★★★★★

                    i’ll do my best with this, all i can say is that the ToggleButton implementation is JUCE native that’s why it works and that’s why it was there, the other components use some logic i cooked up quickly and i agree it might be buggy, but i’ll focus on that.

                    #2275
                    minimalist
                    Participant
                      • Topics: 10
                      • Replies: 141
                      • Total: 151
                      • ★★

                      If this costs too much time for you atm – no problem if this issue will stay for some time, because there is an alternative: just take the standard uiToggleButton. I think the other bugs which making Ctrlr "useless" (at least on Mac) should have priority!?

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                    There is currently 0 users and 110 guests online
                    No users are currently active
                    Forum Statistics
                    Threads: 2,495, Posts: 17,374, Members: 77,605
                    Most users ever online was 12 on January 22, 2019 3:47 pm
                    Ctrlr