Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Release: Dynamic DSP: gives custom effect chains for individual tracks (Read 48615 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #50
It seems that version by @Mario66  is incompatible with fb2k 1.6.  It is not possible to open configuration window for DSPs inside of chain.


Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #52
Interesting ... I think someone used this name before. See here https://hydrogenaud.io/index.php?topic=108904.0

wouldn't foo_dsp_dynamic be a more conventional name? I don't think it's taken.
Quis custodiet ipsos custodes?  ;~)

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #53
SOURCE


Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #55
OK. It seems someone wanted to be helpful, but was too lazy to explain what he has done.

In this thread we have version 1 of Dynamic DSP posted in response to non working report.
In the following thread:
https://hydrogenaud.io/index.php?topic=108904.0  there is version 2.1 of Dynamic DSP component, which seems to be latest / nave the highest version number. And is not working as it should in foobar 1.6.

So which one is really the latest? Which one is supposed to work in foobar 1.6? What was the purpose of giving sources of the component?

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #56
OK. It seems someone wanted to be helpful, but was too lazy to explain what he has done.
In this thread we have version 1 of Dynamic DSP posted in response to non working report.What was the purpose of giving sources of the component?
It seems that version by @Mario66  is incompatible with fb2k 1.6.  It is not possible to open configuration window for DSPs inside of chain.


Maybe someone of developers help us and create compatible verse for F2K v1.6.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #57
Hi all,

sorry for the inconvenience. I do not actively develop this extension any more.

But I noticed that this issue is caused by my bugfix I introduced to fix an issue with this DSP called in a different thread than the main thread.

My solution I can offer to you is to revert to the old behavior which did not have this fix incorporated.
Then you can not call this DSP from context menu "View" > "DSP" > "Dynamic DSP". This will lead to a crash because of running in a different thread.
Instead you can only use this DSP inside the preference dialog of foobar2000. But here at least the DSP is fully functional again.

I created a version 2.1.1 of this DSP with all the new features but the main thread fix reverted to the old version:
https://hydrogenaud.io/index.php?topic=108904.msg988324#msg988324
This should work for foobar2000 1.6 with the limitation described above.

If anyone knows a better way to fix this, feel free to update the addon.

