|
From: robs <aq...@ya...> - 2010-03-10 07:49:57
|
Hmm, I've now tried it and it does seem to work here:
Create a signed 24-bit raw file:
$ sox -r 88200 -n -b 24 -e signed temp.raw synth 40s noise
$ hd temp.raw
00000000 05 b7 cc b5 60 03 ae a3 93 d1 67 e0 38 e9 63 4b |....`.....g.8.cK|
00000010 ee ba ea b0 02 9e d7 b7 fb d6 e8 a8 55 3d b8 0a |............U=..|
00000020 e0 4c 4a da a1 83 48 0f 3a 1b 8b 13 35 bd f7 4f |.LJ...H.:...5..O|
00000030 be 9d 76 04 71 b7 18 3b fd 17 44 f3 27 93 f4 4c |..v.q..;..D.'..L|
00000040 06 1b 52 32 82 bd 63 d7 ef e4 5f ea 7f a7 6d 5f |..R2..c..._...m_|
00000050 81 53 3f 67 6a bb db 21 62 6b dc 91 0e be 97 a0 |.S?gj..!bk......|
00000060 2c ba 69 78 f3 1c 56 f6 67 21 6a 0f 0a 14 86 b0 |,.ix..V.g!j.....|
00000070 40 ff cc 4a 2f e0 93 6d |@..J/..m|
00000078
Convert to 32 bit:
$ sox -r 88200 -e unsigned -b 24 temp.raw -b 32 output.raw
$ hd output.raw
00000000 00 05 b7 cc 00 b5 60 03 00 ae a3 93 00 d1 67 e0 |......`.......g.|
00000010 00 38 e9 63 00 4b ee ba 00 ea b0 02 00 9e d7 b7 |.8.c.K..........|
00000020 00 fb d6 e8 00 a8 55 3d 00 b8 0a e0 00 4c 4a da |......U=.....LJ.|
00000030 00 a1 83 48 00 0f 3a 1b 00 8b 13 35 00 bd f7 4f |...H..:....5...O|
00000040 00 be 9d 76 00 04 71 b7 00 18 3b fd 00 17 44 f3 |...v..q...;...D.|
00000050 00 27 93 f4 00 4c 06 1b 00 52 32 82 00 bd 63 d7 |.'...L...R2...c.|
00000060 00 ef e4 5f 00 ea 7f a7 00 6d 5f 81 00 53 3f 67 |..._.....m_..S?g|
00000070 00 6a bb db 00 21 62 6b 00 dc 91 0e 00 be 97 a0 |.j...!bk........|
00000080 00 2c ba 69 00 78 f3 1c 00 56 f6 67 00 21 6a 0f |.,.i.x...V.g.!j.|
00000090 00 0a 14 86 00 b0 40 ff 00 cc 4a 2f 00 e0 93 6d |......@...J/...m|
000000a0
Lower 8 bits of all 32-bit samples are zero (upper 24 bits unchanged).
----- Original Message ----
> From: TJF <tjf...@we...>
> To: sox...@li...
> Sent: Tue, 9 March, 2010 22:41:48
> Subject: Re: [SoX-users] Creating a special 24 Bit format
>
> Thank you! But both does not work...
>
>
> robs schrieb:
> > Not tried it, but this might work:
> >
> > sox music.wav -e signed -b 24 temp.raw rate 88200
> > sox -e unsigned -b 24 -r 88200 temp.raw -b 32 output_88200_24.raw
> >
> >
> > ----- Original Message ----
> >
> >> From: TJF
> >> To: sox...@li...
> >> Sent: Tue, 9 March, 2010 20:51:31
> >> Subject: [SoX-users] Creating a special 24 Bit format
> >>
> >> Hi,
> >>
> >> has anyone an idea, how to create such a raw-file with sox:
> >>
> >> 24 Bit Raw-File which uses the upper 3 bytes of 32-bit signed integer...?
> >>
> >> I tried things like this (Win), also 32...:
> >> sox.exe music.wav -e signed -b 24 -t .raw output_88200_24.raw rate 88200
|