Re: [LAU] tool to invert left channel and mix it to right

From: Julien Claassen <julien@email-addr-hidden-lab.de>
Date: Tue Jul 31 2007 - 11:01:38 EEST

Hi!
  I's say ecasound or csound. For csound I have a one-step idea:
vim test.orc
sr = 44100 ; your samplerate
kr = 4410 ; your controller rate
ksmps = 10 ; sr/kr
nchnls =1 ; number of output-channels

instr 1
  a1, a2 soundin "in.wav"
  a1 = a1 * -1 ; invert left channel
  out a1*.5 + a2*.5 ; add left and right channels with half volume
endin

vim test.sco
i1 0 30 ; perform instrument 1 for 30 seconds

csound -W -o out.wav test.orc test.sco

  With ecasound I can only think of a multi-step solution, which can, on the
other hand be scripted:
ecasound -f:16,2,44100 -i in.wav -chcopy:1,2 -f:16,1,44100 -o tmp1.wav
# now its mono, I copied left channel to right, to make sure we don't get any
left channel mixed in, because I'm not sure about this stereo to mono
conversion.
ecasound -i tmp1.wav -o tmp2.wav -ea:-110
# invert file, apply volume of -100
ecasound -f:16,2,44100 -i in.wav -chcopy:2,1 -f:16,1,44100 -o tmp3.wav
# now created mono-file with only right-channel
ecasound -a:1 -i tmp2.wav -ea:50 -a:2 -i tmp3.wav -ea:50 -a:all -o out.wav
-z:mixmode,sum
# mix inverted left to right channel.
  I probably did this more complicated than it could be. But this should work.
  Hope that helps!
  Kindest regards
         Julien

--------
Music was my first love and it will be my last (John Miles)

======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user
Received on Tue Jul 31 12:15:03 2007

This archive was generated by hypermail 2.1.8 : Tue Jul 31 2007 - 12:15:03 EEST