Help - Search - Members - Calendar
Full Version: Winamp-VIS-plugs in foobar
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7
hartwork
-- THE PLAN --
my plan is to write a vis-plug for foobar that can load winamp-vis-plugs.
it's said impossible but i (still) don't believe it.
coding has already started but i'm not a lightning-speed-coder so be sure i'll need my time.

-- WHAT IS DONE FOR NOW --
a host that loads a plugin and feeds it with junkfood. download it from HERE.
(move the mouse over the vis-window to create some junkfood...)

-- WHAT ELSE --
i am interested in any source code from previous attempts! please send me a copy - your code is highly appreciated!


now people let me know what you think...
bleh
I had a plugin working semi-well, but I wasn't able to figure out a clean way to take care of shutting down the second thread and unloading the Winamp plugin DLL on playback stop and, in the process of trying to make it work better, I ended up completely breaking it. I was poking around 0.8 beta SDK and saw what looks like a way to get functions called on foobar init and shutdown and think they may help this somewhat, but I've gotten too lazy to look into messing with it anymore.

Of course, even if you got the plugin loading and unloading Winamp DLL's without random crashes, you'd still have to find a way to get playlist information from the main foobar thread and into the separate thread for the Winamp plugin, which is another thing I was too lazy/incompetent to figure out... unless, of course, you can convince people to ignore the playlist functionality in the Winamp plugins.

[EDIT]: No source code from me. My code is inefficient and, in its current state, broken.
Canar
If Winamp-style vis plugins can be made to work with foobar, I have no need for Winamp any more, which would be very cool. If only AVS worked with fb2k... *sighs* It's the one Winamp feature I miss, and one that I occasionally use Winamp for. I'd likely get back into it if I had an fb2k plug that would let me use it.
p0wder
If you can get Milkdrop to work in FB2K you are god. cool.gif
bleh
The version of Milkdrop that came with 2.9something got along with foobar quite well, excepting the aforementioned playlist issues. AVS, however, would complain about not having a recent enough version of Winamp and then blow up.
hartwork
QUOTE(bleh @ Feb 19 2004, 06:00 AM)
The version of Milkdrop that came with 2.9something got along with foobar quite well, excepting the aforementioned playlist issues.  AVS, however, would complain about not having a recent enough version of Winamp and then blow up.

i planned my bridge-plug to work with foo_winamp_spam to solve these problems...
hartwork
QUOTE(bleh @ Feb 19 2004, 03:45 AM)
[EDIT]:  No source code from me.  My code is inefficient and, in its current state, broken.

[broken] and [inefficient] is no problem in this case: ANY source code can help me!
if you don't mind send it to me nevertheless!
PoisonDan
I think the people that voted "Keep _any_ Winamp out of Foobar!" are missing something: this is supposed to be an optional plugin, right ? So if you don't want it, don't install it.

It's not as if "Winamp stuff" will be inserted into the core application...
picmixer
QUOTE(PoisonDan @ Feb 19 2004, 02:22 PM)
I think the people that voted "Keep _any_ Winamp out of Foobar!" are missing something: this is supposed to be an optional plugin, right ? So if you don't want it, don't install it.

It's not as if "Winamp stuff" will be inserted into the core application...

Well I have voted "Keep any Winamp out of Foobar.

Although I completely agree with you that no one should be bothered by any plugins that he is not forced to use. I simply see this specific case in a slightly different light. I think it is more of a philosophical nature ratyher then a practical one. Or maybe both actually.

I just think if people want to have certin plugins they should write them for the Foobar SDK and not port any plugins from other players over through some dodgy plugin wrappers.

After all FB2K has it's own plugin architecture and is not one of those players that are meant to accept Winamp plugins directly like so many others.

Also, if people really are missing Winamp plugins that much there is nothing to stop them from still using it occassionally for those specific plugins. Or simply request something similar for FB2K. I am sure is it is a good request there will be someone willing to code it at some point.

I just think there are quite a few tallented coder out there working on FB2K plugins at the moment and I would rather see this developing further rather then FB2K simply beeing able to accept Winamp plugins.

Of course this is only my strong personal opinion and I can clearly see why people could possibly dissagree. smile.gif
hartwork
QUOTE(PoisonDan @ Feb 19 2004, 02:22 PM)
I think the people that voted "Keep _any_ Winamp out of Foobar!" are missing something: this is supposed to be an optional plugin, right ? So if you don't want it, don't install it.

It's not as if "Winamp stuff" will be inserted into the core application...

i fully agree with you, poisondan!
hartwork
QUOTE(picmixer @ Feb 19 2004, 03:04 PM)
I just think if people want to have certin plugins they should write them for the Foobar SDK and not port any plugins from other players over through some dodgy plugin wrappers.

* not all foobar-users are also developpers!
* even a developper is not necessarily able to write a plugin that does what he wants it to do!
* winamp-plugin-bridges will make it much easier for winamp-users to move to foobar!


QUOTE(picmixer @ Feb 19 2004, 03:04 PM)
Also, if people really are missing Winamp plugins that much there is nothing to stop them from still using it occassionally for those specific plugins.

i guess this is exactly what a ex-winamp-user does NOT want to do. at least this is like i feel about it. i don't want to switch between foobar and winamp when i wanna run geiss or whatever...
imagine foobar could not play mpc - would you not find switching to winamp annoying?

QUOTE(picmixer @ Feb 19 2004, 03:04 PM)
Or simply request something similar for FB2K. I am sure is it is a good request there will be someone willing to code it at some point. I just think there are quite a few tallented coder out there working on FB2K plugins at the moment and I would rather see this developing further rather then FB2K simply beeing able to accept Winamp plugins.

i think your point of view is very emotionally driven. by some kind of winamp-hate. the poll shows you're not alone with that. for me winamp has been my #1-player for a very long time. and what we have now is just a much-better-winamp - foobar is not a revolution. winamp is still a great player! nevertheless foobar is far away from being am 1:1 copy of winamp which i am glad about, too. even winamp-supporting-stuff will not make it such cause it will be in plugins not in the core!

ps: "Keep _any_ Winamp out of Foobar!" was originally added only for peter...
picmixer
QUOTE(hartwork @ Feb 19 2004, 04:00 PM)
* not all foobar-users are also developpers!
* even a developper is not necessarily able to write a plugin that does what he wants it to do!
* winamp-plugin-bridges will make it much easier for winamp-users to move to foobar!

I am sorry, I should have expresed myself a bit clearer here. I meant if developers want these plugins they should use the Foobar SDK. I of course would not expect all foobar users to be skilled at coding in any way. I certainly am not and would definetaly not be able to code any plugins myself.

QUOTE
i guess this is exactly what a ex-winamp-user does NOT want to do. at least this is like i feel about it. i don't want to switch between foobar and winamp when i wanna run geiss or whatever...
imagine foobar could not play mpc - would you not find switching to winamp annoying?


I can definetaly see your point there. Which is why I stated in my first post that I can can see why people would completely dissagree with me.

About imagining that fact that Winamp would support MPC and Foobar wouldn't. It simply won't happen tongue.gif

Although I would probably find it very annoying to switch back, scince the majority of my collection is in this format.

Also I have to say that there are a few tiny features in Winamp I occasionally like myself. However I would rather keep requesting them in vain rather then having them supportet within FB2K via Winamp plugins.

QUOTE
i think your point of view is very emotionally driven. by some kind of winamp-hate. the poll shows you're not alone with that. for me winamp has been my #1-player for a very long time. and what we have now is just a much-better-winamp - foobar is not a revolution. winamp is still a great player! nevertheless foobar is far away from being am 1:1 copy of winamp which i am glad about, too. even winamp-supporting-stuff will not make it such cause it will be in plugins not in the core!


Well you are definately right that my point of view is emotionally driven. However definatly not by some kind of hatred toward Winamp. Maybe a bit by the love for Foobar though biggrin.gif . Also by the fact that I simply believe that Winamp plugins should stay with Winamp and Foobar plugins with Foobar.

I also have used it for quite a while and still absolutely recommend it to people who for their own reasons do not like FB2K that much. Afterall everyone has his own tastes and not every player is the right one for every person.

