Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8545527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:48:41+00:00 2026-06-11T12:48:41+00:00

Second day trying to get the character from byte value which was scaled by

  • 0

Second day trying to get the character from byte value which was scaled by 0x40 bytes

I’m trying to get hex value from Logic Pro/Mackie Control.

Logic sends me 0xE, it mean this is ‘n’. If it sends me ‘4e’ it mean I should draw on the display ‘n.’ (simply add dot at the end).

Here is formula for converting char to byte. Please help me made vice versa formula.

char translate_seven_segment( char achar )
{
    achar = toupper( achar );
    if ( achar >= 0x40 && achar <= 0x60 )
        return achar - 0x40;
    else if ( achar >= 0x21 && achar <= 0x3f )
        return achar;
    else
        return 0x00;
}

char s = 'N';
    Byte ad = translate_seven_segment( s ) + ( '.' == '.' ? 0x40 : 0x00 );

I found also following code (this seems without topper()):

def translate_seven_segment( char )                      
    case char                                       
      when 0x40..0x60                                   
        char - 0x40                                     
      when 0x21..0x3f                                    
        char                                         
      else                                        
        0x00                                         
    end                                        
  end   

How I can reverse it ? I know mackie use this code to build hex from char. But I need vise versa, is to get char from hex.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:48:43+00:00Added an answer on June 11, 2026 at 12:48 pm

    OK, I see you added the note about wanting to reverse the sequence. If that’s the case it’s fairly simple:

    BOOL haveDot = (the7Segment & 0x40) != 0;
    char temp = the7Segment & 0xBF;
    char theChar = (temp > 0x21) ? temp : (temp + 0x40);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Referring second answer to question: How to convert from ASCII to Hex and vice
I've been trying to get this working correctly all day, its nearly complete just
Today is my second day of trying to use amazon and i have started
I'm trying the second day to send a midi signal. I'm using following code:
I’m trying to complete the second exercise on IO day 2 in the book
I'm trying out clojure on my second day and I don't understand almost anything
I'm trying to solve the problem of the second day but with no success
I'm entering my second day of web development, so be gentle! I'm trying to
I know I'm a newbie in Rails but this is the second day I'm
the output should process the first date as day and second as night. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.