diyAudio (
-   PC Based (
-   -   remote mute/unmute of ecasound (

DrNeon 21st November 2020 09:20 PM

remote mute/unmute of ecasound
I'm trying to get ecasound running as a multitrack player that allows me to selectively mute/unmute tracks remotely while it is playing. I've got it pretty close to working, but am stuck on one issue. Right now, I am able to get ecasound to start playing two mono tracks (sent equally to both L and R speakers), via


ecasound -a:1 -i track1.wav -erc:1,2 -epp:50 -a:2  -i track2.wav -erc:1,2 -epp:50  -a:all  -o:alsahw,2,0  --server

which starts both tracks playing immediately, and then, in a second process, selectively mute or unmute one of the two tracks (chains?) via


echo -e "c-select 1\r\nc-mute on\r\n" | nc -w1 localhost 2868

(this will mute chain 1, i.e. track 1, I can choose the track via the c-select command and the mute state via nc-mute)

The problem I'm running into is that I'd like to start ecasound with all tracks muted, but playing, and only then start remotely unmuting selected tracks. I've tried adding -chmute:1 after -a:1 when starting ecasound for example,


ecasound -a:1 -chmute:1 -i track1.wav -erc:1,2 -epp:50 -a:2  -i track2.wav -erc:1,2 -epp:50  -a:all  -o:alsahw,2,0  --server

and this will mute track 1, but I cannot unmute it via the remote process; it remains muted (note that the same remote unmute command will work if I start ecasound without any chmute and then mute track 1 remotely). So somehow -chmute is muting tracks in such a way that I cannot remotely unmute them. Any ideas? I don't want to start ecasound with everything unmuted and then remotely mute all; the remote interface latency is too slow.

wealas 22nd November 2020 07:18 PM

There seems to be a -E option that should allow you to call the commands to mute all channels before playback starts.

DrNeon 22nd November 2020 07:31 PM

Thanks, that seems to be working!
Command line is now:

ecasound -a:1 -i track1.wav -erc:1,2 -epp:50 -a:2 -i track2.wav -erc:1,2 -epp:50 -a:all -o:alsahw,2,0 --server -E "c-select 1; c-mute on; c-select 2; c-mute on"

and my remote process is able to mute/unmute individual channels

DrNeon 23rd November 2020 10:36 PM

As a follow-up to anyone interested, the remote muting/unmuting process seemed a little bit slow, but when I added "-b 64" to the ecasound command line to make the buffer smaller, the response to the remote process was much quicker.

DrNeon 27th December 2020 06:45 PM

As part of this project I'm hoping to play back a MIDI file in sync with multitrack WAV playback (the MIDI is controlling some props using midimonster to convert to ArtNet data). Is ecasound capable of playing a MIDI file to a MIDI port? I've seen that it can play MIDI through Timidity to an audio output, but when I try to get it to play to a MIDI port ("ecasound -a:1 -i miditest1.mid -o:alsa -Md:alsaseq,129:0”), it will send a START and a STOP to the desired port (e.g. 129:0) but nothing from the file itself. Perhaps my syntax is wrong? Using aplaymidi to the port works correctly, but if I try to use aplaymidi and ecasound at the same time (e.g. running “ecasound XXXX & aplaymidi YYYY “) the sync is off (probably because ecasound takes longer to start). So can ecasound play MIDI to a port, or alternatively, is there a program similar to ecasound that can do so (but also do command-line multitrack WAV playback with server control of mute state)?

DrNeon 29th December 2020 12:41 AM

Thanks to Joel Roth, author of nama, figured it out. Needed to run ecasound as a server, load up the chain setup, and then once loading is complete send it a "start" at the same time as starting some of the aplaymidi processes. Sync isn't perfect but I can probably fine tune some things and get it to where I want it.

All times are GMT. The time now is 04:58 PM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 17.65%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio