INTERACT FORUM

Please login or register.

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

Author Topic: Linking files to zones  (Read 951 times)

JoeBoxster

  • Recent member
  • *
  • Posts: 35
Linking files to zones
« on: January 11, 2019, 03:34:45 pm »

Is there a way to link a media file to a specific zone by using a tag attribute? I would like to play a list of files and have each play in a predetermined zone. E.G.; a file will play in a certain zone based upon its genre.

Too esoteric?

Thanks
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Linking files to zones
« Reply #1 on: January 11, 2019, 08:37:18 pm »

[DSP] field.

I don't use it, but believe it works, although with the shortcoming that once set based on one file, then that Zone is selected until it is changed, so later media playback will use that Zone unless changed. This means that if you want to use the functionality for one file, you need to use it for all files. Basically, you could get around that by setting a default value (Zone) during import for all files, and then changing the value by exception as required. Or just have an Expression in Tag on Import to select the correct value in the first place.


Recent discussion on this: https://yabb.jriver.com/interact/index.php/topic,118859.msg822084.html#msg822084
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JoeBoxster

  • Recent member
  • *
  • Posts: 35
Re: Linking files to zones
« Reply #2 on: January 12, 2019, 11:31:03 am »

Hi Roderick,

Thanks, I'll work on it.
Logged

JoeBoxster

  • Recent member
  • *
  • Posts: 35
Re: Linking files to zones
« Reply #3 on: January 12, 2019, 01:45:48 pm »

Roderick,

You say - Basically, you could get around that by setting a default value (Zone) during import for all files, and then changing the value by exception as required. Or just have an Expression in Tag on Import to select the correct value in the first place.

I don't know how to do this. How do I set a default Zone value during import? Example please.

Thanks in advance.

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Linking files to zones
« Reply #4 on: January 12, 2019, 10:33:01 pm »

First, did you read all that thread I linked to, including Brian's concerns about using this method? It could be that using Zones and ZoneSwitch would be a better solution for you. There are plenty of examples on the forum for rules to use with ZoneSwitch.

But if you want to use this method...

Configure Auto-Import, either via "Options > Library & Folders > Configure Auto-import" or via the top menu in MC Standard View > Tools > Import > Configure Auto-Import.

Then select the Folder at the top that you have set up for your media files. Let's assume that you have a folder named D:\Music. When you select that folder, and click the Edit button you will see all the parameters for importing media files from that folder. Under "Import these file types" you might only have "Audio" ticked, or possibly "Audio" and "Playlists". You normally don't want to be importing video files found in your Music folder after all.

Below that you have a box titled "Apply these tags (optional)". Click the Add button and you will be able to enter Expressions to tag files as you wish. Select "Custom", in the drop-down Field list, select "DSP".

You can now enter Fields, Functions, and Variable into the "Value" field to build expressions that control how files are tagged. A very simple expression to set a default value would be;
[DSP]=[Player]

That would select the default Zone of "Player" and its associated DSP settings for all media files imported from that folder.

You might go a bit further and want to use high definition DSP settings for FLAC files, but otherwise use the default Zone, "Player". Try;
ifelse(isequal([File Type], flac), [DSP]=HDPlayer, 1, [DSP]=Player)

Which simply says if the File Type is FLAC, set the Zone to "HDPlayer", otherwise set it to "Player".


A more complex expression might be used to assign different DSP settings to Audio versus Video, if you were importing both from the same folder. For example;
ifelse(isequal([media type], Audio), [DSP]=HDPlayer, isequal([media type], Video), [DSP]=VPlayer, 1, [DSP]=Player)

Where HDPlayer is an Audio Zone you have set up for playing high definition audio, VPlayer is a Zone you have set up for playing video, and Player is the default Zone in MC, and would be used for any other media types, such as Podcasts. The " 1, [DSP]=Player" is a catch-all if the first two conditions aren't met. I did a couple of simple tests for an audio and a video file, and that expression works.




