pilot mixer using simple code (shell+python)

Moderator: flatmax

Post Reply
dim83fr
Posts: 1
Joined: Mon Jul 17, 2017 10:16 pm

pilot mixer using simple code (shell+python)

Post by dim83fr » Mon Jul 17, 2017 10:29 pm

Hi,

I'm possibly interested by the board if I can pilot the input, so I'm asking.

I'm using a max2play squeezebox on Pi2, plug to my amplifier.
I'm searching a board which I can, by detecting (jeedom) that my mixing platine (NS7iii + serato) is on, stop playing stream on squeeze, and directly configure the board to do pass-througth from line-in to line-out.
I can invoke a script (shell and/plus python) from jeedom, but I want it to be automatic, no IHM manipulation (and, if possible no X on the Pi).
I have search for a solution, currently,most forum explain about using pulseaudio, but integration in linux squeezebox using wavein is too hard, I can't make it work. Better solution could be a audio switch simply piloting using gpio, but such a board doesn't exist.

So ...
Can this card can be used as a simple audio switch, and can I configure it simply by using a program ( When I'm not mixing, I'm also a developer ) ?

Thanks for the reply.

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: pilot mixer using simple code (shell+python)

Post by flatmax » Sat Jul 22, 2017 9:40 pm

Hi there, yes it can !

This version of the Audio Injector sound cards allows you to enable or disable a line bypass - this pipes the input audio directly to the output audio in analogue land - which means that it has zero latency and doesn't get converted to pass into the CPU.

If you use the amixer command, you can list all of the available controls like so :

Code: Select all

pi@raspberrypi:~ $ amixer scontrols
Simple mixer control 'Master',0
Simple mixer control 'Master Playback ZC',0
Simple mixer control 'Sidetone',0
Simple mixer control 'Line',0
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost',0
Simple mixer control 'Playback Deemphasis',0
Simple mixer control 'Capture',0
Simple mixer control 'ADC High Pass Filter',0
Simple mixer control 'Input Mux',0
Simple mixer control 'Output Mixer HiFi',0
Simple mixer control 'Output Mixer Line Bypass',0
Simple mixer control 'Output Mixer Mic Sidetone',0
Simple mixer control 'Store DC Offset',0

You will notice there the "Output Mixer Line Bypass'" control - that is the one you want to enable.
To enable it you write the following command :

Code: Select all

amixer sset "Output Mixer Line Bypass"  toggle
For example, if it is muted or not enabled, then :

Code: Select all

pi@raspberrypi:~ $ amixer sset "Output Mixer Line Bypass"  toggle
Simple mixer control 'Output Mixer Line Bypass',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
You can use the same command to disable it !

Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests