Another episode of help me translate the manual —

Home Forums General Programming Another episode of help me translate the manual —

Viewing 2 posts - 21 through 22 (of 22 total)
  • Author
    Posts
  • #7268
    atom
    Keymaster
      • Topics: 159
      • Replies: 2945
      • Total: 3104
      • ★★★★★

      I’m not a good teacher, here is an example to better explain i think, replace portamentoSpeed and portamentoSwitch with whatever values you like, and observe the output on the console:

      portamentoSpeed = 99;
      portamentoSwitch = 0;
      
      bi = BigInteger(portamentoSpeed)
      bi:setBitRangeAsInt (7, 1, portamentoSwitch)
      ls = bi:getBitRangeAsInt(0,7)
      ms = bi:getBitRangeAsInt(7,7)
      
      hex = string.format ("F0 40 00 10 00 01 03 %.2x %.2x F7", ms, ls)
      console ("Binary value: "..bi:toString(2,8))
      console ("SysEx string: "..hex)
      
      #7276
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        Also if you want to use expressions (and in this case you could), I wrote the always missing documentation  for expressions here: http://ctrlr.org/expressions-in-ctrlr

      Viewing 2 posts - 21 through 22 (of 22 total)
      • The forum ‘Programming’ is closed to new topics and replies.
      There is currently 0 users and 84 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