View Full Version : WAV to BMP & Back
Convert WAV To BMP And Back
On RentaCoder one of the other coders thought I just wanted him to
change the extension from WAV to BMP. Another coder brought up the
complexities of actually converting WAVs to JPGs and back again,
because JPGs are compressed. And someone else asked me how they could
actually convert it. It is easiest if we work with BMPs and WAVs
because if we worked with BMP image files you just have to get into the
binary code of the file, and swap the headers around. So as long as
photoshop thinks the WAV is a BMP file you will be able to see what it
looks like and modify it. But I don't expect a representation that
looks like a graphical wav file. I expect a colorful psychedelic mess.
What I suggest is a simple command line interface that has all the
fields for the headers as boxes for input. The number of colors in the
image, the height and width, etc. And all the fields for the type of
sound on the other. And then the user gets to make a manual switch.
It would be nice if we could do all of this live, and while I was
editing in photoshop it could show me a convenient display of what the
WAV file was intended to look like. But we will need to run
experiments to see how the file size of WAVs and BMPs relate to the
headers, minus the size of the headers (which change depending on the
size of the headers fields).
Here is some data...
100x100 pixels: 29.3 KB (30,056 bytes)
1x1 pixels: 60 bytes (60 bytes)
resulution 72 pixels/inch
Color Moder: RGB 8 Bit
Depth 24 Bit
- saved in photoshop -
The content of the files doesn't matter it is all 1s and 0s, the
headers determine the size. We could do another experiment just like
this with a wav file, and see how the size of the file relates to the
wav files headers.
I would like to be able to blend music in photoshop by mixing layers of
wav files. I can take two recordings of someone singing the same song,
and blend them together in photoshop. An example could be taking a
robot voice that sings a song, and then blending it with my voice while
I am singing. To create a more realistic robot. This is one of the
techniques they are using to make music in holywood. And obviously we
could also take real life images or abstract or and see what they
"sound like".
Geoff
August 24th 06, 03:43 AM
wrote:
> Convert WAV To BMP And Back
>
> On RentaCoder one of the other coders thought I just wanted him to
> change the extension from WAV to BMP. Another coder brought up the
> complexities of actually converting WAVs to JPGs and back again,
> because JPGs are compressed. And someone else asked me how they could
> actually convert it. It is easiest if we work with BMPs and WAVs
> because if we worked with BMP image files
DOCs sound goo, but XLSs are much kinder to the HF especially in repect of
phase coherence.
geoff
RD Jones
August 24th 06, 08:06 AM
wrote:
> Convert WAV To BMP And Back
>
> On RentaCoder one of the other coders thought I just wanted him to
> change the extension from WAV to BMP. Another coder brought up the
> complexities of actually converting WAVs to JPGs and back again,
> because JPGs are compressed. And someone else asked me how they could
> actually convert it. It is easiest if we work with BMPs and WAVs
> because if we worked with BMP image files you just have to get into the
> binary code of the file, and swap the headers around. So as long as
> photoshop thinks the WAV is a BMP file you will be able to see what it
> looks like and modify it. But I don't expect a representation that
> looks like a graphical wav file. I expect a colorful psychedelic mess.
>
> What I suggest is a simple command line interface that has all the
> fields for the headers as boxes for input. The number of colors in the
> image, the height and width, etc. And all the fields for the type of
> sound on the other. And then the user gets to make a manual switch.
>
> It would be nice if we could do all of this live, and while I was
> editing in photoshop it could show me a convenient display of what the
> WAV file was intended to look like. But we will need to run
> experiments to see how the file size of WAVs and BMPs relate to the
> headers, minus the size of the headers (which change depending on the
> size of the headers fields).
>
>
> Here is some data...
>
> 100x100 pixels: 29.3 KB (30,056 bytes)
> 1x1 pixels: 60 bytes (60 bytes)
>
> resulution 72 pixels/inch
> Color Moder: RGB 8 Bit
> Depth 24 Bit
>
> - saved in photoshop -
>
> The content of the files doesn't matter it is all 1s and 0s, the
> headers determine the size. We could do another experiment just like
> this with a wav file, and see how the size of the file relates to the
> wav files headers.
>
>
> I would like to be able to blend music in photoshop by mixing layers of
> wav files. I can take two recordings of someone singing the same song,
> and blend them together in photoshop. An example could be taking a
> robot voice that sings a song, and then blending it with my voice while
> I am singing. To create a more realistic robot. This is one of the
> techniques they are using to make music in holywood. And obviously we
> could also take real life images or abstract or and see what they
> "sound like".
Stay away from the brown acid, maaaaaaannn.
Julian
August 24th 06, 08:37 AM
On 24 Aug 2006 00:06:05 -0700, "RD Jones" > wrote:
>
wrote:
>> Convert WAV To BMP And Back
>
>Stay away from the brown acid, maaaaaaannn.
best advice ever posted here
Julian wrote:
> On 24 Aug 2006 00:06:05 -0700, "RD Jones" > wrote:
>
> >
> wrote:
> >> Convert WAV To BMP And Back
> >
> >Stay away from the brown acid, maaaaaaannn.
>
> best advice ever posted here
I have software to do the job now. 010 Editor. It is a hex editor
that understand how to interpret binary file formats, and has a
scripting language to make automatic conversions.
wrote:
> Julian wrote:
> > On 24 Aug 2006 00:06:05 -0700, "RD Jones" > wrote:
> >
> > >
> > wrote:
> > >> Convert WAV To BMP And Back
> > >
> > >Stay away from the brown acid, maaaaaaannn.
> >
> > best advice ever posted here
>
> I have software to do the job now. 010 Editor. It is a hex editor
> that understand how to interpret binary file formats, and has a
> scripting language to make automatic conversions.
Here are two dissassembled BMP files.
1x1 BMP
-------
:struct BITMAPFILEhEADER bmfg
: CHAR bfType[2] BM
: DWORD bfSize 60
: WORD bfReserved1 0
: WORD bfReserved2 0
: DWORD bfOffBits 54
:
:struct BITMAPinfohEADER bmih
: DWORD biSize 40
: LONG biWidth 1
: LONG biHeight 1
: WORD biPlanes 1
: WORD biBitCount 24
: DWORD biCompression 0
: DWORD biSizeImage 6
: LONG biXPelsPerMeter 2834
: LONG biYPelsPerMeter 2834
: DWORD biClrUsed 0
: DWORD biClrImportant 0
:
:struct BITMApLINE lines[1]
: struct BITMApliNE lines[0]
: struct RGBTRIPPLE colors[1]
: struct RGBTRIPlE colors[0]
: UBYTE rgbBlUE 255
: UBYTE rgbGreen 255
: UBYTE rgbRed 255
: UBYTE padBytes[1]
: UBYTE padBytes[0] 0
:
:
:100x100 BMP
:-----------
:
:struct BITMAPFILEhEADER bmfg
: CHAR bfType[2] BM
: DWORD bfSize 30056
: WORD bfReserved1 0
: WORD bfReserved2 0
: DWORD bfOffBits 54
:
:struct BITMAPinfohEADER bmih
: DWORD biSize 40
: LONG biWidth 10
: LONG biHeight 10
: WORD biPlanes 1
: WORD biBitCount 24
: DWORD biCompression 0
: DWORD biSizeImage 30002
: LONG biXPelsPerMeter 2834
: LONG biYPelsPerMeter 2834
: DWORD biClrUsed 0
: DWORD biClrImportant 0
:
:struct BITMApLINE lines[1]
: struct BITMApliNE lines[0]
: struct RGBTRIPPLE colors[100]
: struct RGBTRIPlE colors[0] #FFFFFF
: UBYTE rgbBlUE 255
: UBYTE rgbGreen 255
: UBYTE rgbRed 255
: ...
:
: struct RGBTRIPlE colors[99] #FFFFFF
: UBYTE rgbBlUE 255
: UBYTE rgbGreen 255
: UBYTE rgbRed 255
: ...
:
: struct BITMApliNE lines[99]
: struct RGBTRIPPLE colors[100]
: struct RGBTRIPlE colors[0] #FFFFFF
: UBYTE rgbBlUE 255
: UBYTE rgbGreen 255
: UBYTE rgbRed 255
: ...
: struct RGBTRIPlE colors[99] #FFFFFF
: UBYTE rgbBlUE 255
: UBYTE rgbGreen 255
: UBYTE rgbRed 255
:
:
audio code LPCM
Parameters 1 channels 8 bits
32000 Sampling Freq.
256 Bitrate kbps
WAV's made with tools on http://jsoto.posunplugged.com/audiotools.htm
1 sample
--------
:struct WAVRIFFHEADER header
: ID groupID[4] RIFF
: ID groupID[0] 82'R'
: ID groupID[1] 73'I'
: ID groupID[2] 70'F'
: id groupID[3] 70'f'
: long size 37
: ID riffType[4] WAVE
: ID riffType[0] 87'W'
: ID riffType[1] 65'A'
: ID riffType[2] 86'V'
: ID riffType[3] 69'E'
:struct FORMATCHUNk format
: ID chunkID[4] fmt
: ID chunkID[0] 102'f'
: ID chunkID[1] 109'm'
: ID chunkID[2] 116't'
: ID chunkID[3] 32' '
: long chunkSize 16
: short wFormatTag 1
: unsigned shortwChannels 1
: unsigned long dwSamplesPerSec 32000
: unsigned long dwAvgBytesPerSec 32000
: unsigned short wBlockAlign 1
: unsigned short wBitsPerSample 8
:
:struct DATACHUNK data
: ID chunkID[4] data
: ID chunkID[0] 100'd'
: ID chunkID[1] 97'a'
: ID chunkID[2] 116't'
: ID chunkID[3] 97'a'
: long chunkSize 1
: uchar samples[1]
: uchar samples[0] 0
10 sample
---------
:struct WAVRIFFHEADER header
: ID groupID[4] RIFF
: ID groupID[0] 82'R'
: ID groupID[1] 73'I'
: ID groupID[2] 70'F'
: id groupID[3] 70'f'
: long size 46
: ID riffType[4] WAVE
: ID riffType[0] 87'W'
: ID riffType[1] 65'A'
: ID riffType[2] 86'V'
: ID riffType[3] 69'E'
:struct FORMATCHUNk format
: ID chunkID[4] fmt
: ID chunkID[0] 102'f'
: ID chunkID[1] 109'm'
: ID chunkID[2] 116't'
: ID chunkID[3] 32' '
: long chunkSize 16
: short wFormatTag 1
: unsigned shortwChannels 1
: unsigned long dwSamplesPerSec 32000
: unsigned long dwAvgBytesPerSec 32000
: unsigned short wBlockAlign 1
: unsigned short wBitsPerSample 8
:
:struct DATACHUNK data
: ID chunkID[4] data
: ID chunkID[0] 100'd'
: ID chunkID[1] 97'a'
: ID chunkID[2] 116't'
: ID chunkID[3] 97'a'
: long chunkSize 10
: uchar samples[10]
: uchar samples[0] 0
: uchar samples[1] 0
: uchar samples[2] 0
: uchar samples[3] 0
: uchar samples[4] 0
: uchar samples[5] 0
: uchar samples[6] 0
: uchar samples[7] 0
: uchar samples[8] 0
: uchar samples[9] 0
wrote:
> wrote:
> > Julian wrote:
> > > On 24 Aug 2006 00:06:05 -0700, "RD Jones" > wrote:
> > >
> > > >
> > > wrote:
> > > >> Convert WAV To BMP And Back
> > > >
> > > >Stay away from the brown acid, maaaaaaannn.
> > >
> > > best advice ever posted here
> >
> > I have software to do the job now. 010 Editor. It is a hex editor
> > that understand how to interpret binary file formats, and has a
> > scripting language to make automatic conversions.
>
> Here are two dissassembled BMP files.
>
> 1x1 BMP
> -------
>
> :struct BITMAPFILEhEADER bmfg
> : CHAR bfType[2] BM
> : DWORD bfSize 60
> : WORD bfReserved1 0
> : WORD bfReserved2 0
> : DWORD bfOffBits 54
> :
> :struct BITMAPinfohEADER bmih
> : DWORD biSize 40
> : LONG biWidth 1
> : LONG biHeight 1
> : WORD biPlanes 1
> : WORD biBitCount 24
> : DWORD biCompression 0
> : DWORD biSizeImage 6
> : LONG biXPelsPerMeter 2834
> : LONG biYPelsPerMeter 2834
> : DWORD biClrUsed 0
> : DWORD biClrImportant 0
> :
> :struct BITMApLINE lines[1]
> : struct BITMApliNE lines[0]
> : struct RGBTRIPPLE colors[1]
> : struct RGBTRIPlE colors[0]
> : UBYTE rgbBlUE 255
> : UBYTE rgbGreen 255
> : UBYTE rgbRed 255
> : UBYTE padBytes[1]
> : UBYTE padBytes[0] 0
> :
> :
> :100x100 BMP
> :-----------
> :
> :struct BITMAPFILEhEADER bmfg
> : CHAR bfType[2] BM
> : DWORD bfSize 30056
> : WORD bfReserved1 0
> : WORD bfReserved2 0
> : DWORD bfOffBits 54
> :
> :struct BITMAPinfohEADER bmih
> : DWORD biSize 40
> : LONG biWidth 10
> : LONG biHeight 10
> : WORD biPlanes 1
> : WORD biBitCount 24
> : DWORD biCompression 0
> : DWORD biSizeImage 30002
> : LONG biXPelsPerMeter 2834
> : LONG biYPelsPerMeter 2834
> : DWORD biClrUsed 0
> : DWORD biClrImportant 0
> :
> :struct BITMApLINE lines[1]
> : struct BITMApliNE lines[0]
> : struct RGBTRIPPLE colors[100]
> : struct RGBTRIPlE colors[0] #FFFFFF
> : UBYTE rgbBlUE 255
> : UBYTE rgbGreen 255
> : UBYTE rgbRed 255
> : ...
> :
> : struct RGBTRIPlE colors[99] #FFFFFF
> : UBYTE rgbBlUE 255
> : UBYTE rgbGreen 255
> : UBYTE rgbRed 255
> : ...
> :
> : struct BITMApliNE lines[99]
> : struct RGBTRIPPLE colors[100]
> : struct RGBTRIPlE colors[0] #FFFFFF
> : UBYTE rgbBlUE 255
> : UBYTE rgbGreen 255
> : UBYTE rgbRed 255
> : ...
> : struct RGBTRIPlE colors[99] #FFFFFF
> : UBYTE rgbBlUE 255
> : UBYTE rgbGreen 255
> : UBYTE rgbRed 255
> :
> :
Julian
August 25th 06, 01:13 AM
On 24 Aug 2006 11:19:18 -0700, wrote:
>audio code LPCM
>Parameters 1 channels 8 bits
>32000 Sampling Freq.
>256 Bitrate kbps
>WAV's made with tools on http://jsoto.posunplugged.com/audiotools.htm
Please excuse my sarcasm, but your esoteric obtuseness as to exactly
what you are doing begs for it! Even the link you provide is less
than helpful without downloading a bunch of files and reading.
Can you please explain in a simple sentence or 2 of plain English what
you do and post a link directly to a small file size sample of it in
an easily opened format?
Julian
RD Jones
August 25th 06, 09:15 AM
> On 24 Aug 2006 11:19:18 -0700, wrote:
>
> >audio code LPCM
> >Parameters 1 channels 8 bits
> >32000 Sampling Freq.
> >256 Bitrate kbps
> >WAV's made with tools on http://jsoto.posunplugged.com/audiotools.htm
Julian wrote:
> Please excuse my sarcasm, but your esoteric obtuseness as to exactly
> what you are doing begs for it! Even the link you provide is less
> than helpful without downloading a bunch of files and reading.
>
> Can you please explain in a simple sentence or 2 of plain English what
> you do and post a link directly to a small file size sample of it in
> an easily opened format?
I think I actually get what's going on here, but like the
proverbial freight train taking a left turn down a dirt road,
"You can't get there from here".
Anyone familiar with Hendrix's "Vibratory color-sound
experiments" ? It required appropriate doses of Leary's '25.
rd
Romeo Rondeau
August 25th 06, 09:45 AM
> I think I actually get what's going on here, but like the
> proverbial freight train taking a left turn down a dirt road,
> "You can't get there from here".
>
> Anyone familiar with Hendrix's "Vibratory color-sound
> experiments" ? It required appropriate doses of Leary's '25.
Why not use an audio editor instead of lying to Photoshop? The results
certainly couldn't be useful. Why not just make a convolution filter and run
it in an audio editor?
reddred
August 25th 06, 11:54 PM
> wrote in message
oups.com...
> Convert WAV To BMP And Back
>
I've seen three or four projects over the years that do this or started to
do it. I don't know if there's any code around now or not. The problem is,
there's no practical application. Trying to blend two sounds using two
bitmaps will create an entirely new sound, not a combination of the two,
unless you have VERY strict parameters as to what your images will look
like - in which case you might as well edit wave files in Sound Forge or
Audacity, with normal visual representations.
jb
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.