Get programData value to string

Home Forums General Programming Get programData value to string

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #633
    Cramp
    Participant
      • Topics: 11
      • Replies: 66
      • Total: 77

      good day to all of you,

      working on SysEx dump load into panel.
      And searching for byte values.
      the issue I faced is that I want to get the HEX value of the byte which I’m assigning to modulator
      I’m able to display the result of
      [code:3puyzzjk]console(programData:HexToString(1))[/code:3puyzzjk]
      But I wonder is there anyway to display string value of [code:3puyzzjk]programData:getByte(Value)[/code:3puyzzjk] to console?

      many thanks

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

        you need to format that, this is a integer (example 13th byte)
        [code:1x30goye]
        b = data:getByte(13)
        console (string.format ("decimal=%d hex=%x", b, b))
        [/code:1x30goye]

        #4483
        Cramp
        Participant
          • Topics: 11
          • Replies: 66
          • Total: 77
          "atom":3qgf4vij wrote:
          you need to format that, this is a integer (example 13th byte)
          [code:3qgf4vij]
          b = data:getByte(13)
          console (string.format ("decimal=%d hex=%x", b, b))
          [/code:3qgf4vij][/quote:3qgf4vij]

          Thanks Roman!

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