Skip to main content

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

0 Members and 1 Guest are viewing this topic.
  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
I made this DSP and have been using it for months now to my satisfaction.  So, first off thanks to those who helped me figure some things out: mudlord, foosion, Yegor, and Zao, and others who made SDK, Documentation, and samples.  By no means does their help imply that they like my plugin or much less endorse it!

It is a DSP which is designed to switch effects based on the track being played.

Usage:
Sorry, documentation is not going to be great.  But basically:
1)add the dynamicDSP to your DSP chain.  It can be in among other DSPs, or even have multiple instances of itself in a chain but the way I use it is have a single instance of it as the sole DSP at the top level.
2)select and click configure to bring up the configuration window.
3)Enter a titleformat script in the large textbox at the top of the configure window, or use the one provided.  The script you enter should evaluate to a single word, which is the name of the DSP Chain you want to use for that track.  The titleformat will be run on each track as it is about to be played and provide the switching of chains.  It's OK if this script evaluates to a Chain name which does not exist or blank, in which case no DSP will be applied to that track.
4)enter a DSP chain name in the little textbox to the left of the "Add Chain" button then click that button.  The name will appear in the listbox just above.
5) doubleclick the chain name in the list box to bring up the configuration window for this Named chain.  It is the stock DSP config window, you should be familiar with how to use it.  Add DSPs and configure them, then click ok.
6)repeat steps 4-5 as many times as desired
7)click OK
8)click apply/ok

That's it.  If you use the stock titleformat script, you can just add a custom tag to any track called "TRACKDSP" with the value of the Named Chain you want to use.  When that track is played that chain will activate.

Other people may prefer to evaluate to a chain based on Genre tags or some other scheme which uses tags which already commonly exist in their tracks.  I do not provide any titleformat scripts and it's not a strong area of mine.  Feel free to create and share scripts which you like on this thread.  (That is, if anybody likes this component besides me)

Known Issues / Limitations
This component is sensitive to track changes but has gone to some lengths to avoid using the needstrackchangemark thingy which breaks gapless playback.  To the best of my ability to theorize or detect, gapless playback remains perfect IF the track currently playing and the track that is to follow evaluates to the same chain, or to no chain at all.
BUT, if they evaluate to different chains there is in my tests the tiniest audible dropout between the tracks as the old chain empties and the new chain takes its place.  I don't know how to avoid this so I don't intend to fix it.
A corollary to my decision to avoid needing the needstrackchangemark thingy is that I cannot guarantee that 100% of the samples of a track go through their intended chain.  Some may go through the previous chain so once again this is only an issue if the chain changes.  It was beyond my ability to detect this though.
But the final warning is that if you create a titleformat script which takes too long to evaluate then you could break gapless playback even if the chains do not change.  I have not tested the threshold on this nor do I have any recommendations to offer except to try it and see.  Using the titleformat I provide default, I could detect no flaw in gapless playback on Pink Floyd Dark side of the moon or a white noise sample I made copies of and played back to back.

License
I make no restrictions on what you can do with the the source code or component.

Warrantee/Support
None.  Use at your own risk.  I may consider fixing a bug or two if you find them but I don't spend much time here so if you find something bring it forward fast because I will probably stop visiting this thread regularly in a week or two.

Download
fb2k-component
source

Building
A release build is provided in the download above but if you want to build from source, note that you need to download the  boost libraries, specifically releated to boost::bind, and you must add a new include directory to your VC setup.

You also need WTL but I think that's common for foobar components.
  • Last Edit: 03 April, 2014, 05:46:55 PM by db1989

Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #1
Thanks!! I'll give it a spin

  • romor
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #2
Thanks for making this component
I needed it to control some misbehaved tracks automatically, and searching this forum seems like a lot of users requested such feature. And there it is
There is also similar possibility with foo_yac if user doesn't mind creating impulses, which is a bit more involved...

I wanted to use specific setting from certain VST plugin through Yegor's VST component, and guess what - it works perfectly, as saved DSP chain preset remembers even state from "external" VST plugin. Don't know if this is feature of VST component or foobar, i.e. if other VST component will behave like this.

Some notes:
1. Don't drop the archive in component preferences because foobar won't pick the component, rather extract DLL file and drop instead.
2. Something I didn't find intuitive - if I define some chains inside Dynamic DSP, they will be reset if component is removed from foobar DSP chain. Solution  - after defining chain(s) inside Dynamic DSP, save it as foobar DSP chain preset.
3. Gap thingy isn't show stopper for me, but if someone with more knowledge in foobar DSP can assist as source code is provided, it would be even greater

Cheers

  • romor
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #3
I noticed an issue however with VST component, it's reported here: http://www.hydrogenaudio.org/forums/index....mp;#entry805537

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #4
I noticed an issue however with VST component, it's reported here: http://www.hydrogenaudio.org/forums/index....mp;#entry805537


I'll try it, thanks for your report.

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #5
works great  gives some possibilities missing in certain plug ins.

  • WilB
  • [*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #6
Since my media files are already replay gained, I find this plug-in useful for loading the EBU R128 Compressor and applying replay gain on the fly selectively for radio streams so that all radio streams and media library tracks are of similar sound level.

The EBU R128 Compressor automatically matches to the ReplayGain standard 89 dB using the standard R-128 algorithm and a reasonable look-ahead. I use a titleformat script of $if($strstr(%path%,'://'),Radio,). The Radio chain contains the EBU R128 Compressor. See also http://www.hydrogenaudio.org/forums/index....=0&p=823073
  • Last Edit: 01 March, 2013, 06:42:58 PM by WilB

  • Dynamic
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #7
I took the liberty of making WilB's version work for any source without ReplayGain information (which still includes radio streams but also files without RG, such as the Windows 7 sample music MP3 files) and posted it in that other thread, excerpting the key info here.
Code: [Select]
$if($or($strstr(%replaygain_album_gain%,' dB'),$strstr(%replaygain_track_gain%,' dB')),,R128Comp)


I then set up the Chain called R128Comp to contain just the EBU R128 Compressor DSP from mudlord's foo_dsp_effects bundle.

Dynamic – the artist formerly known as DickD

  • Dynamic
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #8
I made a mistake. In the previous post, it was the EBU R128 Compressor from kode54's foo_r128_norm.dll that I used. No ReplayGain matched compressor is in foo_dsp_effects bundle.
Dynamic – the artist formerly known as DickD

  • Dynamic
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #9
kode54 made a good point about the use of Dynamic DSP in that other thread I referred to.

Normally you should put Dynamic DSP at the top of the list of DSPs so that upon track changes it doesn't force a whole bunch or previous DSPs to flush their buffers (especially those with a 10 second lookahead like kode54's EBU R128 Compressor). There will be certain times that the order is important, though, and it might be necessary to put other DSP first.
Dynamic – the artist formerly known as DickD

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #10
I got small problem with this plugin. I had to reinstall foobar. I kept all configuration files from previous istall and placed them into my new installation. Everything was configured and was working as it was before, except foo_dynamicdsp. It missed all the chains that were added to its configuration dialog. Fortunately I saved them just as regular DSP chains so I could easily import them into foo_dynamicdsp. Anyway I was very baffled when several of my files were playing without shifted playback rate... It took some time to perform investigation... Is it possible that it will be fixed and plugin configuration was fully preserved in some .cfg file?

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #11
I'm gratified to find that some people are finding dynamicDSP useful.  I kept meaning to look into romor's report earlier, but I've just always been so busy.  Now I have a new baby and have even less time.  I wish I could give a more hopeful answer.

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #12
(...) Now I have a new baby and have even less time.  (...)


Hahaha  I can fully understand what you are talking about  . Additionally I got bad news for you - be prepared that within next several years you'll have less and less time  . Critical time is when your baby will have around 2 years... Be prepared for war 

