![]() |
#1 |
Junior Member
Join Date: Jul 2013
Posts: 3
|
Feasibility Check
Hey, I'm a long time Winamp user, and I'm a developer by trade (but I haven't touched C++ in years, and only then in school), but I've not attempted to write a plugin previously.
I'm posting here to get feedback regarding the feasibility of what I'd like to accomplish with a plugin, and I'm hoping someone can point me in the right direction. I've been experimenting with a Philips Hue LED starter kit, which are programmable LEDs controlled with a basic REST API. I've attempted to get a halfway decent system rigged up to make them change color in reaction to detected beat events in music, with mixed success. I had a basic HTML5 "media player" app set up, doing beat detection in javascript, but the interface is super clunky, and doesn't provide a good "party" vibe since it requires a lot of manual intervention. I'd like to implement this functionality within winamp, as it already has excellent playlist, shuffle, visualization, etc. support. What I've not been able to get a good handle on so far is what type of plugin this would be considered. I realize it's not a visualization, per se, but it sort of seems to be that it fits what a visualization does. Anyways, if anyone out there can give me a few quick tips, it'd be appreciated. I have 5.55 SDK and I'm in the process of dusting off my C++ books to try to make some sense of it. If you need any more info about what I'm planning, please let me know! |
![]() |
![]() |
![]() |
#2 |
Forum King
|
I would agree. I've never done up a vis plugin but I've taken a cursory look at the API (about a year ago) and it does seem to be the most suitable for this project.
|
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jul 2013
Posts: 3
|
Thanks for pointing me in the right direction! Any chance you have any tips about the best place for me to track down the visualization plugin API? The SDK doesn't seem to include any visualization examples (unless I'm just looking in the wrong spot).
|
![]() |
![]() |
![]() |
#4 | |
Forum King
|
Quote:
Example: None You'll probably have to learn the dynamics of Input plugins to figure out the dynamics although the API seems fairly straight forward. Just take a whack at it and if you have any problems, post back. |
|
![]() |
![]() |
![]() |
#5 |
Join Date: Sep 2003
Posts: 27,873
|
there was a simple vis plug-in in the sdk (unless it was removed since i last looked) otherwise you'd have to look at the milkdrop / avs source code. and api documentation has historically been crap and mainly based on looking at working plug-ins.
though i'd probably go with a general purpose plug-in as that makes it a lot easier to access things compared to the variable loading which a vis plug-in is subject to. plus if you need audio data to process, then the general purpose plug-ins can get a small sample of it (is what the modern skin engine does) which can be found in wa_ipc.h. |
![]() |
![]() |
![]() |
#6 | ||
Forum King
|
Quote:
Quote:
For the dynamic loading issue, I conjured a Windows API hack, have the plugin LoadLibrary(W) itself on the first load to increase the loaded library ref count. That way when Winamp calls FreeLibrary the OS doesn't remove the library from Winamp's address space, which then means you can /class windows and retain persistent data. Only problem with this hack is that the library has to remain loaded (even if you don't /class) for the remainder of the Winamp instance life-span since a library unloading itself will cause problems (calling FreeLibrary inside the library code itself will basically "free" the library code before the call to FreeLibrary returns rending the current execution state invalid (very not good.)) |
||
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Jul 2013
Posts: 3
|
I think right now my plan will be to bundle bass.dll and bass_fx.dll to do the beat detection and stuff, but I'm really still in the planning / design stages at this point.
I've got a basic visualization plugin loading now, and I can see that it's responding to the init and config events. My next issue will be getting a library working to send the HTTP requests out to the Hue bridge. Do you guys have any suggestions for a decent library for that? As I mentioned before, I have basically zero C/C++ experience. |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Aug 2013
Posts: 1
|
Hello,
I am a user of Philips Hue system and your project light in time with the music greatly interested me. Unfortunately I do not know programming, but if you need a tester or if your project is completed ... I'm leaving. Hoping that the project is still valid. Thank you in advance and good luck ![]() |
![]() |
![]() |
![]() |
|
Tags |
hue, visualization |
Thread Tools | Search this Thread |
Display Modes | |
|
|