INTERACT FORUM

Please login or register.

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

Author Topic: Need help with Zone Switch!  (Read 2562 times)

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Need help with Zone Switch!
« on: February 05, 2014, 03:52:11 pm »

I have the following zones:

Audio 1
Audio 2
Video 1
Video 2

The secondary zones have volume levelling turned on while the primary zones have no DSP settings.

I have set up Zone Switch rules to switch between Video 1 and Video 2 depending on the media sub type and to stop playback in the alternative video zone.

I would also like to be able to switch to Audio 1 when selecting an audio track to play, without stopping playback in the current zone, but only to switch if currently in a video zone, not if currently in Audio 2.  Is this possible?

I've been able to do a rule to switch to Audio 1, when an audio track is selected, without stopping playback in the current zone but it also switches if I'm in Audio 2, which I want to be completely independent and manual. I can't work out if this is possible and, if it is, how to configure it.


Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Need help with Zone Switch!
« Reply #1 on: February 05, 2014, 05:17:54 pm »

ZoneSwitch rules work as relationship groups.  If you have one zone set to stop playback in one or more zones, make sure all those other zones in the relationship do likewise.  So if Audio 1 stops playback in Audio 2, Audio 2 must do likewise to Audio 1.

Otherwise, there is no relationship, so playback would not be stopped in other zones.

When you say "without stopping playback" "in the current zone", what do you mean by "current zone"?  The one that the UI has focus, and is the target of the media controls?   If so, this is a problem if you have Audio 1 and 2 related to each other, and Audio 1 is playing, and you're targeting Audio 2 (or, as you say, "if I'm in Audio 2").  Your ZoneSwitch rules will then by definition stop playback in the other zone (Audio 1), if you've defined them to do so.
Logged
The opinions I express represent my own folly.

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #2 on: February 05, 2014, 05:49:47 pm »

"Current Zone" is the one that's currently selected, i.e. the one that would say "Current" in the overview screen.

Video 1 and Video 2 have mutual stopping as there is only one video device and I want the selected video to play with the right settings automatically depending on its type without having to switch first.  That bit is working.  But many times I've been in a video zone and wanted to play audio but forgot to change the zone or hadn't noticed that I was in a video zone.  (That's one of the usability issues with zones in that there's no way to move a playing track to another zone if it's accidentally started there, and it's a real pain in Theater View to correct such a mistake).  So I'd like it to automatically switch to an audio zone (Audio 1 specifically) when an audio item is played in a video zone, however in that case I don't want to stop video playback automatically because the audio output is a different device from the video and it might be intended for playing in a different room at the same time as video in the main room.  Again, this is working.

The problem is Audio 2. This zone does not appear in any Zone Switch rules, it has no relationship with Audio 1 nor the Video zones, and so I thought it would be completely independant and manual. However, if I'm in Audio 2 and play a track, the Zone Switch rule that I've defined for Audio 1 kicks in and the track plays in Audio 1.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Need help with Zone Switch!
« Reply #3 on: February 05, 2014, 06:01:49 pm »

What is the trigger for Audio 1?

You probably want to add Audio 2 as the fallback zone (bottom of list), and be sure that no rules above it are triggered.
Logged
The opinions I express represent my own folly.

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #4 on: February 05, 2014, 06:08:05 pm »

Audio 1 just has a condition of Media Type = Audio.

I can see that this is difficult to cater for as that, understandably, will unconditionally always play audio in Audio 1, even if you're currently in Audio 2, which is exactly as it's designed to do I guess, but I'd like to make audio play in Audio 2 if the current zone is already Audio 2.

It's like I need to be able to add another condition that says "AND Current Zone is not Audio 2".

If Audio 2 is the fallback zone, then it will never be reached because all audio items will already have been caught by the Audio 1 rule above it.  If I remove the Audio 1 rule then I can't get auto-switching to Audio if I'm mistakenly in a video zone.
Logged

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #5 on: February 05, 2014, 06:10:29 pm »

Ah.....<light bulb moment>....

If I remove the trigger on Audio 1 and move it to the bottom of the list, might this work?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Need help with Zone Switch!
« Reply #6 on: February 05, 2014, 06:12:37 pm »

Yeah, its a little curious.

ZoneSwitch is just a simple rule-based targeting system.  When enabled, the first target whose rules evaluate as True, wins.

And there is no support in the expression language for asking about the currently selected zone, nor for asking about if files are playing in other zones.
Logged
The opinions I express represent my own folly.

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #7 on: February 05, 2014, 06:27:20 pm »

