How to save to PCM unsigned 8 bit mono .RAW, .SND and .PCM format ?

GoldWave general discussions and community help
Post Reply
rickygai
Posts: 2
Joined: Tue May 25, 2021 9:33 am

How to save to PCM unsigned 8 bit mono .RAW, .SND and .PCM format ?

Post by rickygai »

I am on a software programming project that need to drive a speaker mono format using PCM unsigned 8 bit format.

Here is data extracted from a saved .wav PCM unsigned 8 bit format:

Code: Select all

             filename: [helloworld.wav]
              filesize: [8750]
                    id: [RIFF]
                  size: [8742]
                  type: [WAVE]
              chunk_id: [fmt ]
            chunk_size: [16]
                format: [1]
               channel: [1]
        sample_per_sec: [11025]
 average_bytes_per_sec: [11025]
           block_align: [1]
       bits_per_sample: [8]
               data_id: [data]
             data_size: [8706]
QUESTIONS:

1. Can Goldwave 6.55 able to save as .RAW, .SND and .PCM unsigned 8 bit uncompressed format ?

2. From the data block extracted "helloworld.wav" above, let say the first byte of data block is raw format which is 0x41 or 01000001 in binary.
If to send this 8 bits of byte 0x41 to GPIO pin to turn ON/OFF a pulse, the direction to send the bit is it from left-to-right or right-to-left as shown below ?

left-to-right --->
0 1 0 0 0 0 0 1 -------------> Microcontroller GPIO pin -------> 8 ohm 2W speaker.
<--- right to left

Any idea ?

Please advise.
DougDbug
Posts: 2172
Joined: Wed Feb 16, 2005 3:33 pm
Location: Silicon Valley

Re: How to save to PCM unsigned 8 bit mono .RAW, .SND and .PCM format ?

Post by DougDbug »

Yes. Save-As Type Raw (*.snd) and you'll the same data as a WAV file without the file header. i.e. If the 1st audio sample is 41 hex, the first byte in the file will be 41 hex.

There's no "left to right" unless you handle that in your own software. It's just a series of bytes.

Do you have a hex editor? With a hex editor you can see the bytes in a file, including the header in a WAV file.
Post Reply