INTERACT FORUM

Please login or register.

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

Author Topic: Expression to load custom DSP profile  (Read 954 times)

Mike Foran

  • World Citizen
  • ***
  • Posts: 212
Expression to load custom DSP profile
« on: November 14, 2018, 12:01:51 pm »

I have some tracks that I have custom DSP profiles for, mostly to reset EQ levels to something I prefer for that album alone. However, and correct me if this is no longer the case, once the DSP profile changes it doesn't change back unless a different profile is loaded. For that reason, I manually add a default DSP profile to the metadata of EVERY song so that it changes back automatically after one with a custom profile plays. It seems like an unnecessary step if I could write an expression to do it. Basically it would determine if the DSP tag is empty and if so to load a default DSP profile. If not, load the profile in the tag. I've been messing around with this for a while can can't seem to figure out how to do it. Is this possible?
Logged

amandalishus

  • Recent member
  • *
  • Posts: 29
  • Experienced MC user masquerading as novice.
Re: Expression to load custom DSP profile
« Reply #1 on: November 15, 2018, 01:44:31 am »

If I understand you correctly, I've been wondering something along the same lines. I just started using DSP presets in connection with the DSP field recently, and I've been very happy with the results. However, I was somewhat disappointed to find that the EQ settings did not return to the default when a file came up that did not have a value in the DSP field. Of course, the obvious answer was the set the DSP value to "Default" for every file for which I had not entered a value, and to automatically add that value to each file during the import process... but it does feel like an unnecessary extra step.