For some operations dynamicDSP is the best what could be ever invented. It cuts necessity of creating new components that have very tiny and rarely used functionality (like my proposal of plugin that lets inverse phase of chosen audio channels based on tags) and bothering other developers for adding new functionalities to their components (like my request for mudlord and his dsp_effect/Playback Rate Shift plugin).

  • EpicForever
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #13
I found that even changing DSP chain causes that dynamicDSP "forgets" it's configuration... Or removing it from DSP chain...

  • Gnx
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #14
EpicForever, see post #3
Something I didn't find intuitive - if I define some chains inside Dynamic DSP, they will be reset if component is removed from foobar DSP chain. Solution  - after defining chain(s) inside Dynamic DSP, save it as foobar DSP chain preset.


and many thanks to popatr for this component which didn't hope anymore

Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #15
I added [Downmix channels to stereo] and [Convert mono to stereo] to this DSP and tried it.
But Those DSP is already like the true bypass.

  • pablof
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #16
I'm gratified to find that some people are finding dynamicDSP useful.

A big thankyou for your plugin, popatr.

I am using it with this script:

Code: [Select]
$if($or($strcmp(%channels%,'stereo'),$strcmp(%channels%,'mono')),SOXEstereo192,SOXMulti96)

...to resample stereo audio to 192Khz and multichannel audio to 96Khz using SoX.
  • Last Edit: 28 September, 2013, 12:11:39 PM by pablof

  • bdport67
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #17
Need some assistance for a basic script for Dynamic dsp.
Not a programmer and cant seem to wrap my head around the scripting language.

I just need a simple script that will run "mp3chain" only on mp3 files.

anyone care to assist?

  • BenB
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #18
You shouldn't need a script. Just add a TRACKDSP tag to your mp3 files with the value of "mp3chain" (or is there some reason you can't use the default script [%trackdsp%]?).
  • Last Edit: 22 January, 2014, 04:50:26 PM by BenB

  • d125q
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #19
Why suggest an additional tag? Just use $if($strcmp(%__codec%,'MP3'),mp3chain)

  • BenB
  • [*][*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #20
Because it's the default and bdport67 doesn't understand scripting. There's no need to make something more difficult than it has to be.

And, if bdport67 wants to use additional chains in the future, he/she should come ask for scripts for those chains instead of using a simple script (that won't need any future modification whatsoever) that utilizes a tag which can have any value (chain) that's needed?
  • Last Edit: 22 January, 2014, 08:19:09 PM by BenB

  • Rollin
  • [*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #21
I just need a simple script that will run "mp3chain" only on mp3 files.

Titleformat script: [%codec%]
And change chain name from mp3chain to mp3
  • Last Edit: 23 January, 2014, 08:38:50 AM by Rollin

  • bdport67
  • [*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #22
Thanks guys for the responses.
I will try to get this to work.

My problem it seems is that I dont understand the default scripts.
Im not a programmer or a script writer so Im lost without assistance.

Which you guys provided...thanks much

  • WilB
  • [*][*][*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #23
I have just noticed this issue ( http://www.hydrogenaudio.org/forums/index....st&p=861288 ) which seems to specifically occur when Dynamic DSP is used to load the EBU R128 compressor. In essence playback stops 4 sec from the end of the track if there is no following track. If just the EBU R128 compressor is used alone without Dynamic DSP all seems fine. So it seems the issue is with Dynamic DSP. Any chance of a fix?

  • popatr
  • [*][*]
Release: Dynamic DSP: gives custom effect chains for individual tracks
Reply #24
I have just noticed this issue ( http://www.hydrogenaudio.org/forums/index....st&p=861288 ) which seems to specifically occur when Dynamic DSP is used to load the EBU R128 compressor. In essence playback stops 4 sec from the end of the track if there is no following track. If just the EBU R128 compressor is used alone without Dynamic DSP all seems fine. So it seems the issue is with Dynamic DSP. Any chance of a fix?


I have modified dynamicdsp to better handle EBU R128 and hopefully any other dsp with long buffering.
This new release means I will be looking for you guys to tell me if I've introduced any new problems.  I'll check here pretty frequently for a while.  Unfortunately I didn't/don't have time to handle other requests people have/may make.

To real FB2K developers out there: if enough people care about this plugin you should really make an official component that's better than this one.

Here's it is:
dynamicdsp
source

I don't seem to have permission to edit my original post, so I can't fix the links there.  If any admin will do it for me it would be appreciated.