From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B96511F55B for ; Fri, 5 Jun 2020 08:31:58 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jh7lZ-0008A6-8X; Fri, 05 Jun 2020 08:31:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jh7lY-00089W-3c for sox-users@lists.sourceforge.net; Fri, 05 Jun 2020 08:31:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=EHw7JTR+ESZK86LdhXwdcADqfJbdmJ+wbG7wyegsV2U=; b=V7caCEG2ExWGkOp3plN1JD9NwL SZSNSWk/MLYTYPS73bLak24Vmd5XZ+wbMVYSGEyRV7PiIxR6ueoVM6sWLGXoV9yCqunEKXboOHVRI tjg9MkhszXYjB6LETfA+LY6Dyc7LG7VQqDbBX3C+ekeL6KfDvgID4rR6LngJokMooqNc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EHw7JTR+ESZK86LdhXwdcADqfJbdmJ+wbG7wyegsV2U=; b=bW3z5ajDMb1sLw4i0LHMo3EBlA nBIE+xaLnwm3MmIwWXf/zpsuvSbbrfuLoyADrHT3zoA/I9ZT/7AqoC1aWPWwt6yqKdEIntOXbALnW cbAs28lYMgX4E4t8P8RJ6i1EFB6zy5uS5t5NqXSbnv0NtVl9/ej1He483BmUkSSh4iWQ=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jh7lU-009dl8-Be for sox-users@lists.sourceforge.net; Fri, 05 Jun 2020 08:31:52 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 3D4CE15360; Fri, 5 Jun 2020 09:31:26 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Danijel DOMAZET References: Date: Fri, 05 Jun 2020 09:31:26 +0100 In-Reply-To: (Danijel DOMAZET's message of "Fri, 5 Jun 2020 08:54:48 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Headers-End: 1jh7lU-009dl8-Be Subject: Re: Prevent SoX from doing the clipping? X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Cc: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: sox-users-bounces@lists.sourceforge.net Danijel DOMAZET writes: > Hi list, > > I have a heavily "overflowed" WAV file (samples written in float 32-bit > format): instead of [-1.0,+1.0], the samples range goes as far as > [-5.0,+5.0]. > > Using SoX to get raw PCM audio samples from WAV file: > > `sox --bits 32 --channels 1 --encoding floating-point --rate 48000 > input.wav output.raw` > > I get warnings: > > sox WARN sox: `input.wav' input clipped 1163400 samples > sox WARN sox: `output.raw' output clipped 605664 samples; decrease > volume? > > When I look into the output, I see the samples were clipped, and the range > is [-1.0,+1.0] now. However, that is not what I want. > > I would like to have exactly the same output as input, just in different > format (RAW instead of WAV). Is there a way to prevent SoX from doing the > clipping? No, that isn't possible. Sorry. In your specific case, however, a workaround is possible. If you override input sample encoding as 32-bit signed integer instead of float, the values will be copied untouched. Since the output is headerless, it doesn't matter what sox thinks the samples are. -- = M=E5ns Rullg=E5rd _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users