It had also occurred to me that it would be brilliant if we could add an expression value in the DSP setting. For instance, I have DSP presets named things like "Audio.Music.Rock.Prog" or "Audio.Music.Pop". It would be incredible if I could set the DSP field to something like "[Media Type].[Media Sub Type].[Media Type].[Media Sub Type].FirstNotEmpty(Replace[Genre],\,.), Default)". (Forgive any syntax errors there, I didn't test it... You get the idea.) Is something like that possible? Obviously I could set a static value at import, but I'd like to be able to just enter the expression in the DSP field; that was, if/when I set a new Genre value for the file, I wouldn't have to remember to change the DSP value as well.

And as long as I'm throwing around stupid questions (or wish-list items), is there any way to find the list of available DSP presets in the expression language? It would be really cool if I could check to see if the result of the expression is an existing preset and fall back to a default when it is not.
Logged
[color="#C133FF"][size=18]Documentary aficionado. [/size][size=16]Music lover. [/size][size=14]Software developer. [/size][size=12]Transgender geek. [/size][size=10]Interested in everything. [/size][size=8]Easily distracted...[/size][/color]

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3971
Re: Expression to load custom DSP profile
« Reply #2 on: November 15, 2018, 01:49:27 am »

You can do that sort of thing today using zoneswitch, i.e. rule based selection of a DSP configuration.

Personally I don't see the value in making the DSP preset name be the concatenation of some tag values, feels brittle to me.
Logged

amandalishus

  • Recent member
  • *
  • Posts: 29
  • Experienced MC user masquerading as novice.
Re: Expression to load custom DSP profile
« Reply #3 on: November 15, 2018, 12:24:18 pm »

You can do that sort of thing today using zoneswitch, i.e. rule based selection of a DSP configuration.

I've just started playing around with ZoneSwitch, which was a great help in allowing me to have different DSP profiles for Audio and Video files, but I've been a bit hesitant to make it much more granular than that. I mean, I'd like to have different EQ settings for Documentaries than for Movies, or for Industrial music rather than Classical, but I feel like I'd end up with a huge list of zones if I broke it down any further. Also, I would think that would cause a problem if I had a playlist that contained multiple genres and set it to play shuffled... What zone would it play in? Would each track switch to a different zone?

Obviously, I haven't completely grokked the ZoneSwitch functionality yet, so maybe I'm just missing your point. I suspect a full discussion of everything that I misunderstand about ZoneSwitch probably deserves a separate thread. I've actually been compiling a list of questions about it which I'll probably post in the not-too-distant future, so I'm sure you'll have your opportunity to explain some of my misconceptions then.


Personally I don't see the value in making the DSP preset name be the concatenation of some tag values, feels brittle to me.

I'm not sure what you mean by "brittle" in this context, but I suppose it's not terribly important. It seemed like it would be useful to me, based on the way I organize things, but obviously YMMV. I thought a lot of people probably used different EQ settings for things in the "Rock" genre vs. things in the "Pop" genre, for instance, but perhaps that assumption is incorrect.
Logged
[color="#C133FF"][size=18]Documentary aficionado. [/size][size=16]Music lover. [/size][size=14]Software developer. [/size][size=12]Transgender geek. [/size][size=10]Interested in everything. [/size][size=8]Easily distracted...[/size][/color]

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3971
Re: Expression to load custom DSP profile
« Reply #4 on: November 16, 2018, 03:33:15 am »

I've just started playing around with ZoneSwitch, which was a great help in allowing me to have different DSP profiles for Audio and Video files, but I've been a bit hesitant to make it much more granular than that. I mean, I'd like to have different EQ settings for Documentaries than for Movies, or for Industrial music rather than Classical, but I feel like I'd end up with a huge list of zones if I broke it down any further.
I agree it would be unwieldy if you have a lot (or even more than a few) zones, I was just pointing out that there is a way to do this today. I agree that it would be nice if the dsp tag feature were usable in practice but unfortunately it's not. FWIW this, for me,  woul mean the ability to combine multiple dsp presets into 1 active one (so you could have a base configuration and then add track specific pieces on top), the same revert to a base configuration for untagged tracks & some way to identify different line in feeds. i.e. zones IMV should be for physical locations not dsp configuration.

by brittle I mean easy to make a mistake that means the intended configuration doesn't apply, anything text based has this problem (e.g. a simple typo in like Audio.Music.Rock.Pog would mean the rule misses).
Logged

amandalishus

  • Recent member
  • *
  • Posts: 29
  • Experienced MC user masquerading as novice.
Re: Expression to load custom DSP profile
« Reply #5 on: November 16, 2018, 10:49:34 pm »

I agree it would be unwieldy if you have a lot (or even more than a few) zones, I was just pointing out that there is a way to do this today. I agree that it would be nice if the DSP tag feature were usable in practice but unfortunately it's not. FWIW this, for me,  would mean the ability to combine multiple DSP presets into 1 active one (so you could have a base configuration and then add track specific pieces on top), the same revert to a base configuration for untagged tracks & some way to identify different line in feeds. i.e. zones IMV should be for physical locations not DSP configuration.

Yeah, it seems you do understand exactly my point... a list of zones for each genre would eat up a lot of tree space all the time; I also question whether it would work on an album like say Ween, who generally hit a different genre with each track. Otoh, a list of DSP presets would be much easier to handle, especially if you never really have to interact with them manually except to modify an existing one (like if you want to make slight changes for a specific track, as you mention above) and save it under a new name.

by brittle I mean easy to make a mistake that means the intended configuration doesn't apply, anything text based has this problem (e.g. a simple typo in like Audio.Music.Rock.Pog would mean the rule misses).

Agreed, mistakes would be possible; however, I use the subtree functionality extensively, and it's pretty easy to spot a mistake. I can drill down by genre to Audio\Music\Rock and instantly see that there's a Pog folder as well as a Prog folder and quickly make the correction. Also, the autocomplete options in the text entry fields make such mistakes difficult to make unless you are creating a new subgenre.

At any rate, as you point out, this functionality doesn't currently exist, so it really doesn't matter. I guess this really comes down to a feature request, and since I'm just starting out on the forum I'm not sure how to go about making such a request in any official manner.

As it stands, I suppose I can occasionally select every track in my database and enter "=Replace([Genre],\,.)" (again, not checking my syntax, you get the point) and achieve the desired result. If I could access a list of existing DSP presets from an expression, I could build a more complex expression that changed it to "Default" if the resulting Replace did not result in a valid preset, but unless I miss my guess that would be another feature request.
Late-Breaking Edit: I just checked, and I can save the DSP preset as "Rock\Prog", making the Replace function unnecessary. That makes things a little bit easier :)

Y'know, for a moment I thought I had accidentally hijacked someone else's question to make some feature requests that no one but me would ever use... but then I looked back at the original message and realized I can help Mike:

I have some tracks that I have custom DSP profiles for, mostly to reset EQ levels to something I prefer for that album alone. However, and correct me if this is no longer the case, once the DSP profile changes it doesn't change back unless a different profile is loaded. For that reason, I manually add a default DSP profile to the metadata of EVERY song so that it changes back automatically after one with a custom profile plays. It seems like an unnecessary step if I could write an expression to do it. Basically it would determine if the DSP tag is empty and if so to load a default DSP profile. If not, load the profile in the tag. I've been messing around with this for a while can can't seem to figure out how to do it. Is this possible?

