I need to change pitch of whole library


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I need to change pitch of whole library
# 1  
Old 09-26-2013
I need to change pitch of whole library

Hello Even though I have been using Linux for quite a while my knowledge of the command line is pretty limited, now I am beginning to understad why it is considered so powerful.

I am going to give a little introduction of what I need.
I am a "believer" of the music tuned at 432hz, this is considered the old fashioned tunning, most cathedral bells are tuned at this frequency, in the early 21st century someone decided to change it to 440hz, this made the music sound different, many people think this made the music not sounding as well as it used to be. There is a lot to discuss about it.

I am not the only one that thinks than repitching music makes it sound better, I found out the command line (using the program sox) that repitches the music from 440hz to 432hz.

Code:
sox music440Hz.wav music432Hz.wav pitch -31

then someone with a bit more knoledge of the shell told me how to make it so it will change all songs in a directory, just cd to the directory and then...

Code:
$ for f in *.wav ;do sox "$f" "432Hz_$f" pitch -31  ;done


This makes the work a lot easier, but... i guessthere must be a way to have the work done in ALL my music collection.
Would that be too hard to make? I guess not with the right knoledge and skills.
Any answer is welcome,
Thanks!
# 2  
Old 09-26-2013
Code:
find /basedir -name "*.wav" | 
while read pathname
do
    dir=$(dirname $pathname)
    file=$(basename $pathname)
    sox "$dir/$file" "$dir/432Hz_$file" pitch -31
done

...should do the trick
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Programming

C++ linking library to a library

Hi All, My application main engine will use a shared library where we do many operation. We are trying to implement the linear algebra operation on the shared library for that I need to link my shared library to the lapack library in /usr/lib. Below is my make file. Can you please let me... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

2. AIX

Add shared members from library to same library in a different directory

I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message. add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies

3. HP-UX

How to use chatr to change static library path in binary?

I have solved this but now cannot recall the syntax. I want to strip or change the hard wired library paths on binaries I download from a repository. I do not have root and just want a personal install, but would rather not build every tool. I even posted the solution here once for others, but... (2 Replies)
Discussion started by: DGPickett
2 Replies

4. Linux

./configure problem for libsf library due to apparently missing libdb library.

Hello, ./configure script fails to configure libsf. Please check the following last few lines of configure script error. checking for db1/db.h... no checking for db.h... yes checking for dbopen in -ldb1... no configure: error: No libdb? No libsf. But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies

5. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

6. AIX

Modify Print Orientation, Font and Pitch

I need to be able to change the font, pitch, and orientation when printing a text flat file. Any suggestions appreciated. (2 Replies)
Discussion started by: mad_dog
2 Replies
Login or Register to Ask a Question