Save with 24 bits

2004-04-20 Thread Infos - Bien Entendu
I am searching for a way to save 24 bits values on an AIFF file
i thought that keeping the 3 first bytes of an I32 should make it 
but it didn't work
could anyone give me some clue ?

thanks in advance
--
Pascal Luquet
Bien Entendu
eMail : [EMAIL PROTECTED]
www.BienEntendu.fr




Re: Save with 24 bits

2004-04-20 Thread Infos - Bien Entendu
Despite the name of your company, your question wasn't well understood. :)
i should be specialized in intelligibility ... I have to apply my advices
to myself :)

But, are you sure you have the lowest 3 bytes? LV stores data in Hi/Low
format for words and bytes in memory. You need the last 3 bytes.
i don't think that keeping the lowest bytes would preserve the sign bit
so i normalized my datas to a 32 bits value and keep the 3 highest bytes
(i save on an AIFF file so don't have to swap bytes)

just to be sure i tried to keep the lowest and had a similar result

i think that my error comes from elsewhere
so the diagram is :
- wire my i32 array on a for loop
- typecast each number to text
- take the 3 first character
- go outside the loop and write to file the array

something should be wrong in it :((
--
Pascal Luquet
Bien Entendu
eMail : [EMAIL PROTECTED]
www.BienEntendu.fr




Re: Save with 24 bits

2004-04-20 Thread Infos - Bien Entendu
thanks for the answers
i tried to split the bytes with the split number function (and just
taking the 3 first one)
and it worked !
i don't know why i couldn't make it with concatenating bytes after a text
conversion
which should be equivalent ???

anyway it works !
--
Pascal Luquet
Bien Entendu
eMail : [EMAIL PROTECTED]
www.BienEntendu.fr




Save with 24 bits

2004-03-30 Thread R. Glenn Givens
Pascal
Despite the name of your company, your question wasn't well understood. :)

But, are you sure you have the lowest 3 bytes? LV stores data in Hi/Low
format for words and bytes in memory. You need the last 3 bytes.

R. Glenn Givens P.Eng.
Innovention Industries Inc.
Burlington, ON, Canada
www.innovin.com
--

Subject: Save with 24 bits
From: Infos - Bien Entendu [EMAIL PROTECTED]
Date: Fri, 26 Mar 2004 00:06:37 +0100

I am searching for a way to save 24 bits values on an AIFF file
i thought that keeping the 3 first bytes of an I32 should make it
but it didn't work
could anyone give me some clue ?





Re: Save with 24 bits

2004-03-30 Thread Rolf Kalbermatter
Infos - Bien Entendu [EMAIL PROTECTED]

I am searching for a way to save 24 bits values on an AIFF file
i thought that keeping the 3 first bytes of an I32 should make it 
but it didn't work
could anyone give me some clue ?

Since LabVIEW streams data always in big endian format (flatten
to string, typecast or stream to disk) you will probably have to
actually keep the last 3 bytes instead of the first 3.

Rolf Kalbermatter
CIT Engineering Nederland BVtel: +31 (070) 415 9190
Treubstraat 7H  fax: +31 (070) 415 9191
2288 EG Rijswijkhttp://www.citengineering.com
Netherlands mailto:[EMAIL PROTECTED]
 




Re: Save with 24 bits

2004-03-30 Thread Rolf Kalbermatter
Infos - Bien Entendu [EMAIL PROTECTED] wrote:

i tried to split the bytes with the split number function (and just
taking the 3 first one) and it worked !
i don't know why i couldn't make it with concatenating bytes after a text
conversion which should be equivalent ???

No, it isn't! LabVIEWs flattened (typecast is also flattened) stream format
is ALWAYS in big endian (aka most significant byte first). So just take the
last three bytes instead of the first three of a four byte flattened I32
and make sure you append the bytes right.

Just because Intel x86 uses little endian does not mean that is the right
thing to do and LabVIEW as a multiplattform system had to standardize on
something and they choose for the standard of almost all other CPUs including
the one LabVIEW originated from and this is also the prefered network byte
ordering for binary internet protocols.

By the way I believe the Flatten Pixmap.vi, a subVI of Draw Unflattened Pixmap.vi
in LabbVIEW 7 does more or less just what you need.

Rolf Kalbermatter
CIT Engineering Nederland BVtel: +31 (070) 415 9190
Treubstraat 7H  fax: +31 (070) 415 9191
2288 EG Rijswijkhttp://www.citengineering.com
Netherlands mailto:[EMAIL PROTECTED]