INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Having a zone play to many soundcards?  (Read 3762 times)

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Having a zone play to many soundcards?
« on: June 14, 2015, 08:20:19 am »

I have a whole house-audio-system, it is run by four stereo USB-sound-cards, I want to play a tune when somebody rings the doorbell on all speakers, but I do not want the zones to be linked in "regular use", can i make a fifth zone that plays to all the soundcards?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Having a zone play to many soundcards?
« Reply #1 on: June 14, 2015, 12:12:14 pm »

Yes and no.

You can, of course, duplicate all of your regular zones, and then link them together. However, if the audio devices in the "real" zones, are set up to use Exclusive Access (via WASAPI or ASIO) then you won't be able to play to the "master linked" zone when playback on any one of the regular ones is active.  You'd have to first stop MC on all zones, then play it, and then resume playback on those zones.

Obviously non-ideal.

If possible, you'd be much better off using a single zone in MC to play the "doorbell" and other paging duties to a discreet audio output on the PC, and then wire that and mix it in analog style to your output devices (before the amplifier). That may or may not be possible depending on how your system is set up. Unless you're willing to set all of your devices into Shared Mode in MC, and allow the Windows Mixer to butt in, then it'll be very difficult to accomplish what you want without it, however.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Having a zone play to many soundcards?
« Reply #2 on: June 14, 2015, 12:48:40 pm »

Yes and no.

You can, of course, duplicate all of your regular zones, and then link them together. However, if the audio devices in the "real" zones, are set up to use Exclusive Access (via WASAPI or ASIO) then you won't be able to play to the "master linked" zone when playback on any one of the regular ones is active.  You'd have to first stop MC on all zones, then play it, and then resume playback on those zones.

Obviously non-ideal.

If possible, you'd be much better off using a single zone in MC to play the "doorbell" and other paging duties to a discreet audio output on the PC, and then wire that and mix it in analog style to your output devices (before the amplifier). That may or may not be possible depending on how your system is set up. Unless you're willing to set all of your devices into Shared Mode in MC, and allow the Windows Mixer to butt in, then it'll be very difficult to accomplish what you want without it, however.

Thanks for the feedback. Is it easy to get an analogue mixer with several phono inputs and outputs as needed for a setup like this? I haven't really seen it. Another eventual way is to somehow via MCC-commands add the doorbell-sound too the playlist, jump to the doorbell sound, jump back again to the song before in the right position, and remove the doorbellsound from the playlist again. I have to think about this abit, it might actually be the easiest to use a shared audio-mode, even if it not ideal.
Logged

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Having a zone play to many soundcards?
« Reply #3 on: June 14, 2015, 06:07:24 pm »

If you search in Amazon for example for " stereo mixer" you should find a lot of options. I assume you'll also need long audio cables to go from the " doorbell" sound card to each zone (you've probably already got some for the normal sound cards too). You might also need a stereo distribution amplifier, not sure, or you might be able to get away with just splitting the signal multiple ways.

But I agree with Glynor, this is probably a better way of doing it than trying to interrupt several zones of audio, send the same audio to them and then resume them, from within MC. Via the MCC commands you should be able to at least pause each zone, play the doorbell in the dediacted zone, and then unpause them. Although you might have to be careful that the unpause doesn't start replaying something that has already been stopped but still hanging round in the playing now list!

I assume using Direct Sound as Glynor suggested would allow you to do the mixing via software rather than using extra cabling and hardware mixers, but not sure, can't get my head around it!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Having a zone play to many soundcards?
« Reply #4 on: June 14, 2015, 06:17:22 pm »

Paused counts as Playing as far as Exclusive Access is concerned.  MC keeps the stream open when the device is paused, which means it is still locked (essentially "playing silence").

You'd have to Stop on each Zone, and then start each one back up (so you'd need a fairly complex script to record the Playing Now list for each zone, and then re-load it after running the doorbell zone thing).  It could be done with COM access or MCWS, but...

It wouldn't be easy, that's for sure.

To avoid that, you wouldn't have to go all the way to DirectSound. You could use WASAPI in non-exclusive mode. But then you'd have to resample everything to match the default output format in Windows.

There's lots of ways to do whole-house audio. If it was me, I'd probably look at getting a QSC core and driving everything over the network.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Having a zone play to many soundcards?
« Reply #5 on: June 14, 2015, 06:32:48 pm »

If possible, you'd be much better off using a single zone in MC to play the "doorbell" and other paging duties to a discreet audio output on the PC, and then wire that and mix it in analog style to your output devices (before the amplifier).

You could do this, but it would be odd right?  Playing the door bell sound on *top* of any audio playing.  What you'd really want would be to Duck the music signal going to each amplifier and mix the doorbell with the ducked audio.  Which sounds like it's getting way overly complex to me.  I mean, it's possible for sure.  Just strange.

My gut feeling is that a dedicated speaker, or set of speakers for the doorbell sound would be best.  Possibly with a visual alert too?  Depending on how loud the music is typically played. 

Interesting problem.

Brian.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Having a zone play to many soundcards?
« Reply #6 on: June 14, 2015, 06:55:04 pm »

You could do this, but it would be odd right?  Playing the door bell sound on *top* of any audio playing.  What you'd really want would be to Duck the music signal going to each amplifier and mix the doorbell with the ducked audio.

Yep.  You'd definitely want to duck the program audio.  A QSC Core, or something similar with a programmable DSP could do it.  You could even script MC to do it fairly easily, but getting it to mix on multiple zones is tough (unless you abandon exclusive access, of course).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Having a zone play to many soundcards?
« Reply #7 on: June 14, 2015, 06:55:52 pm »

My gut feeling is that a dedicated speaker, or set of speakers for the doorbell sound would be best.

In almost all cases, I'd agree.

Unless you have more money than sense.  ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Having a zone play to many soundcards?
« Reply #8 on: June 14, 2015, 08:32:49 pm »

Using a shared output seems to me to be the easiest and cheapest solution, especially if the majority of your content is at one sample rate. Unless bitperfect output is very important to you and all of your zones are used for critical listening, I think that's the 95% solution.  

If you're like most people I know, you have one setup that you use for "serious hi-fi" and your other zones are mostly used for background music/casual listening, etc.  If you're in that camp you could probably set three of your zones to a shared mode and never notice.  And WASAPI in shared mode isn't bad, as long as you do any necessary resampling in JRiver.  In some cases, I'm not confident that the differences between music at its native sample rate and music resampled by JRiver are even audible.  I certainly can't consistently hear the difference in a blind ABX (conceding that I may just have a tin ear).

If bitperfect is important to you (or you can reliably hear the difference between resampled content and original content), for your "serious hi fi" zone, you could setup a shared zone and a separate "hi fi" exclusive access zone, so you could still optionally listen at native sample rates (recognizing that you might miss the doorbell in those intervals).  

If all your zones are used for critical listening, then I agree that it might well be worth investing in separate hardware.  I'll second the recommendation for separate speaker(s). Tiny speakers are very, very cheap, and setting up dedicated paging speakers will probably be cheaper than even the cheapest mixer(s) (that would actually meet your needs).  For example, parts express sells dozens of mini-drivers that are less than $5 a piece.  If you look for buyouts you can find 2" full-range drivers for $1 or $2 a unit.  If you just want a piezo buzzer (i.e. just ringing, no talking), you can get down under a $1.  So you could probably rig up separate paging speakers for $10 plus the costs of wiring and screws.  You can mount them in the wall with a hole saw for free, or build enclosures for cheap (although you'll probably spend more on the enclosures than you did on the parts).

