sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* SoX bug: smpl chunks deleted
@ 2020-05-07 19:16 Jeff Learman
  2020-05-08 14:59 ` Måns Rullgård
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Learman @ 2020-05-07 19:16 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 663 bytes --]

I noticed that when converting stereo sample files to mono, the 'smpl'
chunks (which encode loop information used by sample players), SoX omits
the 'smpl' chunk in the output file.

For example,

sox input.wav -c 1 output.wav

sums a stereo input.wav to a mono output.wav.  However, the 'smpl' chunk in
input.wav is discarded.

I have a workaround; I wrote code to extract the smpl chunk and append it
to the output.  But it would be nice if 'smpl' chunks were supported by
default, at least for the easy cases.  (I realize it could be difficult or
impossible for many cases.)

What's the best way to file a bug report?

BTW I'm new here.  SoX RoX!

Thanks,
Jeff

[-- Attachment #1.2: Type: text/html, Size: 937 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: SoX bug: smpl chunks deleted
  2020-05-07 19:16 SoX bug: smpl chunks deleted Jeff Learman
@ 2020-05-08 14:59 ` Måns Rullgård
  0 siblings, 0 replies; 2+ messages in thread
From: Måns Rullgård @ 2020-05-08 14:59 UTC (permalink / raw)
  To: Jeff Learman; +Cc: sox-users

Jeff Learman <jjlearman@gmail.com> writes:

> I noticed that when converting stereo sample files to mono, the 'smpl'
> chunks (which encode loop information used by sample players), SoX omits
> the 'smpl' chunk in the output file.
>
> For example,
>
> sox input.wav -c 1 output.wav
>
> sums a stereo input.wav to a mono output.wav.  However, the 'smpl' chunk in
> input.wav is discarded.
>
> I have a workaround; I wrote code to extract the smpl chunk and append it
> to the output.  But it would be nice if 'smpl' chunks were supported by
> default, at least for the easy cases.  (I realize it could be difficult or
> impossible for many cases.)
>
> What's the best way to file a bug report?

The smpl chunk isn't part of the official WAV format, so SoX ignores it.
It's the only reasonable thing to do with unknown chunks.  Copying them
across to the output is risky since we can't know that the processing
didn't invalidate them.  For example, a chunk referencing specific
samples is (likely) still relevant after downmixing stereo to mono,
whereas resampling to a higher or lower rate will obviously make it
useless.

The best we can reasonably do is add a flag to specify extra chunks to
preserve if found in the input.  Would that be helpful in your case?

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-08 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 19:16 SoX bug: smpl chunks deleted Jeff Learman
2020-05-08 14:59 ` Måns Rullgård

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).