Menu

16-bit signed PCM mono different compared to stereo

Help
Toine db
2016-04-05
2016-04-07
  • Toine db

    Toine db - 2016-04-05

    I know its more a basic audio question but I think its a very easy one for people in this group.

    I'm working a lot with raw bytes for pre-proccesing and filtering before sending audio to PS.
    I want to know exactly what the raw audio bytes represent 16-bit signed PCM mono, but only can find topics about stereo.

    So here is the part I just want to be sure;
    This is the format for stereo (found on some forum thread)

       byte | 01 02 | 03 04 | 05 06 | 07 08 | 09 10 | 11 12 | ...
    channel |  Left | Right | Left  | Right | Left |  Right | ...
      frame |     First     |    Second     |     Third     | ...
     sample | 1st L | 1st R | 2nd L | 2nd R | 3rd L | 3rd R | ... etc.
    

    How does this differ from the MONO format?

    PS: when investigating the raw bytes I notice the even bytes are positive and uneven are negative, is the represeted in the sinus as upper and lower amplitude like on: http://manual.audacityteam.org/o/m/images/1/1f/trackexampledb.png ?

    Hope someone can clear this up

     
    • Nickolay V. Shmyrev

      How does this differ from the MONO format?

      In mono format you have just one channel, so one frame contains one sample instead of two

       byte | 01 02 | 03 04 | 05 06 | 07 08 | 09 10 | 11 12 | ...
      channel |  mono | mono | mono  | mono | mono |  mono | ...
        frame |  First  |    Second    |     Third     | ...
       sample | 1st   |  2nd  |  3rd  | ...et
      

      PS: when investigating the raw bytes I notice the even bytes are positive and uneven are negative, is the represeted in the sinus as upper and lower amplitude like on: http://manual.audacityteam.org/o/m/images/1/1f/trackexampledb.png ?

      You need to provide the example, but generally there should be no such thing. Values in PCM files could be arbitrary. The scale of the sample values are from -32767 to 32767.

       

      Last edit: Nickolay V. Shmyrev 2016-04-05
      • Toine db

        Toine db - 2016-04-06

        Nickolay, thanks again for the info.
        Good to get this 100% sure, it was a litle obvious but nowhere clearly noted.

        I checked the 'goforward.raw' example and that indeed seems to not have a sinus like behaviour.

        But I'm still wondering what could be the cause of this in https://onedrive.live.com/redir?resid=53DF68CA92747BA6%21231790

        Any idea why even bytes are positive and uneven are negative?

         
        • Nickolay V. Shmyrev

          Any idea why even bytes are positive and uneven are negative?

          In your audio not every even byte is positive and not every odd byte is negative. You see the white noise which is expected in the beginning of the audio.

          000000A8 FD FF 03 00  FC FF 06 00  FA FF 04 00  FF FF FE FF  04 00 FD FF 
          000000C0 01 00 01 00  FE FF 03 00  FC FF 03 00  FF FF FF FF  02 00 FF FF 
          

          White noise is caused by Brownian motion of atoms in our universe. If you amplify it many times you can listen for it.

           
          • Toine db

            Toine db - 2016-04-07

            OK, thanks for the interesting info.

            So,i think its not a bad idea to make/implement a noise filter ;-)

             
            • Nickolay V. Shmyrev

              Pocketsphinx already has noise filter, you do not need to impelment anything special.

               
              • Toine db

                Toine db - 2016-04-07

                Thanks for the notification.

                 

Log in to post a comment.