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

sox-users@lists.sourceforge.net unofficial mirror

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/sox-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sox-users sox-users/ https://public-inbox.org/sox-users \
		sox-users@lists.sourceforge.net
	public-inbox-index sox-users

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.sox
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.audio.sox
	nntp://news.gmane.io/gmane.comp.audio.sox
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git