IPB

Welcome Guest ( Log In | Register )

4 Pages V   1 2 3 > »   
Reply to this topicStart new topic
foo_controlserver, control foobar2000 over TCP/IP
bluestat
post Oct 21 2005, 18:15
Post #1





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



This is a simple plugin I wrote that controls foobar2000 over a TCP/IP connection.
The source code is included.

Please PM me any problems or irregularities.

changes in 1.0.1
- nothing major has changed; just recompiled with the latest SDK

1.0.1 (for foobar 0.9) - December 4, 2006

This post has been edited by bluestat: Dec 4 2006, 23:42
Attached thumbnail(s)
Attached Image
Attached Image
 

Attached File(s)
Attached File  foo_controlserver_1_0_1.zip ( 134.46K ) Number of downloads: 10960
 
Go to the top of the page
+Quote Post
popplynogood
post Oct 30 2005, 01:43
Post #2





Group: Members
Posts: 6
Joined: 30-October 05
Member No.: 25440



I have a simple remote client, that works off the old Telnet control server. I have been modifying it to use this newer (hopefully supported) TCP/IP version.

It works identically, which is nice, but I've noticed a small bug.

When you get the trackinfo on connect its correct, when you issue a play command the response is correct and when you issue a 'next' its also correct.

But if the player simply ends a song and starts the next, the trackinfo that is broadcast is for the OLD song that just finished, rather than the one that just started. So if you are simply monitoring what the player is doing, its always one song behind.

Can you check this please.

Also I have a crude way to enqueue a song so it starts when the current song ends. Is there a way in the SDk to implement a queue command that overrides the current playlist, but doesn't start until the current song ends? I like to have all my songs in a large single playlist that shuffles, but I want to be able to play a song as the next item on occasion.

Thanks, in advance,

Richard

This post has been edited by popplynogood: Oct 30 2005, 01:44
Go to the top of the page
+Quote Post
synth7
post Oct 30 2005, 01:48
Post #3





Group: Members
Posts: 196
Joined: 17-February 05
Member No.: 19933



I installed this...now what do I do?
Go to the top of the page
+Quote Post
foosion
post Oct 30 2005, 11:10
Post #4





Group: FB2K Moderator (Donating)
Posts: 4336
Joined: 24-February 03
Member No.: 5153



QUOTE (popplynogood @ Oct 30 2005, 02:43 AM)
Is there a way in the SDk to implement a queue command that overrides the current playlist, but doesn't start until the current song ends?
*

In 0.9 there is, but not in 0.8.3 and older.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Oct 30 2005, 14:43
Post #5





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (popplynogood @ Oct 29 2005, 04:43 PM)
I have a simple remote client, that works off the old Telnet control server. I have been modifying it to use this newer (hopefully supported) TCP/IP version.

It works identically, which is nice, but I've noticed a small bug.

When you get the trackinfo on connect its correct, when you issue a play command the response is correct and when you issue a 'next' its also correct.

But if the player simply ends a song and starts the next, the trackinfo that is broadcast is for the OLD song that just finished, rather than the one that just started. So if you are simply monitoring what the player is doing, its always one song behind.

Can you check this please.
*

popplynogood's all night flight? smile.gif (Terry Riley's piece are still a good one...)

Yes. I observed the same.

QUOTE (popplynogood @ Oct 29 2005, 04:43 PM)
Also I have a crude way to enqueue a song so it starts when the current song ends. Is there a way in the SDk to implement a queue command that overrides the current playlist, but doesn't start until the current song ends? I like to have all my songs in a large single playlist that shuffles, but I want to be able to play a song as the next item on occasion.
*

In pre 0.9 the only thing there is for enque are (slightly buggy) 3d party plugin foo_temple (newest version here).

QUOTE (synth7 @ Oct 29 2005, 04:48 PM)
I installed this...now what do I do?
*

Try telneting to port 3333 (or whatever port you set up). More info is revealed by the use of search on "foo_controlserver".


--------------------
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts
Go to the top of the page
+Quote Post
bluestat
post Oct 31 2005, 20:35
Post #6





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (popplynogood @ Oct 29 2005, 04:43 PM)
But if the player simply ends a song and starts the next, the trackinfo that is broadcast is for the OLD song that just finished, rather than the one that just started. So if you are simply monitoring what the player is doing, its always one song behind.

I cannot seem to replicate this with my current setup right now; but I will try to take a look at it.

QUOTE (Mr_Rabid_Teddybear @ Oct 30 2005, 09:43 AM)
Yes. I observed the same.

I may not post a lot but I visit the board every day. Not sure how I missed your thread tho. Your email was probably lost in my spam filter. PM's are good tho;) Do you still experience the problem with commands having to be issued multiple times? I cannot seem to duplicate that with my current setup.

This post has been edited by bluestat: Oct 31 2005, 20:39
Go to the top of the page
+Quote Post
popplynogood
post Nov 1 2005, 19:27
Post #7





Group: Members
Posts: 6
Joined: 30-October 05
Member No.: 25440



QUOTE (bluestat @ Oct 31 2005, 11:35 AM)
I cannot seem to replicate this with my current setup right now; but I will try to take a look at it.


bluestat,

I have been using the previous control server for months with my client and it has always worked fine. Its the latest version you posted a week or so ago, that is causing the incorrect song to be detailed and its ONLY when the player changes of its own accord - any time I command it to play a track or go to the next track, its the correct song that gets reported.

I wonder if its a timing issue - it looks like the code for handling a trackinfo request from the user is pretty much identical to the handletrackupdate, which is initiated by the player message. Is it possible that you get the trackupdate message and execute the get_now_playing() request so quickly that the player hasn't updated that info yet. If I issue a 'trackinfo' request a second after I see the incorrect track update, I get the correct info - so the code seems to work OK, except in that circumstance. My other machine is slower, so maybe its that, or maybe the previous version did more before it got around to executing that now_playing request? Just my thoughts...


Hope this helps,
Richard

This post has been edited by popplynogood: Nov 1 2005, 20:03
Go to the top of the page
+Quote Post
bluestat
post Nov 1 2005, 22:35
Post #8





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (popplynogood @ Nov 1 2005, 02:27 PM)
I wonder if its a timing issue - it looks like the code for handling a trackinfo request from the user is pretty much identical to the handletrackupdate, which is initiated by the player message. Is it possible that you get the trackupdate message and execute the get_now_playing() request so quickly that the player hasn't updated that info yet. If I issue a 'trackinfo' request a second after I see the incorrect track update, I get the correct info - so the code seems to work OK, except in that circumstance. My other machine is slower, so maybe its that, or maybe the previous version did more before it got around to executing that now_playing request? Just my thoughts...
*


Thanks for the detailed symptoms, that should give me a good run at it!
Go to the top of the page
+Quote Post
Mr_Rabid_Teddybe...
post Nov 2 2005, 17:04
Post #9





Group: Members
Posts: 1197
Joined: 3-September 03
From: Bergen, Norway
Member No.: 8667



QUOTE (bluestat @ Oct 31 2005, 11:35 AM)
I may not post a lot but I visit the board every day. Not sure how I missed your thread tho. Your email was probably lost in my spam filter. PM's are good tho;) Do you still experience the problem with commands having to be issued multiple times? I cannot seem to duplicate that with my current setup.
*

Right now I'm not using it that much, but I probably will again later. However, I've been using Putty for interfacing with foo_controlserver, and it seems (as mention otherplace in that thread) that unchecking "Return key sends telnet New Line instead of ^M" in Puttys settings under "Telnet" reduces this problem to a minimum.....


--------------------
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts
Go to the top of the page
+Quote Post
TZOTZIOY
post Nov 11 2005, 00:20
Post #10





Group: Members
Posts: 18
Joined: 4-October 01
From: original Athens
Member No.: 198



QUOTE (popplynogood @ Oct 30 2005, 03:43 AM)
But if the player simply ends a song and starts the next, the trackinfo that is broadcast is for the OLD song that just finished, rather than the one that just started. So if you are simply monitoring what the player is doing, its always one song behind.


This is verified on my machine too, but there is a way to circumvent this (while the bug exists).

Any reply that comes from a command you issue, starts with the code '112', while notifications on track change start with '111', so whenever you get a '111' just issue a 'trackinfo' command for the correct info. This is what I did in my own song attribute manager (think matching songs a la www.last.fm tags or www.pandora.com). Another bug is that not all track changes are reported...

foo_controlserver was what I really needed to finally drop winamp (its winampcom was the last reason to still use it with my app).
Go to the top of the page
+Quote Post
bluestat
post Mar 21 2006, 22:22
Post #11





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



I have almost finished updating this with the new 0.9 SDK; however I would like someone to help test it before I post it. If anyone would like to please send me a PM. I believe I may have fixed some of the previous irregularities reported.

Thanks!

This post has been edited by bluestat: Mar 21 2006, 23:17
Go to the top of the page
+Quote Post
Hamallainen
post Mar 25 2006, 01:48
Post #12





Group: Members
Posts: 226
Joined: 1-April 04
Member No.: 13171



QUOTE (bluestat @ Mar 21 2006, 10:22 PM)
I have almost finished updating this with the new 0.9 SDK; however I would like someone to help test it before I post it. If anyone would like to please send me a PM. I believe I may have fixed some of the previous irregularities reported.
*


Thanks a lot for porting this component for 0.9 smile.gif

I ve just quickly tried the new version and of course i have some questions/bug reports/features requets wink.gif sorry

question:
Did you definitively removed the commands "order" & "order type" or will they be back in a next version ?


bug:
I have a problem with the trackinfo command, it keeps displaying the first track played

ie: i start playing song#1
-> in the console it displays "song#1"
then i type the command "next"
-> song#2 plays
-> in the console if i type "trackinfo" it displays "song#1"
and so on , i can type "next" or "prev" 10 times, it will still displays "song#1"

now if i go back to foobar and double click on song#4, the "trackinfo" command will always display "song#4"

i dont know if i m clear unsure.gif

feature request:
Is it possible to add the command "playlist" which would display all playlists names (with a number) and the command "playlist #" to switch to the playlist number # (found with the command requested just before)

EDIT: Damn me, i m sorry , i had not read the first post of this topic which answers most of the question i asked

This post has been edited by Hamallainen: Mar 25 2006, 02:05
Go to the top of the page
+Quote Post
bluestat
post Mar 25 2006, 02:08
Post #13





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (Hamallainen @ Mar 24 2006, 08:48 PM)
Did you definitively removed the commands "order" & "order type" or will they be back in a next version ?

These should be back once I figure out how to do it in the new SDK.

QUOTE (Hamallainen @ Mar 24 2006, 08:48 PM)
I have a problem with the trackinfo command, it keeps displaying the first track played

Could you please PM me a detailed scenario of this, it could probably happen;) ie. right from starting foobar, to how you started playing the song etc. I was unable to reproduce as I tested quickly, thanks!

QUOTE (Hamallainen @ Mar 24 2006, 08:48 PM)
Is it possible to add the command "playlist" which would display all playlists names (with a number) and the command "playlist #" to switch to the playlist number # (found with the command requested just before)

I plan to do that in the future yep!

This post has been edited by bluestat: Mar 25 2006, 02:08
Go to the top of the page
+Quote Post
bluestat
post Mar 25 2006, 05:35
Post #14





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



Found the problem with trackinfo command mentioned above. Please enable "cursor follows playback" until I can sort out a fix. Thanks Hamallainen!

This post has been edited by bluestat: Mar 25 2006, 06:03
Go to the top of the page
+Quote Post
bluestat
post Mar 25 2006, 17:38
Post #15





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (bluestat @ Mar 25 2006, 12:35 AM)
Found the problem with trackinfo command mentioned above.  Please enable "cursor follows playback" until I can sort out a fix. Thanks Hamallainen!
*

Fixed this; however now if the same track is repeated in a playlist foo_controlserver will display the playlist index of the first one it encounters (when it could be a latter index it is playing) Oh la la! Maybe we should just get rid of it displaying the playlist index for the track! If anyone has any ideas I am all ears;)

This post has been edited by bluestat: Mar 25 2006, 17:38
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 26 2006, 22:17
Post #16





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



How about parsing the playlist and creating an internal number for yourself, and treating the external (playlist number) as the same type of data as the rest?

On a side note, is it possible to change playlists with this?
Go to the top of the page
+Quote Post
bluestat
post Mar 28 2006, 00:59
Post #17





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (Shade[ST] @ Mar 26 2006, 05:17 PM)
How about parsing the playlist and creating an internal number for yourself, and treating the external (playlist number) as the same type of data as the rest?

On a side note, is it possible to change playlists with this?
*


Uploaded a new version today that supports playlists. Probably some issues with it;) Please PM me if you find them!
Go to the top of the page
+Quote Post
anissina
post Mar 30 2006, 08:36
Post #18





Group: Members
Posts: 7
Joined: 28-March 06
Member No.: 28908



I've been using foo_controlserver together with icecast and oddcast, and I absolutely love it (^^)

However, it would be quite nice if someone took the time to implement a few more features into the controlserver, especially to be able to edit metatags.

e.g. edittag <field> <content> [<playlist_number> <item_number>]

if <playlist_number> is left out it uses the current playlist
if <item_number> is left out it uses the track currently playing

not to mention seeking

e.g. seek <direction> <seconds>
f = forward
b = back

...just a thought (^^)

This post has been edited by anissina: Mar 30 2006, 10:10
Go to the top of the page
+Quote Post
bluestat
post Mar 30 2006, 16:25
Post #19





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (anissina @ Mar 30 2006, 03:36 AM)
not to mention seeking

e.g. seek <direction> <seconds>
    f = forward
    b = back

...just a thought (^^)
*


Just uploaded a new version that has seeking support, thanks.

This post has been edited by bluestat: Mar 30 2006, 21:54
Go to the top of the page
+Quote Post
Shade[ST]
post Mar 31 2006, 01:53
Post #20





Group: Members
Posts: 1189
Joined: 19-May 05
From: Montreal, Canada
Member No.: 22144



Another thing to add : Searching for strings (currently, searching a text with spaces doesn't work...)

Maybe detect if you have quotation marks (" ") and parse that as a string?

I'm not sure, also, but I don't know what codepage your plugin uses, for treating text... : If I want to have accented characters ("", "", etc...), I can't currently search for them with the default telnet client.


Also, I wanted to make a gui for your plugin, (In Java, so that it's easily portable), and was wondering how I can connect, etc.

Can anyone with java / telnet experience PM me, or offer me a guide to how to do this?

Thanks.
Go to the top of the page
+Quote Post
TZOTZIOY
post Apr 4 2006, 14:05
Post #21





Group: Members
Posts: 18
Joined: 4-October 01
From: original Athens
Member No.: 198



QUOTE (Shade[ST] @ Mar 31 2006, 02:53 AM)
I'm not sure, also, but I don't know what codepage your plugin uses, for treating text... : If I want to have accented characters ("", "", etc...), I can't currently search for them with the default telnet client.

*

I believe the encoding used is UTF-8, so basically all the unicode range is supported (not only iso8859-1 characters, but even chinese, japanese etc)
Go to the top of the page
+Quote Post
bluestat
post Apr 4 2006, 15:18
Post #22





Group: Members (Donating)
Posts: 33
Joined: 10-July 03
Member No.: 7694



QUOTE (Shade[ST] @ Mar 30 2006, 08:53 PM)
Another thing to add : Searching for strings (currently, searching a text with spaces doesn't work...)

Maybe detect if you have quotation marks (" ") and parse that as a string?

I'm not sure, also, but I don't know what codepage your plugin uses, for treating text... : If I want to have accented characters ("", "", etc...), I can't currently search for them with the default telnet client.

*


Sorry; bit slow response. Searching is limited to 'one word' right now but I could look at doing more. For output you can toggle between/utf8 and lower ascii however for input everything is stripped to lower ascii so searching for accented characters is not working at the moment. I plan on fixing this. They are replaced by ? now on input.
Go to the top of the page
+Quote Post
Cradle22
post Apr 6 2006, 12:10
Post #23





Group: Members
Posts: 7
Joined: 2-February 05
Member No.: 19534



Hi!

I've just experimented with the source of latest version, mostly trying to implement a proper playlist-index-handling.

The author of this component is right, so far I have not been able to get the list_index for the currently playing item. I tried getting the playlist-titleformat for the currently playing item, but playback_format_title also does not see the correct number, as the list_index is being rendered as "?"...

Since the list_index value is being displayed correctly inside the playlist, I can only assume that somehow all index / selection / focus values do not work outside the playlistwindow.

Maybe I will also post a new topic concerning this issue, since for my purposes (using foo_controlserver or anything else) Foobar2000 0.9 is not usable if my program is not able to get the correct list_index (if the playlist has more than one entry of a song).

Bye,

Arndt
Go to the top of the page
+Quote Post
Byan
post Apr 7 2006, 19:36
Post #24





Group: Members
Posts: 24
Joined: 26-October 05
Member No.: 25372



it would be nice if you could change playlists ect.

basically-

ListPlaylist
would return the list of playlists, with numbers infront of them

Playlist N
would change the playlist to whichever one is number N; if called without a argument, it would return the current playlist

I don't really have a use for this atm, but when I do I guess I could just add this myself, shouldn't be too hard...
Go to the top of the page
+Quote Post
phyber
post Apr 12 2006, 03:28
Post #25





Group: Members
Posts: 1
Joined: 12-April 06
Member No.: 29427



I'm trying to write a perl script to control foobar2000/show info on playing MP3, etc from another computer.
The showing the info part is proving quite difficult since at the moment you just drop fields out of the returned line if the specific info doesn't exist in the file that's playing.

For example, you might get
CODE
111|1|14547|0.00|MP3|192|303.57|Q-Strange|Creation to ExeQtion|0|Other|15|Eternal Bliss|

from the server.
Then you listen to the next track and get:
CODE
111|1|16134|0.00|MP3|192|415.92|Squarepusher|Ultravisitor|2004|Dance|Iambic 9 Poetry|

Notice that the field where the track number should be has been completly dropped instead of just being left blank.
This makes it really difficult to write a script based on this plugins output.

If you could, it would be nice if you left in blank fields, for example, that last track should appear as:
CODE
111|1|16134|0.00|MP3|192|415.92|Squarepusher|Ultravisitor|2004|Dance||Iambic 9 Poetry|

This makes it parsable.

Thanks.
(If an option to leave these blank fields in already exists, please point it out to me, it's 3AM and i couldn't find it when I was looking).
Go to the top of the page
+Quote Post

4 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 17:24