Ah.....<light bulb moment>....

If I remove the trigger on Audio 1 and move it to the bottom of the list, might this work?

No, it didn't work. Currently in Audio 2 (which has no relationship with anything else) but it switched to Audio 1.

It worked when I set Audio 1 to stop playing in the two video zones, but that's not what I want to do.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Need help with Zone Switch!
« Reply #8 on: February 05, 2014, 06:36:40 pm »

No, it didn't work. Currently in Audio 2 (which has no relationship with anything else) but it switched to Audio 1.

It worked when I set Audio 1 to stop playing in the two video zones, but that's not what I want to do.

I don't think you can do what you want.  Rules are either global or limited to a relationship.  If your "audio 1" were in a mutual stop playback relationship with the two video zones, and audio 2 were not, then you could play whatever you wanted in audio 2 and it would never trigger the other zones (that's how I have some of my zones setup).  

However, because audio 1 is "detached" (i.e. doesn't stop playback in other zones) all audio will be re-routed to audio 1 under all circumstances unless you turn off zoneswitch or put another rule above it that will send things to audio 2.    

It's been suggested that there should be a way to "Group" zones other than through reciprocal stop playback commands, but we're not there yet.
Logged

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #9 on: February 06, 2014, 03:38:14 am »

Rules are either global or limited to a relationship.  If your "audio 1" were in a mutual stop playback relationship with the two video zones, and audio 2 were not...

I had another thought to try tonight, probably won't work as I would just be trying to trick it, but it's worth a try if only for curiosity!

I could define a Dummy zone, give it a rule that will never trigger, and make it stop playback in all zones (Audio 1, Video 1, Video 2) and all other zones too stop its playback. Even though Audio 1 still won't have stop rules for the video zones, it now has a stop rule for Dummy which might make Zone Switch think it's in an exclusive group. Or do all zones need stop relationships with all other zones before that would work?
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Need help with Zone Switch!
« Reply #10 on: February 06, 2014, 06:54:33 am »

I had another thought to try tonight, probably won't work as I would just be trying to trick it, but it's worth a try if only for curiosity!

I could define a Dummy zone, give it a rule that will never trigger, and make it stop playback in all zones (Audio 1, Video 1, Video 2) and all other zones too stop its playback. Even though Audio 1 still won't have stop rules for the video zones, it now has a stop rule for Dummy which might make Zone Switch think it's in an exclusive group. Or do all zones need stop relationships with all other zones before that would work?
actually i was thinking if a Dummy rule could work. so audio would play in audio1 without stopping video, but there is an other rule that never happens and points to zone audio1, but that would stop video playback.

i should test that later.

 :)
gab
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Need help with Zone Switch!
« Reply #11 on: February 06, 2014, 07:41:43 am »

I had another thought to try tonight, probably won't work as I would just be trying to trick it, but it's worth a try if only for curiosity!

I could define a Dummy zone, give it a rule that will never trigger, and make it stop playback in all zones (Audio 1, Video 1, Video 2) and all other zones too stop its playback. Even though Audio 1 still won't have stop rules for the video zones, it now has a stop rule for Dummy which might make Zone Switch think it's in an exclusive group. Or do all zones need stop relationships with all other zones before that would work?

As I recall if they aren't all reciprocal the logic works funny.  I can't test right now, but the way I recall it working is that if the "stop playbacks" aren't reciprocal (i.e. like you're describing), the zoneswitch only works in one direction.  So for example, if you tried to play audio in the video zones, the switch would work, but if you tried to play video in "audio 1" it might not switch back to the video zones. But I'm not 100% sure that's how it worked, that's just my recollection. 

What you're describing could potentially work, and it's certainly worth a try. 
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Need help with Zone Switch!
« Reply #12 on: February 06, 2014, 12:46:47 pm »

As mwillems states, the relationships need to be mutual, or unexpected results can occur.

If you add the Dummy zone, and set it to stop playback in the other zones, then all of those other zones must also stop playback of the dummy zone, as well as each other.

Think of this as drawing on a piece of paper non-intersecting, non-containing circles (i.e. none touching, and none inside another), and writing the names of your zones into one and only one circle.  For each circle, each zone named inside must stop all other zones in that same circle.  And no zones in a circle should attempt to stop zones in other circles.
Logged
The opinions I express represent my own folly.

csimon

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1686
Re: Need help with Zone Switch!
« Reply #13 on: February 06, 2014, 01:39:15 pm »

Correct, it didn't work LOL!
Logged
Pages: [1]   Go Up