Skip to main content

Topic: Release: Dynamic DSP: gives custom effect chains for individual tracks (Read 17795 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • WilB
  • [*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #25
Thanks for doing this so promptly.

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #26
ps, in the past I have looked into why the component crashes when launched from view/dsp.  I have been unable to figure it out.

The bizarre thing is that when I test with the debugger attached, foobar does not crash, so it doesn't help to step through.  What does happen in debug mode is that the chain configure window comes up blank with no dsps in the chain.  If anyone has insights into the problem this is one issue I'd be very glad to fix.  Although I almost wonder if there is a problem in the framework?
  • Last Edit: 04 April, 2014, 12:29:19 PM by popatr

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #27
After using this plugin for some time I need to ask some question about the way it works...
The question is - does Dynamic DSP insert content of its internally configured DSP chain and lefts rest of chain intact or just... replaces whole chain with the one programmed inside Dynamic DSP?

My normal DSP Chain looks like this:
Dynamic DSP
Skip Silence
Downmix multichannel to stereo
Playback Rate Shift - most of time just set to 100% (unaltered playback rate)
Skip Track

Dynamic DSP is used to occasionally change playback rate on selected tracks. I created additional DSP chains that are used for configuring Dynamic DSP plugin. In general they are copies of my normal regular DSP chain with removed Dynamic DSP and adjusted playback rate via Playback Rate Shift plugin. And I started thinking if this isn't source of my occasional problems with Skip Track component. Initially for some reason I thought that this is obvious that Dynamic DSP must fully replace original DSP chain - that's why all chains used by DDSP are nearly copies of my main chain. But now I wonder if don't cause that for some files (tagged to trigger DDSP) my DSP chain looks like this:

Skip Silence
Downmix multichannel to stereo
Playback Rate Shift - set somewhere between 95 and 107%
Skip Track
Skip Silence
Downmix multichannel to stereo
Playback Rate Shift  (unaltered playback rate)
Skip Track

And I don't care for double Playback Rate Shift occurrence but about Skip Silence and especially about Skip Track...

Popatr - your answer, as the creator of this plugin will be much appreciated.

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #28
After using this plugin for some time I need to ask some question about the way it works...
The question is - does Dynamic DSP insert content of its internally configured DSP chain and lefts rest of chain intact or just... replaces whole chain with the one programmed inside Dynamic DSP?

My normal DSP Chain looks like this:
Dynamic DSP
Skip Silence
Downmix multichannel to stereo
Playback Rate Shift - most of time just set to 100% (unaltered playback rate)
Skip Track

Dynamic DSP is used to occasionally change playback rate on selected tracks. I created additional DSP chains that are used for configuring Dynamic DSP plugin. In general they are copies of my normal regular DSP chain with removed Dynamic DSP and adjusted playback rate via Playback Rate Shift plugin. And I started thinking if this isn't source of my occasional problems with Skip Track component. Initially for some reason I thought that this is obvious that Dynamic DSP must fully replace original DSP chain - that's why all chains used by DDSP are nearly copies of my main chain. But now I wonder if don't cause that for some files (tagged to trigger DDSP) my DSP chain looks like this:

Skip Silence
Downmix multichannel to stereo
Playback Rate Shift - set somewhere between 95 and 107%
Skip Track
Skip Silence
Downmix multichannel to stereo
Playback Rate Shift  (unaltered playback rate)
Skip Track

And I don't care for double Playback Rate Shift occurrence but about Skip Silence and especially about Skip Track...

Popatr - your answer, as the creator of this plugin will be much appreciated.


Dynamic DSP does not replace the whole chain.  If I understand your setup, then your illustration of DSP chain with duplicates is a correct understanding of what would happen when dynamic dsp triggers as you have it setup.  How you set it up is up to you, but two ideas come to mind:

Main chain looks like this:
Skip Silence
Downmix multichannel to stereo
DynamicDSP
Skip Track

DynamicDSP setup:
chain named faster:
playback Rate Shift: 107%

chain named slower:
playback rate shift: 97%

In this case Dynamic DSP becomes a playback rate shift AND that's ALL it controls.  Every other effect comes from the normal chain.

ALternate setup:
Main chain looks like this:
DynamicDSP

DynamicDSP Setup:
(titleformat script (forgive psuedocode): if %trackdsp% then %trackdsp% else "Default")

chain named "Default":
Skip Silence
Downmix multichannel to stereo
Skip Track

chain named "Slower":
Skip Silence
Downmix multichannel to stereo
playback rate shift 97%
Skip Track

chain named "faster":
Skip Silence
Downmix multichannel to stereo
playback rate shift 107%
Skip Track

Remember, you can put more than one dynamicDSP in a chain with different jobs.  You can even put dynamicdsp inside itself.
my main chain looks something like this right now:
main effect
main effect
Dynamic DSP <-this one does drastic things to tracks labeled as poorly recorded speech
Dynamic DSP <-this one shifts playback rate
main effect
main effect

The main effects apply to ALL tracks including those which trigger dynamic DSP
The Dynamic DSPs can trigger independently or together depending on how the tracks are tagged.  They each do their own job not knowing what else is going on in the chain.

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #29
Excellent answer !! Thank you !!

EDIT:
I decided to do it in this way:
Code: [Select]
Main chain looks like this:
Skip Silence
Downmix multichannel to stereo
DynamicDSP
Skip Track

DynamicDSP setup:
chain named faster:
playback Rate Shift: 107%

chain named slower:
playback rate shift: 97%

as I need to have quick access to Playback Rate Shift plugin under normal circumstances (not triggered) - for example when I just want to play with playback rate on particular track. Hiding "Default" chain inside Dynamic DSP would be inconvenient in this case. Anyway - that's still great idea of setup.
  • Last Edit: 03 May, 2014, 04:46:12 AM by EpicForever

  • wiregrind
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #30
I've been using this plugin a lot, it's great for automatically setting different low-pass filters to chiptune songs.

I'm basically necro-ing the thread but I'd like to be able to use values like "Less than" in the plugin, for example a chain that is triggered by any song with a Sample Rate Lower than 44100 Hz. I'm not sure if it's possible with the current version, is there any code to make this work?
It would be really useful, because it's hard to edit custom DSP tag info in chiptune / non-standard files.
  • Last Edit: 26 February, 2015, 12:29:32 PM by wiregrind

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #31
I've been using this plugin a lot, it's great for automatically setting different low-pass filters to chiptune songs.

I'm basically necro-ing the thread but I'd like to be able to use values like "Less than" in the plugin, for example a chain that is triggered by any song with a Sample Rate Lower than 44100 Hz. I'm not sure if it's possible with the current version, is there any code to make this work?
It would be really useful, because it's hard to edit custom DSP tag info in chiptune / non-standard files.


$ifgreater(%sameplerate%, 44099, , 'lowratechain')

Put that where you currently see [%trackdsp%]
That should work.  As titleformat lets you do if,then,else etc, you should be able to accomodate very complicated setups.
Here is the titleformat reference:
http://wiki.hydrogenaud.io/index.php?title...25samplerate.25
Dig into that, put on your programmer's hat, and create a script that names the chain you want.  It's possible.  And nobody can tell you exactly what script will serve your purposes except you.
  • Last Edit: 03 March, 2015, 11:46:23 AM by popatr

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #32
if you want to use trackdsp tag if present but fall back to samplerate logic, you could do this:

$if2([%trackdsp%],$ifgreater(%samplerate%,44099,,lowbitratechain))

but to reiterate you can do A LOT if you can puzzle it out.  One thing I do, is create a custom playlist column which I title "DSP" and put my dynamicdsp titleformat script as the "pattern".  Actually in my column, I surround my script with - chars because spaces at the beginning and end are unfortunately important, and the - chars help me determine that I've got no trimming issues.  So in the playlist you can see which chain your script names for each song.

  • Mario66
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #33
Hi,

I really like this component and I use it for some time now.
Recently, I began to experiment with the source code and added some features that I missed and I decided to share the result with you. I'm a passionate C++ developer, but I'm new to foobar2000 development, so don't expect miracles especially because the SDK documentation is quite limited. I mainly learned from examples provided by the SDK and here in the forum.
My component should be compatible with the original component, so you can just upgrade and all your scripts and chains should continue to work (except if you use the semicolon character in one of your chain names, see below). However, to be safe you may consider to backup your foobar200 AppData directory.

Changes (for users)
- Some GUI improvements (preview text box, added button to copy a DSP chain, ...)

- Added ability to activate more than one DSP chain at the same time by using the semicolon as separator character. For example, if your script evaluates to "Equalizer;Crossfeed", and you have a chain named "Equalizer" and another named "Crossfeed", then both will be applied. The order matters! In the example "Equalizer" will be applied first and "Crossfeed" second.
This feature is optional. You can turn it off, if you want to use the semicolon as regular character again.

- Added ReplayGain Scanner mode that takes a given DSP present into account. The motivation is that if you have different DSPs per track and some of the DSPs change the volume of your track, this may lead to loudness inequalities. With this new mode, you are first prompted to choose a DSP present, then the chosen DSP present will be applied to the tracks before they are forwarded to the build-in ReplayGain Scanner. [Requires ReplayGain Scanner component to be installed] You can access this mode via. the "ReplayGain" context menu > "Scan ... (plus DSP)".

- Updated to latest SDK, therefore requires foobar200 1.3 or later.

- Fixed crash if you call the configuration dialog from "View" > "DSP".*

Changes (for developers)
- Upgraded project to Visual Studio 2013 Update 4 and SDK 2015-01-15
- Replaced boost::bind by std::bind (C++11 feature)

Credits
- popatr for his great component and for sharing the source code.
- kode54 for sharing the source code of his [a href='index.php?showtopic=86404']R128Scan[/a] component from which I borrowed some code [only some GUI mechanics, not the algorithm]

Warranty
None. My component is provided "as-is", use at your own risk. Nevertheless feel free to post about any issues you have with my component.

[a href='index.php?showtopic=108904']Download[/a]

___
*
Quote
ps, in the past I have looked into why the component crashes when launched from view/dsp. I have been unable to figure it out.

If you launch the component from View > DSP, it will run in a different thread (different from the main thread), so you'll need a main_thread_callback for specific functions that will otherwise crash foobar. I had a forum discussion recently about a similar issue: http://www.hydrogenaud.io/forums/index.php?showtopic=108705

  • eahm
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #34
Mario66, first of all thank you for the component, I don't use it much but it can be really useful one day.

Second, I don't think you should call it v2, it's not the second version of the same component made by the same developer, it's a mod, a different version. I think "Dynamic DSP Plus or +", "Dynamic DSP Mod" or "Dynamic DSP M66" would work better.

Anyone?
  • Last Edit: 08 May, 2015, 01:31:57 PM by eahm

  • Mario66
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #35
You are right. "Dynamic DSP Mod" would have been a better name that "Dynamic DSP v2" to avoid confusion.

Unfortunately I can't edit any of my posts or change any of my uploaded files any more. But I will consider your advice in the future.

Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #36
Thank you popatr and Mario66 for these components. Not long ago I was looking for a component that did exactly this but didn't find one. I took another look today and found this.

I am using it in my headphone DSP chain to mix some older stereo albums and tracks to mono, and to change the gain of the center channel which is too loud in some of my 5.1 channel tracks.

I also think the replaygain scan with DSP is a great addition. I mix my 5.1 channel audio to stereo, so with the DSP applied the peak value is now useful. Also the tracks with the modified gain now have accurate replaygain values.

  • Coreda
  • [*][*][*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #37
Is there a way to check / indication of which effects are active for the currently playing track? If not I'd love to see such a feature added.

Would be ideal if a custom title formatting function could be added, so the user can check via their own title formatting in the status bar, etc. Have actually been looking for such a feature for a while.

As it is now I can't tell if an effect is active by looking at the DSP sub-menu or by checking the Dynamic DSP window (apart from double-checking the script function evaluates correctly).
  • Last Edit: 06 March, 2016, 11:28:43 PM by Coreda

  • Coreda
  • [*][*][*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #38
Have noticed that a VST plugin called FNequalizer (as bundled in this skin for the plugin) doesn't save the settings via Dynamic DSP. Each time the EQ is the same flat curve after re-opening the configuration.

  • Isabelxxx
  • [*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #39
Is there a way to check / indication of which effects are active for the currently playing track? If not I'd love to see such a feature added.
The mod version has a preview function, you can play anything you want and check if it triggers the script, but that's all..

Agree about your request for new features for custom title formatting, but that should be also suggested to the main developers of foobar.

Currently you can do it manually adding to the status bar formatting the same "logic" you put in the DSP.
i.e.
DSP:
Code: [Select]
[%trackdsp%]
Status bar:
Code: [Select]
$if(%trackdsp%, DSP used: %trackdsp%)

Obviously  with complex code you then have the possibility that the DSP is not really working but your status bar says the opposite or things like that... that's where new functions really related to DSPs would be useful.

  • Coreda
  • [*][*][*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #40
The mod version has a preview function, you can play anything you want and check if it triggers the script, but that's all..

Do you have a link to the modded version? The one Mario66 posted above has a broken download link.

Agree about your request for new features for custom title formatting, but that should be also suggested to the main developers of foobar.

Currently you can do it manually adding to the status bar formatting the same "logic" you put in the DSP.
i.e.
DSP:
Code: [Select]
[%trackdsp%]
Status bar:
Code: [Select]
$if(%trackdsp%, DSP used: %trackdsp%)

Obviously  with complex code you then have the possibility that the DSP is not really working but your status bar says the opposite or things like that... that's where new functions really related to DSPs would be useful.

By the example above did you mean to check if the formatting returns the correct value, or to display if the DSP is active? If the latter it doesn't appear to work for me. Would be great though to have an additional title formatting option that would return which effects were currently active.
  • Last Edit: 22 March, 2016, 09:16:52 AM by Coreda

  • Isabelxxx
  • [*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #41
I mean to put the same code in both the Dynamic DSP and the statusbar. That was my example, obviously it will not work for you. Adjust it!

I check for a tag in the files to use that "tag" DSP.

Then I check in the status bar the same so it will add that info if it uses any "tag" DSP.

There is no real relation between the status bar and dsp obviously, I can not check any other DSP status only those I "choose" by explicitly applying the same logic in the status bar formatting and the Dynamic DSP script.
But my code is only activated when those triggered DSPs are working so it achieves what you want.

EDIT: Post here the code you use in the script and the DSP names you use and I could suggest you how to apply the same.
But the limit as you have noted it's there: you can not know the state of a DSP outside Dynamic DSP chains.
  • Last Edit: 22 March, 2016, 04:46:58 PM by Isabelxxx

  • Coreda
  • [*][*][*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #42
I check for a tag in the files to use that "tag" DSP.

Then I check in the status bar the same so it will add that info if it uses any "tag" DSP.

I understand what you mean now, and yeah I originally adjusted your example to match my own formatting. Essentially the concept is since you know that a Dynamic DSP preset will always be applied to certain audio files the formatting checks and returns true if it matches the same function as the one set in Dynamic DSP (eg: if the effect is applied to the album 'Hardcore History' it will return 'DSP used: Hardcore History', assuming that's what the function returns).

Guess I was expecting something different in my previous post but I can confirm it works ;)

Thinking about it the formatting could get considerably long to check all the various Dynamic DSP functions. Probably why it's leaner using a custom tag instead.
  • Last Edit: 23 March, 2016, 01:33:49 AM by Coreda

  • EpicForever
  • [*][*][*][*][*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #43
Hi,
I would suggest:
[$if(%trackdsp%, DSP used: %trackdsp%)]                    (where %trackdsp% is the titleformatting expression used in Dynamic DSP's config window, accordingly to custom configuration)

Adding those [ and ] causes, that when no DSP is used, there will be no additional chars/spaces in status bar. You can also change it to:
$if(%trackdsp%, DSP used: %trackdsp%, no Dynamic DSP processing applied)

That will give clear message :)

  • Mario66
  • [*]
Re: Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #44
By the way, the download links are still online at the "Uploads - (fb2k)" subforum. Just the link in my posting here is broken for some reason.

New link: https://hydrogenaud.io/index.php/topic,108904.0.html