Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


moOde 5 and HiFiBerry DAC+ ADC
#1
Hi,

Some screenies of the new Source Select feature in moOde 5 that supports the super nice HiFiBerry DAC+ ADC. This device allows you to connect another audio device to its ADC input for example a Turntable, Radio, CD Player etc. Using moOde Source Select you can easily switch between MPD and the audio device connected to the ADC :-)

                     

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#2
So how does this fit in with the multiple renderer scheme? If I, say, start a Spotify feed while the analog input is selected, which takes precedence?
Reply
#3
The Analog Input will take precedence :-) Your client will actually connect but there is some moOde code that checks to see if the Analog input is active and if so the rest of the renderer setup to allow it to play audio gets dumped. Ideally we would want to block the connection in the first place but that part of the transaction is in librespot, shairport-sync, squeezelite bluetooth code.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
(03-22-2019, 07:47 PM)Tim Curtis Wrote: The Analog Input will take precedence :-) Your client will actually connect but there is some moOde code that checks to see if the Analog input is active and if so the rest of the renderer setup to allow it to play audio gets dumped. Ideally we would want to block the connection in the first place but that part of the transaction is in librespot, shairport-sync, squeezelite bluetooth code.

There is a program called CPiped that includes sound/silence detection. With this, audio from a line-in is only captured when audio is playing from the auxiliary device. This way if nothing is playing other renderers can be activated as normal without manually toggling off the line in input. Any chance the analog input on Moode could also work in this way? I'm thinking of always having an Echo plugged into Mood's analog input so it can pass along Alexa responses (or music from the Echo), but then be free to use the the typically awesome Moode ways (bluetooth, Spotify, Airplay, Local MPD, Radio Streams, etc).
Reply
#5
The input is managed by the DAC. moOde just sends the command to switch the DAC to Analog input. I suppose moOde could poll for no audio output and then automatically swap from Analog-in back to Local output (MPD, renderers) but this is something that does not seem to be generally applicable. It would be up to user to do this coding.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(09-06-2019, 09:37 PM)Tim Curtis Wrote: The input is managed by the DAC. moOde just sends the command to switch the DAC to Analog input. I suppose moOde could poll for no audio output and then automatically swap from Analog-in back to Local output (MPD, renderers) but this is something that does not seem to be generally applicable. It would be up to user to do this coding.

That makes sense. My other though was to use Shairport-Sync's ability to run scripts before and after playback to toggle the mic input to stereo output off/on. Then I'd have line in at all times except for when I'm Airplaying to Moode. I'd have to kill the line-in process manually if I wanted to do anything else in Moode (local library, http streams, etc). Can I directly edit the shairport-sync.conf file to add these before/after commands? Or will Moode overwrite them?
Reply
#7
It's already setup to run before/after scripts. The scripts are in the directory below and are user editable. The only time they would be overwritten is if I needed to install new versions as part of an update.

/var/local/www/commandw

You could also edit /etc/shairport-sync.conf and specify your own scripts
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
(09-06-2019, 09:37 PM)Tim Curtis Wrote: The input is managed by the DAC. moOde just sends the command to switch the DAC to Analog input. I suppose moOde could poll for no audio output and then automatically swap from Analog-in back to Local output (MPD, renderers) but this is something that does not seem to be generally applicable. It would be up to user to do this coding.

Hi Tim,

I just acquired said DAC because I want to be able to connect my TV to the line-in, connect my amp to the RCA.
What I want to achieve is: Set the "source select" of moOde to "analogue input" as default so the TV is running in pass-through to my amp.
As soon as I connect to the Spotify Connect service and start playing a song ==> switch source to Local (MPD)
As soon as I stop the song or disconnect from the Spotify Connect service ==> switch source back to "analogue input"

Same for airplay, same for radio, same for basically all moOde playback functions Smile

If I understand correct there are pre- post scripts for Spotify and Airplay (spotevent.sh  spspost.sh  spspre.sh). So I reckon I could use these to switch the source select from local MPD to analoge input.

However I have no idea how to actualy send the command to the DAC to do the actual switching. How did you manage to achieve this? Or what should I invoke to do the switching? 

(and the above would solve the problem for spotify and airplay, but not for all the other functionality :'( 

Thanks a lot for helping a total noob out here! (Or point me in the right direction)
Reply
#9
Have a look at the source code.
https://github.com/moode-player/moode
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
(12-27-2019, 02:13 AM)Tim Curtis Wrote: Have a look at the source code.
https://github.com/moode-player/moode

Hi Tim,

Thanks for answering! I did take a look but I realy don't know what to look for.
Am I right when I think the source-select option in moOde works with enabeling/disabeling alsaloop on demand?
I tried searching the source code for "alsaloop" but didn't get much wiser. I'm realy no guru when it come to linux Smile
So may I ask you to point me into the right direction so I can hack away at it?

Second question: 
When I use the Source Select option from within the UI, I do indeed hear the audio fed to the jack through the output device. 
However I notice a lot of crackle  / popping and after a while, sound output just stops. I then have to switch through the source select again to MPD ==> click set, then switch back to Analog ==> click set, to get the sound back. 

After some googleing I suspect this to be related to buffer underrun / overrun.

So I tried fiddeling with alsaloop directly through SSH. 
sudo alsaloop -v -t 50000 

This gets rid of a lot of crackle/ popping but after a while alsaloop stops and displays "bus error". 

I suspect I get the bus error too when using the source select from the moOde UI.

Thanks a lot for getting back to me.
Reply


Forum Jump: