CC value 1-127 value display as 50-300

Home Forums General Using Ctrlr CC value 1-127 value display as 50-300

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #29
    msepsis
    Participant
      • Topics: 219
      • Replies: 732
      • Total: 951
      • ★★★

      The synth I’m working on has an arp tempo knob, it sends cc values 0-127. 0 sets the clock to external sync while CC 1-125 changes the tempo from 50-300..

      The jist of what I’m asking is how could I set the value of a uiSlider to display the actual CC value*2?

      Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

      #839
      nozoku
      Participant
        • Topics: 5
        • Replies: 23
        • Total: 28

        it’s problematic – if you set:
        modulatorMin=50
        modulatorMax=300
        and modulatorValue to modulatorValue/2-24
        then you have knob50=cc1 and knob300=cc126 (the min value is ok)

        if you use modulatorValue/2-25 you have knob50=cc0 and knob300=cc125 (the max value is ok)

        so it’s impossible to map 50-300 into 1-125 that way… 50-298 maps into 1-127 when you use modulatorValue/2-24

        and I don’t know how Ctrlr handles fractions – knob299=cc125,5…

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

          i think that (modulatorValue/1.98)-24 will work, fractions are ok all the math stuff is there.

          #836
          nozoku
          Participant
            • Topics: 5
            • Replies: 23
            • Total: 28

            but how the value is sent then as a CC value (or in sysex)? as a fractional number? or as a integer?

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

              noo, it’s always an integer, the fractions will just help you get the result, it’s the result that’s sent, and the result is always rounded.

              #838
              dnigrin
              Participant
                • Topics: 9
                • Replies: 57
                • Total: 66

                Is it rounded or just truncated? For example would 5.9 become 6, or 5?

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

                  it’s definetly rounded, it can give different results on different compilers though so MAC and Windows might be different, but MAC and Linux should be the same (both use gcc)

                  #834
                  msepsis
                  Participant
                    • Topics: 219
                    • Replies: 732
                    • Total: 951
                    • ★★★

                    Thanks atom and dnigrin – great info and very helpful discussion.

                    Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

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