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: COM Automation Server for 0.9 (Read 592814 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

COM Automation Server for 0.9

Reply #150
querying presets, modifying states (DSP), assigning actions...

I'm not sure if I put right words there, but here is real example:

I wanted to script automatic audiotag.info retreival information about current track i.e. so I need to use converter to make 15 sec sample from the track then sent it there. As only option is to use foobar command line assuming right converter preset exists seemed not very comfortable, and thinking about it I thought it would be nice idea which would open other fine possibilities.

COM Automation Server for 0.9

Reply #151
OK. Changing DSP settings is possible.

But e.g. the Converter doesn't provide any programatic ways to manage the presets nor control its other behavior, except running a preset command on some tracks, naturally.
Full-quoting makes you scroll past the same junk over and over.

COM Automation Server for 0.9

Reply #152
thanks for clearance, didn't know that converter is so closed (not that it's options are ever changing AFAIK, but there must be some reason)

COM Automation Server for 0.9

Reply #153
(not that it's options are ever changing AFAIK, but there must be some reason)
I can image a few reasons actually. Providing programmatic access to a component takes effort. You have to design, document and implement an interface, and unless you are willing to annoy other developers you will be stuck with it for quite some time once you have released it. Changing it would force everyone who uses it to change their own code.

Also, this project is now officially on hiatus. Indefinitely. It has always been (one of) the most time consuming component projects I have ever started. The reasons are twofold. Firstly, COM programming in C++ is neither fun nor easy. Secondly, testing the compatibility with various client languages (among others: Visual Basic 6, C#, Python, Lua, PowerShell) has taken me a lot of time.

Nevertheless I am not going to just post the source on the web and hope that someone will come and pick it up. If someone is interested in maintaining this component, they should contact me. Below is a short list of things they should have experience with (or at least they should not be scared of them ):
  • Implementing COM objects in C++ with ATL.
  • Versioning of COM interfaces.
  • Implementing foobar2000 components.
  • Implementing a COM server in a DLL that is started by running an EXE you do not control.
  • Installing COM libraries.

Furthermore I am only looking for people who are committed to maintaining the component for the foreseeable future, lets says for six months at the very least. I am not fond of code-and-run tactics where someone adds their favorite feature and three bugs to a component and then vanishes to never be seen again.

I hope the above does not sound too demanding.

COM Automation Server for 0.9

Reply #154
I am loving this. Thanks!!!

COM Automation Server for 0.9

Reply #155
So it's status-quo for foobar COM component... pity

It seems to me that Playlist interface doesn't have method for selected tracks, or is there a way to get selected tracks somehow

COM Automation Server for 0.9

Reply #156
Playback.Start(bPaused) starts the current track always in paused mode, regardless of the value of the bPaused flag.

Issuing Pause() right after Start() works, but it's strange!

Is it a known bug?
Or maybe I don't understand how to use the flag?

COM Automation Server for 0.9

Reply #157
Hello There,

If have followed this forum quite a while now before deciding to add a comment. Over the years people have asked several times for an active queuelist track enqueue and dequeue options in com_server2.dll. Sofar I did not see any solution that would address this wanted feature. Any chance this will be added to the com_server2 COm object? If not, is there a work around for adding removing tracks to/from the active foobar tracklist remotely? (not by commandline)?
Thanks....

COM Automation Server for 0.9

Reply #158
Hello,

is there meanwhile a way to get the current playing song info with help of PHP?
Any Example?

COM Automation Server for 0.9

Reply #159
Maybe this LinqPad example will be of interest to some: https://gist.github.com/10009197

So with less then 40 lines of code, current playing track is identified by web service, then sent for similarity lookup and finally result matched to user library and presented in accessible interface:



Results in result pane can be comprehended as kind of live playlist - clicking on a track link start track playback.

For this example to work user would need to reference foobar Interop assembly (generated from comserver2 dll) and echonest api key.
Echonest is just a familiar example, which is hopefully enough to show interesting possibilities for other services or even interconnecting multiple services in friendly interface...

COM Automation Server for 0.9

Reply #160
when using the Foobar Query Syntax in the searchbar the command "artist IS Motorhead" returns everything "Motorhead" aswell as "Motörhead"
unfortunately using COM Automation Server for the same thing just returns the exactly same string.

does anyone know a way around this?

COM Automation Server for 0.9

Reply #161
Maybe this LinqPad example will be of interest to some: https://gist.github.com/10009197

So with less then 40 lines of code, current playing track is identified by web service, then sent for similarity lookup and finally result matched to user library and presented in accessible interface:



Results in result pane can be comprehended as kind of live playlist - clicking on a track link start track playback.

For this example to work user would need to reference foobar Interop assembly (generated from comserver2 dll) and echonest api key.
Echonest is just a familiar example, which is hopefully enough to show interesting possibilities for other services or even interconnecting multiple services in friendly interface...

Can you provide instructions to set this up please??

COM Automation Server for 0.9

Reply #162
Any way we can either get the source or get it updated. FB 1.3.6 is crashing like mad. Half the time it works part of the time. Change some little thing and it causes FB to crash. I realize you don't want to release the source code for good reasons, but a better reason is that, at least if it is out there, someone can work on it. If you store it away then it will never get anywhere unless someone decides to take up the challenge. At the very least, you could put it up on Github and maintain it there. This will solve both problems. (you can maintain the official version and only accept pushes to it that you want)

In any case, here is the foobar stack trace dump of the most recent crash.

Address: 764C4B32h (KERNELBASE+14B32h), symbol: "RaiseException" (+49h)
Address: 00C7CEDDh (foobar2000+2CEDDh)
Address: 00CBAA41h (foobar2000+6AA41h)
Address: 00C75D9Dh (foobar2000+25D9Dh)
Address: 10006F1Ch (foo_comserver2+6F1Ch), symbol: "foobar2000_get_interface" (+5DACh)
Address: 1000A7E5h (foo_comserver2+A7E5h), symbol: "foobar2000_get_interface" (+9675h)
Address: 740A2775h (shared+2775h), symbol: "uBugCheck" (+20h)
Address: 740B9168h (shared+19168h), symbol: "CreateFileAbortable" (+E6E9h)
Address: 740BF810h (shared+1F810h), symbol: "CreateFileAbortable" (+14D91h)
Address: 00CD2631h (foobar2000+82631h)
Address: 76C54802h (RPCRT4+14802h), symbol: "RpcImpersonateClient" (+124h)
Address: 00D81976h (foobar2000+131976h)
Address: 1001752Ch (foo_comserver2+1752Ch), symbol: "foobar2000_get_interface" (+163BCh)
Address: 71FDF6ECh (foo_input_std+F6ECh)
Address: 1001F008h (foo_comserver2+1F008h), symbol: "foobar2000_get_interface" (+1DE98h)
Address: 00DCE4D0h (foobar2000+17E4D0h)
Address: 1002EDD8h (foo_comserver2+2EDD8h), symbol: "foobar2000_get_interface" (+2DC68h)
Address: 1000D34Fh (foo_comserver2+D34Fh), symbol: "foobar2000_get_interface" (+C1DFh)
Address: 71FDF61Ch (foo_input_std+F61Ch)
Address: 1002E160h (foo_comserver2+2E160h), symbol: "foobar2000_get_interface" (+2CFF0h)
Address: 1000D4B1h (foo_comserver2+D4B1h), symbol: "foobar2000_get_interface" (+C341h)
Address: 1000D55Ah (foo_comserver2+D55Ah), symbol: "foobar2000_get_interface" (+C3EAh)
Address: 76C5E980h (RPCRT4+1E980h), symbol: "NdrServerInitialize" (+413h)
Address: 76CDADE1h (RPCRT4+9ADE1h), symbol: "NdrStubCall2" (+2A4h)
Address: 1000D550h (foo_comserver2+D550h), symbol: "foobar2000_get_interface" (+C3E0h)
Address: 76840629h (combase+10629h), symbol: "DcomChannelSetHResult" (+6CCh)
Address: 768405E2h (combase+105E2h), symbol: "DcomChannelSetHResult" (+685h)
Address: 10032024h (foo_comserver2+32024h), symbol: "foobar2000_get_interface" (+30EB4h)
....

 

COM Automation Server for 0.9

Reply #163
BTW, there doesn't seem to be any way to get information about the currently playing or selected track or to select specific tracks to play(we can do next, previous, etc... but not select, say, the first track of the playlist)?

I think the reason why it is crashing is that when changing the active playlist you have to select a song. If you start foobar up and change the active playlist (application.Playlists.ActivePlaylist = p), then try to play foobar using application.Playback.Start, it will crash.
As long as I change the active playlist at least once in foobar or my app(it is synchronized), then foobar doesn't crash. (If I uncomment the playback.start, it also doesn't crash)

My guess is that the bug is either with foobar trying to play a song that doesn't exist or comserver trying to force foobar to play such a song. (If we had a way to set the first song of the playlist, this would probably solve it) I can't even seem to find a way to get the current playing song's title, which I could use to compare to the tracks and find it's location.

So, even just selecting the track I want to play prevents the crash. I guess trying to play foobar through the com automation (application.Playback.Start) will cause foobar to crash if a track isn't selected.... yet there seems to be no way to select a track!!

COM Automation Server for 0.9

Reply #164
Does anyone have any information about this tool?  I've installed it and there is literally no information about it. FB2K says it's not running and I have no idea how to start it up. I just want to use the Album Art Downloader and I'm beyond frustrated.  ANY documentation would be great and I don't mean the "copy the dll to your foobar components folder" "documentation".

Thanks,

rocket

COM Automation Server for 0.9

Reply #165
Can you provide instructions to set this up please??


I would guess it's self-explainable, but maybe you have problem with generating assembly?
One way to generate assembly is to use TlbImp utility that comes with Windows sdk:

Code: [Select]
tlbimp foo_comserver2.dll /out:C:\Temp\Interop.Foobar2000.dll /namespace:Foobar2000

I was using assembly implicitly generated by Visual Studio.

Now if you paste to code linked in upper post in LinqPad, you press F4 and browse for this assembly. Then in the "Additional namespace import" tab, select "Pick from assembly" link and add the "Foobar2000" namespace.
You'll also need echonest api key, which you paste in Password manager (Linqpad > File > Password Manager) and name it as "api.echonest" so that you won't have to edit pasted code.

Then just play some song in foobar and hit play in Linqpad (or F5), and it will generate interactive playlist with similar songs (from your library) just in seconds.

Hope this helps, otherwise fell free to ask if you have further problems.

COM Automation Server for 0.9

Reply #166
Can you provide instructions to set this up please??


I would guess it's self-explainable, but maybe you have problem with generating assembly?
One way to generate assembly is to use TlbImp utility that comes with Windows sdk:

Code: [Select]
tlbimp foo_comserver2.dll /out:C:\Temp\Interop.Foobar2000.dll /namespace:Foobar2000

I was using assembly implicitly generated by Visual Studio.

Now if you paste to code linked in upper post in LinqPad, you press F4 and browse for this assembly. Then in the "Additional namespace import" tab, select "Pick from assembly" link and add the "Foobar2000" namespace.
You'll also need echonest api key, which you paste in Password manager (Linqpad > File > Password Manager) and name it as "api.echonest" so that you won't have to edit pasted code.

Then just play some song in foobar and hit play in Linqpad (or F5), and it will generate interactive playlist with similar songs (from your library) just in seconds.

Hope this helps, otherwise fell free to ask if you have further problems.


It probably is self-explanatory if you have some experience with the tool but I don't.  I know this thing works.  There are people all over the site using it with AAD and somewhere there HAS to be a document that says "go here, click that, type the other and hit OK.  If someone could screenshot their config at least I could take a look and see what is actually being done. 

In this post you mention a "problem with generating assembly".  I don't even know what "assembly" means in this context, I'm guessing it's some kind of code construct but that's a WAG.  Could be that this setup requires a skill level that I don't have, or I may just be a dumb-ass. If that's the case, then please, please, have mercy on the dumb-ass. 

Thanks,

rocket

COM Automation Server for 0.9

Reply #167
I imagine you made to the point of installing this component which indeed is not trivial. But if someone wishes to program foobar the easy way, they have to make that step which comserver installer anyways does smoothly.

If your only problem is AAD then I suggest you open new thread with title describing the problem so that also others could learn and more people will reply. I can't help you as I don't use AAD, but I guess you want to automate cover download for your whole library...

As far as this component is concerned, I as many before feel frustrated with limited options provided by comserver, and one most obvious frustration is that you can't get selected track nor do anything useful with playlist, but just use media library search and the likes...
But I'm not to judge com developer that brings the cookies, as I have very little knowledge about it and everything I've seen about com programming seems unnecessarily complicated, leading me to the thought that it must be done by program developer or not at all, but hardly will anyone take this component to next level

COM Automation Server for 0.9

Reply #168
I'd just like to say, that this component is really really useful for what I do. In a few weeks I will make my work pubilc, which is a script to do unidirectional sync (copy/convert by rules) of selected library items and playlists to different targets (usb-devices, folders) in a very flexible way.

Thats why I'd like to encourage to keep this component alive!

COM Automation Server for 0.9

Reply #169
I used the COM Automation Server successfully to create a script, that can synchronize chosen playlists and medialibrary items to USB-players and folder locations.
Because it's a VBscript, someone may find it interesting to look at the code.

Code and Wiki is here,
discussion thread for users is here.

Re: COM Automation Server for 0.9

Reply #170
Hi there,
I am not able to uninstall Com Automation Server from foobar (it's grayed-out) and it's not in my list of installed software (Windows 10). Can anybody help?

Thanks

Re: COM Automation Server for 0.9

Reply #171
Hi there,
I am not able to uninstall Com Automation Server from foobar (it's grayed-out) and it's not in my list of installed software (Windows 10). Can anybody help?

Thanks

Nevermind, just found its uninstaller under: "C:\Program Files (x86)\foobar2000". See you.