uiSlider Invert Modulator Value From MIDI Value

Home Forums General Using Ctrlr uiSlider Invert Modulator Value From MIDI Value

Viewing 20 posts - 1 through 20 (of 25 total)
  • Author
    Posts
  • #12173
    lfo2vco
    Participant
      • Topics: 26
      • Replies: 162
      • Total: 188
      • ★★

      I have a uiSlider Modulator that sends a 0-127 control, this works fine. However the MIDI message it receives seems to be completely inverted, this sends the dial to the exact opposite position to where it should be.

      What would be the best way to correct this, something to do with ‘midiValue’ maybe?

      Here is some noise I organised into an acceptable format:
      https://soundcloud.com/lfo2vco/a-dark-crystal

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

        Can you tell me exactly what gets received, paste the data from the MIDI Monitor for 0,32,64,127 values.

        #12195
        Hecticcc
        Participant
          • Topics: 25
          • Replies: 160
          • Total: 185
          • ★★

          I use this for converting to opposite values, works with decimals & hex as input.

          function invertNumber(input)
          
          local range = 127
          local output = range + (input*-1)
          
          return (output)
          end

          Then just call it whenever you need it somewhere.

          #12241
          lfo2vco
          Participant
            • Topics: 26
            • Replies: 162
            • Total: 188
            • ★★

            Hi Atom, as requested the data from the MIDI monitor is

            7f,5f,3f,00

            So the 3P is definitely sending inverted data for this byte.

            Here is some noise I organised into an acceptable format:
            https://soundcloud.com/lfo2vco/a-dark-crystal

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

              Then in the reverse expression just do 127 – midiValue, you’ll get the reverse values, but i don’t understand how it goes in a normal fashin in the direction of the synth and just the synth replies in an inverted form.

              #12244
              lfo2vco
              Participant
                • Topics: 26
                • Replies: 162
                • Total: 188
                • ★★

                I put “midiValue – 127” in the reverse expression, but still the problem persists.

                Here is some noise I organised into an acceptable format:
                https://soundcloud.com/lfo2vco/a-dark-crystal

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

                  not midiValue – 127 (assuming that the synth sends 23, then the expression will be 23 – 127 = -104)

                  you want the expression to evaluate to a set of values your modulator has, so it’s 127 – modulator value, when the synth send 127 the expression will be 0, when it send 27 the expression will be 100 and so on.

                  you need to find the expression that suits your needs.

                  #12247
                  lfo2vco
                  Participant
                    • Topics: 26
                    • Replies: 162
                    • Total: 188
                    • ★★

                    Syntax and stuff has got the better of me again. I didn’t realise you could put the – in front of the value (because all the examples I’d seen had it behind). But I now understand a little more of the maths the expression is performing.

                    I have tried 127 – modulatorValue, 127 – midiValue, swapped them around, doubled them, halved them… nothing seems to work.

                    I also gave Hecticcc’s method a go… no luck

                    It makes absolutely no sense.

                    Here is some noise I organised into an acceptable format:
                    https://soundcloud.com/lfo2vco/a-dark-crystal

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

                      Can you send/attach the panel and paste a dump of the data, when twisting the knob from 0 to max. I’ll see what i can do.

                      #12251
                      lfo2vco
                      Participant
                        • Topics: 26
                        • Replies: 162
                        • Total: 188
                        • ★★

                        Files attached as requested, I appreciate your time and effort Atom.

                        Attachments:
                        You must be logged in to view attached files.

                        Here is some noise I organised into an acceptable format:
                        https://soundcloud.com/lfo2vco/a-dark-crystal

                        #12268
                        Hecticcc
                        Participant
                          • Topics: 25
                          • Replies: 160
                          • Total: 185
                          • ★★

                          The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.

                          You will need to figure out a formula for it or make a script that translates these values.

                          #12270
                          lfo2vco
                          Participant
                            • Topics: 26
                            • Replies: 162
                            • Total: 188
                            • ★★

                            The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.

                            You will need to figure out a formula for it or make a script that translates these values.

                            The values are me twisting the knob as Atom requested. Just like the avatar to the left : )

                            Here is some noise I organised into an acceptable format:
                            https://soundcloud.com/lfo2vco/a-dark-crystal

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

                              That’s not an issue i think, a bigger issue is a bug i found yesterday about 2am and i had to delete the nightly build. I’ll try to fix it today and update then.

                              #12281
                              Hecticcc
                              Participant
                                • Topics: 25
                                • Replies: 160
                                • Total: 185
                                • ★★

                                The values your device sends are not linear. It sends 1,3,4,6,8… instead of incrementing by 1.

                                You will need to figure out a formula for it or make a script that translates these values.

                                The values are me twisting the knob as Atom requested. Just like the avatar to the left : )

                                Lol, self-facepalm time 😀

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

                                  As far as i can tell you don’t need to do anything, i need to fix my bug and the default expression will work, there is no additional logic needed here. Just give me some time to fix my side.

                                  #12290
                                  lfo2vco
                                  Participant
                                    • Topics: 26
                                    • Replies: 162
                                    • Total: 188
                                    • ★★

                                    As far as i can tell you don’t need to do anything, i need to fix my bug and the default expression will work, there is no additional logic needed here. Just give me some time to fix my side.

                                    Cool, I look forward to giving the new version a go. I’m being dragged away from my synths and computer (kicking & screaming) for a long weekend. I’ll touch base a soon as I get back. Many thanks.

                                    Here is some noise I organised into an acceptable format:
                                    https://soundcloud.com/lfo2vco/a-dark-crystal

                                    #12681
                                    lfo2vco
                                    Participant
                                      • Topics: 26
                                      • Replies: 162
                                      • Total: 188
                                      • ★★

                                      Hi Atom, I downloaded the latest nightly build (Ctrlr_1539.dmg) for Mac OSX and still the inverted modulator persists. Did you have time to try a fix this time around?

                                      I understand you have a life outside Ctrlr, so I’m not hassling you regarding this. Cheers.

                                      Here is some noise I organised into an acceptable format:
                                      https://soundcloud.com/lfo2vco/a-dark-crystal

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

                                        I haven’t forgot, i found some bugs i generated myself in the latest nightly, i’ll try to fix what i can and post a build in a few hours.

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

                                          One thing i noticed you can’t (shouldnt) use

                                          127 - modulatorValue
                                          

                                          in the reverse expression, at least not in your case you should use

                                          127 - midiValue
                                          

                                          at the moment of receiving the MIDI message your modulator value can be anything, you are setting it, so setting the new value based on the OLD value is just not a wise thing to do (unless you know what you are doing)

                                          #12690
                                          lfo2vco
                                          Participant
                                            • Topics: 26
                                            • Replies: 162
                                            • Total: 188
                                            • ★★

                                            Ooops! good spot, corrected many thanks.

                                            Here is some noise I organised into an acceptable format:
                                            https://soundcloud.com/lfo2vco/a-dark-crystal

                                          Viewing 20 posts - 1 through 20 (of 25 total)
                                          • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                                          There is currently 0 users and 65 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