If I were in your shoes, though, and really wanted seamless paging, I would just use a shared mode output. 99% of my music is 44.1KHz: I would put every zone in non-exclusive WASAPI, set my windows mixer to 44.1KHz, setup resampling in JRiver for the odd file at a different sample rate, and never look back.  
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Having a zone play to many soundcards?
« Reply #9 on: June 15, 2015, 02:04:23 am »

Thanks for a lot of good suggestions. My thoughts:

Buying a whole new whole-house setup for thousands of dollars just to get the doorbell to ring seems a bit over the top to me :)
So does buying a lot of ugly(?) small speakers to have everywhere, with external wiring that furthers clutters everything up, I already have nice speakers set up "everywhere".

So I think a software solution is best, seems like there is to options:

WASAPI shared mode, with a own zone just for doorbell duty, what is the functional/quality difference between this and just direct sound, or similar?
Making due with MCC-commands, although it seemed a bit more complex than i first envisioned, with the saving of the playing now and so on, there is no command just to add the "doorbell"-file to the current playing now? (and later remove it again after it has played)?
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Having a zone play to many soundcards?
« Reply #10 on: June 15, 2015, 07:46:56 am »

WASAPI shared mode, with a own zone just for doorbell duty, what is the functional/quality difference between this and just direct sound, or similar?

In terms of audible differences, not much (at least from my end).  The main difference I've observed personally is that I can usually set a lower playback buffer with WASAPI non-exclusive, and generally also get lower total latency.  Not super relevant from a pure audio standpoint, but handy for video or live playback.  That suggests that WASAPI (non-exclusive) is a "more direct" path or at least a more efficient one.  I'll let the API experts weigh in on whether WASAPI non-exclusive bypasses any portion of the windows mixer and it's attendant layers of processing (dither, etc.)

Quote
Making due with MCC-commands, although it seemed a bit more complex than i first envisioned, with the saving of the playing now and so on, there is no command just to add the "doorbell"-file to the current playing now? (and later remove it again after it has played)?

In the MC GUI you can add a song as "next to play."  You might be able to add the doorbell as "next to play" in the current playing now with a command (probably an MCWS call, as I don't see an MCC command that does this), but if you did that, the problem is that the doorbell would not play until the current song was over!  So you could instead try to add it as next to play and then skip to the next track.  But then playback would go on to the next song after the doorbell, and you've lost your place in the previous song.

What you'd need to be able to do to make it work (without messing around with storing the current playing now as a playlist) is a series of commands that 1) query how far along the current song was, 2) store the value, 3) add the doorbell as next to play, 4) skip to the next track and let the doorbell play, 5) skip back a track, and then 6) set the song to the timestamp you stored in step 2).

I'm not sure that MCC commands currently exist for 1) and 3) (although there's almost certainly something in the MCWS web interface for those).  MCC Commands for 4) 10003, 5) 10004, and 6) 10034 or 10048 currently exist.  And you'd need a scripting medium that allows for storing variables to accomplish 2).  

So it might be possible if you sniff around in the web API, but you'd be breaking newish ground (as far as I know).
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Having a zone play to many soundcards?
« Reply #11 on: June 15, 2015, 07:53:49 am »

Lets not forget 7) remove the doorbell song from the playlist, or else it will play again after the song is finished :)

Yeah, it won't have to be MCC-commands, all commands will be sent via the web-system anyway.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Having a zone play to many soundcards?
« Reply #12 on: June 15, 2015, 07:57:57 am »

I don't have the MCWS command-set in front of me (because I'm not in front of MC), but I'm almost positive it offers both a "query current playing time" function and a "set next to play" function (because current MC remotes need/use both those functions).  I don't know if they have a remove next file function, but you'll find out  ;D

I'll be interested to hear your progress!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Having a zone play to many soundcards?
« Reply #13 on: June 15, 2015, 08:00:17 am »

Thinking about this again...