After all development in Foobar is still going strong and we keep seeing new features and plugins with almost every major release. I Personally simply would find it harmful for this development to include winamp plugins at this stage. Although I am sure that even if they were included there would still be enough talented coders to continue work on some very useful
native FB2K plugins.

QUOTE
ps: "Keep _any_ Winamp out of Foobar!" was originally added only for peter...


Well I guess it would have been better then to ask him for his personal opinion on that specific item, rather then including it in a public poll. Nowhere in this poll I saw the hint that only Peter was allowed to cast an option on this vote. wink.gif
bleh
Some plugins, including Milkdrop, I believe, direct all of their API calls at their parent window instead of trying to find window with Winamp's name, so bridging it with foo_winamp_spam doesn't work. You'll have to implement a bunch of the API stuff in your plugin.

Also, even when I did that and pretended to be Winamp version 0x2095, AVS still wouldn't work, so I think it was using an undocumented API or something.
hartwork
QUOTE(bleh @ Feb 19 2004, 10:52 PM)
Some plugins, including Milkdrop, I believe, direct all of their API calls at their parent window instead of trying to find window with Winamp's name, so bridging it with foo_winamp_spam doesn't work. You'll have to implement a bunch of the API stuff in your plugin.

they will for sure pass it to the parent instead of searching for a winamp window. for at least two reasons: (1) the found winamp window could also belong to another instance which would give unwanted results and (2) the winamp-vis-plug-interface-structure contains a member for a parent window which is filled by winamp itsself.
my bridge will be that parent and direct these calls to foo_winamp_spam or directly use it's wndproc or whole window for that. believe me - it won't be this i dispair of... smile.gif

QUOTE(bleh @ Feb 19 2004, 10:52 PM)
Also, even when I did that and pretended to be Winamp version 0x2095, AVS still wouldn't work, so I think it was using an undocumented API or something.

we can log both wndprocs - already did that before when i wrote the whyzed plugin - we'll find out. more work but nothing impossible...
if i can make it work for some vis-plugs-i'll try to make it work for as much as i can. but i guess avs will be one of the hardest cause it detects skin-changes and who knows what else. we'll find out just be patient...
The Khan Artist
QUOTE(p0wder @ Feb 18 2004, 08:57 PM)
If you can get Milkdrop to work in FB2K you are god.  cool.gif

Ditto. biggrin.gif
hartwork
becoming a god - for two people at the same time - not bad! so now i got a goal... smile.gif
Avicus
Geiss for me! Milkdrop is sweet too... I wish you luck and have every hope that you succeed!
hartwork
QUOTE(Avicus @ Feb 20 2004, 05:45 PM)
Geiss for me! Milkdrop is sweet too... I wish you luck and have every hope that you succeed!

thanx, avicus. of course i'll also try to get geiss running...
Burrito
Finding a way to make Milkdrop work under FB2K would be too good to be true.

This would be a reason for many people to switch competely over, imho.
Prodoc
QUOTE(hartwork @ Feb 19 2004, 07:00 AM)
* not all foobar-users are also developpers!
* even a developper is not necessarily able to write a plugin that does what he wants it to do!
* winamp-plugin-bridges will make it much easier for winamp-users to move to foobar!

...

QUOTE(hartwork @ Feb 19 2004, 07:00 AM)
i think your point of view is very emotionally driven. by some kind of winamp-hate.

Now who's being emotionally driven? picmixer gave his view on a plugin like this, he didn't try to flame you personally so no need for that many exclamation marks in one post wink.gif

I would like to be able to use visual effects like those in winamp but I have to agree with picmixer.
Instead of trying to build a plugin which is capable of using winamp's visual effects and add maybe new ones afterwards, wouldn't it be more logical to create a clean plugin for foorbar itself with visual effect capabilities first? If that's finished you could add extra functionality to be able to add the winamp stuff.
This way foobar will have powerfull visual effects plugin for people to use and maybe they can create new effect using it.
Canar
I'm all for seeing people add complete (or even semi-complete) Winamp "emulation" to foobar. That is, assuming it can be done. It just adds that much more power and accessibility.

No matter what happens, though, if you don't like the emulation, you can delete the component or not use it or something. That effectively nullifies any anti-Winamp detractor's argument.

