[Tutor] Associate decimal values with an integer range

Alan Gauld alan.gauld at btinternet.com
Mon Apr 29 18:16:58 CEST 2013


On 29/04/13 15:28, sparkle Plenty wrote:
> Hi, I need some hints on where to start solving this problem.
> I have to interpret a one-byte floating point number

I'm curious, what does a one byte floating point number look like?
I've never come across such a beast, the smallest FP representation I've 
come across is 16 bits or two bytes. But that wasn't in
Python...

> a value such as 0.8367 from a fader control, and my Python is
> interpreting it as either a 0 or 1.

It would help if we could see your python, otherwise we
have to guess...

> for numbers from 0 to 255 within my one byte
> ...and the value will be sent from gui to amp and back as
 > a packed one-byte number.

What does 'packed' mean in this context?
Are you using the struct module or something else or are you meaning 
that you will somehow apply a compression technique? If so, what?

A bit confused...

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list