Isn't simply pausing the music when the doorbell rings enough?  That way you can hear the actual doorbell chime coming from the original doorbell chime box?  ...and if you are playing music loudly enough so that you can't hear the chime in the first place, don't you want to keep the music paused while you go answer the door?

Alternatively, what about a sequence of <pause>, <delay some number of seconds>, <play> .  Again, this allows you to hear the chime from the chime box and won't lose your place in the music.

Brian.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Having a zone play to many soundcards?
« Reply #14 on: June 15, 2015, 08:13:44 am »

Thinking about this again...

Isn't simply pausing the music when the doorbell rings enough?  That way you can hear the actual doorbell chime coming from the original doorbell chime box?  ...and if you are playing music loudly enough so that you can't hear the chime in the first place, don't you want to keep the music paused while you go answer the door?

Alternatively, what about a sequence of <pause>, <delay some number of seconds>, <play> .  Again, this allows you to hear the chime from the chime box and won't lose your place in the music.

Brian.

Not bad  :)

Even if he's got a large house and couldn't hear the actual chime, the sudden pausing of the music would probably communicate that someone's at the door about as effectively as the chime would have. 
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Having a zone play to many soundcards?
« Reply #15 on: June 15, 2015, 09:09:56 am »

Thinking about this again...

Isn't simply pausing the music when the doorbell rings enough?  That way you can hear the actual doorbell chime coming from the original doorbell chime box?  ...and if you are playing music loudly enough so that you can't hear the chime in the first place, don't you want to keep the music paused while you go answer the door?

Alternatively, what about a sequence of <pause>, <delay some number of seconds>, <play> .  Again, this allows you to hear the chime from the chime box and won't lose your place in the music.

Brian.

Not a bad idea, however it is a bit more complicated in my house:

1. I don't have an actual doorbell chime in the first place
2. I don't always listen to music

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Having a zone play to many soundcards?
« Reply #16 on: June 15, 2015, 09:46:49 am »

Again, Paused counts as playing, as far as Exclusive Access is concerned.  If you're willing to disable Exclusive Access, then yes, that is the easiest way.

I agree with mwillems that the audible difference is negligible.  But bear in mind that you must set Outbut Format to resample everything to match the set default output format of your audio device.

If it was me, I'd set the default high (96kHz or so) and resample everything to that.  You could also go the 44.1kHz route explained by mwillems, though.  Depends on what you like, really.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Having a zone play to many soundcards?
« Reply #17 on: June 15, 2015, 10:05:34 am »

<Referring to pausing the music for doorbell>:

Not a bad idea, however it is a bit more complicated in my house:

1. I don't have an actual doorbell chime in the first place
2. I don't always listen to music

1.  So how do you hear the door bell right now?
2.  MC has a core command (10022) that can do "pause only".  It won't toggle unless you tell it to.  So you can issue this command to a paused media center and it will stay paused.  Issue it to a playing media center and it pauses.  Done.  :)

Brian.
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1268
Re: Having a zone play to many soundcards?
« Reply #18 on: June 15, 2015, 10:18:09 am »

<Referring to pausing the music for doorbell>:

1.  So how do you hear the door bell right now?
2.  MC has a core command (10022) that can do "pause only".  It won't toggle unless you tell it to.  So you can issue this command to a paused media center and it will stay paused.  Issue it to a playing media center and it pauses.  Done.  :)

Brian.

1. I just send a web-command to play the song, but it does clear the playlist.
2. Yeah, but not playing music all the times means that pausing the music won't reliably work as a signal that somebody is at the door, I need some sound to play in addition.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Having a zone play to many soundcards?
« Reply #19 on: June 15, 2015, 11:33:20 am »

Some things should be hardware and some things should be software.  In my opinion of course.  I wouldn't rely up on a computer and software for a door bell.  It just seems way overly complicated.  Why not just a chime box or two or three supplemented with a pause command?

Or just do the software mixer deal that's been discussed here.

Brian.
Logged
Pages: [1]   Go Up