Thus, it isn't a balance of opinions, because any anti-Winamp-emulation user has no argument, while all the pro-Winamp-emulation users have strong ones.
Gnerma
Why can't we have the best of both worlds?

Hartwork have you contacted the authors of Milkdrop and Geiss about working with you on a pure port of the plugins? If they agreed to help out at least a little, and share some code I'm sure other foobar plugin devs would help you.

So how about it, have you at least asked?
bleh
I suspect it would be difficult to get a foobar port of Milkdrop as it is included as part of the official Nullsoft plugins with Winamp 5.

In other news, I rewrote the plugin I had and it seems to work without crashing, but I still need to add a config dialog for loading plugins and I need to figure out what I need to do to my message handling to get it to disable itself when the Winamp visualization window is closed. That and it may not actually be getting samples to the plugin properly :/.

Anyway, there's hope... kinda. If I feel it's usable, I'll post source and then hartwork and any other developers can decide what should be done with it.

Oh, and I haven't tried it with Winamp 5 plugins yet. I should probably do that.
Gnerma
QUOTE(bleh @ Feb 20 2004, 03:56 PM)
I suspect it would be difficult to get a foobar port of Milkdrop as it is included as part of the official Nullsoft plugins with Winamp 5.

Let's not give up before we try wink.gif There may be many reasons not to ask, but it should still be done. If nobody else will do it because of various reasons like the above, I will. Although it would be better if it was somebody who actually knows about all this coding mumbo jumbo.
hartwork
QUOTE(Prodoc @ Feb 20 2004, 09:56 PM)
Now who's being emotionally driven? picmixer gave his view on a plugin like this, he didn't try to flame you personally so no need for that many exclamation marks in one post wink.gif

yes you're right. i'm not free of being emotionally driven. how would you feel if you start writing a component that you believed to be welcome and the first five or more votes are [keep any winamp] out and [vis-plugs suck] only? it was much worse than buggy-code. another thing is i just can't understand how anybody can be against this extension of abilities. it will help some people and will not harm anybody: neither core nor sdk will not be touched so where the hell is the problem? furthermore building a bridge for winamp-plugs is just like building any other bridge - there is no difference to bridges for directx-plugs or flac-, mpc- or whatever-input. it's just a bridge - what's so bad about it?
yet another aspect: imagine we'd ask some - let's say five - winamp-plug-authors to write a foobar version of their existing plugin. these five people would have to do quite the same work, each of them doing it - all five. using a bridge one person does this job one time!

QUOTE(Prodoc @ Feb 20 2004, 09:56 PM)
I would like to be able to use visual effects like those in winamp but I have to agree with picmixer.
Instead of trying to build a plugin which is capable of using winamp's visual effects and add maybe new ones afterwards, wouldn't it be more logical to create a clean plugin for foorbar itself with visual effect capabilities first? If that's finished you could add extra functionality to be able to add the winamp stuff.
This way foobar will have powerfull visual effects plugin for people to use and maybe they can create new effect using it.

i'm sorry but i didn't really understand the second part.
hartwork
QUOTE(Gnerma @ Feb 21 2004, 12:46 AM)
Hartwork have you contacted the authors of Milkdrop and Geiss about working with you on a pure port of the plugins? If they agreed to help out at least a little, and share some code I'm sure other foobar plugin devs would help you.

So how about it, have you at least asked?

i did not plan to ask for foobar ports cause i'm just writing the bridge.
if i did so i had asked them to waste their time.

ps: milkdrop and geiss ar both written by the very same person, ryan geiss... smile.gif
hartwork
oh, we got a second page now...

QUOTE(bleh @ Feb 21 2004, 12:56 AM)
In other news, I rewrote the plugin I had and it seems to work without crashing, but I still need to add a config dialog for loading plugins and I need to figure out what I need to do to my message handling to get it to disable itself when the Winamp visualization window is closed. That and it may not actually be getting samples to the plugin properly :/.

Anyway, there's hope... kinda. If I feel it's usable, I'll post source and then hartwork and any other developers can decide what should be done with it.

Oh, and I haven't tried it with Winamp 5 plugins yet. I should probably do that.