If you use this method I think you will have to set up a default value for the [DSP] field for all media types, so each Auto-Import folder will need to have a tagging rule added.

Yes, there is a learning curve for using expressions. If you describe exactly what conditions you are using to select a DSP setting, the names of the settings you have created and so forth, someone might help with creating the exact expression or expressions you need.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Linking files to zones
« Reply #5 on: January 13, 2019, 01:06:07 am »

I just realised that the expressions above could be simplified. I should have checked the Tag on Import Wiki article! You should read it as well.

[DSP]=[Player]
can be just
Player

ifelse(isequal([File Type], flac), [DSP]=HDPlayer, 1, [DSP]=Player)
can be just
if(isequal([File Type], flac), HDPlayer, Player)

ifelse(isequal([media type], Audio), [DSP]=HDPlayer, isequal([media type], Video), [DSP]=VPlayer, 1, [DSP]=Player)
can be just
ifelse(isequal([media type], Audio), HDPlayer, isequal([media type], Video), VPlayer, 1, Player)

Basically, the tag to update has already been set, so no need to specify it again.


Another example if you wanted to use the HDPlayer only when playing Audio file in FLAC format;
If(math( Isequal([Media Type], Audio, 1) & Isequal([File Type], flac, 1) ), HDPlayer, Player)

I was doing something similar and needed to combine two conditions, and the above method was the best I could get to work. I would have thought that just;
If( [Media Type]=Audio [File Type]=flac, HDPlayer, Player)
would work, where the two conditions would be combined by default with an AND operator in a similar way to the Search functions, but I couldn't get that to work at all. Search and Expressions are more different than I thought!


As always, test, test, test... because I could certainly be wrong, or there may be better expressions to achieve the result.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JoeBoxster

  • Recent member
  • *
  • Posts: 35
Re: Linking files to zones
« Reply #6 on: January 13, 2019, 10:49:12 am »

Many thanks.

I assumed that if I modify the DSP tag, then double clicking on the library file would result in that action. I entered the Zone descriptor in the DSP field value, and it played to the currently open Zone - not the DSP value. I have 2 Zones, HD and Source; tried [DSP]=[Source] and [DSP]=[HD] also simply Source or HD. It's still a mystery.

MC really needs a users guide to help the technically aware, but not gifted, to attempt this kind of customization. As users we would all be much more satisfied with the product, and I would be more likely to fund V25 if this were in the plan.

Thanks again.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Linking files to zones
« Reply #7 on: January 13, 2019, 06:18:56 pm »

My apologies. I've misunderstood how it works a little. In my defence I did say:

I don't use it, but believe it works

The DSP doesn't select a Zone by file, but selects a "DSP Preset" by file, and plays to the current Zone.

A "DSP Preset" is created by setting up the DSP settings that you want, then Saving them using the "Load/Save" button in the lower right corner of the DSP Studio. You can see that button in the images in the DSP Wiki Article.

Then when you edit the DSP field for an item in MC, you will get a dropdown list of defined "DSP Presets" to select from, which is an easy way to check that they exist. Once you have the DSP Presets created you can use the above process to assign them to file during Auto-Import.

Search the forum for "DSP Presets" to learn more.

I'm surprised no-one picked me up on my error!


Regardless of the above, I think you should look at using ZoneSwitch as an alternative to the above method of using DSP Presets. See the forum link in the Zones Wiki Article.


Yes, it is a shame that there is no User Guide. But I'm just a user giving my time for free, so I'm not going to write one. JRiver believes that the Wiki and Forum are sufficient.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JoeBoxster

  • Recent member
  • *
  • Posts: 35
Re: Linking files to zones
« Reply #8 on: January 14, 2019, 10:56:16 am »

Roderick,

You are the Man! The DSP Preset save was the key. Works as advertised and my understanding of the application has increased significantly.

Many Thanks
Logged
Pages: [1]   Go Up