For those who are interested, my solution to fix the threading issue looked like the following:
Code: [Select]
class CMyDSPPopup : public CDialogImpl < CMyDSPPopup > {
  [...]
  void OnConfigureDSP(UINT itemNum, int id, CWindow wnd) {
    int selectedItem = chainsList.GetCurSel();
    if (selectedItem != LB_ERR) {
      WCHAR str[MAX_PRESENT_NAME_LEN];
      chainsList.GetText(selectedItem, str);
      pfc::string8 name = ConvertWchar(str);
      // Call dsp configuration popup in main thread
      m_mthelper.add(this, name);
    }
  }
  callInMainThreadHelper m_mthelper;
public:
  void inMainThread(const pfc::string8& chainName) {
    dsp_chain_config_impl *chain = chainsMap[chainName];
    // Set this->m_hWnd as parent, otherwise the user will be able to close this window
    // but leave the DSP popup open => crash
    static_api_ptr_t<dsp_config_manager>().get_ptr()->configure_popup(*chain, this->m_hWnd, chainName.toString());
  }
  friend class callInMainThread;

Now I just reverted it to:
Code: [Select]
 void OnConfigureDSP(UINT itemNum, int id, CWindow wnd) {
    int selectedItem = chainsList.GetCurSel();
    if (selectedItem != LB_ERR) {
      WCHAR str[MAX_PRESENT_NAME_LEN];
      chainsList.GetText(selectedItem, str);
      pfc::string8 name = ConvertWchar(str);
      // Call dsp configuration in current thread (bugfix for fb 1.6)
      dsp_chain_config_impl *chain = chainsMap[ConvertWchar(str)];
      static_api_ptr_t<dsp_config_manager>().get_ptr()->configure_popup(*chain, NULL, name.toString());
    }
  }

I have no clue why the fist version suddenly stopped working.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #58
@Peter - maybe you will be able to judge or check if this is some plugin developer's mistake or is it some bug/regression in newest foobar or its API?

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #59
Hope someone trying to figure out how to make Titleformat script works could find my example helpful.
According to %genre% of current file it switches to appropriate Chain ("Audiobook", "None", "Course", and otherwise "Default2"). And you can simply add your own conditions.

Code: [Select]
$if2([%trackdsp%],
$if($strstr(%genre%,Audiobook),Audiobook,
$if($strstr(%genre%,Psycho),None,
$if($strstr(%genre%,Club),Club,Default2)
)
)
)

Although could anyone explain why $if((%genre% HAS Audiobook),Chain1,Chain2) doesn't work properly so I had to rack my mind to find out working code: $if($strstr(%genre%,Audiobook),Chain1,Chain2) ?

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #60
Although could anyone explain why $if((%genre% HAS Audiobook),Chain1,Chain2) doesn't work properly so I had to rack my mind to find out working code: $if($strstr(%genre%,Audiobook),Chain1,Chain2) ?

I found answer in other thread made by @shakey_snake   :
The TITLE FORMATTING syntax is a separate type of input from the SEARCH QUERY syntax. One handles formatting strings, the other handles searches. Basically, Title formatting syntax has $functions() $and(%objects%) while search queries have expressions AND values. You'll notice the two have separate help pages in foobar2000.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #61
How to make Crossfader works properly inside "Dynamic DSP" chain?

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #62
The answer is you probably don't, since Dynamic DSP changes chains across tracks.

Re: Dynamic DSP v2

Reply #63
I see this was last updated in 2020. Any chance for a 64 bit version?
Think millionaire, but with cannons.




Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #67
BUG: None of my chains from the 32-bit version show up in the 64-bit version.

The 32-bit config could not be ported straight away to the 64-bit version.
And old bug requires to write some sort of importer.



Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #68
BUG: None of my chains from the 32-bit version show up in the 64-bit version.

The 32-bit config could not be ported straight away to the 64-bit version.
And old bug required to write some sort of importer.

Is there any way to import chains across different processor architectures?  Because it be a little crazy to have re-do tons of different chains across different presets for different processor architectures.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #69
If you are still planning to use both platforms the bug has been fixed in 2.1.1.1 and both versions should be compatible now.
I will never use and importer personally, but I will try to find a solution... it just takes time.
Cheers!

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #70
@da yuyu , thanks a lot!

The component adds for fb2k new advantages for managing DSP.
For example, I managed to create the necessary personal settings of DSP for radio streams, multi-channel audio, Youtube items and everything else:
Code: [Select]
$if($strcmp(%directoryname%,'www.youtube.com'),Youtube,$if($strstr(%path%,'mkv'),Movie,Other))
Now the DSP setting selection works automatically. This is amazing!
I hope this component will find support for further development.

Please note:
The following sequence will cause fb2k to crash:
1. Open the Dynamic DSP settings window
2. Open the Chains Settings window
3. Click "Ok" and close the Dynamic DSP settings window (the DSP Settings window is open)
4. Then click "Ok" and close the DSP Settings window - fb2k crashes and creates of crash report.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #71
@da yuyu , thanks a lot!

The component adds for fb2k new advantages for managing DSP.
For example, I managed to create the necessary personal settings of DSP for radio streams, multi-channel audio, Youtube items and everything else:
Code: [Select]
$if($strcmp(%directoryname%,'www.youtube.com'),Youtube,$if($strstr(%path%,'mkv'),Movie,Other))
Now the DSP setting selection works automatically. This is amazing!
I hope this component will find support for further development.

Please note:
The following sequence will cause fb2k to crash:
1. Open the Dynamic DSP settings window
2. Open the Chains Settings window
3. Click "Ok" and close the Dynamic DSP settings window (the DSP Settings window is open)
4. Then click "Ok" and close the DSP Settings window - fb2k crashes and creates of crash report.

Interesting.  Tried this myself.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #72
@sergey77 @Chibisteven

Also I believe the Refresh preview button used to work.
But I am not sure.

This release should fix that crash.
Updated the change log and added dark mode.

I will post sources and binary to the Upload section when I find some time...

 foo_dynamicdsp v2.1.1.2 x86 32-bit & 64-bit.zip  (397.40 KB)

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #73
Please check the attached version of the component.
No changes here.

Re: Release: Dynamic DSP: gives custom effect chains for individual tracks

Reply #74
Ouch... please try downloading it again.
Thanks for reporting !