sorry, i didn't really get that. did you restart coding or are you talking about former experiences?

one more thing i want to make clear: if anybody starts or restarts work on a winamp-vis-bridge we should decide to work together or which one will do the job. what i do not want is to be one of three people doing the same job independently like in a race or contest.
Prodoc
QUOTE(hartwork @ Feb 20 2004, 04:43 PM)
how would you feel if you start writing a component that you believed to be welcome and the first five or more votes are [keep any winamp] out and [vis-plugs suck] only?

You did include these options in the poll now didn't you?
Like picmixer I wasn't trying to flame you eighter, life shouldn't always be too serious, hence the: wink.gif after my comment wink.gif
You also got a lot of positive results, like you expected. The plugin will be welcomed by a lot of users and that's the main thing.

QUOTE(hartwork @ Feb 20 2004, 04:43 PM)
QUOTE(Prodoc @ Feb 20 2004, 09:56 PM)
I would like to be able to use visual effects like those in winamp but I have to agree with picmixer.
Instead of trying to build a plugin which is capable of using winamp's visual effects and add maybe new ones afterwards, wouldn't it be more logical to create a clean plugin for foorbar itself with visual effect capabilities first? If that's finished you could add extra functionality to be able to add the winamp stuff.
This way foobar will have powerfull visual effects plugin for people to use and maybe they can create new effect using it.

i'm sorry but i didn't really understand the second part.

At the moment, foobar itself doesn't have visual effect plugins like the ones in winamp. Wouldn't it be a more logical process to create something to fill this gap first by creating a plugin which enabled you to use visual effects created for foobar?
If that part is completed you could aim the same plugin to winamp effects by adding the feature to use the winamp effects.

Anyway, like I sead, it would still be cool to use your plugin. I just wanted to make a suggestion which seemed more logical and usefull to me.
PhrostByte
I support your efforts. MilkDrop in fb would rox0r. biggrin.gif
bleh
I restarted work on my plugin. I'll post what I have sometime tomorrow when I'm not tired smile.gif. The problem currently really bothering me is that I can't get my plugin to disable when the Winamp visualization plugin window is closed by clicking on the close button or pressing escape, at least without also disabling my plugin when foobar stops playback.

As for trying to coordinate efforts on this, I think that for now we should consider passing code back and forth. That way, it would be less of a race, but there would be more than one person giving input on how to do things.
Chun-Yu
QUOTE(bleh @ Feb 21 2004, 12:34 AM)
As for trying to coordinate efforts on this, I think that for now we should consider passing code back and forth.  That way, it would be less of a race, but there would be more than one person giving input on how to do things.

Agreed. I'll try to help some too in this case. Right now to use MilkDrop with fb2k I wrote a little fb2k DSP and Winamp plugin combo that pipes audio from fb2k into Winamp via a Winamp input plugin. :B Combined with global fb2k hotkeys, it works "well enough" ™ but it doesn't display any song titles or anything and you can't switch songs directly from the vis plugin.
bleh
poost baleeted
Gnerma
Should I use 0.8 beta 10 or 0.7.7b to test?
bleh
Sorry, I forget to mention that. 0.8 beta 10.
Gnerma
This is awesome bleh biggrin.gif

It seems to be working okay so far. Performance is great, about 8 - 12% CPU usage on my dual. Which is equal to 16 - 24% on a single CPU system.

One problem so far.. when switching tracks by double clicking in the playlist I get this with Milkdrop v1.04b about half the time:
CODE
INFO (CORE) : opening file for playback :
INFO (CORE) : location: "file://D:\Music\Albums\808 State - Don Solaris\808 State - 04 - Azura.mp3" (0)
ERROR (foo_vis_bacon) : Unable to register window class.

2 x Athlon MP Barton 2600+ (2000mhz)
1024mb PC2700
ATI 9800 PRO
M-Audio Revolution 7.1 /w 1.0.2.6 drivers
Win2kSP4

I have not tried any other vis plugins. A promising start! laugh.gif
bleh
It seems my assumption that on_data would never be called until after on_flush was completely wrong. That makes things interesting...

I'll see if I can fix it or not.

