Re: starting ecasound at boot, in a terminal window

Joel Roth <[email protected]> Tue, 20 Jun 2017 00:00:18 -1000
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <20170620100018.GA9986@sprite>
john gibby wrote:
>  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. 


Hi,

First, thanks for this application example, which is to
switch between to Ecasound setups, possibly sensing a signal
in a priority input channel and switching over to that
channel when an audio source is present.  

I have been looking into how near this application would be
possible under Nama, which aspires to be a sort of Bat
Utility Belt for audio processing with Ecasound.

To start with, I ported John's Ecasound chain setup to Nama
commands, omitting the presets and replacing the chorder
operators with Nama's routing conventions. That's all
I'll cover in this posting. 

Here's his setup:


> -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

Here's the track listing the results after running
crossover.nms, my port of the above. You can see most of the 
routing: e.g. the source and destination of each track. 

 No. Name       Requested  Status  Source                Destination   Vol   Pan
================================================================================
  1  Main                  OFF     --                    --             --    --
  2  Mixdown               OFF     --                    --             --    --
  3  pre1                  MON     1/2/3/4/5             --             --    --
  4  pre2                  MON     pre1                  --             --    --
  5  woofer                MON     pre1                  1/2            --    --
  6  center                MON     pre1                  7              --    --
  7  rear                  MON     pre1                  9/10           --    --
  8  mid                   MON     pre2                  3/4            --    --
  9  tweeter               MON     pre2                  5/6            --    --

And here is the chain setup, showing additional channel
routing. You can also see how Nama uses jack_multi to route
soundcard inputs and outputs. The chain IDs below correspond
to the track numbers above.
 
# ecasound chainsetup file

# general

-z:mixmode,sum -G:jack,Nama,send -b 256 -z:db,100000 -z:nointbuf -f:f32_le,10,48000

# audio inputs

-a:3 -i:jack_multi,system:capture_1,system:capture_2,system:capture_3,system:capture_4,system:capture_5
-a:4,5,6,7 -i:loop,pre1_out
-a:8,9 -i:loop,pre2_out

# post-input processing

-a:5 -chmove:3,2
-a:6 -chmove:3,1
-a:7 -chmove:4,1 -chmove:5,2

# audio outputs

-a:3 -o:loop,pre1_out
-a:4 -o:loop,pre2_out
-a:5 -o:jack_multi,system:playback_1,system:playback_2
-a:6 -o:jack_multi,system:playback_7
-a:7 -o:jack_multi,system:playback_9,system:playback_10
-a:8 -o:jack_multi,system:playback_3,system:playback_4
-a:9 -o:jack_multi,system:playback_5,system:playback_6

Okay, here is the script responsible for the above. Note
that tracks can be connected without specifying a loop
device.

# crossover.nms

# create tracks and move them to the Aux bus (avoiding automated routing)

add-tracks pre1 pre2 woofer center rear mid tweeter
for        pre1 pre2 woofer center rear mid tweeter; move-to-bus Aux

select-track pre1 
set-track width 5 

for pre2 woofer center rear; source track pre1

woofer # equivalent to 'select-track woofer'
add-effect chmove 3 2
stereo
send 1 # send output to soundcard starting at channel 1

for mid tweeter; source track pre2

mid
stereo
send 3 # send output to soundcard starting at channel 3

tweeter 
stereo
send 5

center mono
add-effect chmove 3 1 
send 7

rear
stereo
afx chmove 4 1 # shortcut for 'add-effect'
afx chmove 5 2
send 9

for Aux; remove-fader-effect pan; remove-fader-effect vol 
Main off; rffx vol; rffx pan # shortcut for 'remove-fader-effect'

cheers,

-- 
Joel Roth
  


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list