Turns out my wish-list items would solve Mike's problems too. However, for now, my idea above can kind of help, Mike...

Step 1: Go to Audio\Files in the tree view, select any track, and then hit Ctrl-A to select all tracks. Open the tagging menu, and in the DSP file enter the following expression (without the quotes): "=FirstNotEmpty([DSP],Default)". That will set the value to "Default" for every file for which the [DSP] field is empty.
Step 2: When you import files, go to the "Apply these tags" section at the bottom of the dialog. Hit Commands -> Add -> Custom. Select the field "DSP" and enter the value "Default". Check the box at the bottom that says "Skip for files...", just in case you ever import something which already has a DSP flag.
Step 3: (optional) If you use Auto-Import, you can configure this separately for each Auto-Import folder exactly as described in Step 2. That way, if you have different Auto-Import folders for Audio and Video (for instance) you can only set the "Default" value in the Auto-Import\Audio folder.


I suppose you could get really crazy and have an Auto-Import\Audio\Rock folder, where you set the [DSP] field to "Rock', and Auto-Import\Audio\Classical folder where you set the [DSP] field to "Classical", etc. It all depends on how crazy-complicated you want to get. Me, I obviously like crazy-complicated, but YMMV.

And I still think it would be cool if we had the ability to use field values directly the in the [DSP] field as I originally suggested... that would make my crazy-complicated idea much easier to implement. Of course, I don't know how the code is implemented, so it's possible that it would be crazy-complicated to implement programmatically, so I'll just leave this dangling here as a suggestion and see if anyone bites... :D
Logged
[color="#C133FF"][size=18]Documentary aficionado. [/size][size=16]Music lover. [/size][size=14]Software developer. [/size][size=12]Transgender geek. [/size][size=10]Interested in everything. [/size][size=8]Easily distracted...[/size][/color]

Mike Foran

  • World Citizen
  • ***
  • Posts: 212
Re: Expression to load custom DSP profile
« Reply #6 on: November 17, 2018, 10:41:15 am »

Thanks amandalishus for bringing it back around. I am not entirely sure of the point of the expression. If I am manually tagging all the files with an empty DSP tag, why not just set the DSP field to "Default" and have a "Default" DSP profile? I already have the auto import settings to add the DSP tag as "Default." I guess I was hoping that I could avoid that and have a cleaner solution. My video already has it's own zone specific setup, so this only applies to audio files for me.
Logged

amandalishus

  • Recent member
  • *
  • Posts: 29
  • Experienced MC user masquerading as novice.
Re: Expression to load custom DSP profile
« Reply #7 on: November 17, 2018, 02:20:20 pm »

Thanks amandalishus for bringing it back around. I am not entirely sure of the point of the expression. If I am manually tagging all the files with an empty DSP tag, why not just set the DSP field to "Default" and have a "Default" DSP profile? I already have the auto import settings to add the DSP tag as "Default." I guess I was hoping that I could avoid that and have a cleaner solution. My video already has it's own zone specific setup, so this only applies to audio files for me.

Gotcha... so you already have 99% of my solution above. The point of the expression is to set everything that was already in your library prior to setting up your Auto-Import tag. If you already have "Default" set for everything that doesn't have a specific profile setting, then that's really the best you can do for right not (at least as far as I understand things). It's certainly how I have mine configured.

I'd like to see a cleaner solution too... and the simplest possible implementation of that, from the development side, is probably for them to set the DSP profile to "Default" any time the field is left blank. My wish-list items above are for a far more intricate set-up, essentially allowing different "Default" settings for different values in the "Genre" field... but as such, they're probably far more difficult to implement programmatically.

One of my general mantras in life: "If you're gonna dream, dream big." I manage a development team, so I always suggest the most thoroughly configurable (and therefore, usually the most complicated) solution/feature that I can imagine. Then it's kinda like haggling... "Ten for that? You must be mad!" It's easier to find the Minimum Viable Product if you specify the Maximal Desired Product first ;)

And y'know, maybe I just like talking to listen to the sound of my own voice... :)
Logged
[color="#C133FF"][size=18]Documentary aficionado. [/size][size=16]Music lover. [/size][size=14]Software developer. [/size][size=12]Transgender geek. [/size][size=10]Interested in everything. [/size][size=8]Easily distracted...[/size][/color]
Pages: [1]   Go Up