[EDIT]: The top part of this post makes no sense. That's bad.
RedSaint
Absolutely awesome, this is what makes life worth living biggrin.gif

Keep on the good work, I hope this will turn out to be a beautiful coop project..

.. I love you milkdrop..

Haven't experienced problems so far - But I'm guessing they'll show their ugly faces sooner or later - unless I'm one of those lucky potatoes..
Skates
Works great with MilkDrop here, is it supposed to work with others yet? I placed a few different other visualizations and it wouldn't detect them as even being thete...
bleh
A) Which exact folder did you put them in?
B) By not detecting them, what do you mean? You went to the config menu and tried to change the selected plugin in the combo box, right?
Skates
Yes, it would just say that I needed to get some plug-ins. Also i found a bug, if you are playing a song and hit the random button it crashes with this error:


QUOTE
Removed Quote!


That also happens with any type of seeking of a song...
bleh
The error you are seeing was just reported by Gnerma; I have a rough idea of what's going on with it. You can edit out the crash log from your post.

However, I would like the exact paths of the directory where you're putting the plugins and the directory where you put foo_vis_bacon.dll to work on the other problem.
Gnerma
QUOTE(Skates @ Feb 21 2004, 01:55 PM)
Yes, it would just say that I needed to get some plug-ins.  Also i found a bug, if you are playing a song and hit the random button it crashes with this error:

The random button works okay for me.

Seeking give me that same...

ERROR (foo_vis_bacon) : Unable to register window class.

...fb2k error with just about the same frequency as switching tracks via double click in the playlist.

I've gotten Geiss 2 to work. AVS gives me the Winamp version error bleh mentioned earlier in the thread.

Oh BTW soundcard Revo 7.1 /w 1.0.2.6 drivers
bleh
Plugin pulled because I screwed too much up.

Reason for those who care: Race condition between my handling of on_flush and on_data. I assumed foobar would call on_flush and wait for it to return before calling on_data. It doesn't.

Skates, I'd still appreciate it if you were to answer my question about the directories because I may have b0rked something else.
kode54
QUOTE(bleh @ Feb 21 2004, 02:08 PM)
Reason for those who care:  Race condition between my handling of on_flush and on_data.  I assumed foobar would call on_flush and wait for it to return before calling on_data.  It doesn't.

I don't get how this is possible, since both are called from the main thread.
bleh
It isn't.
It was my bug.
I'm very embarassed about it.
If you need a hint about what I wasn't doing, it involves the acronym WFSO.
Yes, I'm that stupid.

[EDIT]: I fixed the seeking bug, but it'll be a little while before I repost the fixed build because I didn't realize foobar flushed all of the visualization plugins on seeks and I used to load the Winamp plugin DLL when rendering resumed after a flush. I need a little while to come up with a new time to reload the DLL, since having to restart foobar to change plugins is far from elegant.

[EDIT EDIT]: If you press Alt -> F -> S at the Post Submission page, you submit your post.
Skates
Sorry I just got back but if you goto WinAMP.com and download a visualization called Polar Eyes, and install it properly, it won't show up at all in foobar and you get the follwoing error:

QUOTE
ERROR (foo_vis_bacon) : Couldn't load DLL


Also you will find that a combo box doesn't appear that lets you specify which plug-in you want to use...All the config page is gives an error telling you that you need some WinAMP plug-ins!
bleh
Thanks, I'll look at that Polar Eyes plugin.

However, I really need to know the exact path of the directory where you're putting your Winamp plugin and your foobar2000 components directory. Here's an example taken from my system:

Plugins for foo_vis_bacon - G:\Program Files\foobar2000\bacon
foobar2000 components - G:\Program Files\foobar2000\components

Could you do that for me?
Skates
C:\Program Files\Audio Software\foobar2000\components
C:\Program Files\Audio Software\foobar2000\bacon

Are the two I use...
Skates
bleh actually it started working now, I can now select the right plug-in to use, honestly I don't know what it was...
bleh
Neither do I. Let me know if it starts happening again. I'll do some experimenting on my end and see what I can do. I still haven't quite fixed the seeking, though. Seeking twice really quickly causes problems for some reason.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.