Batch ptich shifting

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Batch ptich shifting

Steven Wronski

Hi,
 
I am interested in using Sox to do doubletracking in a batch.  By doubletracking, this would mean mixing the original sound file with a version that is slightly pitchshifted up and slightly pitchshifted down to get a doubletracked sound.  Depending on the source material, I will need to apply more or less doubletrack-hence SOX looks interesting for this.  However, I am having a hard time figuring out the DOS + SOX combination that will do this for me.  I followed the example in the manual but had no success.  Another factor here is that the source material and the doubletracked material will all have to be lowered several dB in order to be mixable without clipping.  I was able to make a little progress by having SOX output temporary files that had the volume lowered and the pitch changed.  However, I could not get them remixed for the final product.
 
This is as far as I got without getting errors from SOX.
cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" pitch 3.5
pause

 
Thanks for any tips...


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Batch ptich shifting

Sergei Steshenko-2
Why using DOS batch files language ? And I am not a Windows guy.

Either try PowerShell, or install Perl (if you are willing to learn).

Perl on Windows comes in two flavors: ActiveState and Strawberry - the
latter even has in Windows speak a portable version, i.e. can be unpacked in any directory- bot requiring Administrator privileges.

Regards,
  Sergei.



--- On Wed, 5/11/11, Steven Wronski <[hidden email]> wrote:

From: Steven Wronski <[hidden email]>
Subject: [SoX-users] Batch ptich shifting
To: [hidden email]
Date: Wednesday, May 11, 2011, 11:52 AM




Hi,
 
I am interested in using Sox to do doubletracking in a batch.  By doubletracking, this would mean mixing the original sound file with a version that is slightly pitchshifted up and slightly pitchshifted down to get a doubletracked sound.  Depending on the source material, I will need to apply more or less doubletrack-hence SOX looks interesting for this.  However, I am having a hard time figuring out the DOS + SOX combination that will do this for me.  I followed the example in the manual but had no success.  Another factor here is that the source material and the doubletracked material will all have to be lowered several dB in order to be mixable without clipping.  I was able to make a little progress by having SOX output temporary files that had the volume lowered and the pitch changed.  However, I could not get them remixed for the final product.
 
This is as far as I got without getting errors from SOX.
cd %~dp0
mkdir converted
FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" pitch 3.5
pause

 
Thanks for any tips...    

-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
-----Inline Attachment Follows-----

_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: Batch ptich shifting

Doug Cook-2
In reply to this post by Steven Wronski
Let's start with one problem at a time. The Windows batch file (some
call it DOS batch file) is perfectly fine for what you need to do, but
you would need to successfully do it once by hand before you can try
to make a script that does the job.

Perhaps something like this would work:
sox inputFile.mp3 tempfile1.wav pitch 3.5
sox inputFile.wav tempfile2.wav pitch 13.5
sox -m tempfile1.wav tempfile2.wav outputfile.mp3

Once you get a list of steps that works, you could then combine them
in a batch file like this:

mkdir output
for %%a in (%*) do (
    sox "%~a" temp1.wav pitch 3.5
    sox "%~a" temp2.wav pitch 13.5
    sox -m temp1.wav temp2.wav "%~dpna.shifted.mp3"
    del temp1.wav
    del temp2.wav)

On Wed, May 11, 2011 at 11:52 AM, Steven Wronski
<[hidden email]> wrote:

> Hi,
>
> I am interested in using Sox to do doubletracking in a batch.  By
> doubletracking, this would mean mixing the original sound file with a
> version that is slightly pitchshifted up and slightly pitchshifted down to
> get a doubletracked sound.  Depending on the source material, I will need to
> apply more or less doubletrack-hence SOX looks interesting for this.
> However, I am having a hard time figuring out the DOS + SOX combination that
> will do this for me.  I followed the example in the manual but had no
> success.  Another factor here is that the source material and the
> doubletracked material will all have to be lowered several dB in order to be
> mixable without clipping.  I was able to make a little progress by having
> SOX output temporary files that had the volume lowered and the pitch
> changed.  However, I could not get them remixed for the final product.
>
> This is as far as I got without getting errors from SOX.
> cd %~dp0
> mkdir converted
> FOR %%A IN (%*) DO sox %%A "converted/%%~nxA" pitch 3.5
> pause
>
>
> Thanks for any tips...
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users
>
>

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users