Re: [ecasound] john gibby ecasound with multiple inputs

From: Charles Laub <charleslaub@email-addr-hidden>
Date: Mon Jun 12 2017 - 21:09:53 EEST

Hi John,
If you work up something for volume control of an ecasound process (via ecasound-iam?) and a rotary encoder on some GPIO pins I would like to hear how you did it. That is also something that I have on my to-do list... For example if I have a CD player with spdif output I would like to have a way to adjust the volume since the spdif in this case will be at full volume.

For my idea of multiple inputs runnign simultaneously, it might be something like this:ecasound -dd -B:rt -z:mixmode,sum \a:input1 -f:16,2,44100 -i:alsahw,0,0 \a:input2 -f:16,2,44100 -i:alsahw,1,0 \a:input1,input2 -o:loop,1a:pre -i:loopo,1 -el:LADSPA_PLUGIN -el:LADSPA_PLUGIN ... etc.
I didn't try the above but something like that should work. You just read in both inputs that you want to send thru the crossover and mix them together before implementing your LADSPA plugins for your crossover. Just mute the input that you are not using at the time or you can even play both at the same time if you want.
Try something like that. The ecasound manpage is helpful for figuring out these kind of thing, along with using the more verbose debug error reporting option, -dd.See: https://ecasound.seul.org/ecasound/Documentation/ecasound_manpage.html
-Charlie

      From: john gibby <johnalan.gibby@email-addr-hidden>
 To: Charles Laub <charleslaub@email-addr-hidden>
Cc: "ecasound-list@email-addr-hidden" <ecasound-list@email-addr-hidden.net>
 Sent: Monday, June 12, 2017 8:29 AM
 Subject: Re: [ecasound] john gibby ecasound with multiple inputs
   
Thanks all for the input!  To start with, I've added the "killall ecasound" command to my scripts, and that works nicely.  I'm a bit slow figuring out Charlie's suggestion, but am still thinking on it and should get it soon.  This idea about GPIO interface has me thinking of lots of things - like, volume control of the PC/piano from my phone or a tablet or an external box/knob; a push-button setting for piano/movie mode; turning on only the needed amps depending on the mode selected; etc.
Thanks again.John
On Sun, Jun 11, 2017 at 11:38 AM, Charles Laub <charleslaub@email-addr-hidden> wrote:

John,
One simple option would be to have an ecasound command string that has two inputs that are both always "on". You just mix them together into a single two channel chain and then do all your DSP processing after that.
I have a similar problem. I also use ecasound and LADSPA for active loudspeaker crossovers and have written a suite of LADSPA crossover filter plugins for that purpose called ACDf. But I have found that LADSPA can be used to do other things, not just processing audio. For example I wrote a plugin for the Raspberry Pi that senses audio and then toggles a GPIO pin that is connected to a relay. This can be used to automatically turn on external equipment like an amplifier or whatever. I am currently re-writing this plugin to generalize the functionality and to make it usable on other Linux platforms via the userspace gpio interface. One new feature that I will create is a way for one input to override another, that is when input 2 has audio it mutes input 1. This can be done with any number of inputs in a hierarchy so that input 3 overrides input 2, and input 2 overrides input 1, etc. After the input mutexes, the input chains are all mixed together into a single chain that is then inspected for the presence of audio (so that my amps can be turned on and off automatically) and then lastly all the LADSPA processing done. I use an audio interface with multiple analog and digital inputs, and I can also stream audio over my LAN to the computer running my loudspeaker crossover, and I want a way to select from all these inputs automatically. Once I have re-written my LADSPA input monitoring plugin I will have that capability. I will post a note to this list when it's ready. In the meantime, try mixing both inputs together and see how that goes.
-Charlie

     ------------------------------ ------------------------------ ----------

Message: 1
Date: Sun, 11 Jun 2017 00:26:17 -0400
From: john gibby <johnalan.gibby@email-addr-hidden>
To: ecasound-list@email-addr-hidden. sourceforge.net
Subject: [ecasound] starting ecasound at boot, in a terminal window
Message-ID:
    <CAPHHX=Nm9uHNFDSEgn4nacPiQD=y AuvOVnhMdZ-bOR9_uvws6Q@email-addr-hidden. gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,
Thanks for ecasound; it's a wonderful application.  I'm using it for active
crossover DSP processing.  I'm running the latest version of AV-Linux.  I
have one chainsetup for watching movies, and a different one for my
Pianoteq piano application (included below).  I would like the piano
crossover to come up automatically when I start the computer, but I want it
to be convenient to change the chainsetup, for when we want to watch a
movie.  So I thought it would be good to start up ecasound in interactive
mode, with the desired chainsetup, in a terminal window to make it easy to
stop processing and change the chainsetup.  With a good bit of trying, I
got that to work:  I have an application autostart entry in Sessions and
Startup, that successfully brings up ecasound in interactive mode, in a
terminal window.  Only problem is, I still need to go to the terminal
window and type "start".  Can I configure the command in my Session
auto-start, or my chain-setup file, so it starts up processing on the
selected chain-setup, without my having to type "start" in the ecasound-iam
session?  I tried the -E "start" option, but it didn't seem to work.

My autostart command is:  xfce4-terminal
--working-directory=/home/ gibbyj/Ecasound  -e cs_piano

cs_piano script is:
#!/bin/sh
export TERM=xterm;
export LADSPA_PATH=/usr/local/lib/ ladspa:/usr/lib/ladspa;
cd /home/gibbyj/Ecasound;
#
#
ecasound -c -s:/home/gibbyj/Ecasound/ crossover_3chan_piano.ecs

The piano chainsetup file is:
-n:crossover_3chan_piano_cs \
          -a:pre1    -pf:./pre1.ecp  -f:f32_le,5,48000 -i:jack -o:loop,1 \
          -a:pre2,woofer,center,rear -f:f32_le,5,48000 -i:loop,1 \
          -a:pre2    -pf:./pre2.ecp  -o:loop,2 \
          -a:mid,tweeter            -f:f32_le,5,48000 -i:loop,2 \
          -a:woofer  -pf:./woofer.ecp    -chorder:1,3,0,0,0,0,0,0,0,0 \
          -a:mid    -pf:./mid.ecp      -chorder:0,0,1,2,0,0,0,0,0,0 \
          -a:tweeter -pf:./tweeter.ecp  -chorder:0,0,0,0,1,2,0,0,0,0 \
          -a:center  -pf:./center_nodelay.ecp  -chorder:0,0,0,0,0,0,3,0,0,0
\
          -a:rear    -pf:./rear.ecp      -chorder:0,0,0,0,0,0,0,0,4,5 \
          -a:woofer,mid,tweeter,center, rear -f:f32_le,10,48000 -o:jack \
          -a:all -z:mixmode,sum -z:nodb -B:rtlowlatency -b:64

Maybe I don't need to be using interactive mode;  but if I just bring up
ecasound with the piano chainsetup, I'm not sure how to kill and restart it
conveniently; would I use ps -A | grep ecasound and kill all the pid's in a
script somehow?  How could I automate that in a script?  What I've been
doing instead is just changing the autostart command and rebooting, but
that is a pain.
Thanks for the help!!
John

   
------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
______________________________ _________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden. sourceforge.net
https://lists.sourceforge.net/ lists/listinfo/ecasound-list

   

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Jun 13 00:15:02 2017

This archive was generated by hypermail 2.1.8 : Tue Jun 13 2017 - 00:15:02 EEST