sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Sam Trenholme <strenholme.usenet@gmail.com>
To: sox-devel@lists.sourceforge.net
Subject: Re: Sox generates WAV files which the Tascam DP32SD multitrack recorder can not understand
Date: Sun, 20 Sep 2015 21:23:59 -0700	[thread overview]
Message-ID: <CA+7SMPvOmJmukyeu=XJRMZHV434romrmZweFe9YGEW-R8x_Shg@mail.gmail.com> (raw)
In-Reply-To: <yw1xtwqosehb.fsf@unicorn.mansr.com>

I have verified that using the "-t wavpcm" option results in 24-bit
wav files which the Tascam DP-32SD can understand. I have summarized
the technical details and have filed a bug report on the Tascam forum
that discuses this unit.

- Sam

2015-09-20 19:17 GMT-07:00 Måns Rullgård <mans@mansr.com>:
> Sam Trenholme <strenholme.usenet@gmail.com> writes:
>
>> Without modifying the header, the Tascam DP-32SD (a stand-alone
>> digital multitrack recorder) is unable to “grok” (acknowledge as a
>> valid .WAV file) a 24-bit 44.1khz monophonic .WAV file generated by
>> sox.
>>
>> Because of this, the Tascam DP-32SD is unable to import 24-bit/44.1
>> SoX-generated files via the “Audio Depot” unless the .WAV header is
>> altered.
>>
>> ==Steps to reproduce==
>>
>> Use the SoX program to generate a 24-bit wav file. For example:
>>
>> sox foo.wav -b24 bar.wav gain -9
>
> Try adding "-t wavpcm" before the output filename.
>
>> Technical details
>>
>> A Tascam DP-32SD has, for an “audio depot” 24/44.1 file header, the
>> following bytes (this is “hexdump” format; the numbers on the left are
>> hexadecimal numbers; the ASCII that follows is a representation of the
>> data):
>>
>> 00000000 52 49 46 46 XX XX XX XX 57 41 56 45 66 6d 74 20 |RIFF....WAVEfmt |
>> 00000010 10 00 00 00 01 00 01 00 44 ac 00 00 cc 04 02 00 |........D.......|
>> 00000020 03 00 18 00 64 61 74 61 WW WW WW WW WW WW WW WW |....data........|
>
> This is a standard, original Microsoft WAVEFORMAT header.  The value
> 0x0001 at offset 0x14 indicates PCM data.  Although the header structure
> can encode arbitrary values, only 8-bit and 16-bit PCM should use this
> format.
>
>> SoX, on the other hand, generates a 24/44.1 wav file with the
>> following header:
>>
>> 00000000 52 49 46 46 XX XX XX XX 57 41 56 45 66 6d 74 20 |RIFF....WAVEfmt |
>> 00000010 28 00 00 00 fe ff 01 00 44 ac 00 00 cc 04 02 00 |(.......D.......|
>> 00000020 03 00 18 00 16 00 18 00 04 00 00 00 01 00 00 00 |................|
>> 00000030 00 00 10 00 80 00 00 aa 00 38 9b 71 66 61 63 74 |.........8.qfact|
>> 00000040 04 00 00 00 14 f5 5f 00 64 61 74 61 WW WW WW WW |......_.data....|
>
> This is a WAVEFORMATEXTENSIBLE header, indicated by the format tag
> 0xfffe at file offset 0x14.  This header adds additional fields at the
> end allowing arbitrary bit depths as well as various other information.
> It should be used whenever the bit depth is not 8 or 16.
>
> Sox is doing the right thing in creating a WAVEFORMATEXTENSIBLE header
> for 24-bit data, but apparently the Tascam software can't understand
> this format (it's not alone in this, unfortunately), instead applying
> less strict rules for the basic WAVEFORMAT header (everybody does this,
> and rightly so).
>
> The "-t wavpcm" option forces sox to use the short WAVEFORMAT header
> even when this goes against the spec.
>
> For more details, see https://msdn.microsoft.com/en-us/library/dd390971.aspx
>
> --
> Måns Rullgård
> mans@mansr.com

------------------------------------------------------------------------------
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

      reply	other threads:[~2015-09-21  4:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21  0:11 Sox generates WAV files which the Tascam DP32SD multitrack recorder can not understand Sam Trenholme
2015-09-21  2:17 ` Måns Rullgård
2015-09-21  4:23   ` Sam Trenholme [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+7SMPvOmJmukyeu=XJRMZHV434romrmZweFe9YGEW-R8x_Shg@mail.gmail.com' \
    --to=sox-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).